Trexity v1_0 API (1.0)

Download OpenAPI specification:Download


This OpenAPI Specification describes v1_0 of the Trexity API.

Before getting started, please make sure you've acquired Trexity Merchant API Key.

Each endpoint requires an Authorization header with "Bearer <Trexity API Key>" in order to be used.

Below, we describe the available API endpoints in details and provide examples (request/response and curl ones).


In general wherever an address is expected the format we accept is:


However, we also accept newlines and/or commas delimiting each component.

Postal code and country are optional, however it's better to include them to avoid any ambiguity when we attempt to geocode the address.


123 Fake St, Ottawa ON
123 Fake St, Toronto, Ontario
123 Fake St, Toronto, Ontario, B4T 3F5


123 Fake St, Ottawa ON, K2G 8FT Canada
123 Fake St, Toronto, Ontario, M4T 5F6 Canada
123 Fake St, Toronto, Ontario, B4T 3F5, Canada

Response Envelope

All endpoints will return an object and if there is actual data to be returned, it is going to be named data. Where data may be an array or an object.

If there is error field present on the root JSON object, that means something went wrong and that error message is all we know about it. Additionally, in some cases, you may inspect the HTTP status codes to gather more information.

Please check our payload/response examples in details as well as the curl examples that are a part of each section that documents an operation.

Example of a successful response: { data: ... }

Example of a response with an error: { error: 'Some error message', data: null }

Posting a Shipment

In order for Trexity to start the process of matching drivers for your shipment, your shipment must be posted.

The most common way of doing this is via our (post shipment)[/#operation/postShipment] endpoint.

In order to schedule posting a shipment in the future, please use 'scheduledPostAt' in our (create shipment)[/#operation/createShipment] endpoint.



The bearer token which is your Trexity API KEY.

Every request against a Trexity API endpoint must be accompanied with an Authorization header.

For instance:

curl -X POST\
-H 'Content-Type: application/json'\
-H 'Authorization: Bearer <Trexity API Key>'\
-d '{
  "pickupAddress": "9 Slack Road, Ottawa ON, CA",
  "deliveryAddresses": ["123 Slater Street, Ottawa ON, CA"],
  "requirements": {},
  "orderValue": 2500

Please check our curl examples for more examples.

Security Scheme Type HTTP
HTTP Authorization Scheme bearer

Bearer API Key

In order to obtain a Trexity Merchant API key, you need to sign-up as Merchant at

The API key is a string of 128 characters that you can create after you've logged in as Merchant in Trexity's Merchant Portal (

Feel free to contact for any questions you may have.

Shipping Rates

Prior to creating a Shipment, you can calculate the rates based on the pickup address and the number of stops the driver has to do. See our shipment-rates endpoint for more information.

Calculates the rate for a proposed shipment

Returns the distance (in meters), travel duration (in seconds), and fee from a pickup address to the completion of the shipment (takes into account multiple parcel dropoffs, if any). Supports specifying an order value parameter, which will check against API Preferences configured in the merchant portal.

Request Body schema: application/json

Payload that minimally describes a shipment.

string (AddressOrLatLng) <= 512 characters

Latitutde and longitude values separated by comma or an address to be geocoded into latitude and longitude values.

Addresses are in the format "STREET, CITY PROVINCE, POSTAL_CODE COUNTRY" Where postal code and country are optional, but it's better to include them to avoid ambiguity.


  • 44.339565,-78.666433
  • 308 Rideau St, Ottawa ON, K1N 5Y5 Canada
Array of strings (AddressOrLatLng) [ 1 .. 19 ] items

One or more latitude and longitude values separated by comma or an address to be geocoded into latitude and longitude values.


  • 44.339565,-78.666433
  • 308 Rideau St, Ottawa, ON K1N 5Y5
object (ShipmentRequirements)

Object representing the requirements that to be met by a driver in order for them to be considered for delivery.

number >= 0

The order value, if any. Specified in cents.


Request samples

Content type
  • "pickupAddress": "456 Elgin Street, Ottawa, ON",
  • "deliveryAddresses":
  • "requirements":
  • "orderValue": 2500

Response samples

Content type
  • "data":