Metapack Shipping API (1.0.0)

Download OpenAPI specification:Download

The Shipping API is an easy-to-use REST-based API that enables you to manage all of your shipping needs without having to worry about the complexities of different carrier APIs and protocols.

For more information about the API, go to https://dev.metapack.com/.

Consignments

Create and manage consignments. A shipment can be a single consignment or multiple consignments. You must create at least one consignment for a shipment before you can get shipping rates or create a label or a manifest for the shipment.

Search for consignments

Retrieve all consignments that meet specific search criteria.

If any consignments have been allocated, the associated carrier and carrier service information is also returned. You can use this information to plan your deliveries and keep your customers updated.

SecurityBasicAuth
Request
query Parameters
orderReference
string

Return all consignments associated with a specific order identifier.

consignmentTrackingIdentifier
string

Return all consignments associated with a specific consignment tracking identifier assigned by carrier allocation.

parcelTrackingIdentifier
string

Return all consignments associated with a specific parcel tracking identifier.

parcelCode
string

Return all consignments associated with a specific parcel code.

Responses
200

Success

400

Bad Request

401

Unauthorized

500

Internal Server Error

get/consignments
Request samples
curl -i -X GET \
  -u <username>:<password> \
  'https://api.sbx.metapack.com/shipping/v1/consignments?orderReference=string&consignmentTrackingIdentifier=string&parcelTrackingIdentifier=string&parcelCode=string'
Response samples
application/json
[
  • {
    }
]

Create a consignment

Create a consignment without allocating it.

Alternatively, you can create it and use shipping rules to allocate it 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.

Prerequisites: The sender of a consignment is a warehouse (shipping location), so warehouses must be configured for your Metapack shipper account. If you want to use shipping rules for allocation, carriers and carrier services must be configured for your 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.

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.

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.

Responses
201

Consignment created

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

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

Get a consignment

Retrieve a consignment with a specific consignment code.

If the consignment has been allocated, the associated carrier and carrier service information is also returned. You can use this information to plan your deliveries and keep your customers updated.

SecurityBasicAuth
Request
path Parameters
consignmentCode
required
string

Consignment identifier generated by Metapack.

Responses
200

Consignment details

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

get/consignments/{consignmentCode}
Request samples
curl -i -X GET \
  -u <username>:<password> \
  'https://api.sbx.metapack.com/shipping/v1/consignments/{consignmentCode}'
Response samples
application/json
{
  • "consignment": {
    },
  • "links": [
    ]
}

Update an unallocated consignment

Update an Unallocated consignment. For example, change the order details or shipping rules of a consignment.

Prerequisite: If a consignment is Allocated, use Delete consignment allocation before using this operation.

Note: You must resubmit the mandatory information of the consignment in addition to any other consignment data that you have added or modified.

SecurityBasicAuth
Request
path Parameters
consignmentCode
required
string

Consignment identifier generated by Metapack.

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.

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.

Responses
200

Consignment updated

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

409

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

500

Internal Server Error

put/consignments/{consignmentCode}
Request samples
application/json
{
  • "consignment": {
    },
  • "shippingRules": {
    }
}
Response samples
application/json
{
  • "consignment": {
    },
  • "links": [
    ]
}

Delete a consignment

If the consignment is Unallocated, using this operation deletes it.

However, if the consignment is Allocated, using this operation first deallocates it and then deletes it.

Note: You can also use this operation if the consignment lifecycle status is Printed or Ready to manifest. You cannot use this operation if the status of consignment is a Manifested or a later status.

SecurityBasicAuth
Request
path Parameters
consignmentCode
required
string

Consignment identifier generated by Metapack.

Responses
204

Consignment deleted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

delete/consignments/{consignmentCode}
Request samples
curl -i -X DELETE \
  -u <username>:<password> \
  'https://api.sbx.metapack.com/shipping/v1/consignments/{consignmentCode}'
