Save custom code
PUT/company/delivery/customcode/:id
Updates the custom reference code for a shipment. This code is optional and can be used for internal company references. Requires JWT authentication.
Use Cases:
- Assign an internal order code to the shipment
- Link the shipment with an external system
- Add an easily recognizable reference
Request Example:
{
custom_code: PED-2025-1234
}
Successful Response Example:
{
_id: 64d1a2b3e8b7a9001f8e7d12,
service_code: DEL-12345,
custom_code: PED-2025-1234,
updated_at: 2025-08-08T16:00:00Z
}
Request
Responses
- 200
- 400
- 404
Custom code saved successfully
Invalid input. This occurs when:
- The custom_code field is empty
- The format does not meet requirements (1-50 characters)
Shipment not found. The provided ID does not exist or does not belong to the authenticated user's company.