---
title: "Create a Closed Bag"
method: POST
path: "/dpi/shipping/v1/customers/{customerEkp}/bags"
tags: ["Customers"]
---

# Create a Closed Bag

`POST /dpi/shipping/v1/customers/{customerEkp}/bags`

## Request

- Base URL: `https://api-sandbox.dhl.com`
- URL: `https://api-sandbox.dhl.com/dpi/shipping/v1/customers/{customerEkp}/bags`
- Auth: none declared. Required headers: `Authorization`

Creates and closes a bag.

## Path parameters

- `customerEkp` string, required

## Headers

- `Authorization` string, required
- `ThirdPartyVendor-ID` string

## Request body

- ClosedBag
  - `product` string, required: The product that is used for the shipment of this item. Available products are: GMP (Packet), GMM (Business Mail Standard).
  - `format` string, required: The format of the content of this bag.
  - `serviceLevel` 'PRIORITY' | 'REGISTERED', required: The service level that is used for the shipment of this item. There are restrictions for use of service level: STANDARD is only available with products GMM and GMP, PRIORITY is only available with products GMM and GMP.
  - `destinationCountry` string, required: The destination country code.
  - `bagId` string: The BagId to track the bag. In requests only applicable for customers using "prelabelled service"
  - `itemBarcodes` string[], required: The barcodes of the already created items.
  - `itemCount` integer: The number of items. This value is only for the response.
  - `netBulkWeightInKilogram` number, double: The weight of items. This value is only for the response.
  - `customerEkp` string: The customer ekp. This value is only for the response.

## Response `200`

The data of the closed bag.

- ClosedBag
  - `product` string, required: The product that is used for the shipment of this item. Available products are: GMP (Packet), GMM (Business Mail Standard).
  - `format` string, required: The format of the content of this bag.
  - `serviceLevel` 'PRIORITY' | 'REGISTERED', required: The service level that is used for the shipment of this item. There are restrictions for use of service level: STANDARD is only available with products GMM and GMP, PRIORITY is only available with products GMM and GMP.
  - `destinationCountry` string, required: The destination country code.
  - `bagId` string: The BagId to track the bag. In requests only applicable for customers using "prelabelled service"
  - `itemBarcodes` string[], required: The barcodes of the already created items.
  - `itemCount` integer: The number of items. This value is only for the response.
  - `netBulkWeightInKilogram` number, double: The weight of items. This value is only for the response.
  - `customerEkp` string: The customer ekp. This value is only for the response.

## Other responses

- `403`: User 'xxx' has no permission.
- `404`: There is no customer matching the given ekp.
- `422`: Data error, please check response message for details.
- `500`: Internal error.

---

[API](https://skmtc.dev/dhl/apis/deutsche-post-international-shipping-api.md) - [All operations](https://skmtc.dev/dhl/apis/deutsche-post-international-shipping-api/llms.txt) - [OpenAPI document](https://skmtc.dev/dhl/apis/deutsche-post-international-shipping-api/revisions/33ba987e477f?raw)
