Create Shipment
The origin/destination Address and Packages weight and dimensions are required for rating.
HTTP Request
POST /api/v1/shipments
Parameters
Attribute | Required | Type | Specification |
---|---|---|---|
from_company | required | string | Name of the organization |
from_contact_name | required | string | Name of the person. If the shipment is cross border, the name must be a full name. |
from_email | optional | string | Email to reach the person or organization |
from_phone | required | string | Phone number to reach the person or organization |
from_address_1 | required | string | First line of the address |
from_address_2 | optional | string | Second line of the address |
from_city | required | string | City the address is located in |
from_zip_postal | required | string | ZIP or postal code the address is located in |
from_province_state | required | string | State or province the address is located in. For Canadian Provinces and US states it is preferable to use two letter abbreviation. |
from_country | required | string | Two-letter ISO 3166 country code for the country the address is located in |
to_company | required | string | Name of the organization |
to_contact_name | required | string | Name of the person. If the shipment is cross border, the name must be a full name. |
to_email | optional | string | Email to reach the person or organization |
to_phone | required | string | Phone number to reach the person or organization |
to_address_1 | required | string | First line of the address |
to_address_2 | optional | string | Second line of the address |
to_city | required | string | City the address is located in |
to_zip_postal | required | string | ZIP or postal code the address is located in |
to_province_state | required | string | State or province the address is located in. For Canadian Provinces and US states it is preferable to use two letter abbreviation. |
to_country | required | string | Two-letter ISO 3166 country code for the country the address is located in |
to_residential | optional | boolean | Whether or not this address would be considered residential. Defaults to false |
packages | required | array | Array of packages. Each specifying the dimensions and weight of the package |
packages[][Length] | required | numeric | Length of the package |
packages[][Width] | required | numeric | Width of the package |
packages[][Height] | required | numeric | Height of the package |
packages[][Insurance] | optional | numeric | Value of the contents you want to insure. Max $2,500 |
packages[][Description] | optional | string | Package Description. Useful when shipment contains more than one package |
additional | optional | array | Array of additional settings |
additional[signature]: | optional | string | Defaults to NO_SIGNATURE. Other options are SIGNATURE or ADULT_SIGNATURE |
additional[saturday_delivery] | optional | boolean | Defaults to false. Set this value to true for delivery on Saturday. When setting the saturday_delivery option, you will only get rates for services that are eligible for saturday delivery. If no services are available for saturday delivery, then you will not be returned any rates. |
additional[ums] | optional | string | Defaults to the Units of Measure setting on your account. Can be overridden by passing imperial for in / lb or metric for cm / kg |
The package dimensions and weight will be using the default units of measure selected on your account.
Example
from_company: 'LABELNSHIP CORP'
from_contact_name: 'LABELNSHIP CORP'
from_phone: '514-555-5555'
from_address_1: '22 ATLAS AVE'
from_city: 'YORK'
from_province_state: 'ON'
from_country: 'CA'
from_zip_postal: 'L4J3J8'
to_company: 'CLIENT CORP'
to_contact_name: 'MR CLIENT'
to_phone: '416-555-5555'
to_address_1: '390 BAY ST'
to_city: 'TORONTO'
to_province_state: 'ON'
to_country: 'CA'
to_zip_postal: 'M5H2Y2'
packages[0][Length]: 10
packages[0][Width]: 10
packages[0][Height]: 5
packages[0][Weight]: 2
{
"success": true,
"shipment_id": 12345
}
{
"success": false,
"errors": {
"from_company": [
"The from company field is required."
],
"from_contact_name": [
"The from contact name field is required."
],
"from_phone": [
"The from phone field contains an invalid phone number."
]
}
}
Shipment Status
Most shipments will successfully get the rates within few seconds. You should login to the portal to select the rate and purchase the label.