Create a parcel
How to create a parcel via API
To create a new parcel, send a POST
request to the /api/parcels
endpoint, passing the resource arguments in the request body.
Request
POST https://yourdomain.commercelayer.io/api/parcels
Arguments
Body Parameter | Type | Required |
---|---|---|
type |
| Required |
attributes.weight |
| Required |
attributes.unit_of_weight |
| Required |
attributes.eel_pfc |
| Optional |
attributes.contents_type |
| Optional |
attributes.contents_explanation |
| Optional |
attributes.customs_certify |
| Optional |
attributes.customs_signer |
| Optional |
attributes.non_delivery_option |
| Optional |
attributes.restriction_type |
| Optional |
attributes.restriction_comments |
| Optional |
attributes.customs_info_required |
| Optional, default 'false' |
attributes.shipping_label_url |
| Optional |
attributes.shipping_label_file_type |
| Optional |
attributes.shipping_label_size |
| Optional |
attributes.shipping_label_resolution |
| Optional |
attributes.tracking_number |
| Optional |
attributes.tracking_status |
| Optional |
attributes.tracking_status_detail |
| Optional |
attributes.tracking_status_updated_at |
| Optional |
attributes.tracking_details |
| Optional |
attributes.carrier_weight_oz |
| Optional |
attributes.signed_by |
| Optional |
attributes.incoterm |
| Optional |
attributes.delivery_confirmation |
| Optional |
attributes.reference |
| Optional |
attributes.reference_origin |
| Optional |
attributes.metadata |
| Optional |
relationships.shipment |
| Required |
relationships.package |
| Required |
Example
The following request creates a new parcel:
Last updated