Response samples
application/json
{
  • "errorCode": "string",
  • "message": "string",
  • "systemMessage": "string",
  • "traceID": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Update selected properties of an unallocated consignment

Update specific numeric and text properties of an Unallocated consignment.

Prerequisite: If a consignment is Allocated, use Delete consignment allocation before using this operation.

Note: Currently, manifestGroupCode is the only property of a consignment that can be modified by this operation.

SecurityBasicAuth
Request
path Parameters
consignmentCode
required
string

Consignment identifier generated by Metapack.

Request Body schema: application/json
property name*
additional property
string
Responses
200

Consignment updated

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

409

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

500

Internal Server Error

patch/consignments/{consignmentCode}
Request samples
application/json
{
  • "property1": "string",
  • "property2": "string"
}
Response samples
application/json
{
  • "consignment": {
    },
  • "links": [
    ]
}

Get consignment paperwork

Retrieve the labels and customs documents of an Allocated consignment.

Note: You can also use this operation if the consignment lifecycle status is Printed or Ready to manifest.

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
path Parameters
consignmentCode
required
string

Consignment identifier generated by Metapack.

query Parameters
type
string

Specify the type of paperwork to be generated. Select label to generate a labels string in the reponse. Select documentation to generate a customs (customs documentation) string in the response. Select all to generate a labels string and a customs string in the response.

Enum: "label" "documentation" "all"
format
string

Specify the paperwork format to be generated. Select pdf to generate the customs string in PDF format. Select zpl to generate the labels string in Zebra Programming Language (ZPL) format. Select png to generate a label as a PNG file.

Enum: "pdf" "zpl" "png"
dimension
string
Default: "6X4"

Specify the dimensions of the document. Enter either a4 or the page dimensions in inches using m×n format, where m and n are either integers or decimal numbers. For example, 6x4.

resolution
integer
Default: 200

Specify the resolution of the label in dots per inch (DPI). Select 200 to generate the label in 200 DPI. Select 300 to generate the label in 300 DPI.

Enum: 200 300
Responses
200

Consignment paperwork strings

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

409

Conflict - Wrong state for printing

500

Internal Server Error

get/consignments/{consignmentCode}/paperwork
Request samples
curl -i -X GET \
  -u <username>:<password> \
  'https://api.sbx.metapack.com/shipping/v1/consignments/{consignmentCode}/paperwork?type=label&format=pdf&dimension=6X4&resolution=200'
Response samples
application/json
{
  • "paperwork": {
    },
  • "links": [
    ]
}

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": [
    ]
}

Parcels

Manage the parcels in consignments.

Add a parcel to a consignment

Add a parcel to an existing consignment.

If the consignment has already been Allocated, the tracking code for the new parcel is generated automatically and returned in the response.

In addition, the weight and value of the new parcel are added to the weight and value of the consignment.

Note: You can also use this operation if the consignment lifecycle status is Unallocated, Printed, or Ready to manifest. Using this operation resets the status of a modified consignment from Printed or Ready to manifest back to Allocated until all labels are generated.

SecurityBasicAuth
Request
path Parameters
consignmentCode
required
string

Consignment identifier generated by Metapack.

Request Body schema: application/json
required
object (ParcelRequest)

Enter data about each parcel in the consignment.

Responses
201

Parcel added to consignment

400

Bad Request

401

Unauthorized

403

Forbidden

409

Conflict - Parcel cannot be added because the consignment is in a consignment lifecycle status where it cannot be modified

500

Internal Server Error

post/consignments/{consignmentCode}/parcels
Request samples
application/json
{
  • "parcel": {
    }
}
Response samples
application/json
{
  • "parcel": {
    },
  • "links": [
    ]
}

Remove a parcel from a consignment

Remove a parcel from a multi-parcel consignment.

The weight of the removed parcel is subtracted automatically from the weight of the consignment.

