# Create Shipment Create a shipment and return the postage label. Endpoint: POST /shipments Version: 3.0 Security: bearerAuth ## Request fields (application/json): - `name` (string, required) Example: "Pramod Thomson" - `address1` (string, required) Example: "30 Clearview Dr" - `address2` (string) Example: "Lot 2" - `city` (string, required) Example: "Rock Springs" - `province_code` (string, required) Example: "WY" - `postal_code` (string, required) Example: "82901" - `country_code` (string, required) Example: "US" - `email` (string) Example: "test@stallionexpress.ca" - `phone` (string) Example: 11231231234 - `order_id` (string,null) Example: "1234-1233" - `weight_unit` (string, required) Enum: "lbs", "kg", "g", "oz" - `weight` (number, required) Example: 0.6 - `length` (number) Example: 9 - `width` (number) Example: 12 - `height` (number) Example: 1 - `size_unit` (string, required) Enum: "cm", "in" - `package_contents` (string, required) Example: "Two pair of socks" - `value` (number, required) Example: 10 - `currency` (string, required) Enum: "CAD", "USD", "EUR", "AUD", "GBP" - `package_type` (any, required) - `signature_confirmation` (boolean,null) Default false. - `postage_type` (any, required) - `label_format` (string) Default pdf. Set the format of the returned label. Enum: "pdf", "zpl", "png" - `is_fba` (boolean,null) Default false. Set to true to create a Stallion FBA label. - `insured` (boolean,null) Set to true to apply Stallion Protection for tracked shipments only. Example: true - `customs_lines` (array,null) Optional field. Can be used to explicitly set customs declaration for international shipments. Leave empty if unsure. Example: [null] - `customs_lines.description` (string) Example: "Cool T-Shirt" - `customs_lines.quantity` (number) Example: 1 - `customs_lines.hs_code` (string) Example: "620800" - `customs_lines.country_of_origin` (string) Example: "CN" - `region` (string,null) Default account region. The region where the shipment will be delivered to Stallion. Ability to change this is needs to be enabled by Stallion. Enum: "ON", "BC", "QC" ## Response 200 fields (application/json): - `success` (boolean) - `label` (string) Base 64 encoded label. Example: "base64_label" - `tracking_code` (string) Example: "9400111969000940000011" - `message` (string) Example: "Shipment successfully completed" - `shipment` (object) - `shipment.ship_code` (string) Example: "2019JHSJDHSJ" - `shipment.name` (string) Example: "Pramod Thomson" - `shipment.address1` (string) Example: "30 Clearview Dr" - `shipment.address2` (string) Example: "Lot 2" - `shipment.city` (string) Example: "Rock Springs" - `shipment.province_code` (string) Example: "WY" - `shipment.postal_code` (string) Example: "82901" - `shipment.country_code` (string) Example: "US" - `shipment.weight_unit` (string) Enum: "lbs", "kg", "g", "oz" - `shipment.weight` (number) Example: 0.6 - `shipment.length` (number) Example: 9 - `shipment.width` (number) Example: 12 - `shipment.height` (number) Example: 1 - `shipment.size_unit` (string) Enum: "cm", "in" - `shipment.package_contents` (string) Example: "3 underwear" - `shipment.value` (number) Example: 10 - `shipment.currency` (string) Enum: "CAD", "USD", "EUR", "AUD", "GBP" - `shipment.package_type` (string) Enum: "Parcel", "Legal Flat Rate Envelope", "Flat Rate PAdded Envelope", "Small Flat Rate Box", "Medium Flat Rate Box 1", "Medium Flat Rate Box 2", "Large Flat Rate Box", "Regional Rate Box A1", "Regional Rate Box A2", "Regional Rate Box B1", "Regional Rate Box B2", "Letter", "Large Envelope Or Flat", "Thick Envelope" - `shipment.postage_type` (string) Enum: "USPS First Class Mail", "USPS Priority Mail", "USPS Priority Mail Express", "USPS Parcel Select Ground", "USPS Media Mail", "USPS Library Mail", "USPS Express Mail International", "USPS Priority Mail International", "USPS First Class Mail International", "FedEx Ground", "UPS Standard", "PostNL International Packet", "PostNL International Packet Tracked", "APC Priority Worldwide", "APC Priority Worldwide Tracked", "APC Priority Worldwide Expedited", "APC Priority Worldwide Expedited(DDP)", "Stallion Economy USA", "Stallion Economy CA", "US Economy" - `shipment.region` (string) Enum: "Ontario", "British Columbia", "Quebec" - `shipment.rate` (integer) Example: 9 - `shipment.tax` (integer) - `shipment.total_paid` (integer) - `shipment.insured` (boolean) Example: true ## Response 401 fields (application/json): - `message` (string) Example: "Unauthenticated." ## Response 422 fields (application/json): - `success` (boolean) - `errors` (array) Example: ["The data you entered is invalid"] ## Response 500 fields (application/json): - `success` (boolean) - `errors` (array) Example: ["An unknown error occured"]