DHL

DHL Data API

The Data API from DHL — 20 operation(s) for data.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 20

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 /targeting/v1/zone/search Find postal zones matching a shape · Get a list of zone information by a zone search #
Ask an LLM
“Which postal zones cover a given set of coordinates?”
“Can I look up zone shapes by region or postal code?”
Tell an agent
Find zone shapes for coordinates {coordinates}.
Get postal zones in regions {regions}.
POST /targeting/v1/region/search Draw a region shape for mailing · Search region #
Ask an LLM
“How large is a particular region for a direct-mail campaign?”
“Can I get a map shape for a region by postal code?”
Tell an agent
Search region shapes for {coordinates}.
Get a region shape for postal code {regions}.
POST /targeting/v1/postal-code/search Find postal codes matching a shape · Search postal code #
Ask an LLM
“Which postal codes cover a given set of coordinates?”
“Can I look up postal code shapes by city or neighbourhood?”
Tell an agent
Find postal code shapes for coordinates {coordinates}.
Get postal codes in cities {cities}.
POST /targeting/v1/postal-code/files Upload a shape file for postal codes · Get a list of shapes with a shape file in zip format or a kml file upload #
Ask an LLM
“How do I upload a shapefile to define postal code areas?”
“Can I set a minimum intersection threshold when uploading postal code shapes?”
Tell an agent
Upload shape file {file} for postal code areas.
Upload shape file {file} with intersection threshold {threshold}.
POST /targeting/v1/postal-code/costs Estimate postal code mail costs · Retrieves the quantity and net costs for the provided filters, area codes and… #
Ask an LLM
“How many households and what is the cost of mailing to a postal code area?”
“Are costs for POSTWURFSPEZIAL calculated per 5g postcard?”
Tell an agent
Estimate costs for postal code area {areaCodes} with product {productType}.
Calculate postal code costs for filters {filters}.
POST /targeting/v1/neighbourhood/search Draw a neighbourhood shape for mailing · Search neighbourhood #
Ask an LLM
“How many households live in a set of postal codes?”
“Can I get a map shape for several postal codes at once?”
Tell an agent
Search neighbourhood shapes for postal codes {postalCodes}.
Get a neighbourhood shape for {cities}.
POST /targeting/v1/neighbourhood/search/{neighbourhood} Suggest postal neighbourhoods by prefix · Search neighbourhood suggestion #
Ask an LLM
“What postal neighbourhoods start with a given prefix?”
“Can I autocomplete a neighbourhood name for a mailing list?”
Tell an agent
Suggest neighbourhoods starting with {neighbourhood}.
Find postal neighbourhoods matching neighbourhood prefix {neighbourhood}.
POST /targeting/v1/neighbourhood/data/search Search postal neighbourhood data sets · Search neighbourhood data #
Ask an LLM
“Can I search postal neighbourhood data by city or postal code?”
“What demographic data is available for a set of neighbourhoods?”
Tell an agent
Search neighbourhood data for cities {cities}.
Find postal neighbourhood data for postal codes {postalCodes}.
POST /targeting/v1/neighbourhood/costs Estimate cost of a mailing to neighbourhoods · Retrieves the number of households and net costs for the provided filters, area… #
Ask an LLM
“How much will a bulk mail run cost for a set of postal codes?”
“Can I get net costs plus household counts for a product type?”
Tell an agent
Estimate costs for {productType} in {areaCodes}.
Costs and household counts for postal codes {areaCodes} on {productType}.
POST /targeting/v1/delivery-district/search Find delivery districts matching a shape · Search delivery district #
Ask an LLM
“Which delivery districts cover a given set of coordinates?”
“Can I look up delivery district shapes by postal code or city?”
Tell an agent
Find delivery district shapes for coordinates {coordinates}.
Get delivery districts in postal codes {postalCodes}.
POST /targeting/v1/delivery-district/files Upload shape files for delivery districts · Get a list of shapes with a shape file in zip format or a kml file upload #
Ask an LLM
“Can I upload a shape file to define delivery areas for targeting?”
“Is there a threshold for shape files before uploads work?”
Tell an agent
Upload shape file {file}.
Upload {file} with a {threshold} threshold.
POST /targeting/v1/delivery-district/costs Estimate cost of a mailing to delivery districts · Costs 2 #
Ask an LLM
“How many households are in areas defined by delivery district filters?”
“Can I estimate delivery district costs for a product type?”
Tell an agent
Estimate delivery district costs for {productType} with filters {filters}.
Household counts for delivery district areas {areaCodes} on {productType}.
GET /targeting/v1/zone List all postal zones · Get geometric information for all zones #
Ask an LLM
“What postal zones exist in the database?”
“Can I get the geometric information for every postal zone?”
Tell an agent
List all postal zones.
Get the zone shapes for every postal zone.
GET /targeting/v1/zone/{zone} Get a postal zone shape · Get by zone #
Ask an LLM
“What is the shape of a specific postal zone?”
“Can I fetch one postal zone by its id?”
Tell an agent
Get postal zone {zone}.
Show the shape of postal zone {zone}.
GET /targeting/v1/region/{region} Get a postal region shape · Get by region #
Ask an LLM
“What is the shape of a specific postal region?”
“Can I fetch one postal region by its id?”
Tell an agent
Get postal region {region}.
Show the shape of postal region {region}.
GET /targeting/v1/postal-code/{postal-code} Get a postal code shape · Get postal code #
Ask an LLM
“What is the shape of a specific postal code?”
“Can I fetch one postal code by its id?”
Tell an agent
Get postal code {postal-code}.
Show the shape of postal code {postal-code}.
GET /targeting/v1/neighbourhood/{neighbourhood} Get a postal neighbourhood shape · Get neighbourhood #
Ask an LLM
“What is the shape of a specific postal neighbourhood?”
“Can I fetch one postal neighbourhood by its id?”
Tell an agent
Get postal neighbourhood {neighbourhood}.
Show the shape of postal neighbourhood {neighbourhood}.
GET /targeting/v1/delivery-district/{delivery-district} Get a delivery district shape · Get delivery district #
Ask an LLM
“What is the shape of a specific delivery district?”
“Can I fetch one delivery district by its id?”
Tell an agent
Get delivery district {delivery-district}.
Show the shape of delivery district {delivery-district}.
GET /targeting/v1/delivery-district/search/{query} Suggest delivery districts by text · Get suggestions by query #
Ask an LLM
“What delivery districts match a text prefix?”
“Can I autocomplete a delivery district name?”
Tell an agent
Suggest delivery districts for {query}.
Find delivery districts matching {query}.

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-data-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-data-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Dhl Data API
  version: 26.10.30-74-fe9dc15580501f34951cc8ff7f032a067ea13a58
  contact:
    name: Technical Support
    email: it-csp@deutschepost.de
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0
  description: 'Operations tagged Data across 2 of this provider''s published API definitions: dhl-deutsche-post-print-mailing-targeting-post-parcel-germany-openapi.yml, dhl-deutsche-post-print-mailing-targeting-post-parcel-germany-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api-eu.dhl.com/post/advertising/print-mailing
  description: Production environment
