Raw schema
{
"type": "object",
"properties": {
"shipper_account_id": {
"type": "string",
"description": "The MERCHANT'S AfterShip shipper-account id (same one used in quote_rates)."
},
"service_type": {
"type": "string",
"description": "The carrier service to buy — a service_type value returned by quote_rates (e.g. \"fedex_international_priority\")."
},
"paper_size": {
"type": "string",
"description": "Optional label paper size: default | 4x6 | a4 | a5 ... Default \"default\"."
},
"is_document": {
"type": "boolean",
"description": "Optional: true for documents-only shipments. Default false."
},
"customs_purpose": {
"type": "string",
"description": "Optional customs purpose for international parcels: gift | merchandise | sample | return | repair. Sent as customs.purpose when provided."
},
"to_name": {
"type": "string",
"description": "Recipient contact full name."
},
"to_company": {
"type": "string",
"description": "Optional Recipient company name."
},
"to_street1": {
"type": "string",
"description": "Recipient street address line 1."
},
"to_street2": {
"type": "string",
"description": "Optional Recipient street address line 2."
},
"to_city": {
"type": "string",
"description": "Recipient city."
},
"to_state": {
"type": "string",
"description": "Optional Recipient state / province / region."
},
"to_postal_code": {
"type": "string",
"description": "Recipient postal / ZIP code (required by most carriers)."
},
"to_country": {
"type": "string",
"description": "Recipient country as an ISO 3166-1 ALPHA-3 code (3 letters, e.g. USA, GBR, JPN, SGP, HKG). Required."
},
"to_phone": {
"type": "string",
"description": "Optional Recipient phone (some carriers/services require it)."
},
"to_email": {
"type": "string",
"description": "Optional Recipient email."
},
"to_type": {
"type": "string",
"description": "Optional address type: \"residential\" or \"business\" (default residential)."
},
"from_name": {
"type": "string",
"description": "Sender contact full name."
},
"from_company": {
"type": "string",
"description": "Optional Sender company name."
},
"from_street1": {
"type": "string",
"description": "Sender street address line 1."
},
"from_street2": {
"type": "string",
"description": "Optional Sender street address line 2."
},
"from_city": {
"type": "string",
"description": "Sender city."
},
"from_state": {
"type": "string",
"description": "Optional Sender state / province / region."
},
"from_postal_code": {
"type": "string",
"description": "Sender postal / ZIP code (required by most carriers)."
},
"from_country": {
"type": "string",
"description": "Sender country as an ISO 3166-1 ALPHA-3 code (3 letters, e.g. USA, GBR, JPN, SGP, HKG). Required."
},
"from_phone": {
"type": "string",
"description": "Optional Sender phone (some carriers/services require it)."
},
"from_email": {
"type": "string",
"description": "Optional Sender email."
},
"from_type": {
"type": "string",
"description": "Optional address type: \"residential\" or \"business\" (default residential)."
},
"weight_value": {
"type": "number",
"description": "Parcel weight value. Required. Pair with weight_unit."
},
"weight_unit": {
"type": "string",
"description": "Weight unit: kg | lb | oz | g. Default kg."
},
"width": {
"type": "number",
"description": "Parcel width. Provide width+height+depth together (with dimension_unit), or omit all three."
},
"height": {
"type": "number",
"description": "Parcel height."
},
"depth": {
"type": "number",
"description": "Parcel depth / length."
},
"dimension_unit": {
"type": "string",
"description": "Dimension unit: cm | in | m. Default cm."
},
"box_type": {
"type": "string",
"description": "Parcel box type. Default \"custom\" (uses your dimensions). Some carriers accept named flat-rate boxes."
},
"parcel_description": {
"type": "string",
"description": "Optional human description of the parcel contents."
},
"items": {
"type": "array",
"description": "Optional line items for customs (required for most INTERNATIONAL shipments). Each: {description, quantity, price_amount, price_currency, origin_country (alpha-3), weight_value, weight_unit, sku, hs_code}.",
"items": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"quantity": {
"type": "number"
},
"price_amount": {
"type": "number"
},
"price_currency": {
"type": "string"
},
"origin_country": {
"type": "string",
"description": "ISO 3166-1 alpha-3."
},
"weight_value": {
"type": "number"
},
"weight_unit": {
"type": "string"
},
"sku": {
"type": "string"
},
"hs_code": {
"type": "string"
}
}
}
}
},
"required": [
"shipper_account_id",
"to_name",
"to_street1",
"to_city",
"to_country",
"from_name",
"from_street1",
"from_city",
"from_country",
"weight_value",
"service_type"
]
}