This resource allows clients to view, create, and delete a dock receipts for truck visits in Octopi.

Supported Formats

json

GET /api/v1/truck_visits/:truck_visit_id/dock_receipts.json
Get list of dock receipts for a truck visit.

List all the dock receipts for the given 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/86739/dock_receipts.json'     --header 'Content-Type: application/json'     --data-raw '{
}'
[
      {
          "dock_receipt_url": "https://app.octopi.co/api/v1/truck_visits/86739/dock_receipts/46",
          "truck_visit_id": 86739,
          "completed_at": "2019-01-24T20:08:18.575-05:00",
          "booking": {
              "id": 189742,
              "booking_number": "10421990",
              "voyage_number": "23S",
              "trucking_company_id": null,
              "ship_name": "HOHEBANK",
              "items": [
                  {
                      "id": 961911,
                      "line_item_number": 1,
                      "quantity": 1,
                      "description": "1.PAYMOVER T300",
                      "container": {
                          "id": 392426,
                          "display_name": "1982 paymover t300"
                      },
                      "dock_receipt_cargos": [
                          "25AD079A105FE0"
                      ],
                      "hazmat_codes": [],
                      "hazmat_ids_and_codes": {},
                      "hazmat_classes": [],
                      "container_type": {
                          "label": "UNKNOWN"
                      }
                  }
              ],
              "all_items": [
                  {
                      "id": 961911,
                      "line_item_number": 1,
                      "quantity": 1,
                      "description": "1.PAYMOVER T300",
                      "container": {
                          "id": 392426,
                          "display_name": "1982 paymover t300"
                      },
                      "dock_receipt_cargos": [
                          "25AD079A105FE0"
                      ],
                      "hazmat_codes": [],
                      "hazmat_ids_and_codes": {},
                      "hazmat_classes": [],
                      "container_type": {
                          "label": "UNKNOWN"
                      }
                  },
                  {
                      "id": 961912,
                      "line_item_number": 2,
                      "quantity": 0,
                      "description": "DIMENSIONES: L:232" X W:96" X H:79"",
                      "container": {
                          "id": null,
                          "display_name": null
                      },
                      "dock_receipt_cargos": [],
                      "hazmat_codes": [],
                      "hazmat_ids_and_codes": {},
                      "hazmat_classes": []
                  },
                  {
                      "id": 961913,
                      "line_item_number": 3,
                      "quantity": 0,
                      "description": "PESO: 40,000 LIBRAS",
                      "container": {
                          "id": null,
                          "display_name": null
                      },
                      "dock_receipt_cargos": [],
                      "hazmat_codes": [],
                      "hazmat_ids_and_codes": {},
                      "hazmat_classes": []
                  },
                  {
                      "id": 961914,
                      "line_item_number": 4,
                      "quantity": 0,
                      "description": "NUMERO DE SERIE: 00352",
                      "container": {
                          "id": null,
                          "display_name": null
                      },
                      "dock_receipt_cargos": [],
                      "hazmat_codes": [],
                      "hazmat_ids_and_codes": {},
                      "hazmat_classes": []
                  }
              ],
              "port_of_discharge": "CARTAGENA (COCTG)",
              "port_of_loading": "PORT EVERGLADES (USPEF)",
              "port_of_delivery": "CARTAGENA (COCTG)",
              "shipper": {
                  "name": "OCEAN CARGO LOGISTICS GROUP"
              }
          }
      },
      {
          "dock_receipt_url": "https://app.octopi.co/api/v1/truck_visits/86739/dock_receipts/47",
          "truck_visit_id": 86739,
          "completed_at": "2019-01-24T20:08:18.575-05:00",
          "booking": {
              "id": 189742,
              "booking_number": "10421990",
              "voyage_number": "23S",
              "trucking_company_id": null,
              "ship_name": "HOHEBANK",
              "items": [
                  {
                      "id": 961911,
                      "line_item_number": 1,
                      "quantity": 1,
                      "description": "1.PAYMOVER T300",
                      "container": {
                          "id": 392426,
                          "display_name": "1982 paymover t300"
                      },
                      "dock_receipt_cargos": [
                          "25AD079A105FE0"
                      ],
                      "hazmat_codes": [],
                      "hazmat_ids_and_codes": {},
                      "hazmat_classes": [],
                      "container_type": {
                          "label": "UNKNOWN"
                      }
                  }
              ],
              "all_items": [
                  {
                      "id": 961911,
                      "line_item_number": 1,
                      "quantity": 1,
                      "description": "1.PAYMOVER T300",
                      "container": {
                          "id": 392426,
                          "display_name": "1982 paymover t300"
                      },
                      "dock_receipt_cargos": [
                          "25AD079A105FE0"
                      ],
                      "hazmat_codes": [],
                      "hazmat_ids_and_codes": {},
                      "hazmat_classes": [],
                      "container_type": {
                          "label": "UNKNOWN"
                      }
                  },
                  {
                      "id": 961912,
                      "line_item_number": 2,
                      "quantity": 0,
                      "description": "DIMENSIONES: L:232" X W:96" X H:79"",
                      "container": {
                          "id": null,
                          "display_name": null
                      },
                      "dock_receipt_cargos": [],
                      "hazmat_codes": [],
                      "hazmat_ids_and_codes": {},
                      "hazmat_classes": []
                  },
                  {
                      "id": 961913,
                      "line_item_number": 3,
                      "quantity": 0,
                      "description": "PESO: 40,000 LIBRAS",
                      "container": {
                          "id": null,
                          "display_name": null
                      },
                      "dock_receipt_cargos": [],
                      "hazmat_codes": [],
                      "hazmat_ids_and_codes": {},
                      "hazmat_classes": []
                  },
                  {
                      "id": 961914,
                      "line_item_number": 4,
                      "quantity": 0,
                      "description": "NUMERO DE SERIE: 00352",
                      "container": {
                          "id": null,
                          "display_name": null
                      },
                      "dock_receipt_cargos": [],
                      "hazmat_codes": [],
                      "hazmat_ids_and_codes": {},
                      "hazmat_classes": []
                  }
              ],
              "port_of_discharge": "CARTAGENA (COCTG)",
              "port_of_loading": "PORT EVERGLADES (USPEF)",
              "port_of_delivery": "CARTAGENA (COCTG)",
              "shipper": {
                  "name": "OCEAN CARGO LOGISTICS GROUP"
              }
          }
      }
  ]

