# Získání stavu importu zásilky

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /shipment/batch/{batchId}:
    get:
      summary: Získání stavu importu zásilky
      deprecated: false
      description: >-
        ## Význam a použití

        Tato metoda vrací stav zpracování zásilky a v případě stavu
        **"Complete"** pak vrátí URL (hromadné nebo k jednotlivému balíku) pro
        stažení vygenerované etikety.



        :::caution[]

        Aby bylo možné úspěšně zavolat metodu, je nutné použít **batchId**,
        které se získá z hlavičky Location v odpovědi na požadavek POST
        **shipment/batch**.

        :::
      operationId: GetShipmentBatch
      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: OrderBy
          in: query
          description: >-
            Seřaďte položky podle definovaných polí. Pro vícenásobné řazení
            použijte názvy polí oddělené čárkou. Použijte "-" pro sestupné
            pořadí (např.: OrderBy=field1,-field2).

            Řaditelná pole: ShipmentNumber, ReferenceId, viz také
            schéma.**Eps.Api.MyApi2.Web.Controllers.ShipmentBatchController.GetShipmentBatch.OrderBy.enum**
          required: false
          schema:
            anyOf:
              - $ref: >-
                  #/components/schemas/Eps.Api.MyApi2.Web.Controllers.ShipmentBatchController.GetShipmentBatch.OrderBy.enum
              - type: string
                title: ''
                description: ''
        - 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'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                x-apidog-refs:
                  01JKQF5WB8MQ21CBBW3AX6CKDF:
                    $ref: >-
                      #/components/schemas/Eps.Api.MyApi2.Web.Models.ShipmentBatch.ShipmentBatchResultModel
                    x-apidog-overrides:
                      completeLabel: &ref_16
                        oneOf:
                          - &ref_19
                            $ref: >-
                              #/components/schemas/Eps.Api.MyApi2.Web.Models.ShipmentBatch.CompleteLabelModel
                          - &ref_20
                            $ref: '#/components/schemas/EmptyNullableObject'
                        description: obsahuje všechny etikety založené zásilky
                      items: &ref_17
                        type: array
                        items:
                          type: object
                          x-apidog-refs:
                            01JKQF7K4R7DHNY654SH9JFDGC: &ref_21
                              $ref: >-
                                #/components/schemas/Eps.Api.MyApi2.Web.Models.ShipmentBatch.ShipmentResultItemModel
                              x-apidog-overrides:
                                referenceId: &ref_8
                                  type: string
                                  description: Reference Id
                                  nullable: true
                                shipmentNumber: &ref_9
                                  type: string
                                  description: číslo zásilky
                                  nullable: true
                                insuranceCurrency: &ref_10
                                  type: string
                                  description: měna pojištění
                                  nullable: true
                                insurancePrice: &ref_11
                                  type: number
                                  description: cena pojištění
                                  format: double
                                  nullable: true
                                labelUrl: &ref_12
                                  type: string
                                  description: url daného štítku - metoda data
                                  format: uri
                                  nullable: true
                                importState: &ref_0
                                  $ref: >-
                                    #/components/schemas/Eps.Api.MyApi2.Business.Enums.ConstImportState
                                  description: stav (complete, in process....)
                                errorMessage: &ref_13
                                  type: string
                                  description: chybová zpráva
                                  nullable: true
                                errorCode: &ref_14
                                  type: string
                                  description: kód chyby
                                  nullable: true
                                relatedItems: &ref_15
                                  type: array
                                  items:
                                    type: object
                                    x-apidog-refs:
                                      01JKQFCR9Y63D4PYGEM5X757R7: &ref_22
                                        $ref: >-
                                          #/components/schemas/Eps.Api.MyApi2.Web.Models.ShipmentBatch.ShipmentResultChildItemModel
                                        x-apidog-overrides:
                                          shipmentNumber: &ref_1
                                            type: string
                                            description: číslo zásilky
                                            nullable: true
                                          insuranceCurrency: &ref_2
                                            type: string
                                            description: měna pojištění
                                            nullable: true
                                          insurancePrice: &ref_3
                                            type: number
                                            description: cena pojištění
                                            format: double
                                            nullable: true
                                          labelUrl: &ref_4
                                            type: string
                                            description: url daného štítku
                                            format: uri
                                            nullable: true
                                          importState: *ref_0
                                          errorMessage: &ref_5
                                            type: string
                                            description: chybová zpráva
                                            nullable: true
                                          errorCode: &ref_6
                                            type: string
                                            description: kód chyby
                                            nullable: true
                                          relationType: &ref_7
                                            $ref: >-
                                              #/components/schemas/Eps.Api.MyApi2.Business.Enums.ConstRelationType
                                    x-apidog-orders:
                                      - 01JKQFCR9Y63D4PYGEM5X757R7
                                    properties:
                                      shipmentNumber: *ref_1
                                      insuranceCurrency: *ref_2
                                      insurancePrice: *ref_3
                                      labelUrl: *ref_4
                                      importState: *ref_0
                                      errorMessage: *ref_5
                                      errorCode: *ref_6
                                      relationType: *ref_7
                                    x-apidog-ignore-properties:
                                      - shipmentNumber
                                      - insuranceCurrency
                                      - insurancePrice
                                      - labelUrl
                                      - importState
                                      - errorMessage
                                      - errorCode
                                      - relationType
                                  description: >-
                                    přidružené položky (např. return zásilka
                                    apod.)
                                  nullable: true
                          x-apidog-orders:
                            - 01JKQF7K4R7DHNY654SH9JFDGC
                          properties:
                            referenceId: *ref_8
                            shipmentNumber: *ref_9
                            insuranceCurrency: *ref_10
                            insurancePrice: *ref_11
                            labelUrl: *ref_12
                            importState: *ref_0
                            errorMessage: *ref_13
                            errorCode: *ref_14
                            relatedItems: *ref_15
                          x-apidog-ignore-properties:
                            - referenceId
                            - shipmentNumber
                            - insuranceCurrency
                            - insurancePrice
                            - labelUrl
                            - importState
                            - errorMessage
                            - errorCode
                            - relatedItems
                        description: Items
                        nullable: true
                x-apidog-orders:
                  - 01JKQF5WB8MQ21CBBW3AX6CKDF
                properties:
                  completeLabel: *ref_16
                  items: *ref_17
                x-apidog-ignore-properties:
                  - completeLabel
                  - items
              examples:
                '1':
                  summary: 'status200 - importState: "InProcess"'
                  value: "\"items\": [\r\n    {\r\n        \"referenceId\": \"1\",\r\n        \"importState\": \"InProcess\",\r\n        \"relatedItems\": []\r\n    }\r\n]\r\n}"
                '2':
                  summary: 'status 200 - importState: "Complete"'
                  value: "\"completeLabel\": {\r\n    \"labelUrls\": [\r\n        \"https://api-dev.dhl.com/ecs/ppl/myapi2/shipment/batch/2105/label?pageSize=A4&position=1&limit=200&offset=0\"\r\n    ]\r\n},\r\n\"items\": [\r\n    {\r\n        \"referenceId\": \"Reference03\",\r\n        \"shipmentNumber\": \"44682090703\",\r\n        \"labelUrl\": \" https://api.dhl.com/ecs/ppl/myapi2/data/8a06f022-54c1-4e80-a09a-08d9fd099011\",\r\n        \"importState\": \"Complete\",\r\n        \"relatedItems\": [\r\n            {\r\n                \"shipmentNumber\": \"60600016233\",\r\n                \"labelUrl\": \" https://api.dhl.com/ecs/ppl/myapi2/data/998af2a2-9caf-47f7-a099-08d9fd099011\",\r\n                \"importState\": \"Complete\",\r\n                \"relationType\": \"Dormant\"\r\n            },\r\n            {\r\n                \"shipmentNumber\": \"44682090702\",\r\n                \"labelUrl\": \" https://api.dhl.com/ecs/ppl/myapi2/data/1fa00d69-bd5f-4afe-a098-08d9fd099011\",\r\n                \"importState\": \"Complete\",\r\n                \"relationType\": \"ShipmentSet\"\r\n            }\r\n        ]\r\n    }\r\n]\r\n}"
          headers:
            X-Correlation-ID:
              description: Correlation Id of request otherwise id of response
              schema:
                $ref: '#/components/schemas/XCorrelationIdSchema'
          x-apidog-name: OK
        '400':
          description: BadRequest
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                    x-apidog-orders: []
                    properties: {}
                    x-apidog-ignore-properties: []
                    nullable: true
                  type:
                    type: string
                    nullable: true
                  title:
                    type: string
                    nullable: true
                  status:
                    type: integer
                    format: int32
                    nullable: true
                  detail:
                    type: string
                    nullable: true
                  instance:
                    type: string
                    nullable: true
                x-apidog-orders:
                  - 01JJVK4XVAEJK4F47A50R2NWK3
                x-apidog-refs:
                  01JJVK4XVAEJK4F47A50R2NWK3: &ref_18
                    $ref: >-
                      #/components/schemas/Eps.Api.Infrastructure.WebApi.Model.ProblemJsonModel
                x-apidog-ignore-properties:
                  - errors
                  - type
                  - title
                  - status
                  - detail
                  - instance
          headers: {}
          x-apidog-name: Bad Request
        '404':
          description: NotFound
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                    x-apidog-orders: []
                    properties: {}
                    x-apidog-ignore-properties: []
                    nullable: true
                  type:
                    type: string
                    nullable: true
                  title:
                    type: string
                    nullable: true
                  status:
                    type: integer
                    format: int32
                    nullable: true
                  detail:
                    type: string
                    nullable: true
                  instance:
                    type: string
                    nullable: true
                x-apidog-orders:
                  - 01JJVK556JTAPRFY8B32SMDYJX
                x-apidog-refs:
                  01JJVK556JTAPRFY8B32SMDYJX: *ref_18
                x-apidog-ignore-properties:
                  - errors
                  - type
                  - title
                  - status
                  - detail
                  - instance
          headers: {}
          x-apidog-name: Record Not Found
        '500':
          description: InternalServerError
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                    x-apidog-orders: []
                    properties: {}
                    x-apidog-ignore-properties: []
                    nullable: true
                  type:
                    type: string
                    nullable: true
                  title:
                    type: string
                    nullable: true
                  status:
                    type: integer
                    format: int32
                    nullable: true
                  detail:
                    type: string
                    nullable: true
                  instance:
                    type: string
                    nullable: true
                x-apidog-orders:
                  - 01JJVK5AVJ77NC1Q4KESPFPHN3
                x-apidog-refs:
                  01JJVK5AVJ77NC1Q4KESPFPHN3: *ref_18
                x-apidog-ignore-properties:
                  - errors
                  - type
                  - title
                  - status
                  - detail
                  - instance
          headers: {}
          x-apidog-name: Server Error
        '503':
          description: ServiceUnavailable
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                    x-apidog-orders: []
                    properties: {}
                    x-apidog-ignore-properties: []
                    nullable: true
                  type:
                    type: string
                    nullable: true
                  title:
                    type: string
                    nullable: true
                  status:
                    type: integer
                    format: int32
                    nullable: true
                  detail:
                    type: string
                    nullable: true
                  instance:
                    type: string
                    nullable: true
                x-apidog-orders:
                  - 01JJVK5MQJF9J5G49HMPD5MVRJ
                x-apidog-refs:
                  01JJVK5MQJF9J5G49HMPD5MVRJ: *ref_18
                x-apidog-ignore-properties:
                  - errors
                  - type
                  - title
                  - status
                  - detail
                  - instance
          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-13465916-run
