Integration reference for the Sunset Pacific Transportation API: authentication, quoting, tendering, tracking and document retrieval.
Download Postman collectionBefore you can call any endpoint, you need an active account. Follow these steps once; afterwards you only authenticate to obtain a token.
Register at the account registration page. During registration you define your username and password.
tms89.A Sunset Pacific administrator must enable your account before it can be used. Until it is approved, authentication will fail even with valid credentials.
Once your account is enabled, request a token from the
Login endpoint using your username (not email)
and password. Include the returned access_token in the
Authorization header of every subsequent request.
Prefer Postman? Download the ready-made collection plus a pre-configured environment and skip the manual setup.
The baseUrl is already set in each environment — you never copy a URL.
Download collection Production environment Test environment
baseUrl is already set for that environment — nothing to copy.username and password (your API username, not your email). Your account must already be enabled by an administrator.access_token automatically.Authorization: Bearer {{access_token}}, so no copy/paste of the token is needed. Create Quote also auto-fills the quoteId variable used by Get Quote, Tender and Upload Tender File.Authenticate the user with the system and obtain the access_token.
https://api.sunsetpacific.com/token
https://apisunsetpacificstage.azurewebsites.net/token
| Location | Param | Value |
|---|---|---|
| Header | Accept | application/json |
| Header | Content-Type | application/x-www-form-urlencoded |
| Body | grant_type | password |
| Body | username | Your username here (not email) |
| Body | password | Your password here |
200 — token issued. All further API calls must include this key in the Authorization header.
{
"access_token": <auth_key>,
"token_type": "bearer",
"expires_in": <int>,
"userName": <string>,
".issued": "Thu, 30 Mar 2017 18:16:49 GMT",
".expires": "Thu, 30 Mar 2017 19:16:49 GMT"
}
400 — { "error": "invalid_grant", "error_description": "The user name or password is incorrect." }
500 — { "error": "Internal Server Error" }
Create a new quote.
https://api.sunsetpacific.com/api/Quotes
https://apisunsetpacificstage.azurewebsites.net/api/Quotes
| Location | Param | Type |
|---|---|---|
| Header | Accept | application/json |
| Header | Content-Type | application/json |
| Header | Authorization | Bearer <auth_key> |
| Body | Origin | int |
| Body | PickUpDate | string |
| Body | Destination | int |
| Body | LinealFootageKnown | float |
| Body | Weight | int |
| Body | IsFloorLoaded | bool? |
| Body | ShippingRemarks | string (incidental codes, see glossary) |
| Body | MeasurementLFT | int? |
| Body | NonFloorLoadeds | array |
| Body | FloorLoadeds | array |
{
"Origin": 1,
"Destination": 30401,
"PickUpDate": "2016-01-01",
"LinealFootageKnown": 33.66,
"Weight": 10000,
"IsFloorLoaded": null,
"NonFloorLoadeds": [],
"FloorLoadeds": [],
"ShippingRemarks": null,
"MeasurementLFT": 2
}
{
"Origin": 1,
"Destination": 30401,
"PickUpDate": "2016-01-01",
"LinealFootageKnown": 0,
"Weight": 11000,
"IsFloorLoaded": false,
"NonFloorLoadeds": [
{ "Quantity": 12, "Turned": true, "width": 11, "Length": 11, "Height": 11, "Stacking": 1 },
{ "Quantity": 12, "Turned": true, "width": 12, "Length": 12, "Height": 11, "Stacking": 2 }
],
"FloorLoadeds": [],
"ShippingRemarks": null,
"MeasurementLFT": null
}
{
"Origin": 1,
"Destination": 30401,
"PickUpDate": "2016-01-01",
"LinealFootageKnown": 0,
"Weight": 11000,
"IsFloorLoaded": true,
"FloorLoadeds": [
{ "Quantity": 12, "Measurement": true, "width": 11, "Length": 11, "Height": 11 },
{ "Quantity": 12, "Measurement": true, "width": 12, "Length": 12, "Height": 11 }
],
"NonFloorLoadeds": [],
"ShippingRemarks": "DA",
"MeasurementLFT": null
}
200 — an object containing the quote information.
{
"QuoteId": 2,
"Origin": 1,
"PickUpDate": "2017-01-26",
"Destination": 30301,
"LinealFootageKnown": 0,
"Weight": 12,
"IsFloorLoaded": true,
"ShippingRemarks": "DA / SAT",
"LinealFootRate": 695.65,
"Surcharge": 69.56,
"Total": 765.21,
"TotalOriginal": 765.21,
"Discount": 0,
"EstimatedDays": 5,
"Status": "Tendered",
"DueDateType": 0,
"Created": "2017-01-11"
}
400 — { "error": "An Exception occurred" }
401 — { "error": "Authorization has been denied for this request." }
| Attribute | Type | Required | Possible value | Description / Error codes |
|---|---|---|---|---|
| Origin | int | Yes | 1–8 | 1 = S. California (90000–93099), 2 = N. California (93100–96199), 3 = Arizona (85000–85799), 4 = Las Vegas (88900–89199), 5 = Chicago (60000–60899), 6 = Northeast IN (46300–46499), 7 = Southeast WI (53100–53499), 8 = Greater Chicago (60900–61199). 999: Invalid Origin value. |
| PickUpDate | string | Yes | 2016-01-01 | Date the freight will be picked up. 998: Pickup date must be within the next 30 days. 997: cannot be empty. 996: invalid format. |
| Destination | int | Yes | 30301 | ZIP Code of the destination, within a range provided by Sunset Pacific. 995: destination not allowed by the origin. |
| IsFloorLoaded | bool? | No | null / true / false | null if lineal foot is known, true if freights are floor loaded, false if non floor loaded (pallets). 994: only true, false or null allowed. |
| MeasurementLFT | int? | No | null, 0, 1, 2 | Unit of the lineal foot rate: 0 = lineal feet, 1 = cubic feet, 2 = cubic meters. 993: required (0,1,2) when IsFloorLoaded is not null. |
| LinealFootageKnown | float | No | Max depends on MeasurementLFT | 40 max lineal feet, 2000 cubic feet, 57 cubic meters. 992/991/990/989: range validations. |
| ShippingRemarks | string | No | "DA / MIL" | Incidental codes separated by " / ". See incidental codes below. |
| Weight | int | Yes | Max 25000 lbs | Total freight weight. 988: must be an integer between 1 and 37000 lbs. |
| Quantity | int | Yes | 32 | Belongs to both freight arrays. 987: must be an integer greater than 0. |
| Length | int | Yes | 1–500 | Value in inches. 986: must be between 1 and 500. |
| Height | int | Yes | 1–108 | Value in inches. 985: must be between 1 and 108. |
| Width | int | Yes | 1–100 | Value in inches. 984: must be between 1 and 100. |
| Turned | bool | Yes if non floor loaded | true / false | Non Floor Loaded only. Default: true. 983: only true or false. |
| Stacking | int | Yes if non floor loaded | 1, 2, 3 | 1 = no stacking, 2 = double, 3 = triple (108" max pallet spot height). Default: 1. 982: only 1, 2 or 3. |
| Measurement | bool | Yes if floor loaded | true / false | Floor Loaded only. false = inches, true = centimeters. Default: true. 981: only true or false. |
| NonFloorLoadeds | array | Yes if IsFloorLoaded = false | — | 980: at least one item required. 979: must be empty/null when floor loaded. 977: total lineal footage max 40. |
| FloorLoadeds | array | Yes if IsFloorLoaded = true | — | 978: at least one item required. 976: must be empty/null when non floor loaded. 977: total lineal footage max 40. |
ShippingRemarks): DA – Delivery Appointment, CFS – Container Freight Station pick up,
LAX – LAX Airport pick up, MIL – Military/Prison/Camp delivery, CH – Church / place of worship, SAT – Saturday pickup,
SCH – School delivery.
LinealFootageKnown and dimensions are sent, the system takes the biggest lineal feet.
Evolution of Create Quote: create a quote using the origin ZIP code instead of the numeric origin. Use this endpoint when you know the origin ZIP.
https://api.sunsetpacific.com/api/Quotes/QuoteByZipCode
https://apisunsetpacificstage.azurewebsites.net/api/Quotes/QuoteByZipCode
Headers and body are identical to Create Quote, except Origin is replaced by
OriginZipCode (int) and Destination is a numeric destination id.
{
"OriginZipCode": 85001,
"Destination": 1588,
"PickUpDate": "2016-01-01",
"LinealFootageKnown": 33.66,
"Weight": 10000,
"IsFloorLoaded": null,
"NonFloorLoadeds": [],
"FloorLoadeds": [],
"ShippingRemarks": null,
"MeasurementLFT": 2
}
200
{
"QuoteId": 2,
"Origin": 3,
"OriginZipCode": 85001,
"PickUpDate": "2017-01-26",
"Destination": 1588,
"Weight": 12,
"IsFloorLoaded": true,
"ShippingRemarks": "DA / SAT",
"LinealFootRate": 695.65,
"Surcharge": 69.56,
"Total": 765.21,
"EstimatedDays": 5,
"Status": "Tendered",
"Created": "2017-01-11"
}
400 — An Exception occurred
401 — Authorization has been denied for this request.
Retrieve an existing quote. id is the integer returned when the quote was created.
https://api.sunsetpacific.com/api/Quotes/{id}
https://apisunsetpacificstage.azurewebsites.net/api/Quotes/{id}
| Location | Param | Value |
|---|---|---|
| Header | Accept | application/json |
| Header | Content-Type | application/json |
| Header | Authorization | Bearer <auth_key> |
200 — the quote object (same structure as Create Quote).
400 — user info not found / QuoteID {id} has expired / QuoteID {id} was not found / An Exception occurred.
401 — { "error": "Authorization has been denied for this request." }
Tender an existing quote.
https://api.sunsetpacific.com/api/tender
https://apisunsetpacificstage.azurewebsites.net/api/tender
Headers: Accept: application/json, Content-Type: application/json, Authorization: Bearer <auth_key>.
{
"quoteId": 1234,
"shipper": {
"shipperName": "Alberth Einstein",
"contactName": "Pablo James",
"city": "Chino Hills",
"state": "CA",
"address": "5378 Buttonwood Court",
"zip": "91709",
"email": "any@any.com",
"phone": "9096067899"
},
"finalDestination": {
"consigneeName": "CEGA Security HQ - Test",
"contactName": "Tania Lopez",
"city": "Tustin",
"state": "NY",
"address": "1234 Test Ave",
"zip": "30331",
"email": "any@any.com",
"phone": "9096067899"
},
"shippingRemarks": "DA / SAT",
"commodityDescription": "any text",
"billingReference": "billing reference number: LL0524",
"pickupInformation": {
"pickupDate": "2017-01-26",
"pickUpTimeFrom": 0,
"pickUpTimeTo": 0
},
"numberReference": "My number 198223",
"deliveryInformation": {
"dueDateType": 1,
"dueMustDelivery": "2017-01-26",
"duePreSetAppt": "2017-01-26",
"dueDateInit": "2017-01-26",
"dueDateEnd": "2017-01-26",
"dueDateEndTime": 0,
"dueDateEndTimeSelector": 0
},
"deliveryReference": "any text"
}
200
{
"tenderDate": "2018-01-11",
"infoMessages": [
{ "severity": "ERROR", "message": "string", "diagnostic": "string", "source": "SYSTEM" }
]
}
400 — { "error": { Error list } }
401 — { "error": "Authorization has been denied for this request." }
500 — ERRORGETQUOTE / ERRORSENDMAIL / ERROR
| Attribute | Type | Required | Description / Error codes |
|---|---|---|---|
| quoteId | int | Yes | ID of a quote previously created. 1000: doesn't exist. |
| shipperName | string | Yes | Sender's name. 1001: empty. 1002: already in use. |
| shipper.contactName | string | No | Contact's name. |
| shipper.city | string | Yes | 1003: City cannot be empty. |
| shipper.address | string | Yes | 1004: Shipper Address cannot be empty. |
| shipper.zip | string | Yes | 1005: invalid format. 1022: must be between zipinitialcode and zipendcode. |
| shipper.email | string | No | 1006: invalid format. |
| shipper.phone | string | No | 1007: invalid format. |
| consigneeName | string | Yes | Receiver's consignee. 1008: empty. 1009: already in use. |
| finalDestination.city | string | Yes | 1010: City cannot be empty. |
| finalDestination.address | string | Yes | 1011: Consignee Address cannot be empty. |
| finalDestination.zip | string | Yes | 1012: invalid format. 1013: must be between zipinitialcode and zipendcode. |
| finalDestination.email | string | No | 1014: invalid format. |
| finalDestination.phone | string | No | 1015: invalid format. |
| pickupDate | string | Yes | If pickup is today, the value must be 4 hours later. 1016: empty. 1017: cannot be before today. |
| pickUpTimeFrom | int | Yes | Index of the aHours array (24-hour). 1018: invalid value. 1019: 4-hour window required. |
| pickUpTimeTo | int | Yes | Index of the aHours array. 1020: invalid value. 1021: must be greater than pickUpTimeFrom. |
| dueDateType | int | Yes | 0 NoDueDate, 1 NoAppointment, 2 DueDate, 3 DeliveryWindow, 4 PreSetAppointment. 1023: invalid. |
| dueMustDelivery | string | Cond. | Required if dueDateType = DueDate. 1025: invalid. |
| duePreSetAppt | string | Cond. | Required if dueDateType = PreSetAppointment. 1026: invalid. |
| dueDateInit | string | Cond. | Required if dueDateType = DeliveryWindow. 1027: invalid. |
| dueDateEnd | string | Cond. | Required if dueDateType = DeliveryWindow. 1028: invalid. |
| dueDateEndTime | int | Cond. | Index of aHours; required when dueDateType = PreSetAppointment. 1029: invalid. |
| commodityDescription | string | Yes | 1016: cannot be empty. |
Upload documents for a tendered quote.
https://api.sunsetpacific.com/api/tender/{quoteId}/UploadFile
https://apisunsetpacificstage.azurewebsites.net/api/tender/{quoteId}/UploadFile
| Location | Param | Value |
|---|---|---|
| Header | Accept | multipart/form-data |
| Header | Content-Type | multipart/form-data |
| Header | Authorization | Bearer <auth_key> |
Send the file(s) as form-data in the request body. The response confirms the upload of the documents for the given quoteId.
Track an existing order number. orderNumber is the integer generated with the order.
https://api.sunsetpacific.com/api/Tracking/{orderNumber}
https://apisunsetpacificstage.azurewebsites.net/api/Tracking/{orderNumber}
Headers: Accept: application/json, Content-Type: application/json, Authorization: Bearer <auth_key>.
200
{
"OrderNumber": "256894",
"Status": "Completed",
"GPS": "",
"DateTime": "01-20-2019 07:06:13",
"Location": "DENVER,CO",
"TrailerType": "UNKNOWN",
"Move": "270705",
"FinETA": "01-28-19 14:00",
"CurrentSegment": {
"Tractor": "UNKNOWN",
"Carrier": "LOGISTIC",
"Driver 1": "UNKNOWN",
"Trailer 1": "UNKNOWN",
"SegMls": "276"
},
"MovementHistory": [
{ "Dispatcher": "Rita", "BillToName": "NUTRI-BON", "City": "RIVERSIDE", "State": "CA", "OutStatus": "Completed", "ArrivalDate": "01-23-19 01:00", "Carrier": "LOGISTIC", "CompanyName": "NUTRI-BON" }
],
"Shipper": { "ShipperName": "LIDO CONNECTION/EXOTIC", "City": "CHINO", "State": "CA" },
"Consignee": { "ConsigneeName": "KEHE DISTRIBUTORS LLC", "City": "AURORA", "State": "CO" },
"TotalPieces": "10",
"TotalWeight": "7,5000",
"TotalCharge": "5,718.58",
"TotalLHM": "5,413.58",
"TotalAC": "305.00"
}
400 — ProNumber does not exist, please enter another
401 — Authorization has been denied for this request.
500 — Something went wrong. Please try again later.
Retrieve the documents of an order. orderNumber is the integer generated with the order.
https://api.sunsetpacific.com/api/Document/{orderNumber}
https://apisunsetpacificstage.azurewebsites.net/api/Document/{orderNumber}
Headers: Accept: application/json, Content-Type: application/json, Authorization: Bearer <auth_key>.
200
{
"OrderNumber": "256894",
"Status": "Completed",
"Documents": [
{ "Name": "Document01", "Type": "pdf", "Document": "VBORw0KGgoAAAANSUhEUT3ZOBKHi==" },
{ "Name": "Document02", "Type": "pdf", "Document": "VBORw0KGgoAAAANSUhEUT3ZOBKHi==" }
]
}
400 — An Exception occurred
401 — Authorization has been denied for this request.
404 — The order number does not exist / Order number not completed
| Attribute | Type | Description |
|---|---|---|
| OrderNumber | int | The ID of an order previously created. |
| Status | string | Tracking status (e.g. Completed). |
| Name | string | Name of the document. |
| Type | string | Type of document (e.g. "pdf"). |
| Document | bytes | Returns a base64 string of bytes. |
Track an order by ProNumber, an integer provided by Sunset Pacific when the order is generated.
https://api.sunsetpacific.com/api/TrackingByPRONumber/{proNumber}
https://apisunsetpacificstage.azurewebsites.net/api/TrackingByPRONumber/{proNumber}
Headers: Accept: application/json, Content-Type: application/json, Authorization: Bearer <auth_key>.
proNumber is sent the API responds with Status: Pending.
Wait 5 minutes before making a second request.
{
"OrderNumber": 375914,
"Status": "Pending",
"DateTime": "0001-01-01T00:00:00",
"Location": null,
"FinETA": "0001-01-01T00:00:00",
"Shipper": null,
"Consignee": null,
"TotalPieces": 0,
"TotalWeight": 0,
"TotalMiles": 0
}
{
"OrderNumber": 377341,
"Status": "In Transit",
"DateTime": "2022-12-29T07:00:25",
"Location": "FULTONVILLE,NY",
"FinETA": "2022-12-28T14:00:00",
"Shipper": { "ShipperName": "CAL CARTAGE", "City": "City of Industry", "State": "CA" },
"Consignee": { "ConsigneeName": "ALB", "City": "Castleton On Hudson", "State": "NY" },
"TotalPieces": 0,
"TotalWeight": 0,
"TotalMiles": 0
}
400 — ProNumber does not exist, please enter another
401 — Authorization has been denied for this request.
500 — Something went wrong. Please try again later.
Retrieve the documents of an order by ProNumber.
https://api.sunsetpacific.com/api/DocumentByPRONumber/{proNumber}
https://apisunsetpacificstage.azurewebsites.net/api/DocumentByPRONumber/{proNumber}
Headers: Accept: application/json, Content-Type: application/json, Authorization: Bearer <auth_key>.
200
{
"OrderNumber": "256894",
"Status": "Completed",
"Documents": [
{ "Name": "Document01", "Type": "pdf", "Document": "VBORw0KGgoAAAANSUhEUT3ZOBKHi==" },
{ "Name": "Document02", "Type": "pdf", "Document": "VBORw0KGgoAAAANSUhEUT3ZOBKHi==" }
]
}
400 — Invalid proNumber
401 — Authorization has been denied for this request.
500 — Something went wrong. Please try again later.
Version 2 of the tender endpoint. The pickup time fields use a 24-hour string format instead of the aHours index.
https://api.sunsetpacific.com/api/v2/tender
https://apisunsetpacificstage.azurewebsites.net/api/v2/tender
Headers: Accept: application/json, Content-Type: application/json, Authorization: Bearer <auth_key>.
{
"quoteId": 1234,
"shipper": {
"shipperName": "Alberth Einstein",
"city": "Chino Hills",
"state": "CA",
"address": "5378 Buttonwood Court",
"zip": "91709",
"email": "any@any.com",
"phone": "9096067899"
},
"finalDestination": {
"consigneeName": "CEGA Security HQ - Test",
"city": "Tustin",
"state": "NY",
"address": "1234 Test Ave",
"zip": "30331",
"email": "any@any.com",
"phone": "9096067899"
},
"shippingRemarks": "DA / SAT",
"commodityDescription": "any text",
"billingReference": "billing reference number: LL0524",
"pickupInformation": {
"pickupDate": "2017-01-26",
"pickUpTimeFrom": "00:00",
"pickUpTimeTo": "13:00"
},
"numberReference": "My number 198223",
"deliveryInformation": {
"dueDateType": 1,
"dueMustDelivery": "2017-01-26",
"duePreSetAppt": "2017-01-26",
"dueDateInit": "2017-01-26",
"dueDateEnd": "2017-01-26",
"dueDateEndTime": 0,
"dueDateEndTimeSelector": 0
},
"deliveryReference": "any text"
}
200
{
"tenderDate": "2018-01-11",
"infoMessages": [
{ "severity": "ERROR", "message": "string", "diagnostic": "string", "source": "SYSTEM" }
]
}
400 — { "error": { Error list } }
401 — Authorization has been denied for this request.
500 — ERRORGETQUOTE / ERRORSENDMAIL / ERROR
pickUpTimeFrom and pickUpTimeTo are strings in 24-hour format
(e.g. "09:00"). A minimum 4-hour difference between them is required.
1018/1020: must be 24-hour format (00:00–23:59). 1019: 4-hour difference required. 1021: To must be greater than From.
All status codes are standard HTTP status codes:
| Range | Meaning |
|---|---|
| 2XX | Success of some kind. |
| 4XX | Error occurred on the client's part. |
| 5XX | Error occurred on the server's part. |
| Version | Date | Author | Description |
|---|---|---|---|
| 1.0 | 24-Mar-2017 | Angel Guemez | Initial |
| 1.1 | 09-May-2017 | Angel Guemez | Added link to the development site |
| 1.2 | 11-Jul-2017 | Angel Guemez | Updated "IsFloorLoaded" / URL production |
| 2.0 | 01-Feb-2018 | Angel Guemez | Tender documentation |
| 2.1 | 28-Aug-2018 | Hebert Peña | Update URL production and test |
| 3.0 | 22-Feb-2019 | Jesus Gutierrez | Tracking order number information |
| 3.1 | 17-Oct-2019 | Hebert Peña | Fix with DueDateType |
| 3.2 | 05-Oct-2022 | Jesus Gutierrez | Tracking by ProNumber and Document by ProNumber |
| 3.3 | 25-Jan-2024 | Xaviero Cervera | Added Chicago region, incidental codes and instructions |
| 4.0 | 13-Mar-2025 | Abraham Solís | QuoteByZipCode endpoint added |
| 4.1 | 07-Apr-2025 | Abraham Solís | Version 2 of Tender 24-hour pickup date format |
| 4.2 | 30-Apr-2025 | Abraham Solís | Content-types of some endpoints corrected |
| 4.3 | 25-Jul-2025 | Abraham Solís | aHours array added for the tender |