freight

Connect a freight provider account

Changed on

Connect a freight account the seller already holds with the provider. Both connectable providers — speedship (WWEX) and unishippers — authenticate with an OAuth client ID / secret pair issued by the provider.

The credentials are verified against the provider before they are stored, so a 201 means the connection can be quoted against immediately.

A seller may hold one connection per provider. Connecting a provider that is already connected returns 409 with error code freight_provider_already_connected and the existing freight_provider_account_id. Use PUT /v1/freight/provider_accounts/{freight_provider_account_id}/credentials to rotate credentials on the existing connection. Use DELETE /v1/freight/provider_accounts/{freight_provider_account_id} to disconnect it.

post/v1/freight/provider_accounts

Request

  • Base URL: https://api.shipengine.com
  • URL: https://api.shipengine.com/v1/freight/provider_accounts
  • Auth: API key in header API-Key

Request body

freight_provider_codestring required

The code of the provider to connect. The connectable codes are the freight_provider_code values returned by List freight provider accounts. Currently supported: speedship (WWEX) and unishippers.

client_idstring required

The OAuth client ID issued by the freight provider.

client_secretstring required

The OAuth client secret issued by the freight provider.

nicknamestring nullable

An optional label for the connection. Echoed back by List freight provider accounts.

Example request

{
  "freight_provider_code": "speedship",
  "client_id": "my-client-id",
  "client_secret": "my-client-secret",
  "nickname": "My WWEX account"
}

Response

The freight provider account was connected successfully.

freight_provider_account_idstring

A string that uniquely identifies a ShipEngine resource, such as a carrier, label, shipment, etc.

freight_provider_codestring

The code of the freight provider, such as UNISHIPPERS or WWEX. This is the same value returned as freight_provider_code on quotes, shipments, and tracking.

nicknamestring nullable

The name given to the connection when it was set up, or null when it has none.

Example response

{
  "freight_provider_account_id": "se-28529731",
  "freight_provider_code": "UNISHIPPERS",
  "nickname": "Unishippers - Midwest"
}

Changes

    • ▲

      the / response's property type changed from no type to object for status

    • ▲

      the / response's property type changed from no type to object for status

    • ▲

      the / response's property type changed from no type to object for status

    • ○

      added the optional property // to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      added the optional property // to the response with the status

    • ○

      removed from the / response property allOf list for the response status

    • ○

      removed from the / response property allOf list for the response status

    • ○

      removed from the / response property allOf list for the response status

    • ○

      added the required property // to the response with the status

    • ○

      added the required property // to the response with the status

    • ○

      added the required property // to the response with the status

    • ○

      added the required property // to the response with the status

    • ○

      added the required property // to the response with the status

    • ○

      added the required property // to the response with the status

    • ○

      added the required property // to the response with the status

    • ○

      added the required property // to the response with the status

    • ○

      added the required property // to the response with the status

    • ○

      added the required property // to the response with the status

    • ○

      added the required property // to the response with the status

    • ○

      added the required property // to the response with the status

    • ○

      endpoint added