Create Order

Updated by 21 Aug 2024

Authorizations : X-API-Key_Header
Request Body Schema : application/json

POST Create Order

POST /v3/order

Request Data

Parameter

Type

Description

consignee.name

string

Name of the consignee (Receiver)

consignee.phone_number

string

  • Min. Char >= 8
  • No Symbol allowed
  • Pre-fix 62 and 0 are allowed.See detail validation here.

consigner.name

string

Name of the consigner (Sender)

consigner.phone_number

string

  • Min. Char >= 8
  • No Symbol allowed
  • Pre-fix 62 and 0 are allowedSee detail validation here.

courier.cod

boolean
(false / true)
default vale

COD "Flag to determine whether order are Cash on Delivery or not (false/true)"

courier.rate_id

integer

The rate ID of the service to be use for the order

for create RBS order, you can takeout this param from request but don't forget to use param service_type

courier.use_insurance

boolean
(false / true)
default value : false

Use true if you want to use insurance otherwise* false*. But if the pricing is flagged compulsory insurance, must use true

If you create RBS order, Then we will set your insurance True when the order must use insurance even you don't send use_insurance=true.

coverage
(Required)

string
"domestic" / "international"

Coverage of the shipment

origin.area_id
(Required)

integer

The area ID of the origin obtained from Location API

origin.address
(Required)

string

