This resource allows clients to view, create, and delete a general cargo deliveries for truck visits in Octopi.

Supported Formats

json

GET /api/v1/truck_visits/:truck_visit_id/general_cargo_deliveries.json
Get list of general cargo deliveries for truck visits.

List all the general cargo deliveries for the truck visit ID.

Supported Formats

json

Errors

Code Description
404 Not found.
422 Unprocessable Entity.
500 Internal Server Error.
409 Entity conflict.

Examples

curl --location --request GET 'https://app.octopi.co/api/v1/truck_visits/1546714/general_cargo_deliveries.json'     --header 'Content-Type: application/json'
    [
              {
                  "general_cargo_delivery_url": "https://app.octopi.co/api/v1/truck_visits/1546714/general_cargo_deliveries/131175",
                  "truck_visit_id": 1546714,
                  "truck_driver": "Alvin Bryan (M 4492)",
                  "started_at": "2021-08-24T13:24:57.858-04:00",
                  "started_by": "Basil Depradine",
                  "completed": true,
                  "completed_at": "2021-08-24T13:35:00.891-04:00",
                  "completed_by": {
                      "id": 3140,
                      "created_at": "2020-08-04T07:56:04.939-04:00",
                      "updated_at": "2022-03-28T11:11:59.496-04:00",
                      "organization_id": 8,
                      "agent_id": null,
                      "shipping_line_id": null,
                      "consignee_id": null,
                      "email": "ihumphrey@barbadosport.com",
                      "firstname": "ISHA",
                      "lastname": "HUMPHREY",
                      "office_phone": "",
                      "mobile_phone": "",
                      "title": "CLERICAL OFFICER ",
                      "address": "",
                      "roles_users_count": 5,
                      "work_location_type": "",
                      "work_location_id": null,
                      "trucking_company_id": null,
                      "active": true,
                      "is_equipment_operator": false,
                      "high_contrast_ui": false,
                      "freight_forwarder_id": null,
                      "password_updated_at": "2020-08-04T08:05:02.805-04:00",
                      "staff": false,
                      "beta_tester": false,
                      "locale": "en",
                      "pending_approval": false,
                      "broker_id": null,
                      "name": "Isha Humphrey"
                  },
                  "delivered_at": "2021-08-24T13:35:00.888-04:00",
                  "delivered_to": "",
                  "updated_at": "2021-08-24T13:35:00.891-04:00",
                  "remarks": "BAGS",
                  "release_order": null,
                  "delivery_order": null,
                  "barge": null,
                  "reopened_by": null,
                  "total_delivered": 10.0,
                  "pretty_weight": "18,377.06 KG",
                  "delivery_items": [
                      {
                          "quantity": 10.0,
                          "delivered_by": "Isha Humphrey",
                          "delivered_to": "",
                          "created_at": "2021-08-24T13:34:07.197-04:00",
                          "updated_at": "2021-08-24T13:34:07.197-04:00",
                          "delivery_order": null,
                          "pickup_location": null,
                          "id": 251874,
                          "cargo_id": 2866358,
                          "consignee_name": "ROCK HARD CEMENT LTD.",
                          "holds": "0",
                          "package_type": "",
                          "description": "3830 PCS OF SLING BAGS

4347 PCS OF BIG BAGS

200 PCS SLING BAGS",
                          "reference_number": "",
                          "container_path": "/containers/2866358",
                          "dock_receipt_number": "",
                          "delivered_at": "2021-08-24 13:34:07 -0400",
                          "shipping_marks": "",
                          "pretty_weight": "18,377.06 KG",
                          "extra_attributes": null,
                          "vin": ""
                      }
                  ]
              }
          ]

Params

Param name Description
truck_visit_id
required

Truck visit ID.

Validations:

  • Must be a Integer


GET /api/v1/truck_visits/:truck_visit_id/general_cargo_deliveries/:id.json
Get details of a general cargo delivery.

Show general cargo delivery for a general cargo delivery ID.

Supported Formats

json

Errors

Code Description
404 Not found.
422 Unprocessable Entity.
500 Internal Server Error.
409 Entity conflict.

Examples

