This API endpoint will allow you to get a list of trucking companies. You can filter by using different query parameters such as name or general_ledger_id.

Supported Formats

json

Errors

Code Description
400 Bad Request.
404 Not Found.
500 Internal Server Error.

Examples

curl "https://app.octopi.co/api/v1/trucking_companies.json?name=Octopi" -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOUR TOKEN HERE"
{
   "trucking_companies" : [
      {
         "phone" : null,
         "name" : "FC OCTOPI",
         "code" : null,
         "general_ledger_id" : null,
         "vat_number" : "2122",
         "email" : null,
         "id" : 337395,
         "address" : null,
         "contact_person" : null
      },
      {
         "address" : null,
         "contact_person" : null,
         "id" : 337386,
         "email" : null,
         "general_ledger_id" : null,
         "vat_number" : "222",
         "phone" : null,
         "code" : null,
         "name" : "INTER OCTOPI"
      },
      {
         "email" : null,
         "general_ledger_id" : null,
         "vat_number" : "2224",
         "phone" : null,
         "code" : null,
         "name" : "OCTOPI UNITED FC",
         "address" : null,
         "contact_person" : null,
         "id" : 337385
      }
   ]
}

Params

Param name Description
name
optional

Allows you to filter/search trucking companies by name

Validations:

  • Must be a String

code
optional

Allows you to filter/search trucking companies by codes (e.g. SCAC codes)

Validations:

  • Must be a String

general_ledger_id
optional

Allows you to filter/search trucking companies by general ledger ID

Validations:

  • Must be a String

missing_general_ledger_id
optional

Set to true to return all trucking companies that do not have a general ledger ID

Validations:

  • Must be a String

active
optional

Filter for active trucking companies by setting to true. Or set to false to get all inactive trucking companies. If absent, Octopi will return both active and inactive trucking companies.

Validations:

  • Must be a String

page
optional

Specify which page of results to fetch. This value defaults to 1.

Validations:

  • Must be a Integer

per
optional

The number of items to be displayed. This value defaults to 10 and accepts a maximum of 100.

Validations:

  • Must be a Integer