# Getting import state

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /shipment/batch/{batchId}:
    get:
      summary: Getting import state
      deprecated: false
      description: >-
        ## Purpose and usage

        This method returns the processing status of the shipment, and in the
        case of the "Complete" status, it returns a URL (either bulk or per
        individual package) for downloading the generated label.



        :::caution[]

        To successfully call the method, it is necessary to use the **batchId**,
        which is obtained from the Location header in the response to the POST
        **shipment/batch** request.

        :::
      operationId: GetShipmentBatch
      tags:
        - API Methods/ShipmentBatch
        - ShipmentBatch
      parameters:
        - name: batchId
          in: path
          description: The batch id
          required: true
          example: ''
          schema:
            type: string
            format: uuid
        - name: OrderBy
          in: query
          description: "Sort items by defined fields. For multiple sorting use field names separated by comma. Use \"-\" to descendant order (eg.: OrderBy=field1,-field2).\r\nOrderable fields: **ShipmentNumber, ReferenceId**, see also schema **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:
                  01K2M9Q5ZQKNXK1EGB8K1FN9BS:
                    $ref: >-
                      #/components/schemas/Eps.Api.MyApi2.Web.Models.ShipmentBatch.ShipmentBatchResultModel
                    x-apidog-overrides:
                      items: &ref_1
                        type: array
                        items:
                          type: object
                          x-apidog-refs:
                            01K2M9QMKGD16WZTSSQZ8FRYQC: &ref_4
                              $ref: >-
                                #/components/schemas/Eps.Api.MyApi2.Web.Models.ShipmentBatch.ShipmentResultItemModel
                              x-apidog-overrides:
                                labelUrl: &ref_0
                                  type: string
                                  description: Label uri - data method
                                  format: uri
                                  nullable: true
                              required: []
                          x-apidog-orders:
                            - 01K2M9QMKGD16WZTSSQZ8FRYQC
                          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: *ref_0
                            importState: &ref_5
                              $ref: >-
                                #/components/schemas/Eps.Api.MyApi2.Business.Enums.ConstImportState
                            errorMessage:
                              type: string
                              description: Error message
                              nullable: true
                            errorCode:
                              type: string
                              description: Error code
                              nullable: true
                            relatedItems:
                              type: array
                              items: &ref_6
                                $ref: >-
                                  #/components/schemas/Eps.Api.MyApi2.Web.Models.ShipmentBatch.ShipmentResultChildItemModel
                              description: Related items
                              nullable: true
                          x-apidog-ignore-properties:
                            - referenceId
                            - shipmentNumber
                            - insuranceCurrency
                            - insurancePrice
                            - labelUrl
                            - importState
                            - errorMessage
                            - errorCode
                            - relatedItems
                        description: Items
                        nullable: true
                    required: []
                x-apidog-orders:
                  - 01K2M9Q5ZQKNXK1EGB8K1FN9BS
                properties:
                  completeLabel:
                    oneOf:
                      - &ref_2
                        $ref: >-
                          #/components/schemas/Eps.Api.MyApi2.Web.Models.ShipmentBatch.CompleteLabelModel
                      - &ref_3
                        $ref: '#/components/schemas/EmptyNullableObject'
                  items: *ref_1
                x-apidog-ignore-properties:
                  - completeLabel
                  - items
          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: {}
                x-apidog-orders: []
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: Bad Request
        '404':
          description: NotFound
          content:
            application/problem+json:
              schema:
                type: object
                properties: {}
                x-apidog-orders: []
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: Record Not Found
        '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:
        - Bearer: []
          x-apidog:
            required: true
            schemeGroups:
              - id: VDm9uTlD5LiclPCiXRXwh
                schemeIds:
                  - Bearer
            use:
              id: VDm9uTlD5LiclPCiXRXwh
      x-apidog-folder: API Methods/ShipmentBatch
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/800807/apis/api-13601487-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: ''
    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.MyApi2.Web.Models.ShipmentBatch.ShipmentBatchResultModel:
      type: object
      properties:
        completeLabel:
          oneOf:
            - *ref_2
            - *ref_3
        items:
          type: array
          items: *ref_4
          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.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_5
        errorMessage:
          type: string
          description: Error message
          nullable: true
        errorCode:
          type: string
          description: Error code
          nullable: true
        relationType:
          $ref: '#/components/schemas/Eps.Api.MyApi2.Business.Enums.ConstRelationType'
      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: ''
    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_5
        errorMessage:
          type: string
          description: Error message
          nullable: true
        errorCode:
          type: string
          description: Error code
          nullable: true
        relatedItems:
          type: array
          items: *ref_6
          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: ''
  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:
  - Bearer: []
    x-apidog:
      schemeGroups:
        - id: Y1Pl_6gJhwt22zSpU8-70
          schemeIds:
            - Bearer
      required: true
      use:
        id: Y1Pl_6gJhwt22zSpU8-70
      scopes:
        Y1Pl_6gJhwt22zSpU8-70:
          Bearer: []

```
