Shipments API
Update shipment
Update the tracking information on a shipment.
For an in-depth explanation of each parameter, refer to the Create shipment endpoint.
🔑 Access with
API key
Advanced access token with shipments.write
OAuth access with shipments.write
patch/orders/{orderId}/shipments/{shipmentId}
Request
- Base URLhttps://api.mollie.com/v2
- URLhttps://api.mollie.com/v2/orders/{orderId}/shipments/{shipmentId}
- Auth
- HTTP bearer
- or HTTP bearer
- or OAuth 2Authorization code: https://my.mollie.com/oauth2/authorizeToken URL: https://api.mollie.com/oauth2/tokens scopes: shipments.write
Query parameters
testmodeboolean
Most API credentials are specifically created for either live mode or test mode. In those cases the testmode query parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting the testmode query parameter to true.
Test entities cannot be retrieved when the endpoint is set to live mode, and vice versa.
Request body
Example request
{
"tracking": {
"carrier": "PostNL",
"code": "3SKABA000000000",
"url": "http://postnl.nl/tracktrace/?B=3SKABA000000000&P=1015CW&D=NL&T=C"
}
}Response
The updated shipment object.
Example response
{
"id": "shp_5x4xQJDWGNcY3tKGL7X5J",
"mode": "live",
"orderId": "ord_5B8cwPMGnU",
"createdAt": "2024-03-20T09:13:37+00:00",
"tracking": {
"carrier": "PostNL",
"code": "3SKABA000000000",
"url": "http://postnl.nl/tracktrace/?B=3SKABA000000000&P=1015CW&D=NL&T=C"
},
"routing": [
{
"id": "rt_5B8cwPMGnU",
"amount": {
"currency": "EUR",
"value": "10.00"
},
"destination": {
"type": "organization",
"organizationId": "org_1234567"
}
}
],
"lines": [
{
"resource": "orderline",
"id": "odl_5B8cwPMGnU",
"orderId": "ord_5B8cwPMGnU",
"name": "Chess Board",
"type": "physical",
"status": "created",
"quantity": 1,
"amountShipped": {
"currency": "EUR",
"value": "10.00"
},
"amountRefunded": {
"currency": "EUR",
"value": "10.00"
},
"amountCanceled": {
"currency": "EUR",
"value": "10.00"
},
"amount": {
"currency": "EUR",
"value": "10.00"
},
"unitPrice": {
"currency": "EUR",
"value": "10.00"
},
"totalAmount": {
"currency": "EUR",
"value": "10.00"
},
"vatRate": "21.00",
"vatAmount": {
"currency": "EUR",
"value": "10.00"
},
"createdAt": "2025-03-28T16:42:12+00:00",
"discountedAmount": {
"currency": "EUR",
"value": "10.00"
},
"_links": {
"productUr": {
"href": "https://...",
"type": "application/hal+json"
},
"imageUrl": {
"href": "https://...",
"type": "application/hal+json"
}
}
}
],
"_links": {
"self": {
"href": "https://...",
"type": "application/hal+json"
},
"order": {
"href": "https://...",
"type": "application/hal+json"
},
"documentation": {
"href": "https://...",
"type": "application/hal+json"
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.