If the consignment has already been Allocated, the charges are recalculated.

Note: You can also use this operation if the consignment lifecycle status is UnallocatedPrinted, or Ready to manifest. Using the operation does not change the status of a modified consignment.

SecurityBasicAuth
Request
path Parameters
consignmentCode
required
string

Consignment identifier generated by Metapack.

parcelCode
required
string

Parcel code.

Responses
204

Parcel removed from consignment

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

409

Conflict - Parcel cannot be removed because the consignment is in a consignment lifecycle status where it cannot be modified

500

Internal Server Error

delete/consignments/{consignmentCode}/parcels/{parcelCode}
Request samples
curl -i -X DELETE \
  -u <username>:<password> \
  'https://api.sbx.metapack.com/shipping/v1/consignments/{consignmentCode}/parcels/{parcelCode}'
Response samples
application/json
{
  • "errorCode": "string",
  • "message": "string",
  • "systemMessage": "string",
  • "traceID": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Consolidate a parcel with an outer consignment

Create a relationship between two consignments by associating a parcel in an “inner” (child) consignment with a parcel in an “outer” (parent) consignment, which facilitates parent-child tracking.

Note: You can use this operation if the consignment lifecycle status of each consignment is Unallocated, Allocated, Printed, or Ready to manifest. Using the operation does not change the status of a modified consignment.

SecurityBasicAuth
Request
path Parameters
consignmentCode
required
string

Consignment identifier of the inner consignment that you want to consolidate with the outer consignment.

parcelCode
required
string

Parcel identifier of the parcel in the inner consignment that you want to consolidate with the outer consignment.

Request Body schema: application/json
containerConsignmentCode
string

The consignment code of the outer consignment with which you want to link an inner consignment.

containerParcelCode
string

The parcel code of the parcel in the outer consignment with which you want to link an inner consignment parcel.

Responses
200

Consignment is successfully consolidated with the outer consignment

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

409

Conflict - Consignment cannot be consolidated because the consignment is in a consignment lifecycle status where it cannot be modified

500

Internal Server Error

post/consignments/{consignmentCode}/parcels/{parcelCode}/consolidate
Request samples
application/json
{
  • "containerConsignmentCode": "string",
  • "containerParcelCode": "string"
}
Response samples
application/json
{
  • "errorCode": "string",
  • "message": "string",
  • "systemMessage": "string",
  • "traceID": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Remove the consolidation of a parcel with an outer consignment

Delete a consolidation of two consignments that are linked as "inner" (child) and "outer" (parent) consignments.

Note: You can use this operation if the consignment lifecycle status of each consignment is Unallocated, Allocated, Printed, or Ready to manifest. Using the operation does not change the status of a modified consignment.

SecurityBasicAuth
Request
path Parameters
consignmentCode
required
string

Consignment identifier of the inner consignment.

parcelCode
required
string

Parcel identifier of the parcel in the inner consignment.

Responses
204

Consolidation of consignments successfully deleted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

409

Conflict - Consignment cannot be unlinked because the consignment is in a consignment lifecycle status where it cannot be modified

500

Internal Server Error

delete/consignments/{consignmentCode}/parcels/{parcelCode}/consolidate
Request samples
curl -i -X DELETE \
  -u <username>:<password> \
  'https://api.sbx.metapack.com/shipping/v1/consignments/{consignmentCode}/parcels/{parcelCode}/consolidate'
Response samples
application/json
{
  • "errorCode": "string",
  • "message": "string",
  • "systemMessage": "string",
  • "traceID": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Get parcel paperwork

Retrieve the labels and customs documents of a specific parcel in an Allocated consignment.

Note: You can also use this operation if the consignment lifecycle status is Printed or Ready to manifest.

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
path Parameters
consignmentCode
required
string

Consignment identifier generated by Metapack.

parcelCode
required
string

Parcel code.

query Parameters
type
string

Specify the type of paperwork to be generated. Select label to generate a labels string in the reponse. Select documentation to generate a customs (customs documentation) string in the response. Select all to generate a labels string and a customs string in the response.

Enum: "label" "documentation" "all"
format
string

Specify the paperwork format to be generated. Select pdf to generate the customs string in PDF format. Select zpl to generate the labels string in Zebra Programming Language (ZPL) format. Select png to generate a label as a PNG file.

Enum: "pdf" "zpl" "png"
dimension
string
Default: "6X4"

Specify the dimensions of the document. Enter either a4 or the page dimensions in inches using m×n format, where m and n are either integers or decimal numbers. For example, 6x4.

resolution
integer
Default: 200

Specify the resolution of the label in dots per inch (DPI). Select 200 to generate the label in 200 DPI. Select 300 to generate the label in 300 DPI.

Enum: 200 300
Responses
200

Parcel paperwork strings

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

409

Conflict - Wrong state for printing

500

Internal Server Error

get/consignments/{consignmentCode}/parcels/{parcelCode}/paperwork
Request samples
curl -i -X GET \
  -u <username>:<password> \
  'https://api.sbx.metapack.com/shipping/v1/consignments/{consignmentCode}/parcels/{parcelCode}/paperwork?type=label&format=pdf&dimension=6X4&resolution=200'
Response samples
application/json
{
  • "paperwork": {
    },
  • "links": [
    ]
}

Add a product to a parcel

Add a product to a parcel of an existing consignment.

Note:  You can use this operation if the consignment lifecycle status is Unallocated, AllocatedPrinted, or Ready to manifest. Using the operation does not change the status of a modified consignment.

SecurityBasicAuth
Request
path Parameters
consignmentCode
required
string

Consignment identifier generated by Metapack.

parcelCode
required
string

Parcel identifier generated by Metapack.

Request Body schema: application/json
required
object (Item)

Trade items are the goods being shipped. Enter data about each trade item in a parcel.

Responses
200

Successfully amended items

400

Bad Request

401

Unauthorized

403

Forbidden

409

Conflict - Wrong state for adding a product to a parcel

500

Internal Server Error

post/consignments/{consignmentCode}/parcels/{parcelCode}/items
Request samples
application/json
{
  • "item": {
    }
}
Response samples
application/json
{
  • "errorCode": "string",
  • "message": "string",
  • "systemMessage": "string",
  • "traceID": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Remove products from a parcel

Remove the products (items) from the parcel.

Note: You can use this operation if the consignment lifecycle status is Unallocated, AllocatedPrinted, or Ready to manifest. Using the operation does not change the status of a modified consignment.

SecurityBasicAuth
Request
path Parameters
consignmentCode
required
string

Consignment identifier generated by Metapack.

parcelCode
required
string

Parcel identifier generated by Metapack.

itemRef
required
string

Unique reference used for the product/item in the parcel.

query Parameters
quantityToDelete
integer

Quantity of products to be deleted. If not provided, it will be defaulted to 1.

Responses
204

Successfully deleted items

400

Bad Request

401

Unauthorized

403

Forbidden

409

Conflict - Wrong state for deleting products from a parcel

500

Internal Server Error

delete/consignments/{consignmentCode}/parcels/{parcelCode}/items/{itemRef}
Request samples
curl -i -X DELETE \
  -u <username>:<password> \
  'https://api.sbx.metapack.com/shipping/v1/consignments/{consignmentCode}/parcels/{parcelCode}/items/{itemRef}?quantityToDelete=0'
Response samples
application/json
{
  • "errorCode": "string",
  • "message": "string",
  • "systemMessage": "string",
  • "traceID": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Allocations

Manage the allocations of consignments to your subscribed carrier services.

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": [
    ]
}

Delete consignment allocation

Delete the allocation of a consignment to a subscribed carrier service and leave it Unallocated.

Note: You can use this operation if the consignment lifecycle status is AllocatedPrinted, or Ready to manifest.

To verify that the consignment is Unallocated, use the Get a consignment operation.

To reallocate the consignment, use the Allocate a consignment operation.

SecurityBasicAuth
Request
path Parameters
consignmentCode
required
string

Consignment identifier generated by Metapack.

Responses
204

Allocation deleted

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

409

Conflict - Allocation cannot be deleted because the consignment is not in the correct consignment lifecycle status

500

Internal Server Error

delete/consignments/{consignmentCode}/service
Request samples
curl -i -X DELETE \
  -u <username>:<password> \
  'https://api.sbx.metapack.com/shipping/v1/consignments/{consignmentCode}/service'
Response samples
application/json
{
  • "errorCode": "string",
  • "message": "string",
  • "systemMessage": "string",
  • "traceID": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Flag consignment manifest readiness

Flag a Printed consignment as Ready to manifest.

You can then use the Create a manifest for future despatch operation to add the consignment to a post-dated manifest, which will change the status to Manifested.

You can also reallocate or delete the consignment, or add parcels to it. Adding a parcel will change the status to Allocated. Modifying the consignment will require deleting its allocation, which will change the  status to Unallocated.

Alternatively, flag a Ready to manifest consignment as not manifest-ready, which changes the status back to Printed.

You can then reallocate or delete the consignment, or add parcels to it. Adding a parcel will change the status to Allocated. Modifying the consignment will require deleting its allocation, which will change the status to Unallocated.

SecurityBasicAuth
Request
path Parameters
consignmentCode
required
string

Consignment identifier generated by Metapack.

query Parameters
readyToShip
boolean

Set to true to flag a Printed consignment as Ready to manifest. Set to false to move a Ready to manifest consignment back to Printed if no longer manifest-ready.

Responses
204

Consignment status changed

400

Bad Request

401

Unauthorized

409

Conflict - There was a conflict in the change of the consignment lifecycle status

500

Internal Server Error

post/consignments/{consignmentCode}/status
Request samples
curl -i -X POST \
  -u <username>:<password> \
  'https://api.sbx.metapack.com/shipping/v1/consignments/{consignmentCode}/status?readyToShip=true'
Response samples
application/json
{
  • "errorCode": "string",
  • "message": "string",
  • "systemMessage": "string",
  • "traceID": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Verify whether shipping rules can be applied

Verify whether an Unallocated consignment can be allocated using the specified shipping rules.

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.

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.

Responses
200

A subscribed carrier service is available at this time for consignment and its shipping rules

204

A subscribed carrier service is not available at this time for consignment and its shipping rules

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

post/consignment-validation
Request samples
application/json
{
  • "consignment": {
    },
  • "shippingRules": {
    }
}
Response samples
application/json
{
  • "errorCode": "string",
  • "message": "string",
  • "systemMessage": "string",
  • "traceID": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Manifests

Create manifests and retrieve paperwork for them.

Create a manifest for future despatch

Add Ready to manifest consignments to a post-dated manifest and clear the consignments from your current transactional flow.

You might want to do this because you expect a large number of orders to go out on a particular day in the future, but you want to leave sufficient time to pack and process them beforehand.

SecurityBasicAuth
Request
Request Body schema: application/json
carrierCode
required
string

Carrier identifier.

shippingLocationCode
required
string

This is the code of the shipping location (warehouse) for which the manifest is to be created, so warehouses must be configured for your Metapack shipper account. Refer to API setup data.

manifestGroupCode
string

Manifest group codes are trailer identifiers that can be used across multiple carriers. You can assign a manifest group code to a consignment before manifesting to facilitate tracing it to a specific trailer.

transactionType
string
Default: "delivery"

Specify the transaction type. Select delivery for a consignment where the goods are being despatched from a warehouse to a consumer. Select pick-up for a return consignment where the goods are being picked up from the consumer and sent back to a warehouse.

Enum: "delivery" "pick-up"
despatchDate
string <date-time>

Enter the future despatch date.

specifiedDateOnly
boolean
Default: false

Set to true only if the consignments that are due to be despatched on the specified despatchDate are to be added to the manifest. Otherwise, set it to false.

Responses
201

Manifest created

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

post/manifests
Request samples
application/json
{
  • "carrierCode": "string",
  • "shippingLocationCode": "string",
  • "manifestGroupCode": "string",
  • "transactionType": "delivery",
  • "despatchDate": "2019-08-24T14:15:22Z",
  • "specifiedDateOnly": false
}
Response samples
application/json
{
  • "links": [
    ]
}

Get manifest paperwork

Generate a manifest in Base64-encoded format.

Note: You can use this operation only if the consignment lifecycle status is Manifested.

Tip: To generate the manifest as a PDF file, you must first decode the string inluded in a successful response by using a Base64 encoder/decoder and then send it to a network printer.

SecurityBasicAuth
Request
path Parameters
manifestCode
required
string

Manifest identifier.

Responses
200

Manifest paperwork created

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

get/manifests/{manifestCode}/paperwork
Request samples
curl -i -X GET \
  -u <username>:<password> \
  'https://api.sbx.metapack.com/shipping/v1/manifests/{manifestCode}/paperwork'
Response samples
application/json
{
  • "paperwork": {
    },
  • "links": [
    ]
}

Rates

Get shipping rates for consignments.

Create shipping rates

Verify which carrier services associated with your Metapack shipper account can offer the best rates for delivering a consignment.

You also have the option to specify shipping rules, which 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.

A successful response returns all carrier services that can deliver the consignment in order of shipping cost, with the cheapest first.

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

Tip: You can reuse the request body for this operation to create a consignment.

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.

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.

Responses
200

Consignment shipping rates

400

Bad Request

401

Unauthorized

500

Internal Server Error

post/rates
Request samples
application/json
{
  • "consignment": {
    },
  • "shippingRules": {
    }
}
Response samples
application/json
[
  • {
    }
]

Setup

Retrieve information about the warehouses, carriers, and carrier services associated with your Metapack shipper account.

Get your carriers

Retrieve all carriers associated with your Metapack shipper account.

Prerequisite: Carriers must be configured for your Metapack shipper account. Refer to API setup data.

SecurityBasicAuth
Responses
200

The carriers associated with your Metapack shipper account

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

get/carriers
Request samples
curl -i -X GET \
  -u <username>:<password> \
  https://api.sbx.metapack.com/shipping/v1/carriers
Response samples
application/json
[
  • {
    }
]

Get your carrier services

Retrieve all carrier services associated with your Metapack shipper account.

Prerequisite: Carrier services must be configured for your Metapack shipper account. Refer to API setup data.

SecurityBasicAuth
Request
path Parameters
carrierCode
required
string

Carrier identifier.

Responses
200

The carrier services associated with your Metapack shipper account

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

get/carriers/{carrierCode}/services
Request samples
curl -i -X GET \
  -u <username>:<password> \
  'https://api.sbx.metapack.com/shipping/v1/carriers/{carrierCode}/services'
Response samples
application/json
[
  • {
    }
]

Get your warehouses

Retrieve all warehouses associated with your Metapack shipper account.

A warehouse is any location used for shipping orders. Example locations include stores, distribution centres, and logistics channels.

Prerequisite: Warehouses must be configured for your Metapack shipper account. Refer to API setup data.

SecurityBasicAuth
Responses
200

The warehouses associated with your Metapack shipper account

400

Bad Request

401

Unauthorized

404

Not Found

500

Internal Server Error

get/shippingLocations
Request samples
curl -i -X GET \
  -u <username>:<password> \
  https://api.sbx.metapack.com/shipping/v1/shippingLocations
Response samples
application/json
[
  • {
    }
]