Carrier accounts

The carrier account object and the allowed CRUD operations on the related resource endpoint

Commerce Layer integrates with 100+ shipping carriers via Easypost.

Configuring a carrier account for a market is optional and enables you to purchase and print shipping labels in one click and provide real-time tracking updates to your customers. You can connect more carriers to the same market to get more rate options and choose the best one for each shipment.

Setting up a carrier account

You can set up a carrier account from the admin UI. All you need to do is choose the carrier type and provide all the credentials requested by the selected shipping service. Otherwise, you can create it via API. To do that you need to give it a meaningful name within your organization, specify the type of carrier among the ones provided by Easypost as the value of the easypost_type attribute, and fill the credentials object accordingly. The required credentials differ based on the selected carrier. To check which credential keys are requested by each carrier you can fetch the carrier accounts schema from the core public endpoint /api/public/schemas/carrier_accounts:

The following request fetches the available types of carrier accounts:


curl -g -X GET \
  'https://core.commercelayer.io/api/public/schemas/carrier_accounts' \
  -H 'Content-Type: application/vnd.api+json'

In case you're working in test mode, remember to use the test_credentials object instead of the credentials object (if it's provided by the carrier, otherwise keep using credentials).

Data model

Check the related ER diagram and explore the flowchart that illustrates how the carrier account resource relates to the other API entities.

Last updated