DHL

DHL Shipment Label API

The Shipment Label API from DHL — 1 operation(s) for shipment label.

GitHub OpenAPI

Operations 1

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /shipment-label Create a shipment label · Create a shipment label #
Ask an LLM
“How do I print a label for a DHL Global Forwarding ocean shipment?”
“Can I get a shipment label as ZPL instead of PDF?”
Tell an agent
Create a label for housebill {housebillNumber}.
Print label {housebillNumber} as {mimeType} with additional info {additionalInformation}.

Documentation

📖
Documentation
https://developer.dhl.com/tracking
📖
Documentation
https://developer.dhl.com/api-reference/shipment-tracking-unified-push
📖
Documentation
https://developer.dhl.com/api-reference/additional-services-dhl-freight
📖
Documentation
https://developer.dhl.com/api-reference/authentication-dhl-ecommerce-americas
📖
Documentation
https://developer.dhl.com/api-reference/authentication-api-dhl-freight
📖
Documentation
https://developer.dhl.com/api-reference/authentication-api-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/datafactory-autocomplete-20-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/deutsche-post-hybrid-mail-shipments-e-post-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/deutsche-post-international-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/deutsche-post-internetmarke-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/deutsche-post-print-mailing-dispatch-preparation-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/deutsche-post-print-mailing-targeting-post-parcel-germany
📖
Documentation
https://developer.dhl.com/parcel-connect
📖
Documentation
https://developer.dhl.com/api-reference/econnect-beta-dhl-ecommerce-europe
📖
Documentation
https://developer.dhl.com/api-reference/dhl-parcel-de-pickup-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/dhl-parcel-de-postnumber-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/dhl-parcel-de-private-shipping-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/dhl-parcel-de-returns-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/parcel-de-shipping-post-parcel-germany-v2
📖
Documentation
https://developer.dhl.com/api-reference/dhl-parcel-de-shipment-tracking-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/dgf-document
📖
Documentation
https://developer.dhl.com/api-reference/duty-tax-dhl-ecommerce-americas
📖
Documentation
https://developer.dhl.com/api-reference/ecommerce-uk
📖
Documentation
https://developer.dhl.com/api-reference/parcel-eu
📖
Documentation
https://developer.dhl.com/api-reference/pickup-cancellation-dhl-ecommerce-india-blue-dart
📖
Documentation
https://developer.dhl.com/api-reference/price-quote-dhl-freight
📖
Documentation
https://developer.dhl.com/api-reference/print-dhl-freight
📖
Documentation
https://developer.dhl.com/api-reference/product-dhl-freight
📖
Documentation
https://developer.dhl.com/api-reference/product-and-sub-product-pickup-detail-dhl-ecommerce-india-blue-dart
📖
Documentation
https://developer.dhl.com/api-reference/product-finder-dhl-ecommerce-americas
📖
Documentation
https://developer.dhl.com/api-reference/products-api-post-parcel-germany
📖
Documentation
https://developer.dhl.com/api-reference/dgf-push-api
📖
Documentation
https://developer.dhl.com/api-reference/registration-pickup-dhl-ecommerce-india-blue-dart
📖
Documentation
https://developer.dhl.com/api-reference/return-label-dhl-ecommerce-americas
📖
Documentation
https://developer.dhl.com/api-reference/shipment-booking-dhl-freight
📖
Documentation
https://developer.dhl.com/api-reference/dgf-shipment-booking
📖
Documentation
https://developer.dhl.com/api-reference/shipment-label-dhl-global-forwarding
📖
Documentation
https://developer.dhl.com/api-reference/dgf-shipment-status
📖
Documentation
https://developer.dhl.com/api-reference/shipment-tracking-dhl-ecommerce-india-blue-dart
📖
Documentation
https://developer.dhl.com/api-reference/shipment-tracking-v2-dhl-global-forwarding
📖
Documentation
https://developer.dhl.com/api-reference/time-table-dhl-freight
📖
Documentation
https://developer.dhl.com/api-reference/tracking-dhl-ecommerce-americas

Specifications

Schemas & Data

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/dhl:dhl-shipment-label-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

dhl-shipment-label-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Dhl Shipment Label API
  version: 1.0.1
  description: 'Operations tagged Shipment Label across 2 of this provider''s published API definitions: dhl-shipment-label-dhl-global-forwarding-openapi.yml, dhl-shipment-label-dhl-global-forwarding-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api-sandbox.dhl.com/dgff/transportation
  description: Sandbox - test environment
- url: https://api.dhl.com/dgff/transportation
  description: Production