- url: https://api-uat.dhl.com/post/advertising/print-mailing
  description: Test environment
tags:
- name: Data
paths:
  /targeting/v1/zone/search:
    post:
      tags:
      - Data
      summary: Get a list of zone information by a zone search
      operationId: searchZone
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegionZoneSearchRep'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Feature'
                uniqueItems: true
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
  /targeting/v1/region/search:
    post:
      tags:
      - Data
      description: Request a region shape based on the provided search body
      operationId: searchRegion
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegionZoneSearchRep'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Feature'
                uniqueItems: true
      summary: Search region
      x-summary-source: derived
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
  /targeting/v1/postal-code/search:
    post:
      tags:
      - Data
      description: Request postal-code shapes based on the provided search body.
      operationId: searchPostalCode
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FeatureSearchRep'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Feature'
                uniqueItems: true
      summary: Search postal code
      x-summary-source: derived
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
  /targeting/v1/postal-code/files:
    post:
      tags:
      - Data
      summary: Get a list of shapes with a shape file in zip format or a kml file upload
      operationId: uploadFiles_1
      parameters:
      - name: threshold
        in: query
        description: Defines the minimum size of the intersection between input feature and database feature.
        required: false
        schema:
          type: number
          format: double
          default: 50.0
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: Add a zip-compressed Shape file (file ending .zip) or a kml file (file ending .kml) as part called 'file' in a multipart/file request.
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileFeatures'
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
  /targeting/v1/postal-code/costs:
    post:
      tags:
      - Data
      summary: Retrieves the quantity and net costs for the provided filters, area codes and…
      description: Retrieves the quantity and net costs for the provided filters, area codes and product type. The costs for POSTWURFSPEZIAL are calculated based on an automation-enabled postcard product of 5g weight, 1480 deci mm length, 1050 deci mm width and 10 deci mm height. FOR POSTAKTUELL the costs are calculated based on a 20g weight.See result object for details.
      operationId: costs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CostsRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CostsResponse'
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
  /targeting/v1/neighbourhood/search:
    post:
      tags:
      - Data
      description: Request a neighbourhood shape based on the provided search body.
      operationId: searchNeighbourhood
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FeatureSearchRep'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Feature'
                uniqueItems: true
      summary: Search neighbourhood
      x-summary-source: derived
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
  /targeting/v1/neighbourhood/search/{neighbourhood}:
    post:
      tags:
      - Data
      description: Get a list of neighbourhood ids by a neighbourhood prefix.
      operationId: searchNeighbourhoodSuggestion
      parameters:
      - name: neighbourhood
        in: path
        required: true
        schema:
          type: string
          pattern: ^[\w%\-\(\),&'.\/]+$
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/JsonNode'
      summary: Search neighbourhood suggestion
      x-summary-source: derived
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
  /targeting/v1/neighbourhood/data/search:
    post:
      tags:
      - Data
      description: Request neighbourhood data sets on the provided search body.
      operationId: searchNeighbourhoodData
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NeighbourhoodDataSearchRep'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NeighbourhoodDataRep'
      summary: Search neighbourhood data
      x-summary-source: derived
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
  /targeting/v1/neighbourhood/costs:
    post:
      tags:
      - Data
      summary: Retrieves the number of households and net costs for the provided filters, area…
      description: Retrieves the number of households and net costs based on the filters, product and area codes given
      operationId: costs_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CostsRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CostsResponse'
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
  /targeting/v1/delivery-district/search:
    post:
      tags:
      - Data
      description: Request a delivery-district shape based on the provided search body.
      operationId: searchDeliveryDistrict
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FeatureSearchRep'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Feature'
                uniqueItems: true
      summary: Search delivery district
      x-summary-source: derived
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
  /targeting/v1/delivery-district/files:
    post:
      tags:
      - Data
      summary: Get a list of shapes with a shape file in zip format or a kml file upload
      operationId: uploadFiles_2
      parameters:
      - name: threshold
        in: query
        required: false
        schema:
          type: number
          format: double
          default: 50.0
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: Add a zip-compressed Shape file (file ending .zip) or a kml file (file ending .kml) as part called 'file' in a multipart/file request.
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileFeatures'
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
  /targeting/v1/delivery-district/costs:
    post:
      tags:
      - Data
      description: Retrieves the number of households based on the filters, product and area codes given
      operationId: costs_2
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CostsRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CostsResponse'
      summary: Costs 2
      x-summary-source: derived
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
  /targeting/v1/zone:
    get:
      tags:
      - Data
      summary: Get geometric information for all zones
      operationId: getAllZones
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/JsonNode'
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
  /targeting/v1/zone/{zone}:
    get:
      tags:
      - Data
      description: Request all or a specific zone shape/s (10)
      operationId: getByZone
      parameters:
      - name: zone
        in: path
        required: true
        schema:
          type: string
          pattern: ^[0-9]$
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Feature'
                uniqueItems: true
      summary: Get by zone
      x-summary-source: derived
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
  /targeting/v1/search:
    get:
      tags:
      - Data
      description: Searches for the given query and delivers a maximum of 10 results
      operationId: search
      parameters:
      - name: query
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SearchSummary'
      summary: Search
      x-summary-source: derived
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
  /targeting/v1/region/{region}:
    get:
      tags:
      - Data
      description: Request a region shape based on the provided id.
      operationId: getByRegion
      parameters:
      - name: region
        in: path
        required: true
        schema:
          type: string
          pattern: ^[0-9]{2}$
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Feature'
                uniqueItems: true
      summary: Get by region
      x-summary-source: derived
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
  /targeting/v1/postal-code/{postal-code}:
    get:
      tags:
      - Data
      description: Request a postal-code shape based on the provided id.
      operationId: getPostalCode
      parameters:
      - name: postal-code
        in: path
        required: true
        schema:
          type: string
          pattern: ^[0-9]{5}$
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Feature'
                uniqueItems: true
      summary: Get postal code
      x-summary-source: derived
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
  /targeting/v1/neighbourhood/{neighbourhood}:
    get:
      tags:
      - Data
      description: Request a neighbourhood shape based on the provided id.
      operationId: getNeighbourhood
      parameters:
      - name: neighbourhood
        in: path
        required: true
        schema:
          type: string
          pattern: ^[0-9]+$
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Feature'
                uniqueItems: true
      summary: Get neighbourhood
      x-summary-source: derived
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
  /targeting/v1/delivery-district/{delivery-district}:
    get:
      tags:
      - Data
      description: Request a delivery-district shape based on the provided query parameter.
      operationId: getDeliveryDistrict
      parameters:
      - name: delivery-district
        in: path
        required: true
        schema:
          type: string
          pattern: ^[0-9]{5}-[0-9]{2}$
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Feature'
                uniqueItems: true
      summary: Get delivery district
      x-summary-source: derived
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
  /targeting/v1/delivery-district/search/{query}:
    get:
      tags:
      - Data
      description: Get a list of possible delivery districts based on the query given.
      operationId: getSuggestionsByQuery
      parameters:
      - name: query
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Feature'
                uniqueItems: true
      summary: Get suggestions by query
      x-summary-source: derived
    servers:
    - url: https://api-eu.dhl.com/post/advertising/print-mailing
      description: Production environment
    - url: https://api-uat.dhl.com/post/advertising/print-mailing
      description: Test environment
components:
  schemas:
    CityRep:
      type: object
      description: City and/or neighbourhood required.
      properties:
        city:
          type: string
          example: Hamburg
        neighbourhood:
          type: string
          example: Altstadt
        latitude:
          type: number
          format: double
          example: 6.2345
        longitude:
          type: number
          format: double
          example: 50.6789
    SearchResult:
      type: object
      properties:
        id:
          type: string
          example: 12128
        areaCode:
          type: string
          example: Eimsbüttel
        type:
          type: string
          enum:
          - POSTAL_CODE
          - DELIVERY_DISTRICT
          - NEIGHBOURHOOD_ID
          - AGS
          - CITY
          - NEIGHBOURHOOD
          example: NEIGHBOURHOOD
    Feature:
      type: object
      properties:
        id:
          type: string
          example: 45958
        type:
          type: string
          example: Feature
        properties:
          $ref: '#/components/schemas/FeatureProperties'
        geometry:
          $ref: '#/components/schemas/FeatureGeometry'
    JsonNode:
      type: object
      properties:
        integralNumber:
          type: boolean
        missingNode:
          type: boolean
        valueNode:
          type: boolean
        container:
          type: boolean
        object:
          type: boolean
        nodeType:
          type: string
          enum:
          - ARRAY
          - BINARY
          - BOOLEAN
          - MISSING
          - 'NULL'
          - NUMBER
          - OBJECT
          - POJO
          - STRING
        string:
          type: boolean
        pojo:
          type: boolean
        short:
          type: boolean
        int:
          type: boolean
        double:
          type: boolean
        bigDecimal:
          type: boolean
        bigInteger:
          type: boolean
        textual:
          type: boolean
          deprecated: true
        boolean:
          type: boolean
        binary:
          type: boolean
        long:
          type: boolean
        number:
          type: boolean
        floatingPointNumber:
          type: boolean
        array:
          type: boolean
        empty:
          type: boolean
        'null':
          type: boolean
        float:
          type: boolean
        embeddedValue:
          type: boolean
    FileFeatures:
      type: object
      properties:
        fileFeatures:
          type: array
          items:
            $ref: '#/components/schemas/Feature'
          uniqueItems: true
        selectedFeatures:
          type: array
          items:
            $ref: '#/components/schemas/Feature'
          uniqueItems: true
    CostsRequest:
      type: object
      description: Object to request a simple cost calculation. Depending on the applied context, some attributes might be mandatory or optional or ignored. E.g. filters apply to POSTWURFSPEZIAL.
      properties:
        filters:
          type: array
          description: List of PWS filter. Does only apply to POSTWURFSPEZIAL.
          items:
            $ref: '#/components/schemas/PotentialFilter'
        areaCodes:
          type: array
          description: List of area codes. Use different types, depending on the context. Examples are postal code or neighbourhood identifier.
          example:
          - '10969'
          items:
            type: string
        productType:
          type: string
          description: Product type. Valid types depend on the context. E.g. POSTWURF_SPEZIAL is not applicable to neighbourhoods.
          enum:
          - POSTAKTUELL_DAILY_MAIL
          - POSTAKTUELL_ALL
          - POSTAKTUELL_ANY_AND_ALL_HOUSEHOLDS
          - POSTWURF_SPEZIAL
          example: POSTWURF_SPEZIAL
    RegionZoneSearchRep:
      type: object
      description: Request with multiple options
      properties:
        regions:
          type: array
          items:
            type: string
            pattern: ^[0-9]{2}$
        zones:
          type: array
          example:
          - '6'
          items:
            type: string
            pattern: ^[0-9]$
        coordinates:
          type: array
          items:
            $ref: '#/components/schemas/CoordinateRep'
    SearchSummary:
      type: object
      properties:
        results:
          type: array
          description: List of maximal 10 results for the search
          items:
            $ref: '#/components/schemas/SearchResult'
          uniqueItems: true
        furtherResults:
          type: integer
          format: int32
          description: Number of further not returned results, to indicate the need of a more specific query
    FeatureGeometry:
      type: object
      properties:
        type:
          type: string
          example: MultiPolygon
        coordinates:
          type: string
          description: Multipolygon shape
          example: '[[[7.097201732382503,50.71886197143952],[...],...]]'
    CoordinateRep:
      type: object
      properties:
        latitude:
          type: number
          format: double
          example: 50.6789
        longitude:
          type: number
          format: double
          example: 6.2345
        distance:
          type: integer
          format: int32
          description: search radius in kilometres around the given coordinates
          example: 5
      required:
      - latitude
      - longitude
    CostsResponse:
      type: object
      description: Cost calculation simple response
      properties:
        houseHoldCount:
          type: integer
          format: int32
          description: Number of house holds
          example: 1200
        totalcost:
          type: integer
          format: int32
          description: The net costs of this mailing. Contains the postage in Euro Cent of all mailing items, real and extra in this mailing (entgelt_gesamt).
          example: 1200
        deliveryDistrictFee:
          type: integer
          format: int32
          description: Fee for a delivery district selection in cent
          example: 0
        minimumOrderFee:
          type: integer
          format: int32
          description: Fee for a minimum order in cent
          example: 0
        filterFees:
          type: integer
          format: int32
          description: Fee for Postwurf Spezial filter in cent
          example: 0
        isPwsEasy:
          type: boolean
          description: Is this Postwurf Spezial easy
          example: true
        pwsPostageAdditions:
          type: integer
          format: int32
          description: Contains the total net surcharge in Euro Cent to be paid for this mailing. Surcharge will be charged, for example, if the mailing items are not enabled for automation. (entgelt_zuschlag_gesamt)
          example: 1200
    PotentialFilter:
      type: object
      description: Filter for PWS
      properties:
        id:
          type: string
          example: k_kaufkr_kombi
        options:
          type: array
          example:
          - '4'
          items:
            type: string
    NeighbourhoodDataRep:
      type: object
      description: Neighbourhood data representation
      properties:
        neighbourhoodId:
          type: string
          description: Unique neighbourhood id. Matches the id returned by /neighbourhood/search and can be used directly to create a DIS selection.
          example: 12705729
        neighbourhood:
          type: string
          description: Neighbourhood name
          example: Godesberg-Villenviertel
        postalCode:
          type: string
          description: Postal code or zip code
          example: 53173
        city:
          type: string
          description: City name
          example: Bonn
        deliveryDistrict:
          type: string
          description: Delivery district (ZBN)
          example: 53173-31
        deliveryBaseId:
          type: string
          description: Delivery base identification number (ZBN)
          example: '0520'
        deliveryBasePostalCode:
          type: string
          description: Postal code of the delivery base (ZSP)
          example: 53177
        deliveryBaseName:
          type: string
          description: Name of the delivery base (ZSP)
          example: Bonn 2
        hh:
          type: integer
          format: int32
          description: Number of households
          example: 419
        hhBrutto:
          type: integer
          format: int32
          description: Number of households brutto, thus the maximum quantity of reachable households.Authority ROLE_DIS_POSTAKTUELL_ANY_AND_ALL_HOUSEHOLDS is needed to see this value.
          example: 440
        ags:
          type: string
          description: Community identification number or Amtlicher Gemeindeschlüssel
          example: '05314000'
        tariffZone:
          type: string
          description: Tariff zone of the neighbourhood
          example: A
    FeatureSearchRep:
      type: object
      description: Request with multiple options
      properties:
        cities:
          type: array
          items:
            $ref: '#/components/schemas/CityRep'
        neighbourhoods:
          type: array
          example:
          - '24459602'
          items:
            type: string
            pattern: ^[0-9]+$
        districtCodes:
          type: array
          example:
          - 52222-21
          items:
            type: string
            pattern: ^[0-9]{5}-[0-9]{2}$
        postalCodes:
          type: array
          example:
          - '48231'
          items:
            type: string
            pattern: ^[0-9]{5}$
        regions:
          type: array
          example:
          - '64'
          items:
            type: string
            pattern: ^[0-9]{2}$
        zones:
          type: array
          example:
          - '6'
          items:
            type: string
            pattern: ^[0-9]$
        coordinates:
          type: array
          items:
            $ref: '#/components/schemas/CoordinateRep'
        ags:
          type: array
          description: Amtlicher Gemeindeschlüssel
          example:
          - '18807060'
          items:
            type: string
            pattern: ^[0-9]{8}$
    NeighbourhoodDataSearchRep:
      type: object
      description: Request with multiple options
      properties:
        cities:
          type: array
          example:
          - Hamburg
          items:
            type: string
        neighbourhoods:
          type: array
          example:
          - '24459602'
          items:
            type: string
            pattern: ^[0-9]+$
        districtCodes:
          type: array
          example:
          - 52222-21
          items:
            type: string
            pattern: ^[0-9]{5}-[0-9]{2}$
        postalCodes:
          type: array
          example:
          - '48231'
          items:
            type: string
            pattern: ^[0-9]{5}$
        ags:
          type: array
          description: Amtlicher Gemeindeschlüssel
          example:
          - '18807060'
          items:
            type: string
            pattern: ^[0-9]{8}$
    FeatureProperties:
      type: object
      properties:
        id:
          type: string
          description: '45958'
        centroid:
          $ref: '#/components/schemas/FeatureCentroid'
        neighbourhood:
          type: string
          example: Poppelsdorf
        city:
          type: string
          example: Bonn
        region:
          type: string
          example: 53
        zone:
          type: string
          example: 5
        hh:
          type: integer
          format: int32
          description: Number of netto households
          example: 122
        bruttoHouseholds:
          type: integer
          format: int32
          description: Number of brutto (gross) households. Authority ROLE_DIS_POSTAKTUELL_ANY_AND_ALL_HOUSEHOLDS is needed to see this value.
          example: 160
        postal_code:
          type: string
          example: 53115
        zbn:
          type: string
          description: Zustellbezirksnummer - Delivery District ID
          example: 53115-01
    FeatureCentroid:
      type: object
      properties:
        type:
          type: string
          example: Point
        coordinates:
          type: array
          example:
          - 7.083297877833819
          - 50.71886197143952
          items:
            type: number
            format: double
            maxLength: 2
            minLength: 2
          maxLength: 2
          minLength: 2
          properties:
            empty:
              type: boolean
            first:
              type: number
              format: double
            last:
              type: number
              format: double
x-refined-from:
- dhl-deutsche-post-print-mailing-targeting-post-parcel-germany-openapi.yml
- dhl-deutsche-post-print-mailing-targeting-post-parcel-germany-openapi.yml