Params

Param name Description
truck_visit_id
required

Truck visit ID.

Validations:

  • Must be a Integer


GET /api/v1/truck_visits/:truck_visit_id/dock_receipts/:id.json
Get details of a dock receipt.

Show dock receipt for a given dock_receipt 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/34213/dock_receipts/234.json'     --header 'Content-Type: application/json'
  {
    "truck_visit_id": 34213,
    "completed_at": "2019-01-24T20:08:18.575-05:00",
    "booking": {
        "id": 189742,
        "booking_number": "10421990",
        "voyage_number": "23S",
        "trucking_company_id": null,
        "ship_name": "HOHEBANK",
        "items": [
            {
                "id": 961911,
                "line_item_number": 1,
                "quantity": 1,
                "description": "1.PAYMOVER T300",
                "container": {
                    "id": 392426,
                    "display_name": "1982 paymover t300"
                },
                "dock_receipt_cargos": [
                    "25AD079A105FE0"
                ],
                "hazmat_codes": [],
                "hazmat_ids_and_codes": {},
                "hazmat_classes": [],
                "container_type": {
                    "label": "UNKNOWN"
                }
            }
        ],
        "all_items": [
            {
                "id": 961911,
                "line_item_number": 1,
                "quantity": 1,
                "description": "1.PAYMOVER T300",
                "container": {
                    "id": 392426,
                    "display_name": "1982 paymover t300"
                },
                "dock_receipt_cargos": [
                    "25AD079A105FE0"
                ],
                "hazmat_codes": [],
                "hazmat_ids_and_codes": {},
                "hazmat_classes": [],
                "container_type": {
                    "label": "UNKNOWN"
                }
            },
            {
                "id": 961912,
                "line_item_number": 2,
                "quantity": 0,
                "description": "DIMENSIONES: L:232" X W:96" X H:79"",
                "container": {
                    "id": null,
                    "display_name": null
                },
                "dock_receipt_cargos": [],
                "hazmat_codes": [],
                "hazmat_ids_and_codes": {},
                "hazmat_classes": []
            },
            {
                "id": 961913,
                "line_item_number": 3,
                "quantity": 0,
                "description": "PESO: 40,000 LIBRAS",
                "container": {
                    "id": null,
                    "display_name": null
                },
                "dock_receipt_cargos": [],
                "hazmat_codes": [],
                "hazmat_ids_and_codes": {},
                "hazmat_classes": []
            },
            {
                "id": 961914,
                "line_item_number": 4,
                "quantity": 0,
                "description": "NUMERO DE SERIE: 00352",
                "container": {
                    "id": null,
                    "display_name": null
                },
                "dock_receipt_cargos": [],
                "hazmat_codes": [],
                "hazmat_ids_and_codes": {},
                "hazmat_classes": []
            }
        ],
        "port_of_discharge": "CARTAGENA (COCTG)",
        "port_of_loading": "PORT EVERGLADES (USPEF)",
        "port_of_delivery": "CARTAGENA (COCTG)",
        "shipper": {
            "name": "OCEAN CARGO LOGISTICS GROUP"
        }
    }
}

