# Slouží k úpravě výstupního formátu štítku

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /shipment/batch/{batchId}:
    put:
      summary: Slouží k úpravě výstupního formátu štítku
      deprecated: false
      description: >-
        ## Význam a použití

        Pomocí této metody lze měnit formát štítku a to zadáním upraveného
        labelSettings objektu z metody [POST
        shipment/batch](https://ppl-cpl-api.apidog.io/vytvo%C5%99en%C3%AD-z%C3%A1silky-13465914e0).


        ## Optimalizace získávání štítků


        Pro zpracování velkého množství štítků (např. tisk na formát A4) je
        proces výpočetně náročný. Proto je pro tisk štítků implementována cache.


        - Nad A4 to je 5 minut

        - Pro jednoduché štítky 60 s.


        Proto pokud chcete zpracování štítků po zavolání metody **PUT** výrazně
        urychlit, doporučujeme místo opakovaného volání metody [GET
        shipment/batch/{batchId}/label](https://ppl-cpl-api.apidog.io/z%C3%ADsk%C3%A1n%C3%AD-etikety-13465917e0)
        použít metodu [data](https://ppl-cpl-api.apidog.io/data-13465905e0),
        která vrací štítky pro jednotlivé zásilky a je zde nastavena cache na
        1s.


        ### Výhody metody data


        - Metoda je dostupná v response body volání [GET
        shipment/batch/{batchId}](https://ppl-cpl-api.apidog.io/z%C3%ADsk%C3%A1n%C3%AD-stavu-importu-z%C3%A1silky-13465916e0)
        jako hodnota klíče labelUrl.


        - Při konverzi do formátu ZPL se přímo vrací ZPL, takže není nutné
        převádět Base64 → ZPL, jako je tomu u metody label.


        ### Nevýhody metody data


        - Vrací pouze jednotlivý štítek. Pokud budete mít v
        GET/shipment/batch/batchId více zásilek budete muset metodu zavolat pro
        každou zásilku zvlášť


        - Vrací štítek pouze ve formátu default to znamená, že pokud budete
        metodou **PUT** měnit pouze pozici štítku (např z default na A4), tak
        tuto metodu nepoužívejte.


        ### Doporučený postup


        1. Zavolejte metodu PUT pro vytvoření nebo aktualizaci batch.


        2. Zavolejte GET shipment/batch/{batchId}.


        - V odpovědi je k dispozici nový **dataGUID** v metodě **data** viz
        obrázek.


        ![image.png](https://api.apidog.com/api/v1/projects/796227/resources/361277/image-preview)

        - Tento identifikátor se mění po každém volání metody PUT.


        - Můžete buď:
            - porovnat nový GUID s předchozím (pokud si ho ukládáte), nebo

            - nastavit minimální prodlevu mezi metodami PUT a GET.

        3.  Zavolejte metodu data s novým GUID pro získání štítku kde bude
        aktualizovaný formát.
      operationId: UpdateShipmentBatch
      tags:
        - API Metody/ShipmentBatch
        - ShipmentBatch
      parameters:
        - name: batchId
          in: path
          description: batch id z metody POST shipment/batch
          required: true
          example: ''
          schema:
            type: string
            format: uuid
        - name: Accept-Language
          in: header
          description: 'Language specification, default language: cs-CZ'
          required: false
          example: ''
          schema:
            $ref: '#/components/schemas/AcceptLanguageSchema'
        - name: X-Correlation-ID
          in: header
          description: Correlation Id of request
          required: false
          example: ''
          schema:
            $ref: '#/components/schemas/XCorrelationIdSchema'
        - name: X-LogLevel
          in: header
          description: The forced log level
          required: false
          example: ''
          schema:
            $ref: '#/components/schemas/XLogLevelSchema'
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Eps.Api.MyApi2.Web.Models.ShipmentBatch.UpdateShipmentBatchModel
            example:
              labelSettings:
                format: Pdf
                completeLabelSettings:
                  isCompleteLabelRequested: true
                  pageSize: A4
      responses:
        '204':
          description: No Content
          content:
            application/json:
              schema:
                type: object
                properties: {}
                x-apidog-orders: []
                x-apidog-ignore-properties: []
          headers:
            X-Correlation-ID:
              description: Correlation Id of request otherwise id of response
              schema:
                $ref: '#/components/schemas/XCorrelationIdSchema'
          x-apidog-name: No Content
        '400':
          description: BadRequest
          content:
            application/problem+json:
              schema:
                type: object
                properties: {}
                x-apidog-orders: []
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: Bad Request
        '500':
          description: InternalServerError
          content:
            application/problem+json:
              schema:
                type: object
                properties: {}
                x-apidog-orders: []
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: Server Error
        '503':
          description: ServiceUnavailable
          content:
            application/problem+json:
              schema:
                type: object
                properties: {}
                x-apidog-orders: []
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: Service Unavailable
      security: []
      x-apidog-folder: API Metody/ShipmentBatch
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/796227/apis/api-13465915-run
components:
  schemas:
    AcceptLanguageSchema:
      type: string
      description: Accept-Language header schema
      x-apidog-folder: ''
    XCorrelationIdSchema:
      type: string
      description: X-Correlation-ID header schema
      x-apidog-folder: ''
    XLogLevelSchema:
      enum:
        - Trace
        - Debug
        - Information
        - Warning
        - Error
        - Critical
      type: string
      description: X-LogLevel header schema
      x-apidog-folder: ''
    Eps.Api.MyApi2.Web.Models.ShipmentBatch.UpdateShipmentBatchModel:
      required:
        - labelSettings
      type: object
      properties:
        returnChannel:
          oneOf:
            - $ref: >-
                #/components/schemas/Eps.Api.MyApi2.Web.Models.ShipmentBatch.ReturnChannelModel
            - &ref_0
              $ref: '#/components/schemas/EmptyNullableObject'
        labelSettings:
          $ref: >-
            #/components/schemas/Eps.Api.MyApi2.Web.Models.ShipmentBatch.LabelSettingsModel
      additionalProperties: false
      description: UpdateShipmentBatchModel
      x-apidog-orders:
        - returnChannel
        - labelSettings
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Eps.Api.MyApi2.Web.Models.ShipmentBatch.LabelSettingsModel:
      type: object
      properties:
        format:
          $ref: '#/components/schemas/Eps.Api.MyApi2.Web.Constants.ConstLabelFormat'
        dpi:
          maximum: 1200
          minimum: 203
          type: integer
          description: Volba DPI pro ZPL
          format: int32
          nullable: true
        completeLabelSettings:
          oneOf:
            - $ref: >-
                #/components/schemas/Eps.Api.MyApi2.Web.Models.ShipmentBatch.CompleteLabelSettingsModel
            - *ref_0
      additionalProperties: false
      description: LabelSettingsModel
      x-apidog-orders:
        - format
        - dpi
        - completeLabelSettings
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Eps.Api.MyApi2.Web.Models.ShipmentBatch.CompleteLabelSettingsModel:
      type: object
      properties:
        isCompleteLabelRequested:
          type: boolean
          description: IsCompleteLabelRequested
        pageSize:
          $ref: '#/components/schemas/Eps.Api.MyApi2.Business.Enums.ConstPageSize'
        position:
          maximum: 4
          minimum: 1
          type: integer
          description: Position
          format: int32
          nullable: true
      additionalProperties: false
      description: CompleteLabelSettingsModel
      x-apidog-orders:
        - isCompleteLabelRequested
        - pageSize
        - position
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Eps.Api.MyApi2.Business.Enums.ConstPageSize:
      enum:
        - Default
        - A4
      type: string
      x-apidog-folder: ''
    Eps.Api.MyApi2.Web.Constants.ConstLabelFormat:
      enum:
        - Zpl
        - Pdf
        - Jpeg
        - Png
        - Svg
      type: string
      description: Label format
      x-apidog-folder: ''
    EmptyNullableObject:
      description: Injected nullable object
      type: 'null'
      x-apidog-folder: ''
    Eps.Api.MyApi2.Web.Models.ShipmentBatch.ReturnChannelModel:
      type: object
      properties:
        type:
          oneOf:
            - $ref: >-
                #/components/schemas/Eps.Api.MyApi2.Business.Enums.ConstReturnChannel
            - *ref_0
        address:
          maxLength: 100
          type: string
          description: >-
            Pokud je vybrán Type = Email, pak zde vyplňovat email příjemce
            etikety Délka: 100
          nullable: true
      additionalProperties: false
      description: ReturnChannelModel
      x-apidog-orders:
        - type
        - address
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Eps.Api.MyApi2.Business.Enums.ConstReturnChannel:
      enum:
        - None
        - Email
        - Ftp
      type: string
      x-apidog-folder: ''
  securitySchemes:
    oauth2:
      type: apikey
      description: Get access token from authentication server.
      name: Authorization
      in: header
    Bearer:
      type: jwt
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        "Authorization: Bearer {token}"
      scheme: bearer
      bearerFormat: JWT
servers: []
security: []

```
