Consignment Service Types
Manage service types assigned to consignments. Service types are flexible labels used to classify or tag consignments for various purposes — from handling and delivery options to business classifications and operational indicators.
Endpoints Overview
| Method | Endpoint | Description |
|---|---|---|
GET |
/v1/consignments/{consignmentId}/service-types |
Get assigned service types |
PUT |
/v1/consignments/{consignmentId}/service-types |
Update assigned service types |
POST |
/v1/consignments/{consignmentId}/service-types/{serviceTypeId} |
Add a service type to consignment |
DELETE |
/v1/consignments/{consignmentId}/service-types/{serviceTypeId} |
Delete a service type from consignment |
Get Assigned Service Types
Retrieve the service types currently assigned to a consignment.
Endpoint: GET /v1/consignments/{consignmentId}/service-types
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
consignmentId |
uuid | Yes | The consignment ID |
Request Example
curl -X GET "https://api.consignlyhq.com/v1/consignments/550e8400-e29b-41d4-a716-446655440000/service-types" \
-H "Authorization: Bearer ACCESS_TOKEN"
Response Example
{
"serviceTypes": [
{
"id": "550e8400-e29b-41d4-a716-446655440700",
"code": "B2B",
"name": "Business to Business"
},
{
"id": "550e8400-e29b-41d4-a716-446655440701",
"code": "PALLET-DEVAN",
"name": "Palletised Devan"
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
id |
uuid | Service type ID |
code |
string | Service type code |
name |
string | Service type name |
Common Service Type Examples
Service types are defined by each organisation to suit their operational needs. Common use cases include:
| Category | Example Codes | Purpose |
|---|---|---|
| Business classification | B2B, B2C, WHOLESALE |
Distinguish business vs consumer orders |
| Handling requirements | FRAGILE, HAZMAT, COLD-CHAIN |
Special handling instructions |
| Delivery options | EXPRESS, SAME-DAY, STANDARD |
Shipping speed or priority |
| Operational indicators | PALLET-DEVAN, CROSS-DOCK, PICK-PACK |
Warehouse processing type |
| Billing flags | SURCHARGE, PREMIUM, DISCOUNTED |
Pricing or invoicing triggers |
Update Assigned Service Types
Update all service types assigned to a consignment. This replaces the full set of service types — existing service types not present in the request will also be removed from the consignment.
Endpoint: PUT /v1/consignments/{consignmentId}/service-types
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
consignmentId |
uuid | Yes | The consignment ID |
Request Body
{
"serviceTypeIds": [
"550e8400-e29b-41d4-a716-446655440700",
"550e8400-e29b-41d4-a716-446655440701",
"550e8400-e29b-41d4-a716-446655440702"
]
}
| Field | Type | Required | Description |
|---|---|---|---|
serviceTypeIds |
uuid[] | Yes | Array of service type IDs to assign |
Request Example
curl -X PUT "https://api.consignlyhq.com/v1/consignments/550e8400-e29b-41d4-a716-446655440000/service-types" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"serviceTypeIds": [
"550e8400-e29b-41d4-a716-446655440700",
"550e8400-e29b-41d4-a716-446655440701"
]
}'
Response
| Status | Description |
|---|---|
200 |
Service types updated successfully |
304 |
Not modified (no changes) |
Removing All Service Types
To remove all service types from a consignment, send an empty array:
{
"serviceTypeIds": []
}
Error Cases
| Status | Cause | Resolution |
|---|---|---|
400 |
Invalid service type ID | Verify all IDs are valid UUIDs |
404 |
Consignment not found | Verify consignment ID |
404 |
Service type not found | Verify service type IDs exist |
Add Service Type to Consignment
Add a single service type to a consignment.
Endpoint: POST /v1/consignments/{consignmentId}/service-types/{serviceTypeId}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
consignmentId |
uuid | Yes | The consignment ID |
serviceTypeId |
uuid | Yes | The service type ID to add |
Request Example
curl -X POST "https://api.consignlyhq.com/v1/consignments/550e8400-e29b-41d4-a716-446655440000/service-types/550e8400-e29b-41d4-a716-446655440700" \
-H "Authorization: Bearer ACCESS_TOKEN"
Response
| Status | Description |
|---|---|
200 |
Service type added successfully |
Error Cases
| Status | Cause | Resolution |
|---|---|---|
404 |
Consignment not found | Verify consignment ID |
404 |
Service type not found | Verify service type ID exists |
Delete Service Type from Consignment
Remove a single service type from a consignment.
Endpoint: DELETE /v1/consignments/{consignmentId}/service-types/{serviceTypeId}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
consignmentId |
uuid | Yes | The consignment ID |
serviceTypeId |
uuid | Yes | The service type ID to remove |
Request Example
curl -X DELETE "https://api.consignlyhq.com/v1/consignments/550e8400-e29b-41d4-a716-446655440000/service-types/550e8400-e29b-41d4-a716-446655440700" \
-H "Authorization: Bearer ACCESS_TOKEN"
Response
| Status | Description |
|---|---|
200 |
Service type removed successfully |
Error Cases
| Status | Cause | Resolution |
|---|---|---|
404 |
Consignment not found | Verify consignment ID |
404 |
Service type not found | Verify service type ID exists |
Service Types in Consignment Detail
Service types are included in the consignment detail response:
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"serviceTypes": [
{
"id": "550e8400-e29b-41d4-a716-446655440700",
"code": "B2B",
"name": "Business to Business"
}
]
}
Service Types in Consignment Import
You can assign service types when creating a consignment via import using service type codes:
{
"consignmentType": 1,
"clientCode": "ECL",
"serviceTypeCodes": ["B2B", "PALLET-DEVAN"],
"products": [...]
}
Related Endpoints
- Consignments - Main consignment management
- Consignment Import - Create consignments with service types