This API endpoint will allow you to get a list of consignees. You can filter the results using name or general_ledger_id
| Code | Description |
|---|---|
| 400 | Bad Request. |
| 404 | Not Found. |
| 500 | Internal Server Error. |
curl "https://app.octopi.co/api/v1/consignees.json?name=Octopi" -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOUR TOKEN HERE"
{
"consignees" : [
{
"phone" : null,
"name" : "FC OCTOPI",
"customs_code" : null,
"general_ledger_id" : null,
"vat_number" : "111",
"email" : null,
"billing_contact_email" : null,
"id" : 337395,
"address" : null,
"contact_person" : null
},
{
"address" : null,
"contact_person" : null,
"id" : 337386,
"email" : null,
"billing_contact_email" : null,
"general_ledger_id" : null,
"vat_number" : "222",
"phone" : null,
"customs_code" : null,
"name" : "INTER OCTOPI"
},
{
"email" : null,
"billing_contact_email" : null,
"general_ledger_id" : null,
"vat_number" : "333",
"phone" : null,
"customs_code" : null,
"name" : "OCTOPI UNITED FC",
"address" : null,
"contact_person" : null,
"id" : 337385
}
]
}
| Param name | Description |
|---|---|
|
name optional |
Allows you to filter/search consignees by name Validations:
|
|
general_ledger_id optional |
Allows you to filter/search consignees by general ledger ID 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 consignee.
| Code | Description |
|---|---|
| 400 | Bad Request. |
| 404 | Not Found. |
| 500 | Internal Server Error. |
curl "https://app.octopi.co/api/v1/consignees/5.json" -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOUR TOKEN HERE"
{
"consignee" : {
"phone" : null,
"name" : "FC OCTOPI",
"id" : 337395,
"vat_number" : null,
"general_ledger_id" : null,
"address" : null,
"contact_person" : null,
"customs_code" : null,
"email" : null,
"billing_contact_email" : null
}
}
| Param name | Description |
|---|---|
|
id required |
Validations:
|
This API endpoint allows you to create a new consignee.
| Code | Description |
|---|---|
| 400 | Bad Request. |
| 404 | Not Found. |
| 500 | Internal Server Error. |
curl "https://app.octopi.co/api/v1/consignees.json" -X POST -d '{ "name" : "FC UNITED", "general_ledger_id": "SL1231", "contact_person": "Joe Jones", "address": "123 Main St", "email": "joe@example.com", "customs_code": "111" , "vat_number": "111"}' -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOUR TOKEN HERE"
{
"consignee" : {
"email" : "joe@example.com",
"billing_contact_email" : "accounting@example.com",
"id" : 353388,
"general_ledger_id" : "SL1231",
"vat_number" : "111",
"phone" : null,
"customs_code" : "111",
"address" : "123 Main St",
"contact_person" : "Joe Jones",
"name" : "FC UNITED"
}
}
This API endpoint allows you to update a consignee.
| Code | Description |
|---|---|
| 400 | Bad Request. |
| 404 | Not Found. |
| 500 | Internal Server Error. |
curl "https://app.octopi.co/api/v1/consignees/353388.json" -X PUT -d '{ "name" : "FC UNITED LLC", "customs_code": "222", "vat_number": "111"}' -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOUR TOKEN HERE"
{
"consignee" : {
"customs_code" : "222",
"contact_person" : "Joe Jones",
"phone" : null,
"general_ledger_id" : "SL1231",
"vat_number" : "111",
"name" : "FC UNITED LLC",
"address" : "123 Main St",
"email" : "joe@example.com",
"billing_contact_email" : "accounting@example.com",
"id" : 353388
}
}
| Param name | Description |
|---|---|
|
id required |
Validations:
|
This API endpoint allows you to delete a consignee.
| Code | Description |
|---|---|
| 400 | Bad Request. |
| 404 | Not Found. |
| 500 | Internal Server Error. |
curl "https://app.octopi.co/api/v1/consignees/353388.json" -X DELETE -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOUR TOKEN HERE"
{
"consignee" : {
"contact_person" : null,
"phone" : null,
"email" : null,
"customs_code" : null,
"vat_number" : null,
"name" : "A+ TIRE",
"address" : "DELMAS 19, RUE PIERRE ANSELME",
"id" : 300009,
"general_ledger_id" : null
}
}
| Param name | Description |
|---|---|
|
id required |
Validations:
|