Trinet Go API (1.0)

Download OpenAPI specification:Download

The Trinet Go API description

Authentication

  Authentications endpoint (same for Production and UAT):
  - https://auth.gotrinet.com/realms/trinet-realm/protocol/openid-connect/token

  Authentication method: Oauth
  Authentication request:
   - Headers:
      - Content-Type: application/x-www-form-urlencoded
   - Body:
      - grant_type:password
      - client_id:{Your client id}
      - client_secret:{Your client secret}
      - username:{Integration user}
      - password:{Integration password}
  

Carriers

Get carriers

Get all carriers

Authorizations:
bearer

Responses

Response samples

Content type
application/json
{
  • "entries": [
    ],
  • "count": 10
}

Create custom credentials

Create custom credentials for a specific carrier

Authorizations:
bearer
path Parameters
id
required
number

Responses

Rates

Create a shipment and return rates for it

Gets rates and creates the shipment. To book a shipment with a specific rate, use the POST /shipments/bookings/rates/:rateId endpoint.

Authorizations:
bearer
path Parameters
clientId
required
string
Request Body schema: application/json
required

This endpoint takes the shipment data and returns rates from carriers based on its content.

shipperReference
required
string

An identifier for the shipper. This reference could be a PO(purchase order) number, a customer number or any phrase used to identify a shipment.

receiverReference
required
string

An identifier for the receiver. This reference could be a PO(purchase order) number, a customer number or any phrase used to identify a shipment.

customerReference
required
string

An identifier for the customer. This reference could be a PO(purchase order) number, a customer number or any phrase used to identify a shipment.

required
object

An object of type CustomBroker that contains custom broker data.

billTo
required
string
Enum: "BILL_ME" "SHIPPER_RECEIVER" "THIRD_PARTY"

An enum of type BillToOption that specifies the billing mode for the shipment.

costCenter
number

Customer location to billing

accountNumber
required
string

The third party account number is used to indicate which customer account should be charged for the shipment

notes
required
string

A string that contains any additional notes or comments.

required
Array of objects (PackageDto)

An array of objects of type Package that contains information about each package in the shipment.

pickupDate
required
string

A string in ISO 8601 format that specifies the pickup date for the shipment.

required
object

An object of type Person that contains information about the shipper.

required
object

An object of type Person that contains information about the receiver.

required
object

An object of type DangerousGoods that contains information about any dangerous goods in the shipment. Necessary if Dangerous Goods is selected in the accessorials or if HazMat information is provided

termsOfSale
required
string
Enum: "DUTIES_AND_TAXES_UNPAID" "DUTIES_AND_TAXES_PAID"

An enum of type TermsOfSale that specifies the terms of sale for the shipment.

expressAccessorials
required
Array of arrays

An array of strings that specifies any accessorials (additional services) for the shipment. (Must be empty for LTL)

ltlAccessorials
required
Array of arrays

An array of strings that specifies any less-than-truckload (LTL) accessorials (additional services) for the shipment. (Must be empty for Express)

deliveryMode
required
string

The delivery mode for the shipment. (SINGLE or MULTI_DROP)

object

Container for Shipment Service Options.

Responses

Request samples

