Shipment Management
This page is auto-generated from cmd/web/routes.go.
Endpoint List
| Method | Path | Handler | Request |
|---|---|---|---|
| Post | /api/modules/create-shipment | handlers.Repo.CreateShipment | ShipmentRequest.ShipmentCreateRequest |
| Post | /api/modules/delete-shipment | handlers.Repo.DeleteShipment | requests.DeleteRequest |
| Post | /api/modules/delete-shipment-item | handlers.Repo.DeleteShipmentItem | requests.DeleteRequest |
| Post | /api/modules/list-shipment | handlers.Repo.ListShipment | requests.ListRequest |
| Post | /api/modules/read-shipment | handlers.Repo.ReadShipment | requests.ReadRequest |
| Post | /api/modules/report-shipment | handlers.Repo.ReportShipment | requests.ReadRequest |
| Post | /api/modules/update-shipment | handlers.Repo.UpdateShipmentDetail | ShipmentRequest.ShipmentAndItemsUpdateRequest |
| Post | /api/modules/update-shipment-header | handlers.Repo.UpdateHeaderShipment | ShipmentRequest.ShipmentUpdateHeaderRequest |
| Post | /api/modules/update-shipment-item | handlers.Repo.UpdateShipmentItem | ShipmentRequest.ShipmentItemUpdateRequest |
| Post | /api/modules/update-shipment-status | handlers.Repo.UpdateShipmentStatus | ShipmentRequest.ShipmentStatusUpdateRequest |
Request Example: ShipmentRequest.ShipmentCreateRequest
{
"loading_at": 0,
"loading_point_id": 0,
"transported_at": 0,
"unloading_at": 0,
"unloading_point_id": 0,
"shipment_number": "string",
"order_number": "string",
"shipment_date": 0,
"sender_id": 0,
"receiver_id": 0,
"carrier_id": 0,
"shipment_note": "string",
"shipment_type_id": 0,
"shipment_delivery_type_id": 0,
"transport_unit_id": 0,
"transport_unit_code": "string",
"shipment_code": "string",
"external_code": "string",
"vehicle1_id": 0,
"vehicle2_id": 0,
"driver1_id": 0,
"driver2_id": 0,
"items": {}
}Fields:
| Field | Type | Required |
|---|---|---|
loading_at | int64 | no |
loading_point_id | int64 | no |
transported_at | int64 | no |
unloading_at | int64 | no |
unloading_point_id | *int64 | no |
shipment_number | *string | no |
order_number | *string | no |
shipment_date | *int64 | no |
sender_id | *int64 | no |
receiver_id | *int64 | no |
carrier_id | *int64 | no |
shipment_note | *string | no |
shipment_type_id | *int | no |
shipment_delivery_type_id | *int | no |
transport_unit_id | *int | no |
transport_unit_code | *string | no |
shipment_code | *string | no |
external_code | *string | no |
vehicle1_id | *int64 | no |
vehicle2_id | *int64 | no |
driver1_id | *int64 | no |
driver2_id | *int64 | no |
items | []ShipmentItemCreateRequest | no |
Request Example: requests.DeleteRequest
{
"id": 0
}Fields:
| Field | Type | Required |
|---|---|---|
id | int | yes |
Request Example: requests.ListRequest
{
"per_page": 0,
"page": 0,
"sort_column": "string",
"sort_order": "string"
}Fields:
| Field | Type | Required |
|---|---|---|
per_page | int | yes |
page | int | yes |
sort_column | string | no |
sort_order | string | no |
Request Example: requests.ReadRequest
{
"id": 0
}Fields:
| Field | Type | Required |
|---|---|---|
id | int | yes |
Request Example: ShipmentRequest.ShipmentAndItemsUpdateRequest
{
"id": 0,
"loading_at": 0,
"loading_point_id": 0,
"transported_at": 0,
"unloading_at": 0,
"unloading_point_id": 0,
"shipment_number": "string",
"order_number": "string",
"shipment_date": 0,
"sender_id": 0,
"receiver_id": 0,
"carrier_id": 0,
"shipment_note": "string",
"shipment_type_id": 0,
"shipment_delivery_type_id": 0,
"transport_unit_id": 0,
"transport_unit_code": "string",
"shipment_code": "string",
"external_code": "string",
"vehicle1_id": 0,
"vehicle2_id": 0,
"driver1_id": 0,
"driver2_id": 0,
"items": {}
}Fields:
| Field | Type | Required |
|---|---|---|
id | int64 | no |
loading_at | int64 | no |
loading_point_id | int64 | no |
transported_at | int64 | no |
unloading_at | int64 | no |
unloading_point_id | *int64 | no |
shipment_number | *string | no |
order_number | *string | no |
shipment_date | int64 | no |
sender_id | int64 | no |
receiver_id | int64 | no |
carrier_id | *int64 | no |
shipment_note | *string | no |
shipment_type_id | *int | no |
shipment_delivery_type_id | *int | no |
transport_unit_id | *int | no |
transport_unit_code | *string | no |
shipment_code | *string | no |
external_code | *string | no |
vehicle1_id | *int64 | no |
vehicle2_id | *int64 | no |
driver1_id | *int64 | no |
driver2_id | *int64 | no |
items | []ShipmentItemsUpdateRequest | no |
Request Example: ShipmentRequest.ShipmentUpdateHeaderRequest
{
"id": 0,
"loading_at": 0,
"loading_point_id": 0,
"transported_at": 0,
"unloading_at": 0,
"unloading_point_id": 0,
"shipment_number": "string",
"order_number": "string",
"shipment_date": 0,
"sender_id": 0,
"receiver_id": 0,
"carrier_id": 0,
"shipment_note": "string",
"shipment_type_id": 0,
"shipment_delivery_type_id": 0,
"transport_unit_id": 0,
"transport_unit_code": "string",
"shipment_code": "string",
"external_code": "string",
"vehicle1_id": 0,
"vehicle2_id": 0,
"driver1_id": 0,
"driver2_id": 0,
"status_id": 0
}Fields:
| Field | Type | Required |
|---|---|---|
id | int64 | no |
loading_at | int64 | no |
loading_point_id | int64 | no |
transported_at | int64 | no |
unloading_at | int64 | no |
unloading_point_id | *int64 | no |
shipment_number | *string | no |
order_number | *string | no |
shipment_date | int64 | no |
sender_id | int64 | no |
receiver_id | int64 | no |
carrier_id | *int64 | no |
shipment_note | *string | no |
shipment_type_id | *int | no |
shipment_delivery_type_id | *int | no |
transport_unit_id | *int | no |
transport_unit_code | *string | no |
shipment_code | *string | no |
external_code | *string | no |
vehicle1_id | *int64 | no |
vehicle2_id | *int64 | no |
driver1_id | *int64 | no |
driver2_id | *int64 | no |
status_id | int64 | no |
Request Example: ShipmentRequest.ShipmentItemUpdateRequest
{
"id": 0,
"shipment_id": 0,
"load_id": 0,
"load_barcode": "string",
"load_transport_category_id": 0,
"load_description": "string",
"load_transport_type_id": 0,
"quantity": 0,
"load_unit_id": 0,
"unno_id": "string",
"amount_unit_id": 0,
"amount": {},
"exemption_id": 0
}Fields:
| Field | Type | Required |
|---|---|---|
id | *int64 | no |
shipment_id | *int64 | no |
load_id | *int64 | no |
load_barcode | string | no |
load_transport_category_id | int64 | no |
load_description | *string | no |
load_transport_type_id | *int64 | no |
quantity | *int64 | no |
load_unit_id | int64 | no |
unno_id | string | no |
amount_unit_id | int64 | no |
amount | float64 | no |
exemption_id | int64 | no |
Request Example: ShipmentRequest.ShipmentStatusUpdateRequest
{
"shipment_ids": [
0
],
"status_id": 0,
"description": "string",
"status_date": 0,
"file_ids": [
0
]
}Fields:
| Field | Type | Required |
|---|---|---|
shipment_ids | []int64 | no |
status_id | int64 | no |
description | string | no |
status_date | int64 | no |
file_ids | []int64 | no |
Response Examples
Create:
{
"status": "succeeded",
"message": "record created successfully",
"id": 1
}Delete:
{
"status": "succeeded",
"message": "deleted successfully"
}List:
{
"status": "succeeded",
"data": [ ],
"totalPage": 1,
"currentPage": 1,
"perPage": 10
}Read:
{
"status": "succeeded",
"data": { }
}Update:
{
"status": "succeeded",
"message": "updated successfully"
}Error (example):
{
"status": "invalid_request",
"message": "validation failed",
"errors": [ ]
}Last updated on