Create Order

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

POST Create Order

POST /v3/order

Request Data

ParameterTypeDescription
consignee.namestringName of the consignee (Receiver)
consignee.phone_numberstring- Min. Char >= 8
- No Symbol allowed
- Pre-fix 62 and 0 are allowed.

See detail validation here.
consigner.namestringName of the consigner (Sender)
consigner.phone_numberstring- Min. Char >= 8
- No Symbol allowed
- Pre-fix 62 and 0 are allowed

See detail validation here.
courier.codboolean
(false / true)
default vale
COD "Flag to determine whether order are Cash on Delivery or not (false/true)"
courier.rate_idintegerThe 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_insuranceboolean
(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)
integerThe area ID of the origin obtained from Location API
origin.address
(Required)
stringAddress of the Origin (No Symbol Allowed Except # & ' . - = + , ( ) )
origin.directionstringDirection to support/ identify Origin Address (No Symbol Allowed Except # & ' . - = + , ( ) ). Max. 100 characters
origin.lat
(Required for Instant & Same Day Services)
stringLatitude Coordinate of the Origin
origin.lng
(Required for Instant & Same Day Services)
stringLongitude Coordinate of the Origin
origin.country_id (Required for International Services)integerThe ID of the country from LocationAPI
destination.area_id
(Required)
integerThe area ID of the destination obtained from Location API (No Symbol Allowed Except # & ' . - = + , ( ) )
destination.address
(Required)
stringAddress of the Destination (No Symbol Allowed Except # & ' . - = + , ( ) )
destination.directionstringDirection to support/ identify Destination Address (No Symbol Allowed Except # & ' . - = + , ( ) ). Max. 100 characters
destination.lat
(Required for Instant & Same Day Services)
stringLatitude Coordinate of the Destination
destination.lng
(Required for Instant & Same Day Services)
stringLongitude Coordinate of the Destination
destination.country_id (Required for International Services)integerThe ID of the country from LocationAPI
external_idstringExternal ID generated by user
(if any)
package.height
(Required)
integerThe height of the package (cm)
package.length
(Required)
integerThe length of the package (cm)
package.width
(Required)
integerThe width of the package (cm)
package.weight
(Required)
integerThe weight of the package (kg)
package.items.name
(Required)
stringThe name of the item
package.items.price
(Required)
integerThe value of that single item
package.items.qty
(Required)
integerThe 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_categoriesArray 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)
integerThe total value of the order
(item value x quantity)
payment_type
(Required)
stringThe 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_logicstring
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

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.country_idCountry ID of package destination
destination.country_nameCountry 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.country_idCountry ID of package origins
origin.country_nameCountry 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