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
Parameter | Description |
---|---|
metadata | Metadata information |
metadata.path | API endpoint path |
metadata.http_status_code | HTTP status code |
metadata.http_status | HTTP status |
metadata.timestamp | Timestamp |
data | All important information about order creation placed on this param |
data.coverage | Order creation type: domestic/international |
data.order_id | Shipper Order ID. To be use for pickup request |
data.payment_type | Merchant payment type: cash/postpay |
courier | All important information about courier (3PL) placed on this param |
courier.rate_id | RateID of courier |
courier.amount | Shipment fee |
courier.user_insurance | Insurance flag of the order |
courier.insurance_amount | Insurance fee |
courier.cod | Cash on delivery flag of the order |
consignee | All important information about consignee placed on this param |
consignee.name | Consignee name (penerima) |
consignee.phone_number | Consignee phone number |
consigner | All important information about consigner placed on this param |
consigner.name | Consigner name (pengirim) |
consigner.phone_number | Consigner phone number |
destination | All important information about destination of the package placed on this param |
destination.address | Package destination address |
destination.area_id | Area ID of package destination |
destination.area_name | Area name of package destination |
destination.city_id | City ID of package destination |
destination.city_name | City name of package destination |
destination.lat | Latitude of package destination |
destination.lng | Longitude of package destination |
destination.postcode | Postcode of package destination |
destination.province_id | Province ID of package destination |
destination.province_name | Province name of package destinationa |
destination.suburb_id | Suburb id of package destination |
destination.suburb_name | Suburb name of package destination |
origin | All important information about origin package placed on this param |
origin.address | Address of package origin |
origin.area_id | Area ID of package origin |
origin.area_name | Area name of package origin |
origin.city_id | City ID of package origin |
origin.city_name | City name of package origin |
origin.lat | Latitude of package origin |
origin.lng | Longitude of package origin |
origin.postcode | Postcode of package origin |
origin.province_id | Province ID of package origin |
origin.province_name | Province name of package origin |
origin.suburb_id | Suburb id of package origin |
origin.suburb_name | Suburb name of package origin |
package | All important information about package placed on this param |
package.package_type | Type of package: 1) document 2) small package 3) medium package |
package.weight | Weight of package (kg) |
package.length | Length of package (cm) |
package.width | Width of package (cm) |
package.height | Height of package (cm) |
package.price | Price of package (IDR) |
package.price.items | Array of package items |
package.price.items.id | Package item ID |
package.price.items.name | Package item name |
package.price.items.qty | Package item quantity |
package.price.items.price | Package Item price |
Updated 4 months ago
What’s Next
Once you successfully create an order, take that order_id to make a pickup request