curl --location --request GET 'https://app.octopi.co/api/v1/truck_visits/1546714/general_cargo_deliveries/123.json'     --header 'Content-Type: application/json'
    {
          "truck_visit_id": 1546714,
          "truck_driver": "Alvin Bryan (M 4492)",
          "started_at": "2021-08-24T13:24:57.858-04:00",
          "started_by": "Basil Depradine",
          "completed": true,
          "completed_at": "2021-08-24T13:35:00.891-04:00",
          "completed_by": {
              "id": 3140,
              "created_at": "2020-08-04T07:56:04.939-04:00",
              "updated_at": "2022-03-28T11:11:59.496-04:00",
              "organization_id": 8,
              "agent_id": null,
              "shipping_line_id": null,
              "consignee_id": null,
              "email": "ihumphrey@barbadosport.com",
              "firstname": "ISHA",
              "lastname": "HUMPHREY",
              "office_phone": "",
              "mobile_phone": "",
              "title": "CLERICAL OFFICER ",
              "address": "",
              "roles_users_count": 5,
              "work_location_type": "",
              "work_location_id": null,
              "trucking_company_id": null,
              "active": true,
              "is_equipment_operator": false,
              "high_contrast_ui": false,
              "freight_forwarder_id": null,
              "password_updated_at": "2020-08-04T08:05:02.805-04:00",
              "staff": false,
              "beta_tester": false,
              "locale": "en",
              "pending_approval": false,
              "broker_id": null,
              "name": "Isha Humphrey"
          },
          "delivered_at": "2021-08-24T13:35:00.888-04:00",
          "delivered_to": "",
          "updated_at": "2021-08-24T13:35:00.891-04:00",
          "remarks": "BAGS",
          "release_order": null,
          "delivery_order": null,
          "barge": null,
          "reopened_by": null,
          "total_delivered": 10.0,
          "pretty_weight": "18,377.06 KG",
          "delivery_items": [
              {
                  "quantity": 10.0,
                  "delivered_by": "Isha Humphrey",
                  "delivered_to": "",
                  "created_at": "2021-08-24T13:34:07.197-04:00",
                  "updated_at": "2021-08-24T13:34:07.197-04:00",
                  "delivery_order": null,
                  "pickup_location": null,
                  "id": 251874,
                  "cargo_id": 2866358,
                  "consignee_name": "ROCK HARD CEMENT LTD.",
                  "holds": "0",
                  "package_type": "",
                  "description": "3830 PCS OF SLING BAGS

4347 PCS OF BIG BAGS

200 PCS SLING BAGS",
                  "reference_number": "",
                  "container_path": "/containers/2866358",
                  "dock_receipt_number": "",
                  "delivered_at": "2021-08-24 13:34:07 -0400",
                  "shipping_marks": "",
                  "pretty_weight": "18,377.06 KG",
                  "extra_attributes": null,
                  "vin": ""
              }
          ]
      }

Params

Param name Description
truck_visit_id
required

Truck visit ID.

Validations:

  • Must be a Integer

id
required

General cargo delivery ID.

Validations:

  • Must be a Integer


DELETE /api/v1/truck_visit/:truck_visit_id/general_cargo_deliveries/:id.json
Delete a general cargo delivery when ID given

This API endpoint allows you to delete a general cargo delivery.

Supported Formats

json

Errors

Code Description
404 Not found.
422 Unprocessable Entity.
500 Internal Server Error.
409 Entity conflict.

Examples

curl "https://app.octopi.co/api/v1/truck_visits/12321/general_cargo_deliveries/353388.json" -X DELETE -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOUR TOKEN HERE"
{"bid: 353388}

Params

Param name Description
truck_visit_id
required

Truck visit ID

Validations:

  • Must be a String

id
required

General cargo delivery ID

Validations:

  • Must be a String


POST /api/v1/truck_visits/:truck_visit_id/general_cargo_deliveries.json
Create a general cargo delivery for a truck visit.

Create a general cargo delivery for a truck visit.

Supported Formats

json

Errors

Code Description
404 Not found.
422 Unprocessable Entity.
500 Internal Server Error.
409 Entity conflict.

Examples

curl --location --request POST 'https://app.octopi.co/api/v1/truck_visits/1546714/general_cargo_deliveries.json'     --header 'Content-Type: application/json'     --data-raw '{
  "bill_of_lading_number": "BL234234"
  "delivery_order_number": "DO234234"
  "remarks": "BAGS"
}'
       {
          "truck_visit_id": 1546714,
          "truck_driver": "Alvin Bryan (M 4492)",
          "started_at": "2021-08-24T13:24:57.858-04:00",
          "started_by": "Basil Depradine",
          "completed": false,
          "completed_at": "",
          "completed_by": null,
          "delivered_at": null,
          "delivered_to": "",
          "updated_at": null,
          "remarks": "BAGS",
          "release_order": null,
          "delivery_order": null,
          "barge": null,
          "reopened_by": null,
          "total_delivered": 10.0,
          "pretty_weight": "18,377.06 KG",
          "delivery_items": [
              {
                  "quantity": 10.0,
                  "delivered_by": null,
                  "delivered_to": null,
                  "created_at": "2021-08-24T13:34:07.197-04:00",
                  "updated_at": null,
                  "delivery_order": null,
                  "pickup_location": null,
                  "id": 251874,
                  "cargo_id": 2866358,
                  "consignee_name": "ROCK HARD CEMENT LTD.",
                  "holds": "0",
                  "package_type": "",
                  "description": "3830 PCS OF SLING BAGS

4347 PCS OF BIG BAGS

200 PCS SLING BAGS",
                  "reference_number": "",
                  "container_path": "/containers/2866358",
                  "dock_receipt_number": "",
                  "delivered_at": null,
                  "shipping_marks": "",
                  "pretty_weight": "18,377.06 KG",
                  "extra_attributes": null,
                  "vin": ""
              }
          ]
      }

Params

Param name Description
truck_visit_id
required

Truck visit ID.

Validations:

  • Must be a Integer

bill_of_lading_number
optional

Bill of lading number for the general cargo delivery.

Validations:

  • Must be a String

delivery_order_number
optional

Delivery order number for the general cargo delivery.

Validations:

  • Must be a String

remarks
optional

Remarks for the general cargo delivery.

Validations:

  • Must be a String