API
The JSON API that will allow you to get your rates...everywhere.
The JSON API that will allow you to get your rates...everywhere.
If you have any questions at any step of the integration process, let us know, we're here to help! Send us an email at developers@flagshipcompany.com
You will need to create a TOKEN from the SmartShip Authentication Gateway. Your regular FlagShip credentials can be used on this page to generate an app-specific TOKEN.
The Token is one way encrypted. If you lose it, there is no way to get it back - you'll need to get a new one.
The API is stateless and requires authentication for every request.
HTTPS is required to connect to the API and furthermore it is rate-limited to 1 request per second, with bursts of 5 allowed. Exceeding this limit will return a 429 - Too many requests
error.
Sometimes, results might be unexpected because our partners have technical difficulties.
Click here to see the status of all our courier's APIs as well as our own.
Once you have generated a new token, you need to create a special header for the API to accept the request.
x-smartship-token
should contain the TOKEN value obtained when generating the token.
To submit a valid request, your headers should look like this:
GET /test/ HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCVM0pCgB7QB5cp-DlnIo3TA77xZE_yqWqwnia1pGc Content-Type: application/jsonThe Token header must be present for all requests.
One quick way to integrate FlagShip API into your PHP App.
To get started with FlagShip API SDK: learn more.
This library is fully compatible to all entry-points specified in this document.
The response HTTP codes are important. They follow the REST principles, notably:
For 4xx
and 5xx
you will receive different errors type. In case of a 400
the error will show where the problem occurs, e.g :
{ "content": null, "errors": { "from": { "country": ["This value is not valid."] } }, "notices": null }In this case for example, the "country" field in the "from" section of your request has an error.
502
) it will show which courier, with an array of all the errors returned by the courier.:
{ "content": null, "errors": { "ups": ["The maximum per package weight for the selected service from the selected country is 150.00 pounds."], "fedex": ["There are no valid services available. "], "purolator": ["The weight of an individual piece cannot exceed 150 lb"] }, "notices": null }
In the examples both in requests and responses, arrays
are truncated with the following:
"..."These are to keep the documentation succinct and are of course not part of them.
This resource allows to shop rates, confirm, list and cancel shipments
This will allow to get rates for packages, courier packs or courier letters going from Canada to anywhere in the world.
[POST] /ship/rates
POST /ship/rates HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc Content-Type: application/json { "from": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "123", "department": "Reception", "is_commercial": true }, "to": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "123", "department": "Reception", "is_commercial": true }, "packages": { "items": [ { "width": 22, "height": 22, "length": 22, "weight": 22, "description": "Item description" }, "..." ], "units": "imperial", "type": "package", "content": "goods" }, "payment": { "payer": "F" }, "options": { "insurance": { "value": 123.45, "description": "Children books" }, "cod": { "method": "check", "payable_to": "Bob", "receiver_phone": "18663208383", "amount": 123.45, "currency": "CAD" }, "signature_required": false, "saturday_delivery": false, "shipping_date": "2015-12-11", "reference": "123 test", "driver_instructions": "Doorbell broken, knock on door", "address_correction": false, "return_documents_as": "url", "shipment_tracking_emails": "jbeans@company.com;shipping1@company.com" } }
Name | Example Value | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
from
(Address) {...}
Where the shipment is originating from |
|
||||||||||||||||||||||||||||||||||||||||||||
to
(Address) {...}
Where the shipment is going |
|
||||||||||||||||||||||||||||||||||||||||||||
packages
(Packages) {...}
What are you shipping? |
|
||||||||||||||||||||||||||||||||||||||||||||
payment
(enum-objects) {...}
Who is paying for this shipment? |
Flagship Payment
Collect Payment
Third Party Payment
|
||||||||||||||||||||||||||||||||||||||||||||
options
(Options) {...}
The options for this shipment. None of the options are required. |
|
{ "content": [ { "price": { "charges": { "freight": 123.45, "signature_required": 123.45, "insurance": 123.45, "multipiece": 123.45 }, "adjustments": null, "subtotal": 123.45, "total": 123.45, "taxes": { "gst": 123.45, "qst": 123.45, "pst": 123.45, "hst": 123.45 } }, "service": { "flagship_code": "expressEarlyAm", "courier_code": "FIRST_OVERNIGHT", "courier_desc": "First Overnight", "courier_name": "FedEx", "transit_time": 1, "estimated_delivery_date": "2015-12-03 23:30:00" } }, "..." ], "errors": [], "notices": [] }
Name | Example Value | ||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content
(array) {...}
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
errors
(array) {...}
Messages that AFFECT the outcome of the request will be shown here |
[]
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|
Confirmation request that is domestic.
[POST] /ship/confirm
POST /ship/confirm HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc Content-Type: application/json { "from": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "123", "department": "Reception", "is_commercial": true }, "to": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "123", "department": "Reception", "is_commercial": true }, "packages": { "items": [ { "width": 22, "height": 22, "length": 22, "weight": 22, "description": "Item description" }, "..." ], "units": "imperial", "type": "package", "content": "goods" }, "payment": { "payer": "F" }, "service": { "courier_name": "fedex", "courier_code": "FIRST_OVERNIGHT" }, "options": { "insurance": { "value": 123.45, "description": "Children books" }, "cod": { "method": "check", "payable_to": "Bob", "receiver_phone": "18663208383", "amount": 123.45, "currency": "CAD" }, "signature_required": false, "saturday_delivery": false, "shipping_date": "2015-12-11", "reference": "123 test", "driver_instructions": "Doorbell broken, knock on door", "address_correction": false, "return_documents_as": "url", "shipment_tracking_emails": "jbeans@company.com;shipping1@company.com" } }
Name | Example Value | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
from
(Address) {...}
Where the shipment is originating from |
|
||||||||||||||||||||||||||||||||||||||||||||
to
(Address) {...}
Where the shipment is going |
|
||||||||||||||||||||||||||||||||||||||||||||
packages
(Packages) {...}
What are you shipping? |
|
||||||||||||||||||||||||||||||||||||||||||||
payment
(enum-objects) {...}
Who is paying for this shipment? |
Flagship Payment
Collect Payment
Third Party Payment
|
||||||||||||||||||||||||||||||||||||||||||||
service
(Service) {...}
What courier and courier service are we using? |
|
||||||||||||||||||||||||||||||||||||||||||||
options
(Options) {...}
The options for this shipment. None of the options are required. |
|
{ "content": { "shipment_id": "201012221", "tracking_number": "329018797020", "price": { "charges": { "freight": 123.45, "signature_required": 123.45, "insurance": 123.45, "multipiece": 123.45 }, "adjustments": null, "subtotal": 123.45, "total": 123.45, "taxes": { "gst": 123.45, "qst": 123.45, "pst": 123.45, "hst": 123.45 } }, "service": { "flagship_code": "expressEarlyAm", "courier_code": "FIRST_OVERNIGHT", "courier_desc": "First Overnight", "courier_name": "FedEx", "transit_time": 1, "estimated_delivery_date": "2015-12-03 23:30:00" }, "labels": { "regular": "https:\/\/api.smartship.io\/ship\/201012221\/labels\/102xae1e80cddb\/?document=reg", "thermal": "https:\/\/api.smartship.io\/ship\/201012221\/labels\/102xae1e80cddb\/?document=therm" }, "packages": [ { "width": 22, "height": 22, "length": 22, "weight": 22, "description": "Item description", "pin": "72909513411" }, "..." ] }, "errors": [], "notices": [] }
Name | Example Value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content
(Shipment) {...}
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
errors
(array) {...}
Messages that AFFECT the outcome of the request will be shown here |
[]
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|
Confirmation request that is being sent internationally.
[POST] /ship/confirm
POST /ship/confirm HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc Content-Type: application/json { "from": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "123", "department": "Reception", "is_commercial": true }, "to": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "123", "department": "Reception", "is_commercial": true }, "packages": { "items": [ { "width": 22, "height": 22, "length": 22, "weight": 22, "description": "Item description" }, "..." ], "units": "imperial", "type": "package", "content": "goods" }, "payment": { "payer": "F" }, "service": { "courier_name": "fedex", "courier_code": "FIRST_OVERNIGHT" }, "options": { "insurance": { "value": 123.45, "description": "Children books" }, "cod": { "method": "check", "payable_to": "Bob", "receiver_phone": "18663208383", "amount": 123.45, "currency": "CAD" }, "signature_required": false, "saturday_delivery": false, "shipping_date": "2015-12-11", "reference": "123 test", "driver_instructions": "Doorbell broken, knock on door", "address_correction": false, "return_documents_as": "url", "shipment_tracking_emails": "jbeans@company.com;shipping1@company.com" }, "sold_to": { "sold_to_address": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "123", "department": "Reception", "is_commercial": true }, "duties_payer": "F", "duties_payer_account": "1231234", "reason_for_export": "P", "is_nafta": true }, "inquiry": { "company": "ACME inc.", "name": "Bob", "broker_id": "1", "sender_tax_id": "", "receiver_tax_id": "", "inquiry_phone": "18663208383", "inquiry_phone_ext": "" }, "declared_items": { "currency": "CAD", "ci_items": [ { "product_name": "Cologne", "description": "1 bottle of Cologne", "HS_code": "", "country_of_origin": "CA", "quantity": "2", "unit_price": "20", "unit_weight": "22.50", "unit_of_measurement": "kilograms" }, "..." ] } }
Name | Example Value | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
from
(Address) {...}
Where the shipment is originating from |
|
||||||||||||||||||||||||||||||||||||||||||||
to
(Address) {...}
Where the shipment is going |
|
||||||||||||||||||||||||||||||||||||||||||||
packages
(Packages) {...}
What are you shipping? |
|
||||||||||||||||||||||||||||||||||||||||||||
payment
(enum-objects) {...}
Who is paying for this shipment? |
Flagship Payment
Collect Payment
Third Party Payment
|
||||||||||||||||||||||||||||||||||||||||||||
service
(Service) {...}
What courier and courier service are we using? |
|
||||||||||||||||||||||||||||||||||||||||||||
options
(Options) {...}
The options for this shipment. None of the options are required. |
|
||||||||||||||||||||||||||||||||||||||||||||
sold_to
(Sold To) {...}
Information about buyer. |
|
||||||||||||||||||||||||||||||||||||||||||||
inquiry
(Inquiry) {...}
Inquiry contact and broker information |
|
||||||||||||||||||||||||||||||||||||||||||||
declared_items
(Declared Items) {...}
Details about package contents |
|
{ "content": { "shipment_id": "201012221", "tracking_number": "329018797020", "price": { "charges": { "freight": 123.45, "signature_required": 123.45, "insurance": 123.45, "multipiece": 123.45 }, "adjustments": null, "subtotal": 123.45, "total": 123.45, "taxes": { "gst": 123.45, "qst": 123.45, "pst": 123.45, "hst": 123.45 } }, "service": { "flagship_code": "expressEarlyAm", "courier_code": "FIRST_OVERNIGHT", "courier_desc": "First Overnight", "courier_name": "FedEx", "transit_time": 1, "estimated_delivery_date": "2015-12-03 23:30:00" }, "labels": { "regular": "https:\/\/api.smartship.io\/ship\/201012221\/labels\/102xae1e80cddb\/?document=reg", "thermal": "https:\/\/api.smartship.io\/ship\/201012221\/labels\/102xae1e80cddb\/?document=therm" }, "packages": [ { "width": 22, "height": 22, "length": 22, "weight": 22, "description": "Item description", "pin": "72909513411" }, "..." ], "documents_only": false, "commercial_invoice": "https:\/\/api.smartship.io\/ship\/201012221\/labels\/102xae1e80cddb\/?document=statement", "nafta_form_url": "https:\/\/www.cbp.gov\/sites\/default\/files\/documents\/CBP%20Form%20434_3.pdf" }, "errors": [], "notices": [] }
Name | Example Value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content
(Shipment) {...}
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
errors
(array) {...}
Messages that AFFECT the outcome of the request will be shown here |
[]
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|
Creates a record for the shipment in the database, in a "prequoted" status. Can subsequently be used to be confirmed with "Confirm By id" function.
[POST] ship/prepare
POST ship/prepare HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc Content-Type: application/json { "from": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "123", "department": "Reception", "is_commercial": true }, "to": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "123", "department": "Reception", "is_commercial": true }, "packages": { "items": [ { "width": 22, "height": 22, "length": 22, "weight": 22, "description": "Item description" }, "..." ], "units": "imperial", "type": "package", "content": "goods" }, "payment": { "payer": "F" }, "options": { "insurance": { "value": 123.45, "description": "Children books" }, "cod": { "method": "check", "payable_to": "Bob", "receiver_phone": "18663208383", "amount": 123.45, "currency": "CAD" }, "signature_required": false, "saturday_delivery": false, "shipping_date": "2015-12-11", "reference": "123 test", "driver_instructions": "Doorbell broken, knock on door", "address_correction": false, "return_documents_as": "url", "shipment_tracking_emails": "jbeans@company.com;shipping1@company.com" } }
Name | Example Value | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
from
(Address) {...}
Where the shipment is originating from |
|
||||||||||||||||||||||||||||||||||||||||||||
to
(Address) {...}
Where the shipment is going |
|
||||||||||||||||||||||||||||||||||||||||||||
packages
(Packages) {...}
What are you shipping? |
|
||||||||||||||||||||||||||||||||||||||||||||
payment
(enum-objects) {...}
Who is paying for this shipment? |
Flagship Payment
Collect Payment
Third Party Payment
|
||||||||||||||||||||||||||||||||||||||||||||
options
(Options) {...}
The options for this shipment. None of the options are required. |
|
{ "content": { "id": 1122341, "tracking_number": "1P0075H07633636542", "pickup_id": 1122342, "status": "prequoted", "from": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "123", "department": "Reception", "is_commercial": true }, "to": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "123", "department": "Reception", "is_commercial": true }, "options": { "insurance": { "value": 123.45, "description": "Children books" }, "cod": { "method": "check", "payable_to": "Bob", "receiver_phone": "18663208383", "amount": 123.45, "currency": "CAD" }, "signature_required": false, "saturday_delivery": false, "shipping_date": "2015-12-11", "reference": "123 test", "driver_instructions": "Doorbell broken, knock on door", "address_correction": false, "return_documents_as": "url", "shipment_tracking_emails": "jbeans@company.com;shipping1@company.com" }, "pickup_details": { "confirmation": "2929602E9CP", "address": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "11", "is_commercial": false }, "boxes": 4, "weight": 6, "units": "imperial", "date": "2015-12-31", "from": "09:00:00", "until": "17:00:00", "location": "Reception", "instruction": "contain glass product, etc.", "is_cancelled": false }, "service": { "courier_name": "fedex", "courier_code": "FIRST_OVERNIGHT" }, "packages": { "items": [ { "width": 22, "height": 22, "length": 22, "weight": 22, "description": "Item description" }, "..." ], "units": "imperial", "type": "package", "content": "goods" }, "price": { "charges": { "freight": 123.45, "signature_required": 123.45, "insurance": 123.45, "multipiece": 123.45 }, "adjustments": { "fuel_surchage": 123.45 }, "subtotal": 123.45, "total": 123.45, "taxes": { "gst": 123.45, "qst": 123.45, "pst": 123.45, "hst": 123.45 } }, "brokerage_details": { "description": "Chocolate covered gift box", "items": [ { "country_of_origin": "CA", "description": "Sweet Biscuits", "duty_value": 3074.67, "class_number": "1905312900", "duty": 0, "excise_tax_rate": 0, "excise_tax_amount": 0, "gst_hst_rate": 0, "gst_hst_amount": 0, "tax_value": 0, "sima_assess": 0, "total_customs": 0 }, "..." ], "total_duty": 3074.67, "currency": "CAD", "billed_weight": 6, "weight_units": "imperial", "package_count": 4, "invoice_number": "1234567" }, "documents": { "regular": "https:\/\/api.smartship.io\/ship\/201012221\/labels\/102xae1e80cddb\/?document=reg", "thermal": "https:\/\/api.smartship.io\/ship\/201012221\/labels\/102xae1e80cddb\/?document=therm" }, "nafta_form_url": "https:\/\/www.cbp.gov\/sites\/default\/files\/documents\/CBP%20Form%20434_3.pdf", "transit_details": [ { "last_update": "2017-06-09 23:00:00", "status": "D", "message": "Shipment delivered to YALE via GUELPH, ON depot" }, "..." ] }, "errors": [], "notices": [] }
Name | Example Value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content
(Shipment) {...}
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
errors
(array) {...}
Messages that AFFECT the outcome of the request will be shown here |
[]
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|
Get a shipment's details by id.
[GET] /ship/shipments/{shipmentId}
GET /ship/shipments/{shipmentId} HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc
{ "content": { "id": 1122341, "tracking_number": "1P0075H07633636542", "pickup_id": 1122342, "status": "prequoted", "from": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "123", "department": "Reception", "is_commercial": true }, "to": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "123", "department": "Reception", "is_commercial": true }, "options": { "insurance": { "value": 123.45, "description": "Children books" }, "cod": { "method": "check", "payable_to": "Bob", "receiver_phone": "18663208383", "amount": 123.45, "currency": "CAD" }, "signature_required": false, "saturday_delivery": false, "shipping_date": "2015-12-11", "reference": "123 test", "driver_instructions": "Doorbell broken, knock on door", "address_correction": false, "return_documents_as": "url", "shipment_tracking_emails": "jbeans@company.com;shipping1@company.com" }, "pickup_details": { "confirmation": "2929602E9CP", "address": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "11", "is_commercial": false }, "boxes": 4, "weight": 6, "units": "imperial", "date": "2015-12-31", "from": "09:00:00", "until": "17:00:00", "location": "Reception", "instruction": "contain glass product, etc.", "is_cancelled": false }, "service": { "courier_name": "fedex", "courier_code": "FIRST_OVERNIGHT" }, "packages": { "items": [ { "width": 22, "height": 22, "length": 22, "weight": 22, "description": "Item description" }, "..." ], "units": "imperial", "type": "package", "content": "goods" }, "price": { "charges": { "freight": 123.45, "signature_required": 123.45, "insurance": 123.45, "multipiece": 123.45 }, "adjustments": { "fuel_surchage": 123.45 }, "subtotal": 123.45, "total": 123.45, "taxes": { "gst": 123.45, "qst": 123.45, "pst": 123.45, "hst": 123.45 } }, "brokerage_details": { "description": "Chocolate covered gift box", "items": [ { "country_of_origin": "CA", "description": "Sweet Biscuits", "duty_value": 3074.67, "class_number": "1905312900", "duty": 0, "excise_tax_rate": 0, "excise_tax_amount": 0, "gst_hst_rate": 0, "gst_hst_amount": 0, "tax_value": 0, "sima_assess": 0, "total_customs": 0 }, "..." ], "total_duty": 3074.67, "currency": "CAD", "billed_weight": 6, "weight_units": "imperial", "package_count": 4, "invoice_number": "1234567" }, "documents": { "regular": "https:\/\/api.smartship.io\/ship\/201012221\/labels\/102xae1e80cddb\/?document=reg", "thermal": "https:\/\/api.smartship.io\/ship\/201012221\/labels\/102xae1e80cddb\/?document=therm" }, "nafta_form_url": "https:\/\/www.cbp.gov\/sites\/default\/files\/documents\/CBP%20Form%20434_3.pdf", "transit_details": [ { "last_update": "2017-06-09 23:00:00", "status": "D", "message": "Shipment delivered to YALE via GUELPH, ON depot" }, "..." ], "invoice_details": { "201712-52": { "cycle_id": "201712-52", "invoice_id": "123", "originals": { "freight": { "reason": "special handling", "amount": 123.45 }, "0": "..." }, "adjustements": { "freight": { "reason": "special handling", "amount": 123.45 }, "0": "..." }, "credits": { "freight": { "reason": "special handling", "amount": 123.45 }, "0": "..." }, "payments": { "freight": { "reason": "special handling", "amount": 123.45 }, "0": "..." } }, "0": "..." } }, "errors": [], "notices": [] }
Name | Example Value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content
(Shipment) {...}
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
errors
(array) {...}
Messages that AFFECT the outcome of the request will be shown here |
[]
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|
Update the shipment identified by id field from the request uri
[PUT] ship/shipments/{id}
PUT ship/shipments/{id} HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc Content-Type: application/json { "from": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "123", "department": "Reception", "is_commercial": true }, "to": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "123", "department": "Reception", "is_commercial": true }, "packages": { "items": [ { "width": 22, "height": 22, "length": 22, "weight": 22, "description": "Item description" }, "..." ], "units": "imperial", "type": "package", "content": "goods" }, "payment": { "payer": "F" }, "service": { "courier_name": "fedex", "courier_code": "FIRST_OVERNIGHT" }, "options": { "insurance": { "value": 123.45, "description": "Children books" }, "cod": { "method": "check", "payable_to": "Bob", "receiver_phone": "18663208383", "amount": 123.45, "currency": "CAD" }, "signature_required": false, "saturday_delivery": false, "shipping_date": "2015-12-11", "reference": "123 test", "driver_instructions": "Doorbell broken, knock on door", "address_correction": false, "return_documents_as": "url", "shipment_tracking_emails": "jbeans@company.com;shipping1@company.com" } }
Name | Example Value | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
from
(Address) {...}
Where the shipment is originating from |
|
||||||||||||||||||||||||||||||||||||||||||||
to
(Address) {...}
Where the shipment is going |
|
||||||||||||||||||||||||||||||||||||||||||||
packages
(Packages) {...}
What are you shipping? |
|
||||||||||||||||||||||||||||||||||||||||||||
payment
(enum-objects) {...}
Who is paying for this shipment? |
Flagship Payment
Collect Payment
Third Party Payment
|
||||||||||||||||||||||||||||||||||||||||||||
service
(Service) {...}
What courier and courier service are we using? |
|
||||||||||||||||||||||||||||||||||||||||||||
options
(Options) {...}
The options for this shipment. None of the options are required. |
|
{ "content": { "id": 1122341, "tracking_number": "1P0075H07633636542", "pickup_id": 1122342, "status": "prequoted", "from": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "123", "department": "Reception", "is_commercial": true }, "to": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "123", "department": "Reception", "is_commercial": true }, "options": { "insurance": { "value": 123.45, "description": "Children books" }, "cod": { "method": "check", "payable_to": "Bob", "receiver_phone": "18663208383", "amount": 123.45, "currency": "CAD" }, "signature_required": false, "saturday_delivery": false, "shipping_date": "2015-12-11", "reference": "123 test", "driver_instructions": "Doorbell broken, knock on door", "address_correction": false, "return_documents_as": "url", "shipment_tracking_emails": "jbeans@company.com;shipping1@company.com" }, "pickup_details": { "confirmation": "2929602E9CP", "address": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "11", "is_commercial": false }, "boxes": 4, "weight": 6, "units": "imperial", "date": "2015-12-31", "from": "09:00:00", "until": "17:00:00", "location": "Reception", "instruction": "contain glass product, etc.", "is_cancelled": false }, "service": { "courier_name": "fedex", "courier_code": "FIRST_OVERNIGHT" }, "packages": { "items": [ { "width": 22, "height": 22, "length": 22, "weight": 22, "description": "Item description" }, "..." ], "units": "imperial", "type": "package", "content": "goods" }, "price": { "charges": { "freight": 123.45, "signature_required": 123.45, "insurance": 123.45, "multipiece": 123.45 }, "adjustments": { "fuel_surchage": 123.45 }, "subtotal": 123.45, "total": 123.45, "taxes": { "gst": 123.45, "qst": 123.45, "pst": 123.45, "hst": 123.45 } }, "brokerage_details": { "description": "Chocolate covered gift box", "items": [ { "country_of_origin": "CA", "description": "Sweet Biscuits", "duty_value": 3074.67, "class_number": "1905312900", "duty": 0, "excise_tax_rate": 0, "excise_tax_amount": 0, "gst_hst_rate": 0, "gst_hst_amount": 0, "tax_value": 0, "sima_assess": 0, "total_customs": 0 }, "..." ], "total_duty": 3074.67, "currency": "CAD", "billed_weight": 6, "weight_units": "imperial", "package_count": 4, "invoice_number": "1234567" }, "documents": { "regular": "https:\/\/api.smartship.io\/ship\/201012221\/labels\/102xae1e80cddb\/?document=reg", "thermal": "https:\/\/api.smartship.io\/ship\/201012221\/labels\/102xae1e80cddb\/?document=therm" }, "nafta_form_url": "https:\/\/www.cbp.gov\/sites\/default\/files\/documents\/CBP%20Form%20434_3.pdf", "transit_details": [ { "last_update": "2017-06-09 23:00:00", "status": "D", "message": "Shipment delivered to YALE via GUELPH, ON depot" }, "..." ] }, "errors": [], "notices": [] }
Name | Example Value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content
(Shipment) {...}
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
errors
(array) {...}
Messages that AFFECT the outcome of the request will be shown here |
[]
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|
Confirms the shipment identified by id field from the request uri
[PUT] /ship/{Id}/confirm
PUT /ship/{Id}/confirm HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc Content-Type: application/json
{ "content": { "shipment_id": "201012221", "tracking_number": "329018797020", "price": { "charges": { "freight": 123.45, "signature_required": 123.45, "insurance": 123.45, "multipiece": 123.45 }, "adjustments": null, "subtotal": 123.45, "total": 123.45, "taxes": { "gst": 123.45, "qst": 123.45, "pst": 123.45, "hst": 123.45 } }, "service": { "flagship_code": "expressEarlyAm", "courier_code": "FIRST_OVERNIGHT", "courier_desc": "First Overnight", "courier_name": "FedEx", "transit_time": 1, "estimated_delivery_date": "2015-12-03 23:30:00" }, "labels": { "regular": "https:\/\/api.smartship.io\/ship\/201012221\/labels\/102xae1e80cddb\/?document=reg", "thermal": "https:\/\/api.smartship.io\/ship\/201012221\/labels\/102xae1e80cddb\/?document=therm" }, "packages": [ { "width": 22, "height": 22, "length": 22, "weight": 22, "description": "Item description", "pin": "72909513411" }, "..." ], "documents_only": false, "commercial_invoice": "https:\/\/api.smartship.io\/ship\/201012221\/labels\/102xae1e80cddb\/?document=statement", "nafta_form_url": "https:\/\/www.cbp.gov\/sites\/default\/files\/documents\/CBP%20Form%20434_3.pdf" }, "errors": [], "notices": [] }
Name | Example Value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content
(Shipment) {...}
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
errors
(array) {...}
Messages that AFFECT the outcome of the request will be shown here |
[]
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|
Cancel the shipment identified by its shipment id field from the request uri
[DELETE] /ship/shipments/{id}
DELETE /ship/shipments/{id} HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc Content-Type: application/json
Get the list of shipments
[GET] /ship/shipments
Parameter | Value | Description |
---|---|---|
courier | ups |
Filter by the courier. Options are ups|dhl|fedex|purolator|canpar|dicom |
status | dispatched |
Filter by the shipment status. Options are prequoted|quoted|predispatched|dispatched|manifested|cancelled |
reference | Some reference |
Filter by the shipment reference |
tracking_number | 1234321445 |
The shipment's tracking number. |
package_pin | 112234 |
A shipment's package pin |
page | 2 |
The page wanted in the list of results |
limit | 23 |
The number of results wanted per page. Maximum 50. |
GET /ship/shipments HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc
{ "content": { "records": [ { "id": 1122341, "tracking_number": "1P0075H07633636542", "pickup_id": 1122342, "status": "prequoted", "from": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "123", "department": "Reception", "is_commercial": true }, "to": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "123", "department": "Reception", "is_commercial": true }, "options": { "insurance": { "value": 123.45, "description": "Children books" }, "cod": { "method": "check", "payable_to": "Bob", "receiver_phone": "18663208383", "amount": 123.45, "currency": "CAD" }, "signature_required": false, "saturday_delivery": false, "shipping_date": "2015-12-11", "reference": "123 test", "driver_instructions": "Doorbell broken, knock on door", "address_correction": false, "return_documents_as": "url", "shipment_tracking_emails": "jbeans@company.com;shipping1@company.com" }, "pickup_details": { "confirmation": "2929602E9CP", "address": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "11", "is_commercial": false }, "boxes": 4, "weight": 6, "units": "imperial", "date": "2015-12-31", "from": "09:00:00", "until": "17:00:00", "location": "Reception", "instruction": "contain glass product, etc.", "is_cancelled": false }, "service": { "courier_name": "fedex", "courier_code": "FIRST_OVERNIGHT" }, "packages": { "items": [ { "width": 22, "height": 22, "length": 22, "weight": 22, "description": "Item description" }, "..." ], "units": "imperial", "type": "package", "content": "goods" }, "price": { "charges": { "freight": 123.45, "signature_required": 123.45, "insurance": 123.45, "multipiece": 123.45 }, "adjustments": { "fuel_surchage": 123.45 }, "subtotal": 123.45, "total": 123.45, "taxes": { "gst": 123.45, "qst": 123.45, "pst": 123.45, "hst": 123.45 } }, "brokerage_details": { "description": "Chocolate covered gift box", "items": [ { "country_of_origin": "CA", "description": "Sweet Biscuits", "duty_value": 3074.67, "class_number": "1905312900", "duty": 0, "excise_tax_rate": 0, "excise_tax_amount": 0, "gst_hst_rate": 0, "gst_hst_amount": 0, "tax_value": 0, "sima_assess": 0, "total_customs": 0 }, "..." ], "total_duty": 3074.67, "currency": "CAD", "billed_weight": 6, "weight_units": "imperial", "package_count": 4, "invoice_number": "1234567" }, "documents": { "regular": "https:\/\/api.smartship.io\/ship\/201012221\/labels\/102xae1e80cddb\/?document=reg", "thermal": "https:\/\/api.smartship.io\/ship\/201012221\/labels\/102xae1e80cddb\/?document=therm" }, "nafta_form_url": "https:\/\/www.cbp.gov\/sites\/default\/files\/documents\/CBP%20Form%20434_3.pdf", "transit_details": [ { "last_update": "2017-06-09 23:00:00", "status": "D", "message": "Shipment delivered to YALE via GUELPH, ON depot" }, "..." ] }, "..." ], "current_page": 2, "max_per_page": 20, "nb_of_pages": 7, "nb_of_records": 131 }, "errors": [], "notices": [] }
Name | Example Value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content
(Shipment List) {...}
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
errors
(array) {...}
Messages that AFFECT the outcome of the request will be shown here |
[]
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|
This will find out how package items can be fitted into the available boxes (Items are assumed to be shipped flat)
[POST] /ship/packing
POST /ship/packing HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc Content-Type: application/json { "items": [ { "length": 22, "width": 22, "height": 10, "weight": 10, "description": "computer screen" }, "..." ], "boxes": [ { "box_model": "S4319", "length": 52, "inner_length": 51, "width": 52, "inner_width": 51, "height": 30, "inner_height": 29, "weight": 1, "max_weight": 50 }, "..." ], "units": "imperial" }
Name | Example Value | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
items
(array) {...}
Array of all the items |
|
||||||||||||||||||||
boxes
(array) {...}
Array of all the available boxes (the models of boxes based on size) |
|
||||||||||||||||||||
units
(string)
imperial (inch, lb) or metric (cm, Kg)
|
imperial |
{ "content": { "packages": [ { "box_model": "S-4319", "length": 52, "width": 52, "height": 30, "weight": 32, "items": [ "computer screen", "computer screen", "album" ] }, "..." ], "units": "imperial" }, "errors": [], "notices": [] }
Name | Example Value | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content
(Packing Result) {...}
|
|
||||||||||||||||||||||||||||
errors
(array) {...}
Messages that AFFECT the outcome of the request will be shown here |
[]
|
||||||||||||||||||||||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|
This will return a list of all available courier services
[GET] /ship/available_services
Parameter | Value | Description |
---|---|---|
courier_code | ups |
Filter by the courier. Options are ups|dhl|fedex|purolator|canpar|dicom |
GET /ship/available_services HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc
{ "content": { "ups": [ { "flagship_code": "expressAm", "courier_code": "PRIORITY_OVERNIGHT", "courier_description": "Priority Overnight" }, "..." ], "fedex": [ { "flagship_code": "expressAm", "courier_code": "PRIORITY_OVERNIGHT", "courier_description": "Priority Overnight" }, "..." ], "purolator": [ { "flagship_code": "expressAm", "courier_code": "PRIORITY_OVERNIGHT", "courier_description": "Priority Overnight" }, "..." ] }, "errors": [], "notices": [] }
Name | Example Value | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content
(Available Services) {...}
List of couriers with their services |
|
||||||||||||||||||||||||||||||||
errors
(array) {...}
Messages that AFFECT the outcome of the request will be shown here |
[]
|
||||||||||||||||||||||||||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|
This will allow you to generate labels.
Get a label by shipment id.
[GET] /ship/{shipmentId}/labels
Parameter | Value | Description |
---|---|---|
document | reg |
Get different types of labels ref|therm|statement|watch_info |
GET /ship/{shipmentId}/labels HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc
[Binary Data]
This will allow to get one(many), modify, and create pick-up for shipment.
Get the pickup identified by id field from the request uri
[GET] /pickups/{id}
GET /pickups/{id} HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc
{ "content": { "id": 48979792, "confirmation": "2929602E9CP", "address": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "11", "is_commercial": false }, "courier": "ups", "boxes": 4, "weight": 6, "date": "2015-12-31", "from": "09:00", "until": "17:00", "location": "BackDoor, Basement, BetweenDoors, Counter, Desk, FrontDesk, FrontDoor, FrontPorch, Garage, GateHouse, Kiosk, Lab, LoadingDock, Lobby, Mailbox, MailRoom, Office, OutsideDoor, PartsDepartment, Pharmacy, ProShop, Receiving, Reception, Security, ServiceCounter, Shipping, SideDoor, Switchboard, Vault, Warehouse", "instruction": "contain glass product, etc.", "cancelled": "0", "units": "imperial", "shipments": [ "integer", "..." ] }, "errors": [], "notices": [] }
Name | Example Value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content
(Pickup) {...}
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
errors
(array) {...}
Messages that AFFECT the outcome of the request will be shown here |
[]
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|
Create a pickup without shipment ids.
[POST] /pickups
POST /pickups HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc Content-Type: application/json { "address": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "211", "is_commercial": true }, "courier": "ups", "boxes": 4, "weight": 6, "units": "imperial", "date": "2015-12-31", "from": "09:00", "until": "17:00", "location": "BackDoor, Basement, BetweenDoors, Counter, Desk, FrontDesk, FrontDoor, FrontPorch, Garage, GateHouse, Kiosk, Lab, LoadingDock, Lobby, Mailbox, MailRoom, Office, OutsideDoor, PartsDepartment, Pharmacy, ProShop, Receiving, Reception, Security, ServiceCounter, Shipping, SideDoor, Switchboard, Vault, Warehouse", "to_country": "CA", "is_ground": false, "instruction": "contain glass product, etc." }
Name | Example Value | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
address
(Address) {...}
Pickup address |
|
||||||||||||||||||||||||
courier
(enum)
Courier service provider |
ups|dhl|fedex|purolator|canpar|dicom | ||||||||||||||||||||||||
boxes
(integer)
Number of boxes ceiled up to the nearest integer. eg: 3.2 = 4 |
4 | ||||||||||||||||||||||||
weight
(integer)
Weight ceiled up to the nearest integer. eg: 5.7 = 6 |
6 | ||||||||||||||||||||||||
units
(enum)
Units of measurement |
imperial|metric | ||||||||||||||||||||||||
date
(date)
Can be YYYY-MM-DD . The default is the current date.
|
2015-12-31 | ||||||||||||||||||||||||
from
(timestamp)
Can be hour and minute in 24h format, hh:mm
|
09:00 | ||||||||||||||||||||||||
until
(timestamp)
Can be hour and minute in 24h format, hh:mm
|
17:00 | ||||||||||||||||||||||||
location
(string)
Where the pick-up location is. The default is "Reception". |
BackDoor, Basement, BetweenDoors, Counter, Desk, FrontDesk, FrontDoor, FrontPorch, Garage, GateHouse, Kiosk, Lab, LoadingDock, Lobby, Mailbox, MailRoom, Office, OutsideDoor, PartsDepartment, Pharmacy, ProShop, Receiving, Reception, Security, ServiceCounter, Shipping, SideDoor, Switchboard, Vault, Warehouse | ||||||||||||||||||||||||
to_country
(string)
Destination country code in ISO 3166-1 alpha-2 two letter country code format |
CA | ||||||||||||||||||||||||
is_ground
(boolean)
It has to be true for Fedex Ground pickup.
|
false | ||||||||||||||||||||||||
instruction
(string)
Special attention for delivery |
contain glass product, etc. |
{ "content": { "id": 48979792, "confirmation": "2929602E9CP", "address": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "11", "is_commercial": false }, "courier": "ups", "boxes": 4, "weight": 6, "date": "2015-12-31", "from": "09:00", "until": "17:00", "location": "BackDoor, Basement, BetweenDoors, Counter, Desk, FrontDesk, FrontDoor, FrontPorch, Garage, GateHouse, Kiosk, Lab, LoadingDock, Lobby, Mailbox, MailRoom, Office, OutsideDoor, PartsDepartment, Pharmacy, ProShop, Receiving, Reception, Security, ServiceCounter, Shipping, SideDoor, Switchboard, Vault, Warehouse", "instruction": "contain glass product, etc.", "cancelled": "0", "units": "imperial", "shipments": [ "integer", "..." ] }, "errors": [], "notices": [] }
Name | Example Value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content
(Pickup) {...}
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
errors
(array) {...}
Messages that AFFECT the outcome of the request will be shown here |
[]
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|
Create a list of pickups for confirmed shipments. One pickup will be created for shipments that have the same courier, postal code, street number, and suite number (if applicable). (Note: Fedex Ground and other Fedex services are treated seperately for pickups).
[POST] /pickups
POST /pickups HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc Content-Type: application/json { "address": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "211", "is_commercial": true }, "date": "2015-12-31", "from": "09:00", "until": "17:00", "location": "BackDoor, Basement, BetweenDoors, Counter, Desk, FrontDesk, FrontDoor, FrontPorch, Garage, GateHouse, Kiosk, Lab, LoadingDock, Lobby, Mailbox, MailRoom, Office, OutsideDoor, PartsDepartment, Pharmacy, ProShop, Receiving, Reception, Security, ServiceCounter, Shipping, SideDoor, Switchboard, Vault, Warehouse", "instruction": "contain glass product, etc.", "shipments": [ "integer", "..." ] }
Name | Example Value | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
address
(Address) {...}
If the address is provided, it will override the addresses of all the associated shipments as the pickup address for all the shipments. |
|
||||||||||||||||||||||||
date
(date)
Can be YYYY-MM-DD . The default is the current date.
|
2015-12-31 | ||||||||||||||||||||||||
from
(timestamp)
Can be hour and minute in 24h format, hh:mm
|
09:00 | ||||||||||||||||||||||||
until
(timestamp)
Can be hour and minute in 24h format, hh:mm
|
17:00 | ||||||||||||||||||||||||
location
(string)
Where the pick-up location is. The default is "Reception". |
BackDoor, Basement, BetweenDoors, Counter, Desk, FrontDesk, FrontDoor, FrontPorch, Garage, GateHouse, Kiosk, Lab, LoadingDock, Lobby, Mailbox, MailRoom, Office, OutsideDoor, PartsDepartment, Pharmacy, ProShop, Receiving, Reception, Security, ServiceCounter, Shipping, SideDoor, Switchboard, Vault, Warehouse | ||||||||||||||||||||||||
instruction
(string)
Special attention for delivery |
contain glass product, etc. | ||||||||||||||||||||||||
shipments
(array) {...}
Shipment Ids (e.g., 123456, 234567,) |
[]
|
{ "content": [ { "id": 48979792, "confirmation": "2929602E9CP", "address": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "11", "is_commercial": false }, "courier": "ups", "boxes": 4, "weight": 6, "date": "2015-12-31", "from": "09:00", "until": "17:00", "location": "BackDoor, Basement, BetweenDoors, Counter, Desk, FrontDesk, FrontDoor, FrontPorch, Garage, GateHouse, Kiosk, Lab, LoadingDock, Lobby, Mailbox, MailRoom, Office, OutsideDoor, PartsDepartment, Pharmacy, ProShop, Receiving, Reception, Security, ServiceCounter, Shipping, SideDoor, Switchboard, Vault, Warehouse", "instruction": "contain glass product, etc.", "cancelled": "0", "units": "imperial", "shipments": [ "integer", "..." ] }, "..." ], "errors": [], "notices": [] }
Name | Example Value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content
(array) {...}
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
errors
(array) {...}
Messages that AFFECT the outcome of the request will be shown here |
[]
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|
{ "content": [ { "id": 48979792, "confirmation": "2929602E9CP", "address": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "11", "is_commercial": false }, "courier": "ups", "boxes": 4, "weight": 6, "date": "2015-12-31", "from": "09:00", "until": "17:00", "location": "BackDoor, Basement, BetweenDoors, Counter, Desk, FrontDesk, FrontDoor, FrontPorch, Garage, GateHouse, Kiosk, Lab, LoadingDock, Lobby, Mailbox, MailRoom, Office, OutsideDoor, PartsDepartment, Pharmacy, ProShop, Receiving, Reception, Security, ServiceCounter, Shipping, SideDoor, Switchboard, Vault, Warehouse", "instruction": "contain glass product, etc.", "cancelled": "0", "units": "imperial", "shipments": [ "integer", "..." ] }, "..." ], "errors": { "fedex": { "message": "Service is not available to this location", "shipments": "12345,123232" } }, "notices": [] }
Name | Example Value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content
(array) {...}
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
errors
(object) {...}
Messages that AFFECT the outcome of the request will be shown here |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|
Update the pickup identified by id field from the request uri
[PUT] /pickups/{id}
PUT /pickups/{id} HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc Content-Type: application/json { "address": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "211", "is_commercial": true }, "courier": "ups", "boxes": 4, "weight": 6, "units": "imperial", "date": "2015-12-31", "from": "09:00", "until": "17:00", "location": "BackDoor, Basement, BetweenDoors, Counter, Desk, FrontDesk, FrontDoor, FrontPorch, Garage, GateHouse, Kiosk, Lab, LoadingDock, Lobby, Mailbox, MailRoom, Office, OutsideDoor, PartsDepartment, Pharmacy, ProShop, Receiving, Reception, Security, ServiceCounter, Shipping, SideDoor, Switchboard, Vault, Warehouse", "to_country": "CA", "is_ground": false, "instruction": "contain glass product, etc." }
Name | Example Value | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
address
(Address) {...}
Pickup address |
|
||||||||||||||||||||||||
courier
(enum)
Courier service provider |
ups|dhl|fedex|purolator|canpar|dicom | ||||||||||||||||||||||||
boxes
(integer)
Number of boxes ceiled up to the nearest integer. eg: 3.2 = 4 |
4 | ||||||||||||||||||||||||
weight
(integer)
Weight ceiled up to the nearest integer. eg: 5.7 = 6 |
6 | ||||||||||||||||||||||||
units
(enum)
Units of measurement |
imperial|metric | ||||||||||||||||||||||||
date
(date)
Can be YYYY-MM-DD . The default is the current date.
|
2015-12-31 | ||||||||||||||||||||||||
from
(timestamp)
Can be hour and minute in 24h format, hh:mm
|
09:00 | ||||||||||||||||||||||||
until
(timestamp)
Can be hour and minute in 24h format, hh:mm
|
17:00 | ||||||||||||||||||||||||
location
(string)
Where the pick-up location is. The default is "Reception". |
BackDoor, Basement, BetweenDoors, Counter, Desk, FrontDesk, FrontDoor, FrontPorch, Garage, GateHouse, Kiosk, Lab, LoadingDock, Lobby, Mailbox, MailRoom, Office, OutsideDoor, PartsDepartment, Pharmacy, ProShop, Receiving, Reception, Security, ServiceCounter, Shipping, SideDoor, Switchboard, Vault, Warehouse | ||||||||||||||||||||||||
to_country
(string)
Destination country code in ISO 3166-1 alpha-2 two letter country code format |
CA | ||||||||||||||||||||||||
is_ground
(boolean)
It has to be true for Fedex Ground pickup.
|
false | ||||||||||||||||||||||||
instruction
(string)
Special attention for delivery |
contain glass product, etc. |
{ "content": { "id": 48979792, "confirmation": "2929602E9CP", "address": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "11", "is_commercial": false }, "courier": "ups", "boxes": 4, "weight": 6, "date": "2015-12-31", "from": "09:00", "until": "17:00", "location": "BackDoor, Basement, BetweenDoors, Counter, Desk, FrontDesk, FrontDoor, FrontPorch, Garage, GateHouse, Kiosk, Lab, LoadingDock, Lobby, Mailbox, MailRoom, Office, OutsideDoor, PartsDepartment, Pharmacy, ProShop, Receiving, Reception, Security, ServiceCounter, Shipping, SideDoor, Switchboard, Vault, Warehouse", "instruction": "contain glass product, etc.", "cancelled": "0", "units": "imperial", "shipments": [ "integer", "..." ] }, "errors": [], "notices": [] }
Name | Example Value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content
(Pickup) {...}
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
errors
(array) {...}
Messages that AFFECT the outcome of the request will be shown here |
[]
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|
Cancel the pickup identified by id field from the request uri
[DELETE] /pickups/{id}
DELETE /pickups/{id} HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc Content-Type: application/json
List pick-ups filter by parameters
[GET] /pickups
Parameter | Value | Description |
---|---|---|
courier | ups |
Courier service provider |
date | 2015-12-31 |
Can be YYYY-MM-DD |
page | 2 |
The page wanted in the list of results |
limit | 23 |
The number of results wanted per page. Maximum 50. |
GET /pickups HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc
{ "content": { "records": [ { "id": 48979792, "confirmation": "2929602E9CP", "address": { "name": "ACME inc.", "attn": "Bob", "address": "123 Main Street", "suite": "227", "city": "Montreal", "country": "CA", "state": "QC", "postal_code": "A1A1A1", "phone": "18663208383", "ext": "11", "is_commercial": false }, "courier": "ups", "boxes": 4, "weight": 6, "date": "2015-12-31", "from": "09:00", "until": "17:00", "location": "BackDoor, Basement, BetweenDoors, Counter, Desk, FrontDesk, FrontDoor, FrontPorch, Garage, GateHouse, Kiosk, Lab, LoadingDock, Lobby, Mailbox, MailRoom, Office, OutsideDoor, PartsDepartment, Pharmacy, ProShop, Receiving, Reception, Security, ServiceCounter, Shipping, SideDoor, Switchboard, Vault, Warehouse", "instruction": "contain glass product, etc.", "cancelled": "0", "units": "imperial", "shipments": [ "integer", "..." ] }, "..." ], "current_page": 2, "max_per_page": 20, "nb_of_pages": 7, "nb_of_records": 131 }, "errors": [], "notices": [] }
Name | Example Value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content
(Pickup List) {...}
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
errors
(array) {...}
Messages that AFFECT the outcome of the request will be shown here |
[]
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|
This will allow to get a list of custom brokers
Returns a list of all the available custom brokers
[GET] /brokers
GET /brokers HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc
{ "content": [ { "id": 12, "code": "555", "name": "TCARATAC Inc", "street_lines": "2094 Grand Island Blvd.", "city": "Grand Island", "state_province_code": "NY", "postal_code": "14072", "country_code": "US", "phone": "716-773-9207" }, "..." ], "errors": [], "notices": [] }
Name | Example Value | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content
(array) {...}
|
|
||||||||||||||||||||
errors
(array) {...}
Messages that AFFECT the outcome of the request will be shown here |
[]
|
||||||||||||||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|
This allows to get tracking information about shipments that you processed through FlagShip
Returns the tracking information related to a specific shipment
[GET] /ship/track
Parameter | Value | Description |
---|---|---|
shipment_id | 1234567 |
The shipment id. Required if tracking_number is not specified. |
tracking_number | 1234567 |
The shipment's tracking number. Required if shipment_id is not specified. |
GET /ship/track HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc
{ "content": { "current_status": "D", "courier_update": "2015-10-01 16:43:00", "status_desc": "Description: Shipment delivered to K BONCI via BURNABY, BC depot", "shipment_id": "1406346" }, "errors": [], "notices": [] }
Name | Example Value | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
content
(Tracking) {...}
|
|
||||||||||
errors
(array) {...}
Messages that AFFECT the outcome of the request will be shown here |
[]
|
||||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|
This allows to list, create, modify, and delete address groups.
Get an address group's details by id.
[GET] /addresses/groups/{groupId}
GET /addresses/groups/{groupId} HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc
{ "content": { "id": 1122341, "name": "Your company addresses", "number_of_addresses": 10, "deletable": false, "type": "company_addresses" }, "errors": [], "notices": [] }
Name | Example Value | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content
(Address Group) {...}
|
|
||||||||||||
errors
(array) {...}
Messages that AFFECT the outcome of the request will be shown here |
[]
|
||||||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|
Get the list of address groups
[GET] /addresses/groups
Parameter | Value | Description |
---|---|---|
name | Your company addresses |
Filter by group name |
group_type | company_addresses |
Filter by the type of address group. Options are company_addresses|shipping_addresses|pickup_addresses|other_addresses |
contains_address_name | John Doe |
Find address groups that contain at least one address with the provided recipient name |
GET /addresses/groups HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc
{ "content": { "records": [ { "id": 1122341, "name": "Your company addresses", "number_of_addresses": 10, "deletable": false, "type": "company_addresses" }, "..." ], "current_page": 2, "max_per_page": 20, "nb_of_pages": 7, "nb_of_records": 131 }, "errors": [], "notices": [] }
Name | Example Value | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content
(Address Group List) {...}
|
|
||||||||||||||||||||||||
errors
(array) {...}
Messages that AFFECT the outcome of the request will be shown here |
[]
|
||||||||||||||||||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|
Create an address group.
[POST] /addresses/groups
POST /addresses/groups HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc Content-Type: application/json { "name": "Your company addresses", "type": "company_addresses" }
Name | Example Value |
---|---|
name
(string)
Name of the address group |
Your company addresses |
type
(string)
Type of the address group (company_addresses|shipping_addresses|pickup_addresses|other_addresses). Default: other_addresses. |
company_addresses |
{ "content": { "id": 1122341, "name": "Your company addresses", "type": "company_addresses" }, "errors": [], "notices": [] }
Name | Example Value | ||||||||
---|---|---|---|---|---|---|---|---|---|
content
(Address Group) {...}
|
|
||||||||
errors
(array) {...}
Messages that AFFECT the outcome of the request will be shown here |
[]
|
||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|
Update the address group identified by id field from the request uri.
[PUT] /addresses/groups/{id}
PUT /addresses/groups/{id} HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc Content-Type: application/json { "name": "Your company addresses", "type": "company_addresses" }
Name | Example Value |
---|---|
name
(string)
Name of the address group |
Your company addresses |
type
(string)
Type of the address group (company_addresses|shipping_addresses|pickup_addresses|other_addresses). Default: other_addresses. |
company_addresses |
{ "content": { "id": 1122341, "name": "Your company addresses", "type": "company_addresses" }, "errors": [], "notices": [] }
Name | Example Value | ||||||||
---|---|---|---|---|---|---|---|---|---|
content
(Address Group) {...}
|
|
||||||||
errors
(array) {...}
Messages that AFFECT the outcome of the request will be shown here |
[]
|
||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|
Delete the address group identified by id field from the request uri (Note: groups that contain transaction addresses of a company cannot be deleted).
[DELETE] /addresses/groups/{id}
DELETE /addresses/groups/{id} HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc Content-Type: application/json
This resource allows to get information about access points
Get list of locations
[GET] /locations
Parameter | Value | Description |
---|---|---|
courier | ups |
Filter by the courier. Options are ups|fedex |
limit | 5 |
Filter by number of locations |
distance | 6.48 |
Filter by radius. Units : KM |
address | Yobain 14 |
The address for nearby locations |
city | Mexico City |
City for above mentioned address |
postal_code | 14200 |
Postal code for the address |
state | CDMX |
State or province for the address |
country | MX |
Country for the address |
GET /locations HTTPS/1.1 Host: api.smartship.io X-Smartship-Token: kXCSNMGOk39QB5cp-DlnFGX3TA77xZE_yqWqwnia1pGc
{ "content": { "content": [ { "courier": "ups", "location_id": "151160", "location_number": "U33773754", "latitude": "19.29207038", "longitude": "-99.2164306", "name": "MASPC MX", "address": "PICACHO AJUSCO 508\\n\\nPADIERNA", "postal_code": "14200", "city": "CDMX", "state": "CIUDAD DE MEXICO", "country": "MX", "phone": "N\/A", "distance": "0.9", "opening_hours": { "Monday": [ { "day": "Monday", "hours": "09:00-16:00" }, "..." ] } }, "..." ] }, "errors": [], "notices": [] }
Name | Example Value | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
content
(Location List) {...}
|
|
||||||||||||||||||||||||||||||||||||||||||||
errors
(array) {...}
Messages that AFFECT the outcome of the request will be shown here |
[]
|
||||||||||||||||||||||||||||||||||||||||||||
notices
(array) {...}
Messages that MIGHT affect the outcome of the request will be shown here |
[]
|