Params

Param name Description
truck_visit_id
required

Truck visit ID.

Validations:

  • Must be a Integer

id
required

Dock receipt ID.

Validations:

  • Must be a Integer


DELETE /api/v1/truck_visit/:truck_visit_id/dock_receipts/:id.json
Delete a dock receipt when ID given.

This API endpoint allows you to delete a dock receipt.

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/213/dock_receipts/353388.json" -X DELETE -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Token token=YOUR TOKEN HERE"
{"dock_receipt_id: 353388}

Params

Param name Description
truck_visit_id
required

Truck visit ID.

Validations:

  • Must be a String

id
required

Dock receipt ID.

Validations:

  • Must be a String


POST /api/v1/truck_visits/:truck_visit_id/dock_receipts.json
Create a dock receipt for a truck visit.

Create a dock receipt 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/86739/dock_receipts.json'     --header 'Content-Type: application/json'     --data-raw '{
  "booking_number": "10421990"
}'
  {
    "truck_visit_id": 86739,
    "completed_at": null,
    "booking": {
        "id": 189742,
        "booking_number": "10421990",
        "voyage_number": "23S",
        "trucking_company_id": null,
        "ship_name": "HOHEBANK",
        "items": [
            {
                "id": 961911,
                "line_item_number": 1,
                "quantity": 1,
                "description": "1.PAYMOVER T300",
                "container": {
                    "id": 392426,
                    "display_name": "1982 paymover t300"
                },
                "dock_receipt_cargos": [
                    "25AD079A105FE0"
                ],
                "hazmat_codes": [],
                "hazmat_ids_and_codes": {},
                "hazmat_classes": [],
                "container_type": {
                    "label": "UNKNOWN"
                }
            }
        ],
        "all_items": [
            {
                "id": 961911,
                "line_item_number": 1,
                "quantity": 1,
                "description": "1.PAYMOVER T300",
                "container": {
                    "id": 392426,
                    "display_name": "1982 paymover t300"
                },
                "dock_receipt_cargos": [
                    "25AD079A105FE0"
                ],
                "hazmat_codes": [],
                "hazmat_ids_and_codes": {},
                "hazmat_classes": [],
                "container_type": {
                    "label": "UNKNOWN"
                }
            },
            {
                "id": 961912,
                "line_item_number": 2,
                "quantity": 0,
                "description": "DIMENSIONES: L:232" X W:96" X H:79"",
                "container": {
                    "id": null,
                    "display_name": null
                },
                "dock_receipt_cargos": [],
                "hazmat_codes": [],
                "hazmat_ids_and_codes": {},
                "hazmat_classes": []
            },
            {
                "id": 961913,
                "line_item_number": 3,
                "quantity": 0,
                "description": "PESO: 40,000 LIBRAS",
                "container": {
                    "id": null,
                    "display_name": null
                },
                "dock_receipt_cargos": [],
                "hazmat_codes": [],
                "hazmat_ids_and_codes": {},
                "hazmat_classes": []
            },
            {
                "id": 961914,
                "line_item_number": 4,
                "quantity": 0,
                "description": "NUMERO DE SERIE: 00352",
                "container": {
                    "id": null,
                    "display_name": null
                },
                "dock_receipt_cargos": [],
                "hazmat_codes": [],
                "hazmat_ids_and_codes": {},
                "hazmat_classes": []
            }
        ],
        "port_of_discharge": "CARTAGENA (COCTG)",
        "port_of_loading": "PORT EVERGLADES (USPEF)",
        "port_of_delivery": "CARTAGENA (COCTG)",
        "shipper": {
            "name": "OCEAN CARGO LOGISTICS GROUP"
        }
    }
}

Params

Param name Description
truck_visit_id
required

Truck visit ID.

Validations:

  • Must be a Integer

booking_number
required

Booking number for the dock receipt.

Validations:

  • Must be a String