> ## Documentation Index
> Fetch the complete documentation index at: https://enterprise-docs.bglobale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get shipping documents

> From the orders indicated as fulfilled with possible exceptions, the Global-e API will return the required shipping documentation as a base64 encoded byte array and URL for printing

<Note>
  Part of the [Shipping Documents API](/shipping-documents-api) integration guide — see it for when and how to use this endpoint.
</Note>


## OpenAPI

````yaml api-reference/specs/getshippingdocuments.yaml POST /Order/GetShippingDocuments
openapi: 3.0.3
info:
  title: GetShippingDocuments
  version: 1.0.0
  description: >-
    From the orders indicated as fulfilled with possible exceptions, the
    Global-e API will return the required shipping documentation as a base64
    encoded byte array and URL for printing
servers:
  - url: https://{globale_api_domain}
    variables:
      globale_api_domain:
        default: globale_api_domain
        description: Global-e API host, supplied to the merchant by Global-e.
security: []
tags:
  - name: GetShippingDocuments
    x-page-title: GetShippingDocuments
  - name: 'Direction: Merchant → Global-e'
  - name: 'Domain: Shipping'
paths:
  /Order/GetShippingDocuments:
    post:
      tags:
        - GetShippingDocuments
      summary: Get shipping documents
      description: >-
        From the orders indicated as fulfilled with possible exceptions, the
        Global-e API will return the required shipping documentation as a base64
        encoded byte array and URL for printing
      operationId: getShippingDocuments
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateOrderDispatchRequest'
            example:
              OrderId: GE123874638GB
              HubCode: hub001
              DeliveryReferenceNumber: '123756483'
              Parcels:
                - ParcelCode: '123454321'
                  ShippingAdditionalInformation:
                    - name: ITNNumber
                      value: X202487492387
                  Products:
                    - ProductCode: sku121212
                      DeliveryQuantity: 1
                    - ProductCode: sku131313
                      DeliveryQuantity: 2
      responses:
        '200':
          description: >-
            Successful response, or a 200 carrying object-level processing
            errors (IsSuccess=false with the Errors array populated).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderDocumentsResponse'
              examples:
                success:
                  summary: Documents generated successfully
                  value:
                    IsSuccess: true
                    ErrorText: null
                    Documents:
                      - DocumentTypeCode: '4'
                        DocumentTypeName: AWB
                        DocumentExtension: zpl
                        URL: >-
                          https://assets.global-e.com/documents/478D-AA72-1EB8BBDD7C27.zpl
                        DocumentData: >-
                          JVBERi0xLjUNCiW1tbW1DQoxIDAgb2[...]mDQoxNDgzNDkNCiUlRU9G
                      - DocumentTypeCode: '1'
                        DocumentTypeName: CommercialInvoiceAndPackingList
                        DocumentExtension: pdf
                        URL: >-
                          https://assets.global-e.com/documents/AE09-FAB014DAA421.pdf
                        DocumentData: >-
                          JVBERi0xLjUNCiW1tbW1DQoxIDAgb2[...]mDQoxNDgzNDkNCiUlRU9G
                        ErrorMessage: null
                    ParcelsTracking:
                      - ParcelTrackingNumber: '9895722141'
                        ParcelTrackingUrl: >-
                          https://mydhl.express.dhl/us/en/tracking.html#/results?id=9895722141
                        ParcelCode: '123454321'
                objectLevelError:
                  summary: Order could not be processed (object-level error)
                  value:
                    IsSuccess: false
                    ErrorText: >-
                      Could not retrieve documents and/or process order. Either
                      order is in wrong status (Cancelled) or partial
                      information provided.
                    Documents: null
                    ParcelsTracking: null
                    TrackingDetails: null
                    Errors:
                      - OrderID: GE3008553US
                        ErrorCode: A200
                        ErrorText: >-
                          Could not retrieve documents and/or process order.
                          Either order is in wrong status (Cancelled) or partial
                          information provided.
                        MerchantOrderID: null
        '400':
          description: General API error (e.g. invalid request).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo'
        '500':
          description: General API error (server error).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo'
