Skip to main content
POST
/
draft
Create Draft Order
curl --request POST \
  --url https://api.freshtrack.ma/api/v1/draft \
  --header 'Content-Type: application/json' \
  --header 'x-auth-token: <api-key>' \
  --data '
{
  "reference": "AGD-RTM-2024-08136",
  "quantity": 2,
  "pickupPlaceName": "TAROUNDANT",
  "departurePortUnLoCode": "MAAGA",
  "arrivalPortUnLoCode": "NLRTM",
  "deliveryPlaceName": "BERLIN",
  "containerIsoCode": "22R1",
  "commodityHsCode": "0805220000",
  "incoterm": "FOB",
  "pickupGenset": false,
  "deliveryGenset": false,
  "comment": "Contact [email protected] (John Doe)"
}
'
{
  "message": "Draft order created successfully",
  "draftOrderId": "DO-2024-08203"
}

Description

This endpoint allows you to create a draft order in FreshTrack via API integration. It provides an easy way for third-party software, such as ERPs (Enterprise Resource Planning systems), to create and submit shipping orders directly into the FreshTrack system.
  1. Ensure all required fields are provided in the request body.
  2. The example provided showcases a common shipping route from Agadir, Morocco to Rotterdam, Netherlands.

Authorizations

x-auth-token
string
header
required

Body

application/json

Represents a simplified draft order for maritime container shipping.

reference
string
required

A unique reference number assigned by the shipper to identify this specific shipment.

Example:

"AGD-RTM-2024-08136"

quantity
number
required

The number of containers requested for this shipment.

Example:

2

pickupPlaceName
string
required

The name of the pickup location.

Example:

"TAROUNDANT"

departurePortUnLoCode
string
required

The UN/LOCODE for the departure port.

Example:

"MAAGA"

arrivalPortUnLoCode
string
required

The UN/LOCODE for the arrival port.

Example:

"NLRTM"

deliveryPlaceName
string
required

The name of the delivery location.

Example:

"BERLIN"

containerIsoCode
string
required

The ISO code for the container type.

Example:

"22R1"

commodityHsCode
string
required

The Harmonized System (HS) code for the commodity.

Example:

"0805220000"

incoterm
string
required

The Incoterm rule used for this shipment.

Example:

"FOB"

pickupGenset
boolean

Indicates whether a generator set (genset) is required at the pickup location.

Example:

false

deliveryGenset
boolean

Indicates whether a generator set (genset) is required at the delivery location.

Example:

false

comment
string

Additional notes or instructions relevant to the shipment.

Example:

"Contact [email protected] (John Doe)"

Response

Created

message
string
Example:

"Draft order created successfully"

draftOrderId
string
Example:

"DO-2024-08203"