Use this API resources to CRUD trucking companies.
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.
Code | Description |
---|---|
400 | Bad Request. |
404 | Not Found. |
500 | Internal Server Error. |
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 } ] }
Param name | Description |
---|---|
name optional |
Allows you to filter/search trucking companies by name Validations:
|
code optional |
Allows you to filter/search trucking companies by codes (e.g. SCAC codes) Validations:
|
general_ledger_id optional |
Allows you to filter/search trucking companies by general ledger ID Validations:
|
missing_general_ledger_id optional |
Set to true to return all trucking companies that do not have a general ledger ID Validations:
|
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:
|
page optional |
Specify which page of results to fetch. This value defaults to 1. Validations:
|
per optional |
The number of items to be displayed. This value defaults to 10 and accepts a maximum of 100. Validations:
|
This API endpoint will return the information for the trucking company.
Code | Description |
---|---|
400 | Bad Request. |
404 | Not Found. |
500 | Internal Server Error. |
curl "https://app.octopi.co/api/v1/trucking_companies/5.json" -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOUR TOKEN HERE"
{ "trucking_company" : { "phone" : null, "name" : "FC OCTOPI", "id" : 337395, "general_ledger_id" : null, "vat_number" : null, "address" : null, "contact_person" : null, "code" : null, "email" : null } }
Param name | Description |
---|---|
id required |
Validations:
|
This API endpoint allows you to create a new trucking company.
Code | Description |
---|---|
400 | Bad Request. |
404 | Not Found. |
500 | Internal Server Error. |
curl "https://app.octopi.co/api/v1/trucking_companies.json" -X POST -d '{ "name" : "FC UNITED", "general_ledger_id": "SL1231", "contact_person": "Joe Jones", "address": "123 Main St", "email": "joe@example.com", "code": "111", "vat_number": "223"}' -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOUR TOKEN HERE"
{ "trucking_company" : { "email" : "joe@example.com", "id" : 353388, "general_ledger_id" : "SL1231", "phone" : "786-111-1111", "code" : "SCAC", "vat_number" : "223", "address" : "123 Main St", "contact_person" : "Joe Jones", "name" : "FC UNITED" } }
This API endpoint allows you to update a trucking company.
Code | Description |
---|---|
400 | Bad Request. |
404 | Not Found. |
500 | Internal Server Error. |
curl "https://app.octopi.co/api/v1/trucking_companies/353388.json" -X PUT -d '{ "name" : "FC UNITED LLC", "code": "222" , "vat_number": "223"}' -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOUR TOKEN HERE"
{ "trucking_company" : { "code" : "222", "contact_person" : "Joe Jones", "phone" : null, "general_ledger_id" : "SL1231", "name" : "FC UNITED LLC", "vat_number" : "223", "address" : "123 Main St", "email" : "joe@example.com", "id" : 353388 } }
Param name | Description |
---|---|
id required |
Validations:
|
This API endpoint allows you to delete a trucking company. This is a soft delete. It will mark the company as inactive.
Code | Description |
---|---|
400 | Bad Request. |
404 | Not Found. |
500 | Internal Server Error. |
curl "https://app.octopi.co/api/v1/trucking_companies/353388.json" -X DELETE -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOUR TOKEN HERE"
{ "trucking_company" : { "contact_person" : null, "phone" : null, "email" : null, "code" : null, "name" : "A+ TIRE", "vat_number" : null, "address" : "DELMAS 19, RUE PIERRE ANSELME", "id" : 300009, "general_ledger_id" : null } }
Param name | Description |
---|---|
id required |
Validations:
|