components:
  schemas:
    Eps.Api.MyApi2.Web.Controllers.ShipmentBatchController.GetShipmentBatch.OrderBy.enum:
      enum:
        - ShipmentNumber
        - ReferenceId
      type: string
      x-apidog-folder: ''
    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.ShipmentBatchResultModel:
      type: object
      properties:
        completeLabel:
          oneOf:
            - *ref_19
            - *ref_20
        items:
          type: array
          items: *ref_21
          description: Items
          nullable: true
      additionalProperties: false
      description: ShipmentBatchResultModel
      x-apidog-orders:
        - completeLabel
        - items
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Eps.Api.MyApi2.Web.Models.ShipmentBatch.ShipmentResultItemModel:
      type: object
      properties:
        referenceId:
          type: string
          description: Reference Id
          nullable: true
        shipmentNumber:
          type: string
          description: Shipment number
          nullable: true
        insuranceCurrency:
          type: string
          description: Insurance currency
          nullable: true
        insurancePrice:
          type: number
          description: Insurance price
          format: double
          nullable: true
        labelUrl:
          type: string
          description: Label uri
          format: uri
          nullable: true
        importState: *ref_0
        errorMessage:
          type: string
          description: Error message
          nullable: true
        errorCode:
          type: string
          description: Error code
          nullable: true
        relatedItems:
          type: array
          items: *ref_22
          description: Related items
          nullable: true
      additionalProperties: false
      description: Shipment result item model
      x-apidog-orders:
        - referenceId
        - shipmentNumber
        - insuranceCurrency
        - insurancePrice
        - labelUrl
        - importState
        - errorMessage
        - errorCode
        - relatedItems
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Eps.Api.MyApi2.Web.Models.ShipmentBatch.ShipmentResultChildItemModel:
      type: object
      properties:
        shipmentNumber:
          type: string
          description: Shipment number
          nullable: true
        insuranceCurrency:
          type: string
          description: Insurance currency
          nullable: true
        insurancePrice:
          type: number
          description: Insurance price
          format: double
          nullable: true
        labelUrl:
          type: string
          description: Label uri
          format: uri
          nullable: true
        importState: *ref_0
        errorMessage:
          type: string
          description: Error message
          nullable: true
        errorCode:
          type: string
          description: Error code
          nullable: true
        relationType: *ref_7
      additionalProperties: false
      description: Shipment result child item model
      x-apidog-orders:
        - shipmentNumber
        - insuranceCurrency
        - insurancePrice
        - labelUrl
        - importState
        - errorMessage
        - errorCode
        - relationType
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Eps.Api.MyApi2.Business.Enums.ConstRelationType:
      enum:
        - ShipmentSet
        - DocumentBack
        - Dormant
      type: string
      x-apidog-folder: ''
    Eps.Api.MyApi2.Business.Enums.ConstImportState:
      enum:
        - Accepted
        - InProcess
        - Complete
        - Error
      type: string
      x-apidog-folder: ''
    EmptyNullableObject:
      description: Injected nullable object
      type: 'null'
      x-apidog-folder: ''
    Eps.Api.MyApi2.Web.Models.ShipmentBatch.CompleteLabelModel:
      type: object
      properties:
        labelUrls:
          type: array
          items:
            type: string
            format: uri
          description: LabelUrls
          nullable: true
      additionalProperties: false
      description: CompleteLabelModel
      x-apidog-orders:
        - labelUrls
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Eps.Api.Infrastructure.WebApi.Model.ProblemJsonModel:
      type: object
      properties:
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          x-apidog-orders: []
          properties: {}
          x-apidog-ignore-properties: []
          nullable: true
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties:
        type: string
      x-apidog-orders:
        - errors
        - type
        - title
        - status
        - detail
        - instance
      x-apidog-ignore-properties: []
      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: []

```
