Create a consignment, use shipping rules to allocate it, and get paperwork for it

Create a consignment, use shipping rules to allocate it, and generate Base64-encoded labels and customs documents for it.

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.

Prerequisites: Warehouses, carriers, and carrier services must be configured for your Metapack shipper account. Refer to API setup data.

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

Tip: To generate the labels or documents from the strings included in a successful response, you must first decode the strings by using a Base64 encoder/decoder and then send them to a network printer.

SecurityBasicAuth
Request
Request Body schema: application/json
required
object (ConsignmentRequest)

One or more items going from the same origin to the same destination being despatched on the same date using the same carrier service.

required
object (ShippingRules)

For each consignment, you have the option to define specific allocation parameters for that consignment, or you can reuse a predefined allocation rule that you created previously.

required
object (PaperworkRequest)
Responses
200

Consignment created and allocated, including paperwork strings

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

post/consignment-with-paperwork
Request samples
application/json
{
  • "consignment": {
    },
  • "shippingRules": {
    },
  • "paperwork": {
    }
}
Response samples
application/json
{
  • "consignment": {
    },
  • "paperwork": {
    },
  • "links": [
    ]
}