Carrier’s official API
Sunset Pacific Transportation API: integration guide
Sunset Pacific Transportation offers a JSON web API (the "Sunset Web API") for customers who ship from its California, Arizona and Las Vegas origin regions. It covers creating and retrieving rate quotes priced by linear foot, tendering a quote as a shipment, tracking an order and downloading its documents. It suits shippers and TMS developers who want to quote and book Sunset Pacific volume freight without using the web portal.
This guide covers Sunset Pacific Transportation’s own API. Credentials come from Sunset Pacific Transportation, not from FreightAPIs, and we are not affiliated with them.
Want one API key for carrier terminals, NMFC and ports instead? FreightAPIs API docs →
At a glance
| Carrier | Sunset Pacific Transportation |
|---|---|
| Type | Volume LTL / partial truckload carrier |
| Interface | REST/JSON |
| Authentication | OAuth 2.0 password grant (bearer token) |
| Capabilities | Authentication, Rate quote, Tender (book a shipment), Shipment tracking, Documents |
Getting access
- The API is not documented on a public developer page. The specification is provided to Sunset Pacific customers on request, together with a username and password.
- Contact Sunset Pacific Transportation through your sales or customer-service representative to request API access. Separate test and production environments exist; the carrier supplies the URLs.
- The specification is dated 2017–2019. Confirm with the carrier that the version you received is current before building against it.
- The documentation does not cover pricing, rate limits or an approval process.
Authentication
OAuth 2.0 password grant (bearer token).
- POST to `/token` with `Content-Type: application/x-www-form-urlencoded` and the form fields `grant_type=password`, `username` and `password`. The username is an account user name, not an email address.
- The response returns `access_token`, `token_type` ("bearer"), `expires_in`, `.issued` and `.expires`. The sample token is valid for 30 minutes, so cache it and log in again before it expires.
- Send `Authorization: Bearer <access_token>` and `Accept: application/json` on every other call.
- Wrong credentials return HTTP 400 with `"error": "invalid_grant"`. A missing or expired token returns HTTP 401 "Authorization has been denied for this request."
Endpoints
Authentication
Exchanges a username and password for a short-lived bearer token.
| POST | /token | Log in and receive an access token. |
Rate quote
Creates a quote from an origin region, a destination ZIP, the total weight and either a known linear footage or a list of pallet or floor-loaded pieces. The response includes the linear-foot rate, surcharge, total and estimated transit days. Saved quotes can be fetched again by ID.
| POST | /api/Quotes | Create a new rate quote. |
| GET | /api/Quotes/{id} | Retrieve a previously created quote by its QuoteId. |
Tender (book a shipment)
Turns an existing quote into a shipment by adding shipper and consignee details, pickup window, delivery requirements and references.
| POST | /api/tender | Tender a previously created quote. |
Shipment tracking
Returns the status, latest location and ETA for an order, the current segment (carrier, tractor, trailer, segment miles) and the movement history, plus shipper, consignee and charge totals.
| GET | /api/Tracking/{orderNumber} | Track an order by its order number. |
Documents
Returns the documents attached to an order, each with a name, a file type and the file content as an encoded string.
| GET | /api/Document/{orderNumber} | Download the documents for an order. |
Example request
Use the base URL Sunset Pacific gives you. The documented samples are sent as JSON even though the header tables list a form-encoded content type; confirm which one your environment expects.
Integration notes
- `Origin` is not a ZIP code. It is a region number from 1 to 4 (S. California, N. California, Arizona, Las Vegas), each tied to a ZIP range. `Destination` must be a ZIP inside the range Sunset Pacific serves from that origin, or you get error 995.
- Give either `LinealFootageKnown` with `MeasurementLFT`, or a piece list with `IsFloorLoaded` true (FloorLoadeds) or false (NonFloorLoadeds), not both arrays. Limits: 40 linear feet, 2,000 cubic feet or 57 cubic meters. If you send both footage and dimensions, the larger linear footage is used.
- Piece dimensions are integers in inches: Length 1–500, Height 1–108, width 1–100. For floor-loaded pieces, `Measurement` true means centimeters. Note the lowercase `width` field name in the samples.
- The weight limit is stated two ways: the field table says 25,000 lb max, but error 988 says 1–37,000 lb. Treat the lower figure as safe until the carrier confirms.
- Validation errors come back as numbered codes (for example 998 invalid pickup date, 993 missing MeasurementLFT). Map the code, not the message text.
- On a tender, `pickUpTimeFrom`, `pickUpTimeTo` and `dueDateEndTime` are indexes into an hours list (24-hour times), not clock values, and a same-day pickup needs at least a 4-hour window. `dueDateType` 0–4 decides which due-date fields are required. Ask the carrier for the full hours list; the specification does not print it.
- The tender call can return HTTP 200 with entries in `infoMessages` whose `severity` is ERROR. Always inspect `infoMessages`. The specification does not show where the order number used for tracking is returned, so confirm this with the carrier.
- Tracking returns numbers as formatted strings (for example "5,718.58") and dates as MM-DD-YYYY or MM-DD-YY with time. Field names contain spaces ("Driver 1", "Trailer 1"). Document content is an encoded string; decode it before saving with the returned `Type` (for example pdf).
FAQ
Does Sunset Pacific Transportation have an API?
Yes. The Sunset Web API is a JSON API for rate quotes, tendering, tracking and documents. The specification and credentials are provided to customers on request.
How does Sunset Pacific API authentication work?
You POST your username and password to `/token` with `grant_type=password` and receive a bearer token. Send it in the `Authorization` header on every call and renew it before it expires.
How are Sunset Pacific API quotes priced?
Quotes are based on linear feet. You either send the known linear footage or a list of pallet or floor-loaded pieces with dimensions, and the response returns the linear-foot rate, surcharge and total.
Can I get POD or shipment documents from the Sunset Pacific API?
Yes. `GET /api/Document/{orderNumber}` returns the documents for an order with a name, type and the encoded file content. The specification does not label which document is the POD.
On FreightAPIs
Official resources
Written from Sunset Pacific Transportation’s published API documentation and last checked 2026-10-09. FreightAPIs is not affiliated with Sunset Pacific Transportation; endpoints and access rules can change, so confirm details in the carrier’s own documentation before going live.
Other carrier API guides
ABF Freight · Estes Express Lines · Saia LTL Freight · TForce Freight · Old Dominion Freight Line · XPO (LTL) · AAA Cooper Transportation · AIT Worldwide Logistics