components:
  schemas:
    UpdateOrderDispatchRequest:
      type: object
      title: UpdateOrderDispatchRequest
      required:
        - OrderId
        - Parcels
      properties:
        OrderId:
          type: string
          description: >-
            "eCommerce order number" as passed down in the order payload. For
            Shopify, should be either the Shopify Order Name (default), e.g.
            #12345; or the Shopify Order Number, e.g. 12345.
        DeliveryReferenceNumber:
          type: string
          description: Additional informative dispatch reference.
        HubCode:
          type: string
          description: >-
            When dispatching from multiple hubs, indicates for a given call
            which hub the related shipment will be dispatched from.
        Parcels:
          type: array
          items:
            $ref: '#/components/schemas/Parcel'
    OrderDocumentsResponse:
      type: object
      title: OrderDocumentsResponse
      properties:
        IsSuccess:
          type: boolean
          description: Indicates whether the API call was successful.
        ErrorText:
          type: string
          nullable: true
          description: Description of the error for getting documents.
        Documents:
          type: array
          nullable: true
          description: List of OrderDocument objects that hold the shipping documents.
          items:
            $ref: '#/components/schemas/OrderDocument'
        ParcelsTracking:
          type: array
          nullable: true
          description: >-
            The list of Merchant.ParcelTracking objects. Each object holds the
            parcel tracking number and the full tracking URL of the relevant
            shipper (with the parcel tracking number).
          items:
            $ref: '#/components/schemas/MerchantParcelTracking'
        TrackingDetails:
          allOf:
            - $ref: '#/components/schemas/MerchantTrackingDetails'
          nullable: true
          description: Order tracking information.
        DeliveryAdviceInformation:
          type: array
          nullable: true
          description: >-
            List of DeliveryAdviceInformation objects that hold the information
            required for the "Delivery Advice" document.
          items:
            $ref: '#/components/schemas/DeliveryAdviceInformation'
        Errors:
          type: array
          nullable: true
          description: Object-level processing errors (returned with HTTP 200).
          items:
            $ref: '#/components/schemas/OrderProcessingError'
    ErrorInfo:
      type: object
      title: ErrorInfo
      description: General API error.
      properties:
        Code:
          type: string
          description: Error code.
        Error:
          type: string
          description: Error message.
        Description:
          type: string
          description: Error description.
    Parcel:
      type: object
      title: Parcel
      required:
        - ParcelCode
        - Products
      properties:
        ParcelCode:
          type: string
          maxLength: 20
          description: >-
            Unique identifier for each parcel (/package) to be shipped. Can be
            freely generated in any range as long as it is unique and no longer
            than 20 characters.
        Products:
          type: array
          items:
            $ref: '#/components/schemas/Product'
        ShippingAdditionalInformation:
          type: array
          description: >-
            Details about additional shipping information. If a shipment
            contains one or multiple items with the exact same HS code, the
            merchant can use this parameter to provide additional information.
          items:
            $ref: '#/components/schemas/ShippingAdditionalInformation'
    OrderDocument:
      type: object
      title: OrderDocument
      properties:
        DocumentData:
          type: string
          description: Base64 encoded byte array representing the document file content.
        URL:
          type: string
          format: uri
          description: URL of the document.
        DocumentTypeCode:
          type: string
          description: >-
            Document type code. (Note: for PLT countries the commercial invoice
            is not returned in the response.) This value can be:
            CommercialInvoice = 1, PackingList = 2, ShipperManifest = 3, Label =
            4, VATInvoice = 5, DangerousGoodDeclarationLink = 6, GELabel = 7,
            CustomerReceiptInvoice = 8, ArchiveLabel = 9, DeliveryAdvice = 10.
          enum:
            - '1'
            - '2'
            - '3'
            - '4'
            - '5'
            - '6'
            - '7'
            - '8'
            - '9'
            - '10'
        DocumentTypeName:
          type: string
          description: >-
            Document type name such as AWB, CommercialInvoiceAndPackingList or
            Manifest.
        DocumentExtension:
          type: string
          description: Document extension (pdf, zpl, epl).
        ErrorMessage:
          type: string
          nullable: true
          description: >-
            Description of the error for this entity (order/parcel) if it
            happened.
        ParcelCode:
          type: string
          description: The parcel code related to the document.
    MerchantParcelTracking:
      type: object
      title: Merchant.ParcelTracking
      properties:
        ParcelTrackingNumber:
          type: string
          description: >-
            The tracking number used by the selected international shipping
            method for this parcel.
        ParcelTrackingUrl:
          type: string
          format: uri
          description: >-
            Full tracking URL including ParcelTrackingNumber used by the
            selected international shipping method for this parcel.
        ParcelCode:
          type: string
          description: Parcel code.
    MerchantTrackingDetails:
      type: object
      title: Merchant.TrackingDetails
      properties:
        TrackingNumber:
          type: string
          description: The tracking number as the shipper has specified.
        ShipperName:
          type: string
          description: The shipping method name.
        TrackingURL:
          type: string
          format: uri
          description: >-
            Full tracking URL including the TrackingNumber used by the selected
            international shipping method.
    DeliveryAdviceInformation:
      type: object
      title: DeliveryAdviceInformation
      properties:
        ParcelCode:
          type: string
          description: Parcel code.
        CommercialInvoiceNumber:
          type: string
          nullable: true
          description: >-
            Commercial invoice number of the parcel if it exists on the parcel
            level, otherwise order commercial invoice number. Can be null if a
            commercial invoice does not exist for the order.
        TotalValue:
          type: number
          format: float
          description: Value of all products in the parcel.
        CurrencyCode:
          type: string
          description: TotalValue 3-char ISO currency code.
    OrderProcessingError:
      type: object
      title: OrderProcessingError
      properties:
        OrderID:
          type: string
          description: Order identifier.
        ErrorCode:
          type: string
          example: A200
          description: Object-level error code.
        ErrorText:
          type: string
          description: Error text in response.
        MerchantOrderID:
          type: string
          nullable: true
          description: Merchant order identifier; may be null.
    Product:
      type: object
      title: Product
      required:
        - ProductCode
        - DeliveryQuantity
      properties:
        ProductCode:
          type: string
          description: >-
            Product reference from the merchant as available in the eCommerce
            platform. For Shopify, should be either the Shopify SKU or Barcode
            for the product to be shipped.
        DeliveryQuantity:
          type: integer
          description: Quantity of a product to be shipped.
    ShippingAdditionalInformation:
      type: object
      title: ShippingAdditionalInformation
      properties:
        name:
          type: string
          description: Name of additional information item, for example ITNNumber.
        value:
          type: string
          description: Value of additional information item.

````