Products
Retrieve the services and options a customer is entitled to use. Call this before creating a shipment to discover which service codes (e.g. B2B, CR, PM2) and option codes (e.g. EXW, LQ, 2CRET) are available for the customer.
Endpoint: GET /api/v1/products/{invoicingNumber}
Auth: Bearer JWT token required
The result is scoped to the authenticated user's access: only services and options assigned to the given customer configuration are returned.
Request
Path parameter:
| Parameter | Type | Required | Example |
|---|---|---|---|
invoicingNumber | String | Mandatory | 0123456789 |
curl -X GET "https://label-print-shipments.dpd.ch/api/v1/products/0123456789" \
-H "Authorization: Bearer <jwt_token>"
Response
200 OK:
{
"services": [
{
"name": "Collection Request",
"code": "CR"
},
{
"name": "DPD CLASSIC",
"code": "B2B"
},
{
"name": "DPD CLASSIC Guarantee",
"code": "PM2"
}
],
"options": [
{
"name": "Exworks",
"code": "EXW"
},
{
"name": "Limited Quantities",
"code": "LQ"
},
{
"name": "Return",
"code": "2CRET"
}
]
}
Both lists are sorted alphabetically by name. Either list may be empty if the customer has no services or options of that kind assigned.
Fields
| Field | Type | Description |
|---|---|---|
services | Array | Services (main products) available to the customer |
options | Array | Options (add-ons) available to the customer |
services[].name | String | Display name of the service |
services[].code | String | Service code, used as serviceCode when creating a shipment |
options[].name | String | Display name of the option |
options[].code | String | Option code, used when adding options to a shipment |
HTTP status codes
| Code | Description |
|---|---|
200 OK | Services and options returned |
401 Unauthorized | Missing or invalid token |
403 Forbidden | Customer is not accessible to the authenticated user |
404 Not Found | Customer (invoicing number) does not exist |