Create an interchange 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/1876441/interchanges.json'
  --header 'Content-Type: application/json'
  --data-raw '{
    "purpose": "drop_off_container",
    "container_number": "CAIU2340022",
    "container_status": "full",
    "booking_number": "10543688",
    "chassis_number": "SEFZ104186"
  }'
{
  "id": 12345,
  "container_status": "full",
  "truck_visit_id": 4567,
  "complete": false,
  "completed_at": null,
  "for_container": true,
  "for_chassis": false,
  "for_genset": false,
  "type": "interchange_in",
  "container": {
      "id": 1119659,
      "number": "CAIU2340022",
      "status": "full",
      "has_damages": false,
      "is_reefer": false,
      "is_flatrack": false,
      "unlifted_holds_exist": false,
      "chassis": {
        "id": 882733,
        "number": "SEFZ104186"
      }
  },
  "chassis": {
    "id": 882733,
    "number": "SEFZ104186"
  },
  "booking": {
    "id": 287504,
    "trucking_company_id": 467,
    "is_runner": false,
    "booking_number": "10543688",
    "voyage_number": "200S",
    "ship_name": "FS IPANEMA",
    "port_of_discharge": "ARUBA (AWAUA)",
    "port_of_loading": "PORT EVERGLADES (USPEF)",
    "port_of_delivery": "ARUBA (AWAUA)",
    "shipper": {
      "name": "SHIPPER INC."
    },
    "trucking_company": {
      "name": "Seaboard"
    },
    "items": [
      {
        "id": 16193771,
        "line_item_number": 10,
        "quantity": 1,
        "description": "",
        "container": {
          "id": null,
          "display_name": null
        },
        "dock_receipt_cargos": [],
        "hazmat_codes": [],
        "hazmat_ids_and_codes": {},
        "hazmat_classes": [],
        "container_type": {
          "label": "20CT"
        }
      },
      {
        "id": 1395330,
        "line_item_number": 4,
        "quantity": 1,
        "description": "CARGO NOS",
        "container": {
          "id": null,
          "display_name": null
        },
        "dock_receipt_cargos": [],
        "hazmat_codes": [],
        "hazmat_ids_and_codes": {},
        "hazmat_classes": [],
        "container_type": {
          "label": "40HC"
        }
      }
    ],
    "all_items": [
      {
        "id": 16193771,
        "line_item_number": 10,
        "quantity": 1,
        "description": "",
        "container": {
          "id": null,
          "display_name": null
        },
        "dock_receipt_cargos": [],
        "hazmat_codes": [],
        "hazmat_ids_and_codes": {},
        "hazmat_classes": [],
        "container_type": {
          "label": "20CT"
        }
      },
      {
        "id": 1395327,
        "line_item_number": 1,
        "quantity": 1,
        "description": "CARGO NOS",
        "container": {
          "id": 1101190,
          "display_name": "BSIU2346474"
        },
        "dock_receipt_cargos": [],
        "hazmat_codes": [],
        "hazmat_ids_and_codes": {},
        "hazmat_classes": [],
        "container_type": {
          "label": "20CT"
        }
      },
      {
        "id": 1395328,
        "line_item_number": 2,
        "quantity": 1,
        "description": "CARGO NOS",
        "container": {
          "id": 1119413,
          "display_name": "SMLU7903607"
        },
        "dock_receipt_cargos": [],
        "hazmat_codes": [],
        "hazmat_ids_and_codes": {},
        "hazmat_classes": [],
        "container_type": {
          "label": "20CT"
        }
      },
      {
        "id": 1395330,
        "line_item_number": 4,
        "quantity": 1,
        "description": "CARGO NOS",
        "container": {
          "id": null,
          "display_name": null
        },
        "dock_receipt_cargos": [],
        "hazmat_codes": [],
        "hazmat_ids_and_codes": {},
        "hazmat_classes": [],
        "container_type": {
          "label": "40HC"
        }
      },
      {
        "id": 1395329,
        "line_item_number": 3,
        "quantity": 1,
        "description": "CARGO NOS",
        "container": {
          "id": 1119444,
          "display_name": "SMLU3105445"
        },
        "dock_receipt_cargos": [],
        "hazmat_codes": [],
        "hazmat_ids_and_codes": {},
        "hazmat_classes": [],
        "container_type": {
          "label": "20CT"
        }
      },
      {
        "id": 1395333,
        "line_item_number": 7,
        "quantity": 1,
        "description": "CARGO NOS",
        "container": {
          "id": 1114166,
          "display_name": "TCNU6028886"
        },
        "dock_receipt_cargos": [],
        "hazmat_codes": [],
        "hazmat_ids_and_codes": {},
        "hazmat_classes": [],
        "container_type": {
          "label": "40HC"
        }
      }
    ]
  },
  "export_release": null
}

Params

Param name Description
truck_visit_id
required

Truck visit ID.

Validations:

  • Must be a Integer

purpose
required

Purpose of the interchange.

Validations:

  • Must be one of: drop_off_container, pick_up_container, drop_off_chassis, pick_up_chassis, drop_off_genset, pick_up_genset.

container_number
optional

Container number to create interchange.

Validations:

  • Must be a String

container_status
optional

Container status.

Validations:

  • Must be one of: full, empty.

booking_number
optional

Booking number for the interchange.

Validations:

  • Must be a String

chassis_number
optional

Chassis number.

Validations:

  • Must be a String

genset_number
optional

Genset number.

Validations:

  • Must be a String

export_release_number
optional

Export release number for the interchange.

Validations:

  • Must be a String

bill_of_lading_number
optional

Bill of lading number for the interchange.

Validations:

  • Must be a String

delivery_order_number
optional

Delivery order number for the interchange.

Validations:

  • Must be a String

completed_at
optional

The date and time at which interchange was completed, in ISO 8601 format (Eg 2023-04-13T14:30:00Z). Providing this value will create the interchange with a completed status.

Validations:

  • Must be a String

temperature_letter_port_of_discharge
optional

Temperature letter port of discharge (eg. “HTPAP”)

Validations:

  • Must be a String

temperature_letter_vgm
optional

Temperature letter VGM in your organization’s weight unit preference (eg. 2345.0)

Validations:

  • Must be a Float