Supply Chain · Freight Forwarding
Forwarding Shipments
A house bill under a master bill. A forwarder makes its money on the spread between what it buys at and what it sells at, so buy and sell are two columns rather than one.
/api/scm/forwarding-shipmentsPublished as /api/v1/forwarding-shipmentsDownload specification (OpenAPI 3.1) Screen: Forwarding Shipments
Overview
| Package | Supply Chain |
|---|---|
| Authentication | Bearer token: a service account's token (POST /api/auth/service-token) or, for the published path, an API key |
| Authorization | The caller's roles must hold Supply Chain › Forwarding Shipments on the Roles screen: display for GET, add for POST, change for PUT, delete for DELETE; an action needs the grant of the button that runs it on the screen. |
| Table | scm.forwarding_shipments · kept per company (and organisational unit where it has one) |
| Record | Created, changed and (where the screen allows) deleted; key id |
| Rules | The same as the screen: validation, numbering, approvals, posting, the company the caller belongs to, and the audit trail. |
API reference
15 operations. Open one for its parameters, bodies, responses and a sample request.
GET/api/scm/forwarding-shipmentsList forwarding shipments
Query parameters
| Name | Description | Example |
|---|---|---|
limit | Rows per page (50 by default, at most 200) | limit=100 |
offset | Rows to skip | offset=200 |
q | Free-text search over the search columns | q=acme |
sort | column:asc or column:desc, several separated by commas | sort=created_at:desc |
filter | A JSON condition or group (see the filter language), URL-encoded; any field below can be filtered and sorted | filter={"col":"status","op":"eq","value":"open"} |
<field>=<value> | Shorthand for "field is value" |
Response 200
{
"rows": [
{
"id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"org_unit_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"shipment_no": "SHI-000001",
"job_type": "export",
"mode": "ocean",
"service_type": "text",
"shipper_account_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"shipper_supplier_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"shipper_name": "Example",
"consignee_account_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"consignee_name": "Example",
"notify_party": "text",
"carrier_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"vessel_name": "Example"
}
],
"count": 1
}Sample request
curl "https://demo.tranxact.ai/api/scm/forwarding-shipments?limit=20" \
-H "Authorization: Bearer $TOKEN"GET/api/scm/forwarding-shipments/{id}Read one forwarding shipment
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Response 200
{
"id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"org_unit_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"shipment_no": "SHI-000001",
"job_type": "export",
"mode": "ocean",
"service_type": "text",
"shipper_account_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"shipper_supplier_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"shipper_name": "Example",
"consignee_account_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"consignee_name": "Example",
"notify_party": "text",
"carrier_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"vessel_name": "Example"
}404 when no record with that id is visible to the caller.
Sample request
curl "https://demo.tranxact.ai/api/scm/forwarding-shipments/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN"POST/api/scm/forwarding-shipmentsCreate a forwarding shipment
Request body
The record as JSON. Fields marked Yes are required.
| Field | Type | Required | Description |
|---|---|---|---|
job_type | text | No | Job type Allowed: export import cross_trade domestic transit |
mode | text | No | Mode Allowed: ocean air road rail multimodal courier |
service_type | text | No | Service |
shipper_account_id | uuid | No | Shipper (customer) |
shipper_supplier_id | uuid | No | Shipper (supplier) |
shipper_name | text | No | Shipper name — Where the shipper is the other side rather than one of ours. |
consignee_account_id | uuid | No | Consignee (customer) |
consignee_name | text | No | Consignee name |
notify_party | text | No | Notify party |
carrier_id | uuid | No | Carrier |
vessel_name | text | No | Vessel |
voyage_no | text | No | Voyage |
flight_no | text | No | Flight |
house_bill_no | text | No | House bill number |
master_bill_no | text | No | Master bill number |
booking_no | text | No | Booking number |
consolidation_id | uuid | No | Consolidated under |
origin_place_id | uuid | No | Origin |
port_of_loading | text | No | Port of loading |
port_of_discharge | text | No | Port of discharge |
place_of_receipt | text | No | Place of receipt |
place_of_delivery | text | No | Place of delivery |
destination_place_id | uuid | No | Destination |
etd | date | No | Estimated departure |
atd | date | No | Actual departure |
eta | date | No | Estimated arrival |
ata | date | No | Actual arrival |
cargo_ready_on | date | No | Cargo ready |
cutoff_at | timestamp with time zone | No | Cutoff |
free_time_days | integer | No | Free days |
incoterm | text | No | Incoterm |
currency | text | No | Currency |
goods_description | text | No | Goods |
marks_and_numbers | text | No | Marks and numbers |
gross_weight_kg | numeric | No | Gross weight (kg) |
chargeable_weight_kg | numeric | No | Chargeable weight (kg) |
volume_cbm | numeric | No | Volume (m3) |
package_count | integer | No | Packages |
declared_value | numeric | No | Declared value |
insurance_value | numeric | No | Insured value |
is_hazardous | boolean | No | Dangerous goods |
operator_user_id | uuid | No | Operator |
notes | text | No | Notes |
Sample body
{
"job_type": "export",
"mode": "ocean",
"service_type": "text",
"shipper_account_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73"
}Response 201
{
"id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"org_unit_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"shipment_no": "SHI-000001",
"job_type": "export",
"mode": "ocean",
"service_type": "text",
"shipper_account_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"shipper_supplier_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"shipper_name": "Example",
"consignee_account_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"consignee_name": "Example",
"notify_party": "text",
"carrier_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"vessel_name": "Example"
}Sample request
curl -X POST "https://demo.tranxact.ai/api/scm/forwarding-shipments" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"job_type":"export","mode":"ocean","service_type":"text","shipper_account_id":"3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73"}'PUT/api/scm/forwarding-shipments/{id}Change a forwarding shipment
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Request body
Only the fields to change; fields left out keep their value.
| Field | Type | Required | Description |
|---|---|---|---|
job_type | text | No | Job type Allowed: export import cross_trade domestic transit |
mode | text | No | Mode Allowed: ocean air road rail multimodal courier |
service_type | text | No | Service |
shipper_account_id | uuid | No | Shipper (customer) |
shipper_supplier_id | uuid | No | Shipper (supplier) |
shipper_name | text | No | Shipper name — Where the shipper is the other side rather than one of ours. |
consignee_account_id | uuid | No | Consignee (customer) |
consignee_name | text | No | Consignee name |
notify_party | text | No | Notify party |
carrier_id | uuid | No | Carrier |
vessel_name | text | No | Vessel |
voyage_no | text | No | Voyage |
flight_no | text | No | Flight |
house_bill_no | text | No | House bill number |
master_bill_no | text | No | Master bill number |
booking_no | text | No | Booking number |
consolidation_id | uuid | No | Consolidated under |
origin_place_id | uuid | No | Origin |
port_of_loading | text | No | Port of loading |
port_of_discharge | text | No | Port of discharge |
place_of_receipt | text | No | Place of receipt |
place_of_delivery | text | No | Place of delivery |
destination_place_id | uuid | No | Destination |
etd | date | No | Estimated departure |
atd | date | No | Actual departure |
eta | date | No | Estimated arrival |
ata | date | No | Actual arrival |
cargo_ready_on | date | No | Cargo ready |
cutoff_at | timestamp with time zone | No | Cutoff |
free_time_days | integer | No | Free days |
incoterm | text | No | Incoterm |
currency | text | No | Currency |
goods_description | text | No | Goods |
marks_and_numbers | text | No | Marks and numbers |
gross_weight_kg | numeric | No | Gross weight (kg) |
chargeable_weight_kg | numeric | No | Chargeable weight (kg) |
volume_cbm | numeric | No | Volume (m3) |
package_count | integer | No | Packages |
declared_value | numeric | No | Declared value |
insurance_value | numeric | No | Insured value |
is_hazardous | boolean | No | Dangerous goods |
operator_user_id | uuid | No | Operator |
notes | text | No | Notes |
Sample body
{
"job_type": "export",
"mode": "ocean"
}Response 200
{
"id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"org_unit_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"shipment_no": "SHI-000001",
"job_type": "export",
"mode": "ocean",
"service_type": "text",
"shipper_account_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"shipper_supplier_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"shipper_name": "Example",
"consignee_account_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"consignee_name": "Example",
"notify_party": "text",
"carrier_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"vessel_name": "Example"
}Sample request
curl -X PUT "https://demo.tranxact.ai/api/scm/forwarding-shipments/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"job_type":"export","mode":"ocean"}'DELETE/api/scm/forwarding-shipments/{id}Delete a forwarding shipment
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Response 200
{ "deleted": true }Many documents are cancelled or reversed instead; the API refuses a delete the screen would refuse.
Sample request
curl -X DELETE "https://demo.tranxact.ai/api/scm/forwarding-shipments/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN"POST/api/scm/forwarding-shipments/{id}/copyCopy
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Request body
The keys this action reads (* = required; "one of" lists the only values):
overrides, preview, withLinesResponse
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/scm/forwarding-shipments/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/copy" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"overrides":"value","preview":"value","withLines":"value"}'GET/api/scm/forwarding-shipments/{id}/profitabilityProfitability
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Response
200 with the data as JSON.
Sample request
curl "https://demo.tranxact.ai/api/scm/forwarding-shipments/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/profitability" \
-H "Authorization: Bearer $TOKEN"GET/api/scm/forwarding-shipments/{parentId}/containersContainers
Path parameters
| Name | Type | Description |
|---|---|---|
parentId | string (uuid) | The record's parentId, as a list returns it. |
Response
200 with the data as JSON.
Sample request
curl "https://demo.tranxact.ai/api/scm/forwarding-shipments/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/containers" \
-H "Authorization: Bearer $TOKEN"POST/api/scm/forwarding-shipments/{parentId}/containersContainers
Path parameters
| Name | Type | Description |
|---|---|---|
parentId | string (uuid) | The record's parentId, as a list returns it. |
No body is required.
Response
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/scm/forwarding-shipments/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/containers" \
-H "Authorization: Bearer $TOKEN"PUT/api/scm/forwarding-shipments/{parentId}/containers/{lineId}Containers
Path parameters
| Name | Type | Description |
|---|---|---|
parentId | string (uuid) | The record's parentId, as a list returns it. |
lineId | string (uuid) | The record's lineId, as a list returns it. |
No body is required.
Response
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X PUT "https://demo.tranxact.ai/api/scm/forwarding-shipments/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/containers/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN"DELETE/api/scm/forwarding-shipments/{parentId}/containers/{lineId}Containers
Path parameters
| Name | Type | Description |
|---|---|---|
parentId | string (uuid) | The record's parentId, as a list returns it. |
lineId | string (uuid) | The record's lineId, as a list returns it. |
No body is required.
Response
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X DELETE "https://demo.tranxact.ai/api/scm/forwarding-shipments/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/containers/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN"GET/api/scm/forwarding-shipments/{parentId}/chargesCharges
Path parameters
| Name | Type | Description |
|---|---|---|
parentId | string (uuid) | The record's parentId, as a list returns it. |
Response
200 with the data as JSON.
Sample request
curl "https://demo.tranxact.ai/api/scm/forwarding-shipments/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/charges" \
-H "Authorization: Bearer $TOKEN"POST/api/scm/forwarding-shipments/{parentId}/chargesCharges
Path parameters
| Name | Type | Description |
|---|---|---|
parentId | string (uuid) | The record's parentId, as a list returns it. |
No body is required.
Response
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/scm/forwarding-shipments/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/charges" \
-H "Authorization: Bearer $TOKEN"PUT/api/scm/forwarding-shipments/{parentId}/charges/{lineId}Charges
Path parameters
| Name | Type | Description |
|---|---|---|
parentId | string (uuid) | The record's parentId, as a list returns it. |
lineId | string (uuid) | The record's lineId, as a list returns it. |
No body is required.
Response
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X PUT "https://demo.tranxact.ai/api/scm/forwarding-shipments/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/charges/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN"DELETE/api/scm/forwarding-shipments/{parentId}/charges/{lineId}Charges
Path parameters
| Name | Type | Description |
|---|---|---|
parentId | string (uuid) | The record's parentId, as a list returns it. |
lineId | string (uuid) | The record's lineId, as a list returns it. |
No body is required.
Response
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X DELETE "https://demo.tranxact.ai/api/scm/forwarding-shipments/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/charges/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN"Data model
Every field of a forwarding shipment, as the API returns it. Field names are the JSON keys; any of them can be filtered and sorted on a list.
| Field | Type | Access | Description |
|---|---|---|---|
id | uuid | read only | Id |
org_id | uuid | read only | Org id |
org_unit_id | uuid | read only | Org unit id |
shipment_no | text | read only | Shipment no |
job_type | text | read, write | Job type Allowed: export import cross_trade domestic transit |
mode | text | read, write | Mode Allowed: ocean air road rail multimodal courier |
service_type | text | read, write | Service |
shipper_account_id | uuid | read, write | Shipper (customer) |
shipper_supplier_id | uuid | read, write | Shipper (supplier) |
shipper_name | text | read, write | Shipper name — Where the shipper is the other side rather than one of ours. |
consignee_account_id | uuid | read, write | Consignee (customer) |
consignee_name | text | read, write | Consignee name |
notify_party | text | read, write | Notify party |
carrier_id | uuid | read, write | Carrier |
vessel_name | text | read, write | Vessel |
voyage_no | text | read, write | Voyage |
flight_no | text | read, write | Flight |
house_bill_no | text | read, write | House bill number |
master_bill_no | text | read, write | Master bill number |
booking_no | text | read, write | Booking number |
consolidation_id | uuid | read, write | Consolidated under |
origin_place_id | uuid | read, write | Origin |
port_of_loading | text | read, write | Port of loading |
port_of_discharge | text | read, write | Port of discharge |
place_of_receipt | text | read, write | Place of receipt |
place_of_delivery | text | read, write | Place of delivery |
destination_place_id | uuid | read, write | Destination |
etd | date | read, write | Estimated departure |
atd | date | read, write | Actual departure |
eta | date | read, write | Estimated arrival |
ata | date | read, write | Actual arrival |
cargo_ready_on | date | read, write | Cargo ready |
cutoff_at | timestamp with time zone | read, write | Cutoff |
free_time_days | integer | read, write | Free days |
incoterm | text | read, write | Incoterm |
currency | text | read, write | Currency |
goods_description | text | read, write | Goods |
marks_and_numbers | text | read, write | Marks and numbers |
gross_weight_kg | numeric | read, write | Gross weight (kg) |
chargeable_weight_kg | numeric | read, write | Chargeable weight (kg) |
volume_cbm | numeric | read, write | Volume (m3) |
package_count | integer | read, write | Packages |
container_count | integer | read only | Container count |
declared_value | numeric | read, write | Declared value |
insurance_value | numeric | read, write | Insured value |
total_buy | numeric | read only | Total buy |
total_sell | numeric | read only | Total sell |
margin | numeric | read only | Margin |
is_hazardous | boolean | read, write | Dangerous goods |
status | text | read only | Status |
operator_user_id | uuid | read, write | Operator |
notes | text | read, write | Notes |
created_at | timestamp with time zone | read only | Created at |
xf_text_1 | text | read only | Xf text 1 |
xf_text_2 | text | read only | Xf text 2 |
xf_text_3 | text | read only | Xf text 3 |
xf_text_4 | text | read only | Xf text 4 |
xf_text_5 | text | read only | Xf text 5 |
xf_num_1 | numeric | read only | Xf num 1 |
xf_num_2 | numeric | read only | Xf num 2 |
xf_num_3 | numeric | read only | Xf num 3 |
xf_date_1 | date | read only | Xf date 1 |
xf_date_2 | date | read only | Xf date 2 |
created_by | uuid | read only | Created by |
updated_at | timestamp with time zone | read only | Updated at |
updated_by | uuid | read only | Updated by |
Errors
| Status | Meaning |
|---|---|
| 400 | The request could not be read: a filter that is not JSON, a bad parameter |
| 401 | No credential, or it is wrong, revoked or expired |
| 403 | The caller's roles do not hold Supply Chain › Forwarding Shipments for this verb, or the address or origin is not allowed |
| 404 | No record with that id is visible to the caller |
| 409 | A conflict: a duplicate number, a document in a state that does not allow it, or a record changed or locked by someone else |
| 422 | Refused by the same validation as the screen; the error names the field and why |
Every error is JSON: {"error": "a sentence saying what was wrong"}, with field where it applies.