Content type
application/json
{
  • "shipperReference": "SHIPPER_REF_123",
  • "receiverReference": "RECEIVER_REF_456",
  • "customerReference": "CUSTOMER_REF_789",
  • "customBroker": {
    },
  • "billTo": "BILL_ME",
  • "costCenter": "534",
  • "accountNumber": "123 456 789",
  • "notes": "A string that contains any additional notes or comments",
  • "packages": [
    ],
  • "pickupDate": "2023-03-28T15:00:00.000Z",
  • "shipper": {
    },
  • "receiver": {
    },
  • "dangerousGoods": {
    },
  • "termsOfSale": "DUTIES_AND_TAXES_UNPAID",
  • "expressAccessorials": "Saturday Delivery",
  • "ltlAccessorials": "Pickup - After Hours",
  • "deliveryMode": "SINGLE",
  • "shipmentServiceOptions": {
    }
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Bookings

Book a shipment directly

Books a shipment without specifying a rate ID, a carrier must be specified for the booking process. Returns a tracking ID for the shipment.

Authorizations:
bearer
path Parameters
clientId
required
string
Request Body schema: application/json
required
required
object

Shipment data

carrierId
required
number

Carrier id

serviceLevel
required
string

Carrier service level

consolidationId
required
number

Consolidation id

required
object or null

Pickup data

Responses

Request samples

Content type
application/json
{
  • "data": {
    },
  • "carrierId": 0,
  • "serviceLevel": "string",
  • "consolidationId": 1,
  • "pickup": {
    }
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "trackingId": "270321192985",
  • "consolidation": 1,
  • "transactionNumber": "TRI12_34",
  • "pickupDate": "2021-03-27T00:00:00.000Z",
  • "deliveryDate": "2021-03-27T00:00:00.000Z",
  • "documents": [],
  • "rate": {
    }
}

Book a shipment by providing a rate ID (see Rates for more information)

Books a shipment with a specified rate using the rate ID received from POST /rates. Returns a tracking ID for the shipment.

Authorizations:
bearer
path Parameters
rateId
required
string
clientId
required
string
Request Body schema: application/json
required
required
object

Shipment Pickup data

consolidationId
required
number

Consolidation id

Responses

Request samples

Content type
application/json
{
  • "pickup": {
    },
  • "consolidationId": 1
}

Response samples

Content type
application/json
{
  • "id": 1,
  • "trackingId": "270321192985",
  • "consolidation": 1,
  • "transactionNumber": "TRI12_34",
  • "pickupDate": "2021-03-27T00:00:00.000Z",
  • "deliveryDate": "2021-03-27T00:00:00.000Z",
  • "documents": [],
  • "rate": {
    }
}

Shipments

Get updated rates for an existing shipment

Gets updated rates for a shipment by ID. To book a shipment with a specific rate, use the POST /shipments/bookings/rates/:rateId endpoint.

Authorizations:
bearer
path Parameters
shipmentId
required
string
Request Body schema: application/json
required

This endpoint takes the shipment data and returns rates from carriers based on its content.

shipperReference
required
string

An identifier for the shipper. This reference could be a PO(purchase order) number, a customer number or any phrase used to identify a shipment.

receiverReference
required
string

An identifier for the receiver. This reference could be a PO(purchase order) number, a customer number or any phrase used to identify a shipment.

customerReference
required
string

An identifier for the customer. This reference could be a PO(purchase order) number, a customer number or any phrase used to identify a shipment.

required
object

An object of type CustomBroker that contains custom broker data.

billTo
required
string
Enum: "BILL_ME" "SHIPPER_RECEIVER" "THIRD_PARTY"

An enum of type BillToOption that specifies the billing mode for the shipment.

costCenter
number

Customer location to billing

accountNumber
required
string

The third party account number is used to indicate which customer account should be charged for the shipment

notes
required
string

A string that contains any additional notes or comments.

required
Array of objects (PackageDto)

An array of objects of type Package that contains information about each package in the shipment.

pickupDate
required
string

A string in ISO 8601 format that specifies the pickup date for the shipment.

required
object

An object of type Person that contains information about the shipper.

required
object

An object of type Person that contains information about the receiver.

required
object

An object of type DangerousGoods that contains information about any dangerous goods in the shipment. Necessary if Dangerous Goods is selected in the accessorials or if HazMat information is provided

termsOfSale
required
string
Enum: "DUTIES_AND_TAXES_UNPAID" "DUTIES_AND_TAXES_PAID"

An enum of type TermsOfSale that specifies the terms of sale for the shipment.

expressAccessorials
required
Array of arrays

An array of strings that specifies any accessorials (additional services) for the shipment. (Must be empty for LTL)

ltlAccessorials
required
Array of arrays

An array of strings that specifies any less-than-truckload (LTL) accessorials (additional services) for the shipment. (Must be empty for Express)

deliveryMode
required
string

The delivery mode for the shipment. (SINGLE or MULTI_DROP)

object

Container for Shipment Service Options.

Responses

Request samples

Content type
application/json
{
  • "shipperReference": "SHIPPER_REF_123",
  • "receiverReference": "RECEIVER_REF_456",
  • "customerReference": "CUSTOMER_REF_789",
  • "customBroker": {
    },
  • "billTo": "BILL_ME",
  • "costCenter": "534",
  • "accountNumber": "123 456 789",
  • "notes": "A string that contains any additional notes or comments",
  • "packages": [
    ],
  • "pickupDate": "2023-03-28T15:00:00.000Z",
  • "shipper": {
    },
  • "receiver": {
    },
  • "dangerousGoods": {
    },
  • "termsOfSale": "DUTIES_AND_TAXES_UNPAID",
  • "expressAccessorials": "Saturday Delivery",
  • "ltlAccessorials": "Pickup - After Hours",
  • "deliveryMode": "SINGLE",
  • "shipmentServiceOptions": {
    }
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Cancel an existing shipment

Cancel an existing shipment by ID.

Authorizations:
bearer
path Parameters
shipmentId
required
string

Responses

Response samples

Content type
application/json
{
  • "shipmentId": 0,
  • "transactionNumber": 0,
  • "status": "string"
}

Get a shipment by ID

Get a shipment by ID.

Authorizations:
bearer
path Parameters
shipmentId
required
string

Responses

Response samples

Content type
application/json
{
  • "id": 1,
  • "trackingId": "270321192985",
  • "consolidation": 1,
  • "transactionNumber": "TRI12_34",
  • "pickupDate": "2021-03-27T00:00:00.000Z",
  • "deliveryDate": "2021-03-27T00:00:00.000Z",
  • "documents": [],
  • "rate": {
    }
}

Create a new shipment

Save shipment data. This method can be used to get rates and refresh them for future use. Notice, this does not book a shipment

Authorizations:
bearer
Request Body schema: application/json
required
shipperReference
required
string

An identifier for the shipper. This reference could be a PO(purchase order) number, a customer number or any phrase used to identify a shipment.

receiverReference
required
string

An identifier for the receiver. This reference could be a PO(purchase order) number, a customer number or any phrase used to identify a shipment.

customerReference
required
string

An identifier for the customer. This reference could be a PO(purchase order) number, a customer number or any phrase used to identify a shipment.

required
object

An object of type CustomBroker that contains custom broker data.

billTo
required
string
Enum: "BILL_ME" "SHIPPER_RECEIVER" "THIRD_PARTY"

An enum of type BillToOption that specifies the billing mode for the shipment.

costCenter
number

Customer location to billing

accountNumber
required
string

The third party account number is used to indicate which customer account should be charged for the shipment

notes
required
string

A string that contains any additional notes or comments.

required
Array of objects (PackageDto)

An array of objects of type Package that contains information about each package in the shipment.

pickupDate
required
string

A string in ISO 8601 format that specifies the pickup date for the shipment.

required
object

An object of type Person that contains information about the shipper.

required
object

An object of type Person that contains information about the receiver.

required
object

An object of type DangerousGoods that contains information about any dangerous goods in the shipment. Necessary if Dangerous Goods is selected in the accessorials or if HazMat information is provided

termsOfSale
required
string
Enum: "DUTIES_AND_TAXES_UNPAID" "DUTIES_AND_TAXES_PAID"

An enum of type TermsOfSale that specifies the terms of sale for the shipment.

expressAccessorials
required
Array of arrays

An array of strings that specifies any accessorials (additional services) for the shipment. (Must be empty for LTL)

ltlAccessorials
required
Array of arrays

An array of strings that specifies any less-than-truckload (LTL) accessorials (additional services) for the shipment. (Must be empty for Express)

deliveryMode
required
string

The delivery mode for the shipment. (SINGLE or MULTI_DROP)

object

Container for Shipment Service Options.

Responses

Request samples

Content type
application/json
{
  • "shipperReference": "SHIPPER_REF_123",
  • "receiverReference": "RECEIVER_REF_456",
  • "customerReference": "CUSTOMER_REF_789",
  • "customBroker": {
    },
  • "billTo": "BILL_ME",
  • "costCenter": "534",
  • "accountNumber": "123 456 789",
  • "notes": "A string that contains any additional notes or comments",
  • "packages": [
    ],
  • "pickupDate": "2023-03-28T15:00:00.000Z",
  • "shipper": {
    },
  • "receiver": {
    },
  • "dangerousGoods": {
    },
  • "termsOfSale": "DUTIES_AND_TAXES_UNPAID",
  • "expressAccessorials": "Saturday Delivery",
  • "ltlAccessorials": "Pickup - After Hours",
  • "deliveryMode": "SINGLE",
  • "shipmentServiceOptions": {
    }
}

Response samples

Content type
application/json
{
  • "shipperReference": "SHIPPER_REF_123",
  • "receiverReference": "RECEIVER_REF_456",
  • "customerReference": "CUSTOMER_REF_789",
  • "customBroker": {
    },
  • "billTo": "BILL_ME",
  • "costCenter": "534",
  • "accountNumber": "123 456 789",
  • "notes": "A string that contains any additional notes or comments",
  • "packages": [
    ],
  • "pickupDate": "2023-03-28T15:00:00.000Z",
  • "shipper": {
    },
  • "receiver": {
    },
  • "dangerousGoods": {
    },
  • "termsOfSale": "DUTIES_AND_TAXES_UNPAID",
  • "expressAccessorials": "Saturday Delivery",
  • "ltlAccessorials": "Pickup - After Hours",
  • "deliveryMode": "SINGLE",
  • "shipmentServiceOptions": {
    },
  • "id": 1,
  • "transactionNumber": "TRI12_34"
}

Consolidations

Open a consolidation

Open a consolidation for a carrier and zip code

Authorizations:
bearer
Request Body schema: application/json
required
carrierId
required
number

Carrier id

postalCode
required
string

Consolidation zip code, only one open consolidation per carrier per zip code can coexist

addressLine1
required
string

Consolidation address line 1

addressLine2
required
string

Consolidation address line 2

required
object

Shipper address

required
object

Receiver address

object

Additional information for the carrier (Mandatory for Fedex consolidations)

Responses

Request samples

Content type
application/json
{
  • "carrierId": 1,
  • "postalCode": "12345",
  • "addressLine1": "Street 12345",
  • "addressLine2": "Office 12345",
  • "shipperAddress": {
    },
  • "receiverAddress": {
    },
  • "additionalInformation": {
    }
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "status": "OPEN"
}

Close a consolidation

Close a consolidation of shipments

Authorizations:
bearer
path Parameters
consolidationId
required
number
Request Body schema: application/json
required
required
object

Pickup data

Responses

Request samples

Content type
application/json
{
  • "pickupData": {
    }
}

Response samples

Content type
application/json
{
  • "consolidation": {
    },
  • "manifest": {},
  • "errors": [
    ]
}

Get consolidation Manifest

Get the manifest for a closed consolidation

Authorizations:
bearer
path Parameters
consolidationId
required
number

Responses

Response samples

Content type
application/json
{}

Handling-units

Get handling units

Get all handling units for use in the shipment creation

Authorizations:
bearer

Responses

Response samples

Content type
application/json
{
  • "entries": [
    ],
  • "count": 10
}

Accessorials

Get accessorials

Get all accessorials for use in the shipment creation

Authorizations:
bearer

Responses

Response samples

Content type
application/json
{
  • "entries": [
    ],
  • "count": 10
}

Documents

Get Documents from cloud

Get any document from cloud storage, by name or document Id

path Parameters
id
required
string
query Parameters
manifest
required
boolean

Responses

Response samples

Content type
application/json
"string"