Skip to content

Purchase Shipping Labels

POST
/shipping/shipments

Purchase shipping labels for the specified shipping rates.

Request Body required

object
carrier

The carrier for which the shipping label is being purchased.

string
amazon_shipping_v2
shipment

Details of the shipment to purchase.

object
allocation_id

The ID of the allocation for which to purchase the shipping label.

number format: int64
carrier_id

The ID of the carrier account to use for this shipment.

string
remote_shipment_id

The remote shipment ID received in the rates response.

string
service_type

The service type corresponding to the name field in the rates response.

string
notify_customer

Whether to notify the customer about the shipment.

boolean
creation_method

Method used to create the shipment, e.g., “single_ship_from_orders_list”.

string
sub_carrier_id

Sub-carrier ID from the rates response.

string
service_carrier

Service carrier from the rates response.

string
payment_method_id

Payment method ID, if applicable.

string
nullable
value_added_service__VAS_GROUP_ID_CONFIRMATION

Value-added service confirmation, e.g., “DELIVERY_CONFIRMATION”.

string
liability_amount

Liability amount for insurance, if applicable.

string
try_inbound_label

Whether to create a return label.

boolean
total_net_charge

Total net charge for the shipping label.

string format: currency
base_rate

Base rate for the shipping label.

string format: currency
Example
{
"carrier": "amazon_shipping_v2",
"shipment": {
"allocation_id": "INSERT_ALLOCATION_ID",
"carrier_id": "",
"remote_shipment_id": "prbXXXXXX which was recieved in the rates response",
"service_type": "corresponds to the `name` field in the rates response",
"notify_customer": true,
"creation_method": "single_ship_from_orders_list",
"sub_carrier_id": "`sub_carrier_id` from the rates response",
"service_carrier": "`service_carrier` from the rates response",
"payment_method_id": null,
"value_added_service__VAS_GROUP_ID_CONFIRMATION\"": "DELIVERY_CONFIRMATION",
"liability_amount\"": "0.0",
"try_inbound_label\"": false,
"total_net_charge\"": "$8.56",
"base_rate\"": "8.56"
}
}

Responses

200

Successful response with purchased shipping labels.

object
id

The ID of the purchased shipping label.

string
outbound_label_charges
object
unit

The currency unit for the charges.

string
value

The total charge for the shipping label.

number format: float
tracking_url

URL to track the shipment.

string
label_url

URL to download the purchased shipping label.

string
Example
{
"id": 123456789,
"outbound_label_charges": {
"unit": "USD",
"value": "8.56,"
},
"tracking_url": "<TRACKING_URL>",
"label_url": "<LABEL_URL_PART_FROM_PURCHASE>"
}

400

Bad request. Ensure you are passing valid parameters.

404

Allocation ID not found or invalid shipping rates provided.

500

Internal server error during label purchase.