TRANXACT.AI Help

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.

Type REST15 operationsBase path /api/scm/forwarding-shipmentsPublished as /api/v1/forwarding-shipments

Download specification (OpenAPI 3.1) Screen: Forwarding Shipments

Overview

PackageSupply Chain
AuthenticationBearer token: a service account's token (POST /api/auth/service-token) or, for the published path, an API key
AuthorizationThe 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.
Tablescm.forwarding_shipments · kept per company (and organisational unit where it has one)
RecordCreated, changed and (where the screen allows) deleted; key id
RulesThe 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

NameDescriptionExample
limitRows per page (50 by default, at most 200)limit=100
offsetRows to skipoffset=200
qFree-text search over the search columnsq=acme
sortcolumn:asc or column:desc, several separated by commassort=created_at:desc
filterA JSON condition or group (see the filter language), URL-encoded; any field below can be filtered and sortedfilter={"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

NameTypeDescription
idstring (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.

FieldTypeRequiredDescription
job_typetextNoJob type
Allowed: export import cross_trade domestic transit
modetextNoMode
Allowed: ocean air road rail multimodal courier
service_typetextNoService
shipper_account_iduuidNoShipper (customer)
shipper_supplier_iduuidNoShipper (supplier)
shipper_nametextNoShipper name — Where the shipper is the other side rather than one of ours.
consignee_account_iduuidNoConsignee (customer)
consignee_nametextNoConsignee name
notify_partytextNoNotify party
carrier_iduuidNoCarrier
vessel_nametextNoVessel
voyage_notextNoVoyage
flight_notextNoFlight
house_bill_notextNoHouse bill number
master_bill_notextNoMaster bill number
booking_notextNoBooking number
consolidation_iduuidNoConsolidated under
origin_place_iduuidNoOrigin
port_of_loadingtextNoPort of loading
port_of_dischargetextNoPort of discharge
place_of_receipttextNoPlace of receipt
place_of_deliverytextNoPlace of delivery
destination_place_iduuidNoDestination
etddateNoEstimated departure
atddateNoActual departure
etadateNoEstimated arrival
atadateNoActual arrival
cargo_ready_ondateNoCargo ready
cutoff_attimestamp with time zoneNoCutoff
free_time_daysintegerNoFree days
incotermtextNoIncoterm
currencytextNoCurrency
goods_descriptiontextNoGoods
marks_and_numberstextNoMarks and numbers
gross_weight_kgnumericNoGross weight (kg)
chargeable_weight_kgnumericNoChargeable weight (kg)
volume_cbmnumericNoVolume (m3)
package_countintegerNoPackages
declared_valuenumericNoDeclared value
insurance_valuenumericNoInsured value
is_hazardousbooleanNoDangerous goods
operator_user_iduuidNoOperator
notestextNoNotes

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

NameTypeDescription
idstring (uuid)The record's id, as a list returns it.

Request body

Only the fields to change; fields left out keep their value.

FieldTypeRequiredDescription
job_typetextNoJob type
Allowed: export import cross_trade domestic transit
modetextNoMode
Allowed: ocean air road rail multimodal courier
service_typetextNoService
shipper_account_iduuidNoShipper (customer)
shipper_supplier_iduuidNoShipper (supplier)
shipper_nametextNoShipper name — Where the shipper is the other side rather than one of ours.
consignee_account_iduuidNoConsignee (customer)
consignee_nametextNoConsignee name
notify_partytextNoNotify party
carrier_iduuidNoCarrier
vessel_nametextNoVessel
voyage_notextNoVoyage
flight_notextNoFlight
house_bill_notextNoHouse bill number
master_bill_notextNoMaster bill number
booking_notextNoBooking number
consolidation_iduuidNoConsolidated under
origin_place_iduuidNoOrigin
port_of_loadingtextNoPort of loading
port_of_dischargetextNoPort of discharge
place_of_receipttextNoPlace of receipt
place_of_deliverytextNoPlace of delivery
destination_place_iduuidNoDestination
etddateNoEstimated departure
atddateNoActual departure
etadateNoEstimated arrival
atadateNoActual arrival
cargo_ready_ondateNoCargo ready
cutoff_attimestamp with time zoneNoCutoff
free_time_daysintegerNoFree days
incotermtextNoIncoterm
currencytextNoCurrency
goods_descriptiontextNoGoods
marks_and_numberstextNoMarks and numbers
gross_weight_kgnumericNoGross weight (kg)
chargeable_weight_kgnumericNoChargeable weight (kg)
volume_cbmnumericNoVolume (m3)
package_countintegerNoPackages
declared_valuenumericNoDeclared value
insurance_valuenumericNoInsured value
is_hazardousbooleanNoDangerous goods
operator_user_iduuidNoOperator
notestextNoNotes

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

NameTypeDescription
idstring (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

NameTypeDescription
idstring (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, withLines

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/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

NameTypeDescription
idstring (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

NameTypeDescription
parentIdstring (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

NameTypeDescription
parentIdstring (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

NameTypeDescription
parentIdstring (uuid)The record's parentId, as a list returns it.
lineIdstring (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

NameTypeDescription
parentIdstring (uuid)The record's parentId, as a list returns it.
lineIdstring (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

NameTypeDescription
parentIdstring (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

NameTypeDescription
parentIdstring (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

NameTypeDescription
parentIdstring (uuid)The record's parentId, as a list returns it.
lineIdstring (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

NameTypeDescription
parentIdstring (uuid)The record's parentId, as a list returns it.
lineIdstring (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.

FieldTypeAccessDescription
iduuidread onlyId
org_iduuidread onlyOrg id
org_unit_iduuidread onlyOrg unit id
shipment_notextread onlyShipment no
job_typetextread, writeJob type
Allowed: export import cross_trade domestic transit
modetextread, writeMode
Allowed: ocean air road rail multimodal courier
service_typetextread, writeService
shipper_account_iduuidread, writeShipper (customer)
shipper_supplier_iduuidread, writeShipper (supplier)
shipper_nametextread, writeShipper name — Where the shipper is the other side rather than one of ours.
consignee_account_iduuidread, writeConsignee (customer)
consignee_nametextread, writeConsignee name
notify_partytextread, writeNotify party
carrier_iduuidread, writeCarrier
vessel_nametextread, writeVessel
voyage_notextread, writeVoyage
flight_notextread, writeFlight
house_bill_notextread, writeHouse bill number
master_bill_notextread, writeMaster bill number
booking_notextread, writeBooking number
consolidation_iduuidread, writeConsolidated under
origin_place_iduuidread, writeOrigin
port_of_loadingtextread, writePort of loading
port_of_dischargetextread, writePort of discharge
place_of_receipttextread, writePlace of receipt
place_of_deliverytextread, writePlace of delivery
destination_place_iduuidread, writeDestination
etddateread, writeEstimated departure
atddateread, writeActual departure
etadateread, writeEstimated arrival
atadateread, writeActual arrival
cargo_ready_ondateread, writeCargo ready
cutoff_attimestamp with time zoneread, writeCutoff
free_time_daysintegerread, writeFree days
incotermtextread, writeIncoterm
currencytextread, writeCurrency
goods_descriptiontextread, writeGoods
marks_and_numberstextread, writeMarks and numbers
gross_weight_kgnumericread, writeGross weight (kg)
chargeable_weight_kgnumericread, writeChargeable weight (kg)
volume_cbmnumericread, writeVolume (m3)
package_countintegerread, writePackages
container_countintegerread onlyContainer count
declared_valuenumericread, writeDeclared value
insurance_valuenumericread, writeInsured value
total_buynumericread onlyTotal buy
total_sellnumericread onlyTotal sell
marginnumericread onlyMargin
is_hazardousbooleanread, writeDangerous goods
statustextread onlyStatus
operator_user_iduuidread, writeOperator
notestextread, writeNotes
created_attimestamp with time zoneread onlyCreated at
xf_text_1textread onlyXf text 1
xf_text_2textread onlyXf text 2
xf_text_3textread onlyXf text 3
xf_text_4textread onlyXf text 4
xf_text_5textread onlyXf text 5
xf_num_1numericread onlyXf num 1
xf_num_2numericread onlyXf num 2
xf_num_3numericread onlyXf num 3
xf_date_1dateread onlyXf date 1
xf_date_2dateread onlyXf date 2
created_byuuidread onlyCreated by
updated_attimestamp with time zoneread onlyUpdated at
updated_byuuidread onlyUpdated by

Errors

StatusMeaning
400The request could not be read: a filter that is not JSON, a bad parameter
401No credential, or it is wrong, revoked or expired
403The caller's roles do not hold Supply Chain › Forwarding Shipments for this verb, or the address or origin is not allowed
404No record with that id is visible to the caller
409A conflict: a duplicate number, a document in a state that does not allow it, or a record changed or locked by someone else
422Refused 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.