Address of the Origin (No Symbol Allowed Except # & ' . - = + , ( ) )

origin.direction

string

Direction to support/ identify Origin Address (No Symbol Allowed Except # & ' . - = + , ( ) ). Max. 100 characters

origin.lat
(Required for Instant & Same Day Services)

string

Latitude Coordinate of the Origin

origin.lng
(Required for Instant & Same Day Services)

string

Longitude Coordinate of the Origin

destination.area_id
(Required)

integer

The area ID of the destination obtained from Location API (No Symbol Allowed Except # & ' . - = + , ( ) )

destination.address
(Required)

string

Address of the Destination (No Symbol Allowed Except # & ' . - = + , ( ) )

destination.direction

string

Direction to support/ identify Destination Address (No Symbol Allowed Except # & ' . - = + , ( ) ). Max. 100 characters

destination.lat
(Required for Instant & Same Day Services)

string

Latitude Coordinate of the Destination

destination.lng
(Required for Instant & Same Day Services)

string

Longitude Coordinate of the Destination

external_id

string

External ID generated by user
(if any)

package.height
(Required)

integer

The height of the package (cm)

package.length
(Required)

integer

The length of the package (cm)

package.width
(Required)

integer

The width of the package (cm)

package.weight
(Required)

integer

The weight of the package (kg)

package.items.name
(Required)

string

The name of the item

package.items.price
(Required)

integer

The value of that single item

package.items.qty
(Required)

integer

The quantity of the item

package.package_type
(required)

integer
Package Type:
1 for document (default)
2 for small package
3 for medium package

Package type category

package.item_categories

Array of string (item category id)

Item categories of the package.
Options that allowed:

  1. Cairan
  2. Dokumen
  3. Elektronik
  4. Furnitur
  5. Kosmetik
  6. Makanan
  7. Minuman
  8. Pakaian
  9. Sepatu
  10. Spare Parts
  11. Aksesoris
  12. Dekorasi Rumah
  13. Mainan
  14. Obat dan Herbal
  15. Garmen dan Tekstil
  16. Buku
  17. Lainnya

package.price
(Required)

integer

The total value of the order
(item value x quantity)

payment_type
(Required)

string

The payment type of the order
"cash" / "postpay"
default value : "postpay"

service_type
(Required if not use courier.rate_id)

integer
1 = Regular
9 = Instant

Use if using RBS (Recommended by Shipper) rate in the order.

When not use this param then by default will selected regular service

rbs_logic
(Optional)

string
best_performance
best_price

best_performance = to select 3PL rate with the best SLA performance.

best_price = to select 3PL rate with the cheapest price.

When not use this param then by default will selected best_performance

courier.schedule_at
(Optional. Only use this parameter if you use Lalamove)

yyyy-mm-ddThh:mm:ssZ

Ex: 2024-08-09T00:00:00Z

To set the scheduled date and time of your Lalamove order

courier.special_instructions
(Optional. Only use this parameter if you use Lalamove)

array

You will get the special_instructions id when you access this endpoint https://logistics-docs.shipper.id/docs/get-vehicle-id
Use that ID to use one or several additional service attached to that vehicle

Sample Request & Response

curl --location --request POST '{{baseUrl}}/v3/order' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: {{YOUR_API_KEY}}' \
--data-raw '{
  "consignee": {
    "name": "Penerima",
    "phone_number": "62852280038095"
  },
  "consigner": {
    "name": "Pengirim",
    "phone_number": "62852280038095"
  },
  "courier": {
    "cod": false,
    "rate_id": 58,
    "use_insurance": true
  },
  "coverage": "domestic",
  "destination": {
    "address": "Jalan Kenangan",
    "area_id": 12212,
    "lat": "-6.123123123",
    "lng": "104.12312312"
  },
  "external_id": "KRN1231123121",
  "origin": {
    "address": "Jalan Kenangan",
    "area_id": 12212,
    "lat": "-6.123123123",
    "lng": "104.12312312"
  },
  "package": {
    "height": 60,
    "items": [
      {
        "name": "Baju Baju",
        "price": 120000,
        "qty": 12
      }
    ],
    "length": 30,
    "package_type": 2,
    "price": 1440000,
    "weight": 1.1231,
    "width": 40
  },
  "payment_type": "postpay"
}'
{
    "metadata": {
        "path": "/v3/order",
        "http_status_code": 201,
        "http_status": "Created",
        "timestamp": 1622132155
    },
    "data": {
        "coverage": "domestic",
        "order_id": "215MX47DYNRV5",
        "payment_type": "postpay",
        "courier": {
            "rate_id": 58,
            "amount": 168000,
            "use_insurance": true,
            "insurance_amount": 7880,
            "cod": false
        },
        "consignee": {
            "name": "Pengirim",
            "phone_number": "62852280038095"
        },
        "consigner": {
            "name": "Penerima",
            "phone_number": "62852280038095"
        },
        "destination": {
            "address": "Jalan Kenangan",
            "area_id": 12212,
            "area_name": "Margaasih",
            "city_id": 75,
            "city_name": "Bandung, Kab.",
            "country_id": 228,
            "country_name": "INDONESIA",
            "lat": "-6.123123123",
            "lng": "104.12312312",
            "postcode": "40351",
            "province_id": 9,
            "province_name": "Jawa Barat",
            "suburb_id": 1242,
            "suburb_name": "Margaasih"
        },
        "origin": {
            "address": "Jalan Kenangan",
            "area_id": 12212,
            "area_name": "Margaasih",
            "city_id": 75,
            "city_name": "Bandung, Kab.",
            "country_id": 228,
            "country_name": "INDONESIA",
            "lat": "-6.123123123",
            "lng": "104.12312312",
            "postcode": "40351",
            "province_id": 9,
            "province_name": "Jawa Barat",
            "suburb_id": 1242,
            "suburb_name": "Margaasih"
        },
        "package": {
            "package_type": 2,
            "weight": 1.1231,
            "length": 30,
            "width": 40,
            "height": 60,
            "price": 1440000,
            "items": [
                {
                    "id": 717898,
                    "name": "Baju Baju",
                    "qty": 12,
                    "price": 120000
                }
            ]
        }
    }
}

Important Return Parameter

  • order_id - To be use for requesting pickup
  • courier.amount - The cost of the delivery that will be invoiced by Shipper
  • courier.insurance_amount - The additional cost of delivery that will be invoiced by Shipper if using insurance.
  • Make sure that all the details (consigner, consignee, origin, destination & package details) has been filled in correctly.

Response List

ParameterDescription
metadataMetadata information
metadata.pathAPI endpoint path
metadata.http_status_codeHTTP status code
metadata.http_statusHTTP status
metadata.timestampTimestamp
dataAll important information about order creation placed on this param
data.coverageOrder creation type: domestic/international
data.order_idShipper Order ID. To be use for pickup request
data.payment_typeMerchant payment type: cash/postpay
courierAll important information about courier (3PL) placed on this param
courier.rate_idRateID of courier
courier.amountShipment fee
courier.user_insuranceInsurance flag of the order
courier.insurance_amountInsurance fee
courier.codCash on delivery flag of the order
consigneeAll important information about consignee placed on this param
consignee.nameConsignee name (penerima)
consignee.phone_numberConsignee phone number
consignerAll important information about consigner placed on this param
consigner.nameConsigner name (pengirim)
consigner.phone_numberConsigner phone number
destinationAll important information about destination of the package placed on this param
destination.addressPackage destination address
destination.area_idArea ID of package destination
destination.area_nameArea name of package destination
destination.city_idCity ID of package destination
destination.city_nameCity name of package destination
destination.latLatitude of package destination
destination.lngLongitude of package destination
destination.postcodePostcode of package destination
destination.province_idProvince ID of package destination
destination.province_nameProvince name of package destinationa
destination.suburb_idSuburb id of package destination
destination.suburb_nameSuburb name of package destination
originAll important information about origin package placed on this param
origin.addressAddress of package origin
origin.area_idArea ID of package origin
origin.area_nameArea name of package origin
origin.city_idCity ID of package origin
origin.city_nameCity name of package origin
origin.latLatitude of package origin
origin.lngLongitude of package origin
origin.postcodePostcode of package origin
origin.province_idProvince ID of package origin
origin.province_nameProvince name of package origin
origin.suburb_idSuburb id of package origin
origin.suburb_nameSuburb name of package origin
packageAll important information about package placed on this param
package.package_typeType of package: 1) document 2) small package 3) medium package
package.weightWeight of package (kg)
package.lengthLength of package (cm)
package.widthWidth of package (cm)
package.heightHeight of package (cm)
package.pricePrice of package (IDR)
package.price.itemsArray of package items
package.price.items.idPackage item ID
package.price.items.namePackage item name
package.price.items.qtyPackage item quantity
package.price.items.pricePackage Item price

What’s Next

Once you successfully create an order, take that order_id to make a pickup request