Introduction
Welcome to the Transit API.
You can use our API to access product information, submit new orders and view your order status in our database.
You can view code examples in the dark area to the right. Any language able to make HTTP calls will work. The examples use shell scripting curl commands.
Please use the newest available APIs for all new implementations
Authentication
Transit uses API authentication tokens to allow access to the API. You can register a new Transit API auth token by communicating with your sales representative.
An API auth token is linked to a Transit Customer Zone account.
The linked Transit Customer Zone account defines the Transit warehouse and default ship-to location used by the API.
Transit expects for the API auth token to be included in all API requests to the server in a header that looks like the following:
Authorization: Basic YourAuthTokenBase64
The GET APIs are browser explorable: the browser will ask for the credentials. Enter the auth token in the username field and leave the password field empty.
Test Environment
A simple sandbox feature is available to facilitate new integrations.
A special auth token TEST
can be used with all endpoints. When you use this auth token, you will receive fake data in the HTTP response. This fake data is in the same format and encoding than real data.
Products
Get Products
curl "https://api.transitinc.com/v1/products?products=8-56140,LOP-LP5"
-H "Authorization: Basic YourAuthTokenBase64"
The above command returns JSON structured like this:
{
"products": [
{
"product": "8-56140",
"name": "(5580) ROTOR (TOP QUALITY)",
"price": 9.57,
"prices": [],
"available": 71
},
{
"product": "LOP-LP5",
"name": "OIL FILTER (LOOP)",
"price": 3.57,
"prices": [
{ "qty": 10, "price": 3.25 }
],
"available": 12
}
]
}
This endpoint retrieves a list of products.
HTTP Request
GET https://api.transitinc.com/v1/products
Query Parameters
Parameter | Required | Description |
---|---|---|
products | yes | Comma separated list of Transit part numbers |
Error codes
See the Errors section to know how to read error codes.
Error Code | Message |
---|---|
4001 | At least one product number is required. |
Get Products V2
curl "https://api.transitinc.com/v2/products?whse=001&products=8-56140,LOP-LP5,PPC-D741&ignoreProductError=true"
-H "Authorization: Basic YourAuthTokenBase64"
The above command returns JSON structured like this:
{
"products": [
{
"product": "8-56140",
"name": "ROTOR (TOP QUALITY)",
"weight": 5.30000,
"price": 12.64,
"unit": "each",
"altPrice": 12.64,
"altUnit": "each",
"prices": [],
"available": 74
},
{
"product": "18-ATO10",
"name": "STD BLADE FUSES 10 AMPS (TOP QUALITY)",
"weight": 0.0200,
"price": 0.60,
"unit": "P10",
"altPrice": 0.06,
"altUnit": "Un",
"prices": [],
"available": 88
},
{
"product": "AQL-47101",
"name": "AQUAPEL GLASS TREATMENT (AQUAPEL)",
"weight": 0.10400,
"price": 6.95,
"unit": "each",
"altPrice": 6.95,
"altUnit": "each",
"prices": [
{
"qty": 6,
"price": 6.59,
"altPrice": 6.59
},
{
"qty": 24,
"price": 6.19,
"altPrice": 6.19
},
{
"qty": 120,
"price": 5.89,
"altPrice": 5.89
}
],
"available": 494
}
],
"errors": {
"code": 2011,
"message": "Product PPC-D741 not found in Warehouse 001.",
"errors": []
}
}
This endpoint retrieves a list of products.
HTTP Request
GET https://api.transitinc.com/v2/products
Query Parameters
Parameter | Required | Description |
---|---|---|
products | yes | Comma separated list of Transit part numbers |
whse | no | Transit warehouse to get results from |
ignoreProductError | no | true / false - When true products will be returned even if an error is encountered. Defaults to false. |
Error codes
See the Errors section to know how to read error codes.
Error Code | Message |
---|---|
2003 | Product XXX is invalid. |
2011 | Product XXX not found in Warehouse XXX. |
4001 | At least one product number is required. |
6001 | Invalid warehouse, or access not allowed for this warehouse. |
Orders
Submit Order
curl "https://api.transitinc.com/v1/orders"
-X POST
-H "Authorization: Basic YourAuthTokenBase64"
-H "Content-Type: application/json"
-d '{
"purchaseOrder": "123456",
"isPickup": false,
"shipTo": {
"LanguageNo": "EN",
"Name": "John Doe",
"Phone": "(514) 432-4323",
"Email": "johndoe@hotmail.com",
"AddressLine1": "123, Fake street",
"AddressLine2": null,
"City": "Montreal",
"State": "QC",
"Zip": "D6G 9J4",
"Country": "CA",
"Note": "LAISSER SUR PLACE SI PERSONNE"
},
"details": [
{ "product": "8-56140", "qty": 2 },
{ "product": "LOP-LP5", "qty": 1 }
]
}'
The above command returns JSON structured like this:
{
"success": true
}
This endpoint submits a new order to Transit.
HTTP Request
POST https://api.transitinc.com/v1/orders
Query Parameters
Parameter | Required | Description |
---|---|---|
purchaseOrder | yes | Unique alphanumeric order number, will be set as the PO on the Transit Invoice for this order. Max 10 characters. |
isPickup | yes | false if you want Transit to ship the order. true for a customer pickup at Transit Warehouse. |
shippingService | no | For shipped orders, the desired shipping service. |
shipTo | no | Don't specify the shipTo object for pickup orders or if you want to keep the default shipto configured in the linked Transit Customer Zone account. |
shipTo.LanguageNo | yes | Packing Slip Language. Must be EN, or FR. |
shipTo.Name | yes | Ship to name, on carrier label, packing slip |
shipTo.Phone | yes | Ship to phone, for carrier |
shipTo.Email | no | Ship to email, for carrier |
shipTo.AddressLine1 | yes | Ship to address line 1 |
shipTo.AddressLine2 | no | Ship to address line 2 |
shipTo.City | yes | Ship to city |
shipTo.State | yes | Ship to state (2 char) |
shipTo.Zip | yes | Ship to zip/postal code |
shipTo.Country | yes | Ship to country must be CA or US. |
shipTo.Note | yes | Ship to note (for carrier/customer) max 100 caracters. |
details.product | yes | Transit part number |
details.qty | yes | Order Qty |
Error codes
See the Errors section to know how to read error codes.
Error Code | Message |
---|---|
2000 | Order not created because the request contains error(s). |
2001 | purchaseOrder must be unique. |
2002 | shipTo LanguageNo must be EN or FR. |
2003 | product XXX is invalid. |
2004 | product XXX qty XXX is not available. |
2005 | product XXX qty XXX must be greater than 0. |
2006 | purchaseOrder must be alphanumeric only. |
2007 | purchaseOrder must be less than 11 characters. |
2008 | product XXX Qty XXX must be a factor of XXX. |
2009 | shipTo State must be 2 letters. |
2010 | shipTo Country must be CA or US. |
2101 | purchaseOrder is required. |
2102 | shipTo LanguageNo is required. |
2103 | shipTo Name is required. |
2104 | shipTo Phone is required. |
2105 | shipTo AddressLine1 is required. |
2106 | shipTo City is required. |
2107 | shipTo State is required. |
2108 | shipTo Zip is required. |
2109 | shipToCountry is required. |
2110 | A product is required. |
2112 | shipTo address is invalid. |
Submit Order V2
curl "https://api.transitinc.com/v2/orders"
-X POST
-H "Authorization: Basic YourAuthTokenBase64"
-H "Content-Type: application/json"
-d '{
"whse": "001",
"whsePickup": "001",
"purchaseOrder": "123456",
"shippingService": "UPSGround",
"transitNote": "transit note",
"documentNote": "document note",
"shipTo": {
"languageNo": "EN",
"name": "John Doe",
"phone": "(514) 432-4323",
"email": "johndoe@hotmail.com",
"addressLine1": "123, Fake street",
"addressLine2": null,
"addressLine3": null,
"city": "Montreal",
"state": "QC",
"zip": "D6G 9J4",
"country": "CA",
"note": "LAISSER SUR PLACE SI PERSONNE"
},
"details": [
{
"product": "8-56140",
"crossReference": "ref#"
"qty": 2,
"keepBo": true,
"declaredValue": 9.99
},
{
"product": "LOP-LP5",
"crossReference": "ref#"
"qty": 1,
"keepBo": true,
"declaredValue": 9.99
}
]
}'
The above command returns JSON structured like this:
{
"success": true,
"warnings": []
}
This endpoint submits a new order to Transit.
HTTP Request
POST https://api.transitinc.com/v2/orders
HTTP Response
Status code: 201
Location header: /v1/orders/purchase-order
Query Parameters
Parameter | Required | Description |
---|---|---|
whse | no | Warehouse at which you wish to submit your order, will default to your default warehouse. |
whsePickup | no | For pickup orders, Warehouse at which you wish to pickup your order. If not set, the order will be shipped using shippingService or the default shipping method registered to your account. |
purchaseOrder | yes | Unique alphanumeric order number, will be set as the PO on the Transit Invoice for this order. |
shippingService | no | For shipped orders, the desired shipping service. If set, prevails over whsePickup, making the order a shipped order. |
transitNote | no | Transit will take note of this. This note will not be printed on any document. The nature of this note may cause delays. |
documentNote | no | Transit will not take note of this. This note will be printed on the documents related to this order. |
shipTo | no | Don't specify the shipTo object for pickup orders or if you want to keep the default shipto configured in the linked Transit Customer Zone account. |
shipTo.languageNo | no | Language used for notifications. Defaults to token's language no. |
shipTo.name | yes | Ship to name, on carrier label |
shipTo.phone | yes | Ship to phone, for carrier |
shipTo.email | no | Ship to email, for carrier |
shipTo.addressLine1 | yes | Ship to address line 1 |
shipTo.addressLine2 | no | Ship to address line 2 |
shipTo.addressLine3 | no | Ship to address line 3 |
shipTo.city | yes | Ship to city |
shipTo.state | yes | Ship to state |
shipTo.zip | yes | Ship to zip/postal code |
shipTo.country | yes | Ship to country. |
shipTo.note | yes | Ship to note (for carrier/customer). |
details | yes | List of products you wish to order. |
details.product | yes | Transit part number |
details.qty | yes | Order Qty (unit is used, no altUnit are supported) |
details.crossReference | no | Your reference number for the product. |
details.keepBo | no | Keep back order if there is not enough stock to fullfill your order. |
details.declaredValue | no | Declared valued of the product. Required for international orders. |
Error codes
See the Errors section to know how to read error codes.
Error Code | Message |
---|---|
2000 | Order not created because the request contains error(s). |
2001 | Purchase Order must be unique. |
2002 | Ship To LanguageNo must be EN or FR. |
2003 | product XXX is invalid. |
2005 | Quantity must be greater than zero for product XXX. |
2006 | Purchase Order's characters allowed are alphanumeric, dash and underscore. |
2007 | Purchase Order must not exceed 22 characters.. |
2010 | Ship To Country Code must be CA or US. |
2011 | Product XXX not found in Warehouse XXX. |
2018 | Back Order is not allowed for XXX, this product will be discontinued. |
2019 | Invalid pickup warehouse. |
2020 | Shipping Service must not exceed 100 characters. |
2021 | Invalid Shipping Service. |
2023 | Oups! Qty XX exceeds our availability of XX for product XXX. |
2024 | Declared value must be greater than zero. (Product XXX) |
2101 | purchaseOrder is required. |
2103 | Ship To Name is required. |
2104 | Ship To Phone is required. |
2105 | Ship To Address Line 1 is required. |
2106 | Ship To City is required. |
2107 | Ship To State is required. |
2108 | Ship To Zip is required. |
2109 | Ship To Country Code is required. |
2110 | A product is required. |
2113 | Ship To Name must not exceed 30 characters. |
2114 | Concatenated Ship To Address Lines must not exceed 90 characters. |
2115 | ShipTo City must not exceed 20 characters. |
2116 | Ship To State Code must not exceed 2 characters. |
2117 | Ship To Zip must not exceed 10 characters. |
2119 | Ship To Phone must not exceed 20 characters. |
2120 | Ship To Email must not exceed 60 characters. |
2121 | Note must not exceed 30 characters. |
2122 | Document Note must not exceed 960 characters. |
2125 | Transit Note must not exceed 960 characters. |
2126 | Cross reference must not exceed 24 characters for product XXX. |
2128 | Invalid state for Country XX. |
2129 | Declared value is required for international sales. (Product XXX) |
6001 | Invalid warehouse, or access not allowed for this warehouse. |
Warnings
Product XXX, XX units ordered, XX units kept BO.
Get Order
curl "https://api.transitinc.com/v1/orders/123456"
-H "Authorization: Basic YourAuthTokenBase64"
The above command returns JSON structured like this:
{
"purchaseOrder": "123456",
"status": "Shipped",
"carrier": "Nationex",
"carrierService": null,
"carrierTrackingNo": "123456789",
"shipToName": "John Doe",
"shipToPhone": "(514) 432-4323",
"shipToEmail": "johndoe@hotmail.com",
"shipToAddressLine1": "123, Fake street",
"shipToAddressLine2": null,
"shipToCity": "Montreal",
"shipToState": "QC",
"shipToZip": "D6G 9J4",
"shipToCountry": "CA",
"details": [
{ "product": "8-56140", "orderQty": 2, "shipQty": 2 },
{ "product": "LOP-LP5", "orderQty": 1, "shipQty": 0 }
]
}
This endpoint retrieves an order.
HTTP Request
GET https://api.transitinc.com/v1/orders/<purchaseOrder>
Query Parameters
Parameter | Required | Description |
---|---|---|
purchaseOrder | yes | Supplied purchaseOrder when the order was submitted. |
Error codes
See the Errors section to know how to read error codes.
Error Code | Message |
---|---|
5001 | Order not found. |
5002 | Order details not found. |
Inventory
Get Inventory
curl "https://api.transitinc.com/v1/inventory?warehouse=001&type=FULL&format=JSON"
-H "Authorization: Basic YourAuthTokenBase64"
The above command returns JSON structured like this:
{
"version": "Full-201902130145",
"inventory": [
["8-56140", 43],
["LOP-LP5", 8]
]
}
This endpoint retrieves the inventory for a specific Transit warehouse, all products.
HTTP Request
GET https://api.transitinc.com/v1/inventory
Query Parameters
Parameter | Required | Description |
---|---|---|
warehouse | yes | Transit warehouse code. Example: 001 is Levis Warehouse. |
type | yes | FULL: for the full list of products refreshed each hour. UPDATE: for the list of all products that their inventory has changed today (since midnight). |
format | yes | JSON for json output. CSV for csv output. |
Error codes
See the Errors section to know how to read error codes.
Error Code | Message |
---|---|
6001 | Invalid warehouse, or access not allowed for this warehouse. |
6002 | Invalid type. |
6003 | Invalid format. |
6004 | Information not available at this time. |
Pricing
Get Pricing
curl "https://api.transitinc.com/v1/pricing?warehouse=001&type=FULL&format=JSON"
-H "Authorization: Basic YourAuthTokenBase64"
The above command returns JSON structured like this:
{
"version": "Full-201902130145",
"pricing": [
["K8T-102429","EACH","Transit Auto","827098402437",104.12],
["K8T-102430","EACH","Transit Auto","827098402444",104.05]
]
}
This endpoint retrieves the pricing for a specific Transit warehouse, all products.
HTTP Request
GET https://api.transitinc.com/v1/pricing
Query Parameters
Parameter | Required | Description |
---|---|---|
warehouse | yes | Transit warehouse code. Example: 001 is Levis Warehouse. |
type | yes | FULL: for the full list of products refreshed each week. |
format | yes | JSON for json output. CSV for csv output. |
Result Column
ColumnName | Description |
---|---|
ProductKey | Transit warehouse product name |
UnitStock | The stocking unit is the basis for all quantity transactions |
WebBrandName | Web brand name |
UPC | UPC |
Price | Price |
Error codes
See the Errors section to know how to read error codes.
Error Code | Message |
---|---|
6001 | Invalid warehouse, or access not allowed for this warehouse. |
6002 | Invalid type. |
6003 | Invalid format. |
6004 | Information not available at this time. |
Errors
Single error code returned:
{
"code": 1234,
"message": "This is a detailed error message."
}
More than one error code returned:
{
"code": 1234,
"message": "This is a detailed error message.",
"errors": [
{ "code": 2222, "message": "This is a detailed error message 1." },
{ "code": 3333, "message": "This is a detailed error message 2." },
]
}
For every API endpoint, if an invalid or empty auth token is supplied, the response HTTP code is 401
.
For any other error, the response HTTP code is 500
instead of 200
.
Additionnaly, a JSON object is returned with a detailed error code and message. If more than one error is encountered in the same request, an additionnal errors
JSON array is returned.
New in V2 routes
The error response always returns an "errors" array. It is empty if there is a single error.
An error response will have HTTP code 400
(Bad Request).