Create Order

Create Order

By creating an order, the rate of the shipment will be locked and order_id will be generated to identify that order.

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 or "0" Allowed

consigner.name

string

Name of the consigner (Sender)

consigner.phone_number

string

Min. Char >= 8
No Symbol or "0" Allowed

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

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

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

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

origin.country_id (Required for International Services)

integer

The ID of the country from LocationAPI

destination.area_id
(Required)

integer

The area ID of the destination obtained from Location API

destination.address
(Required)

string

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

destination.direction

string

Direction to support/ identify Destination Address

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

destination.country_id (Required for International Services)

integer

The ID of the country from LocationAPI

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.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

integer
1 = regular services
2 = express services

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

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.country_id

Country ID of package destination

destination.country_name

Country 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.country_id

Country ID of package origins

origin.country_name

Country 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


What’s Next

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