Allocate a consignment

You can allocate a consignment separately from creating it. You can also reallocate a consignment.

Allocate consignment request

You need the following to make an allocate consignment request.

Parameter Value Description
status UNALLOCATED The consignment lifecycle status.
consignmentCode The consignment identifier generated by Metapack when a consignment is created.

Using the Allocate a consignment operation, enter the following information:

  • The consignmentCode of the consignment
  • The code of a previously defined shipping rule
Tip

Instead of entering a code, you can also enter allocation parameters to define a new shipping rule for the consignment.

Example request

Copy
Copied
POST /shipping/v1/{consignmentCode}/service HTTP/1.1
Host: api.metapack.com
API-Key: Basic Base64-encoded <username>:<password>
Content-Type: application/json

{
   "code": "sr1"
}

Allocate consignment response

201 (Created)

Significant parameters in a successful response are as follows.

Parameter Value Description
status ALLOCATED

You can reallocate or delete the consignment, or add parcels to it. Modifying the consignment will require deleting its allocation, which will change the status to UNALLOCATED.

If a suitable subscribed carrier service is not found for the consignment, the status will be UNALLOCATED.

carrierConsignmentCode If the consignment has been allocated, the value of this parameter is not null.

Related tasks