POST API: Create or update bookings for customers
Description
This API allows customer to create a booking
URL
Full URL
https://api.dev.e4cars.io/api/v1/4pl/{accountId}/incoming-flows/incoming-order
METHOD
- /POST
PATH parameters
- accountId (string, required): unique identifier of the E4Box client account.
REQUEST parameters
- body (JSON Object, required)
Standard flow
IncomingOrderBookingPivot schema
IncomingOrderBookingPivot.ts
export interface IncomingOrderPivot {
customer_incoming_order_no?: string;
kind?: string;
movement_type?: string;
issuing_date?: string;
issuer?: {
incoming_principal: {
code: string;
}
};
receiver: {
account: {
code: string;
}
},
itus: [
{
itu_code?: string;
customer_order_no?: string;
customer_reference?: string;
seal_nos? : string[];,
incoming_itu: {
iso_code?: string;,
unit_type?: string;
unit_subtype?: string;
rail_profile?: string;
itu_attributes : {
length?: string;
width?: string;
height?: string;
tare?: string;
max_net_weight?: string;
max_gross_weight?: string;
}
},
cargos: [
{
description?: string;
net_weight?: string;
package_quantity?: string;
package_type?: string;
check_waste?: string;
nhm_code?: string;
dangerous_goods : {
un_number?: string;
hazard_code?: string;
hazard_class?: string;
packing_group?: string;
danger_labels?: string[];
}
}
],
check_phyto_mark_needed?: string;
check_veterinary_mark_needed?: string;
origin: {
incoming_member_role:{
check_private?: string;
platform: {
terminal : {
uirr?: string;
}
}
}
},
destination: {
incoming_member_role:{
check_private?: string,
platform: {
terminal : {
uirr?: string;
}
}
}
}
}
],
allocation:{
pickup: {
incoming_member_role:{
check_private?: string;
platform: {
terminal : {
uirr?: string;
}
}
},
target_date : {
date?: string;
}
},
delivery: {
incoming_member_role:{
check_private?: string;
platform: {
terminal : {
uirr?: string;
}
}
}
},
incoming_sender: {
code?: string;
},
incoming_invoice: {
code?: string;
},
incoming_receiver: {
code?: string;
}
}
}
Example of IncomingOrderBookingPivot Body
JSON
{
"customer_incoming_order_no" : "2026030211290015",
"kind": "booking",
"movement_type": "create",
"issuing_date": "2026-05-05T10:52:54",
"issuer": {
"incoming_principal": {
"code": "11788"
}
},
"receiver": {
"account": {
"code": "GCA"
}
},
"itus": [
{
"itu_code" : "RBCU400024-4",
"customer_order_no" : "427152",
"customer_reference" : "427152",
"seal_nos" : [
"seal_1",
"seal_2"
],
"incoming_itu": {
"iso_code" : "4MB6",
"unit_type" : "I",
"unit_subtype" : "Subtype",
"rail_profile" : "Rail profile",
"itu_attributes" : {
"length" : "1372",
"width" : "244",
"height" : "258",
"tare" : "2600",
"max_net_weight" : "30000",
"max_gross_weight" : "32600"
}
},
"cargos": [
{
"description" : "Marchandise A",
"net_weight" : "27000",
"package_quantity" : "2",
"package_type" : "Package type",
"check_waste" : "false",
"nhm_code" : "11111",
"dangerous_goods" : {
"un_number" : "111",
"hazard_code" : "Code",
"hazard_class" : "Class",
"packing_group" : "Group",
"danger_labels" : [
"label1",
"label2"
]
}
}
],
"check_phyto_mark_needed" : "false",
"check_veterinary_mark_needed" : "false",
"origin": {
"incoming_member_role":{
"check_private": "false",
"platform": {
"terminal" : {
"uirr": "289"
}
}
}
},
"destination": {
"incoming_member_role":{
"check_private": "false",
"platform": {
"terminal" : {
"uirr": "222"
}
}
}
}
}
],
"allocation":{
"pickup": {
"incoming_member_role":{
"check_private": "false",
"platform": {
"terminal" : {
"uirr": "289"
}
}
},
"target_date" : {
"date" : "2026-05-22T10:52:54"
}
},
"delivery": {
"incoming_member_role":{
"check_private": "false",
"platform": {
"terminal" : {
"uirr": "222"
}
}
}
},
"incoming_sender": {
"code": "11788"
},
"incoming_invoicee": {
"code": "11788"
},
"incoming_receiver": {
"code": "11788"
}
}
}
Date value
All date (IN or OUT) are Locale
!!! warning "Below is the list of all accepted date formats:"
* YYYY-MM-DDTHH24:MI:SS
* YYYY-MM-DDTHH24:MI:SSZ
* YYYY-MM-DDTHH24:MI
* YYYY-MM-DDTHH24:MI:SS.ms
* YYYY-MM-DDTHH24:MI:SS.msZ
The POST request requires a body in JSON format containing the necessary information to execute the incoming flow. Here is an example of the body structure:
Example of JSON Body
JSON
{
"customer_incoming_order_no" : "2026030211290015",
"kind": "booking",
"movement_type": "create",
"issuing_date": "2026-05-05T10:52:54",
"issuer": {
"incoming_principal": {
"code": "11788"
}
},
"receiver": {
"account": {
"code": "GCA"
}
},
"itus": [
{
"itu_code" : "RBCU400024-4",
"customer_order_no" : "427152",
"customer_reference" : "427152",
"seal_nos" : [
"seal_1",
"seal_2"
],
"incoming_itu": {
"iso_code" : "4MB6",
"unit_type" : "I",
"unit_subtype" : "Subtype",
"rail_profile" : "Rail profile",
"itu_attributes" : {
"length" : "1372",
"width" : "244",
"height" : "258",
"tare" : "2600",
"max_net_weight" : "30000",
"max_gross_weight" : "32600"
}
},
"cargos": [
{
"description" : "Marchandise A",
"net_weight" : "27000",
"package_quantity" : "2",
"package_type" : "Package type",
"check_waste" : "false",
"nhm_code" : "11111",
"dangerous_goods" : {
"un_number" : "111",
"hazard_code" : "Code",
"hazard_class" : "Class",
"packing_group" : "Group",
"danger_labels" : [
"label1",
"label2"
]
}
}
],
"check_phyto_mark_needed" : "false",
"check_veterinary_mark_needed" : "false",
"origin": {
"incoming_member_role":{
"check_private": "false",
"platform": {
"terminal" : {
"uirr": "289"
}
}
}
},
"destination": {
"incoming_member_role":{
"check_private": "false",
"platform": {
"terminal" : {
"uirr": "222"
}
}
}
}
}
],
"allocation":{
"pickup": {
"incoming_member_role":{
"check_private": "false",
"platform": {
"terminal" : {
"uirr": "289"
}
}
},
"target_date" : {
"date" : "2026-05-22T10:52:54"
}
},
"delivery": {
"incoming_member_role":{
"check_private": "false",
"platform": {
"terminal" : {
"uirr": "222"
}
}
}
},
"incoming_sender": {
"code": "11788"
},
"incoming_invoicee": {
"code": "11788"
},
"incoming_receiver": {
"code": "11788"
}
}
}
| Code | Description | Example Response |
|---|---|---|
| 200 | Success, the flow was executed correctly. | { "status": "success", "message": "Incoming flow executed successfully." } |
| 401 | Unauthorized, missing or invalid authentication. | { "status": "error", "message": "Unauthorized. Please authenticate." } |
| 403 | Forbidden, insufficient permissions. | { "status": "error", "message": "Forbidden. You do not have the necessary permissions to execute this flow." } |
| 400 | Bad request, invalid body or parameters. | { "status": "error", "message": "Invalid request. Ensure all parameters are correctly provided." } |
POST API: Cancel bookings for customers
Description
This API allows customer to cancel a booking
URL
Full URL
https://api.dev.e4cars.io/api/v1/4pl/{accountId}/incoming-flows/incoming-order
METHOD
- /POST
PATH parameters
- accountId (string, required): unique identifier of the E4Box client account.
REQUEST parameters
- body (JSON Object, required)
Standard flow
IncomingOrderCancellationPivot schema
Example of IncomingOrderCancellationPivot Body
JSON
{
"customer_incoming_order_no" : "2026030211290015",
"kind": "order_cancellation",
"issuing_date": "2025-12-29T15:22:49",
"issuer": {
"incoming_principal": {
"code": "11788"
}
},
"receiver": {
"account" : {
"code" : "GCA"
}
},
"order_cancellation": {
"customer_order_no": "GCA-20251211-00025"
}
}
Date value
All date (IN or OUT) are Locale
!!! warning "Below is the list of all accepted date formats:"
* YYYY-MM-DDTHH24:MI:SS
* YYYY-MM-DDTHH24:MI:SSZ
* YYYY-MM-DDTHH24:MI
* YYYY-MM-DDTHH24:MI:SS.ms
* YYYY-MM-DDTHH24:MI:SS.msZ
The POST request requires a body in JSON format containing the necessary information to execute the incoming flow. Here is an example of the body structure:
Example of JSON Body
JSON
{
"customer_incoming_order_no" : "2026030211290015",
"kind": "order_cancellation",
"issuing_date": "2025-12-29T15:22:49",
"issuer": {
"incoming_principal": {
"code": "11788"
}
},
"receiver": {
"account" : {
"code" : "GCA"
}
},
"order_cancellation": {
"customer_order_no": "GCA-20251211-00025"
}
}
| Code | Description | Example Response |
|---|---|---|
| 200 | Success, the flow was executed correctly. | { "status": "success", "message": "Incoming flow executed successfully." } |
| 401 | Unauthorized, missing or invalid authentication. | { "status": "error", "message": "Unauthorized. Please authenticate." } |
| 403 | Forbidden, insufficient permissions. | { "status": "error", "message": "Forbidden. You do not have the necessary permissions to execute this flow." } |
| 400 | Bad request, invalid body or parameters. | { "status": "error", "message": "Invalid request. Ensure all parameters are correctly provided." } |