Allocate a consignment

Use shipping rules to allocate an Unallocated consignment to the optimal carrier service associated with your Metapack shipper account.

Shipping rules enable you to search for an optimal subscribed carrier service by using acceptable and unacceptable collection and delivery days and date and time slots, carrier services, delivery location, and other filtering options.

Note: If a suitable subscribed carrier service is not found for the consignment, it will remain Unallocated.

SecurityBasicAuth
Request
path Parameters
consignmentCode
required
string

Consignment identifier generated by Metapack.

Request Body schema: application/json
object

The collection slots.

object

The delivery slots.

object

The collection days.

object

The delivery days.

carrierServices
Array of strings

Your subscribed carrier services.

code
string

The identifer of a specific allocation rule to be used.

Responses
201

Consignment allocated

204

Consignment not allocated

400

Bad Request

401

Unauthorized

403

Forbidden

409

Conflict - Consignment cannot be allocated because it is not in the correct consignment lifecycle status

500

Internal Server Error

post/consignments/{consignmentCode}/service
Request samples
application/json
{
  • "collectionSlots": {
    },
  • "deliverySlots": {
    },
  • "collectionDays": {
    },
  • "deliveryDays": {
    },
  • "carrierServices": [
    ],
  • "code": "string"
}
Response samples
application/json
{
  • "consignment": {
    },
  • "links": [
    ]
}