Skip to content

Process exchanges clients

POST API: Manage orders for customers of MLS

Description

This API allows MLS customer to create all attached services in a compound for a vehicle.

The machanism is to execute an incoming flow for a specific client and a given custom translator : MOS_IN_VEHICLE_ACCOUNT. The accountId and translatorCode parameters are dynamic and must be provided in the URL.

URL

Full URL

https://api.dev.e4cars.io/api/v1/4pl/{accountId}/incoming-flows/orders/{translatorCode}?token={TOKEN}&dry_run=true

Full URL

https://api.dev.e4cars.io/api/v1/4pl/MOS/incoming-flows/orders/MOS_IN_VEHICLE_ACCOUNT?token=18498cae876943a9aa2c72971645b75xxxx

METHOD

  • /POST

PATH parameters

  • accountId (string, required): unique identifier of the E4Cars client account.
  • translatorCode (string, required): code of the translator executing the incoming flow. The custom translator is MOS_IN_VEHICLE_ACCOUNT.

QUERY parameters

  • token (string, required): API key for authentication for the call. (see authentication section)
  • dry_run (string, optional, default=false): Allows you to run the translator for testing. Only the translation will be launched, the result will not be processed.
    • true: Only translation will run, no processing
    • false: Translation and processing of the translated flow will run.

REQUEST parameters

  • body (JSON Object, required): It contains a JSON array of object that will be transformed into the IncomingVehicleServicesPivot structure, E4Cars' internal format.

    The object in body can also be an ad hoc object corresponding to the caller's or an existing API's needs.

    In this case, you should contact the E4Cars integration teams (integration@e4cars.com) so they can create an ad hoc translator to transform the body into IncomingVehicleServicesPivot.

Standard flow translator case: translatorCode=MOS_IN_VEHICLE_ACCOUNT

If you decide to use the standard flow translator (MOS_IN_VEHICLE_ACCOUNT), you must adhere to the standard incoming manifest schema IncomingVehicleServicesPivot below.

IncomingVehicleServicesPivot schema
IncomingVehicleServicesPivot.ts
{
    "VIN":string;
    "Make":string;
    "Customer":string;
    "Consignee":string;
    "Address":string; // From E4Cars address book
    "Tech_service_package":string; // From E4Cars products. Product code
    "Plates_installation_needed": boolean; // Y/N
    "Additional_services":string; // present in step of product needed
    "PIO":string; // present in stepp of product needed
    "Sales_channel2"?:"",
    "Self-pickup": boolean; // Y/N
    "Optional_order_date": string; // "dd/MM/YYYY"
    "Order_UID":string;
    "Wench_Type": string; // "Normal, simple, jockey"
    "Deliver_from"?:string
}
Example of IncomingVehicleServicesPivot Body
JSON
{
"vehicles": [
    {
        "VIN":"MAT791103S7L00194",
        "Make":"TATA",
        "Customer":"TATA",
        "Consignee":"Haramain - HCV",
        "Address":"Haramain - HCV",
        "Tech_service_package":"Package 3",
        "Plates_installation_needed":"N",
        "Additional_services":"Add inspection",
        "PIO":"",
        "Sales_channel2":"RETAIL",
        "Self-pickup":"N",
        "Optional_order_date":"19/06/2025",
        "Order_UID":"1-19.06.2025-Haramain - HCV",
        "Wench_Type":"Single",
        "Deliver_from":"Dammam"
    },
    {
        "VIN":"WBA58FF08P8D05668",
        "Make":"BMW",
        "Customer":"BMW",
        "Consignee":"NRR",
        "Address":"NRR",
        "Tech_service_package":"Package 3",
        "Plates_installation_needed":"N",
        "Additional_services":"Add inspection",
        "PIO":"",
        "Sales_channel2":"RETAIL",
        "Self-pickup":"N",
        "Optional_order_date":"23/06/2025",
        "Order_UID":"1-23.06.2025-NRR",
        "Wench_Type":"Single",
        "Deliver_from":"Riyadh"
    }
]
}

Example of URL

Full URL

https://api.dev.e4cars.io/api/v1/4pl/MOS/incoming-flows/orders/MOS_IN_VEHICLE_ACCOUNT?token=18498cae876943a9aa2c72971645b75xxxx


NAME NATURE TYPE PLACE VALUE
ACCOUNT_ID CONSTANT string Path param MOS
ID_TRANSLATOR CONSTANT String Path param MOS_IN_VEHICLE_ACCOUNT
TOKEN CONSTANT string Query param (see authentication section)
dry_run CONSTANT string Query param false
NAME NATURE TYPE PLACE VALUE
"Tech_service_package" VARIABLE String Body Dynamic. This value must be an e4Cars product
"Plates_installation_needed" VARIABLE String Body Mandatory. Y/N
"Additional_services" VARIABLE String Body Dynamic. This value must be an e4Cars step of a product
"PIO" VARIABLE String Body Dynamic. This value must be alist of e4Cars step template separated by ','
Below is the list of accepted values for vehicle.shape:
Name Value
CABRIOLET CABRIOLET
COUPE COUPE
CUV CUV
HATCHBACK HATCHBACK
MICRO MICRO
MINIVAN MINIVAN
PICKUP PICKUP
ROADSTER ROADSTER
SEDAN SEDAN
SUPERCAR SUPERCAR
SUV SUV

Date value

All date (IN or OUT) are Locale

Below is the list of all accepted date formats:

  • DD/MM/YYYY

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
{
"vehicles": [
    {
        "VIN":"MAT791103S7L00194",
        "Make":"TATA",
        "Customer":"TATA",
        "Consignee":"Haramain - HCV",
        "Address":"Haramain - HCV",
        "Tech_service_package":"Package 3",
        "Plates_installation_needed":"N",
        "Additional_services":"Add inspection",
        "PIO":"",
        "Sales_channel2":"RETAIL",
        "Self-pickup":"N",
        "Optional_order_date":"19/06/2025",
        "Order_UID":"1-19.06.2025-Haramain - HCV",
        "Wench_Type":"Single",
        "Deliver_from":"Dammam"
    },
    {
        "VIN":"WBA58FF08P8D05668",
        "Make":"BMW",
        "Customer":"BMW",
        "Consignee":"NRR",
        "Address":"NRR",
        "Tech_service_package":"Package 3",
        "Plates_installation_needed":"N",
        "Additional_services":"Add inspection",
        "PIO":"",
        "Sales_channel2":"RETAIL",
        "Self-pickup":"N",
        "Optional_order_date":"23/06/2025",
        "Order_UID":"1-23.06.2025-NRR",
        "Wench_Type":"Single",
        "Deliver_from":"Riyadh"
    }
]
}
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." }