security:
- oAuth2Token_SANDBOX: []
- oAuth2Token_PROD: []
tags:
- name: Shipment Label
paths:
  /shipment-label:
    post:
      operationId: shipmentlabel_POST
      summary: Create a shipment label
      description: Use this operation to create a shipment label with DHL Global Forwarding. The API produces labels for a given shipment in PDF or ZPL (Binary or Base64 encoding)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/shipmentLabel'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/shipmentlabel_POST_JSON_response'
            application/octet-stream:
              schema:
                type: string
                format: binary
        '400':
          description: Bad Request
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/shipmentlabel_400_error_response'
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/shipmentlabel_401_error_response'
        '404':
          description: Not Found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/shipmentlabel_404_error_response'
        '429':
          description: Too Many Requests
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/shipmentlabel_429_error_response'
        '500':
          description: Internal Server Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/shipmentlabel_500_error_response'
      tags:
      - Shipment Label
    servers:
    - url: https://api-sandbox.dhl.com/dgff/transportation
      description: Sandbox - test environment
    - url: https://api.dhl.com/dgff/transportation
      description: Production
components:
  schemas:
    shipmentlabel_401_error_response:
      properties:
        status:
          type: integer
          example: 401
        title:
          type: string
          example: Unauthorized
        details:
          type: string
          example: Expired Access Token
          enum:
          - Unauthorized for given resource
          - Expired Access Token
        api-correlation-id:
          type: string
          example: bcf621d5-250d-49b5-a4a0-521cf7a120f0
    shipmentlabel_POST_JSON_response:
      properties:
        shipmentLabel:
          type: object
          properties:
            document:
              type: string
              example: VGhpcyBpcyBhIHRlc3QgZm9yIERHRiBTaGlwbWVudCBMYWJlbA==
            metaData:
              type: object
              properties:
                mimeType:
                  type: string
                  example: pdf
                  enum:
                  - pdf
                  - zpl
    shipmentlabel_500_error_response:
      properties:
        status:
          type: integer
          example: 500
        title:
          type: string
          example: Internal Server Error
          enum:
          - Internal Server Error
        details:
          type: string
          example: The server encountered an unexpected condition that prevented it from fulfilling the request. Please try again later
        api-correlation-id:
          type: string
          example: bcf621d5-250d-49b5-a4a0-521cf7a120f0
    shipmentLabel:
      required:
      - housebillNumber
      properties:
        shipmentID:
          type: string
          description: DHL Shipment ID. Required for Ocean freight shipment.
          maxLength: 50
          example: S21000645937
        housebillNumber:
          type: string
          description: DHL Shipment Housebill number
          maxLength: 35
          example: 8FE7018
        additionalInformation:
          type: string
          description: The text that will appear in the label under Additional Information section
          maxLength: 275
          example: This is a test label
        mimeType:
          type: string
          description: Define the output format either 'pdf' or 'zpl' file type , if this field left blank system will default to 'pdf'
          maxLength: 5
          enum:
          - pdf
          - zpl
          example: pdf
        acceptContentType:
          type: string
          description: Define the output content type whether it will be JSON 'application/json' or binary 'application/octet-stream', if this field left blank system will default to 'application/octet-stream'
          maxLength: 25
          enum:
          - application/json
          - application/octet-stream
          example: application/octet-stream
    shipmentlabel_429_error_response:
      properties:
        status:
          type: integer
          example: 429
        title:
          type: string
          example: Too Many Requests
          enum:
          - Too Many Requests
        details:
          type: string
          example: Number of API requests for a given API key/token has exceeded allocated rate limit. Please try again later.
        api-correlation-id:
          type: string
          example: bcf621d5-250d-49b5-a4a0-521cf7a120f0
    shipmentlabel_404_error_response:
      properties:
        status:
          type: integer
          example: 404
        title:
          type: string
          example: Not Found
        details:
          type: string
          example: Shipment not found
          enum:
          - Shipment not found
        api-correlation-id:
          type: string
          example: bcf621d5-250d-49b5-a4a0-521cf7a120f0
    shipmentlabel_400_error_response:
      properties:
        status:
          type: integer
          example: 400
        title:
          type: string
          example: Bad Request
        details:
          type: string
          example: Bad Request. Missing housebillNumber JSON input parameter
        api-correlation-id:
          type: string
          example: bcf621d5-250d-49b5-a4a0-521cf7a120f0
  securitySchemes:
    oAuth2Token_SANDBOX:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api-sandbox.dhl.com/auth/v1/token?response_type=access_token&grant_type=client_credentials
    oAuth2Token_PROD:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.dhl.com/auth/v1/token?response_type=access_token&grant_type=client_credentials
x-refined-from:
- dhl-shipment-label-dhl-global-forwarding-openapi.yml
- dhl-shipment-label-dhl-global-forwarding-openapi.yml