Order
This API is used to create an order on the anteraja by passing the following parameters.
End Point
Reques Headers Parameters :
x-api-key, is the api key of the appgregator that has been encrypted using AES encryption format.
name, is the name of the project registered in the appgregator that is adjusted to the x-api-key in the previous parameter.
connection_name, connection_name is the connection name that is adjusted to the project and x-api-key that has been registered in the appgregator.
base_path, is the basepath given directly by the anteraja
access_key, is a key that is given directly from the anteraja
Request Body Parameters :
booking_id, (required), user's system Unique Transaction Id / Booking Id. Format : [PREFIX]-[TRX ID]. Prefix will be given by Anteraja Team. We will trim the leading and trailing whitespace, and ignore case. max length 25 character.
invoice_no, (optional), user's System Invoice No. max length 25 character
service_code, (required). Anteraja Service Type (SD, ND, REG, ICE, BIG), max length 3 character
parcel_total_weight, (required). Parcel Total Weight (in grams). Minimum is 1000. Maximum is 50000. max length 5 character
[shipper/receiver].name, (required). Shipper / Receiver Name info. Maximal length 50 character
[shipper/receiver].phone, its required. Shipper / Receiver Telephone info. Max length 16 character.
[shipper/receiver].email, optional. Shipper / Receiver Email info. Max length 50 character.
[shipper/receiver].district, its required. Shipper / Receiver District Code. Max length 10 character.
[shipper/receiver].address, its required. Shipper / Receiver Address detail info. Max length 256 character.
[shipper/receiver].postcode, its required. Shipper / Receiver Postcode info. Max length 5 character.
[shipper/receiver].geoloc, optional. Shipper / Receiver Geolocation (Longitude, Latitude) info. Max length 100 character.
items.item_name, its required Item name info. Max length 50 character.
items.item_desc, optional. Item description info. Max length 32 character.
items.item_category, optioanal. Item category info. Max length 20 character.
items.item_quantity, its required. Item quantity info. Max length 2 character.
items.declared_value, its required. Item value info (per item). Max length 9 character.
items.weight, its required. Item weight info (in grams and per item). Minimum is 100. Maximum is 50000. Max length 5 character.
use_insurance, optional, Order covered by insurance or not. (true / false).
declared_value, its required. Parcel declared value. Max length 9 character.
expect_time, optional. Expected pickup time. Max 19 character.
var axios = require('axios');
var data = JSON.stringify({
"booking_id": "PREFIX-2011",
"invoice_no": "INV/RJ/2011",
"service_code": "REG",
"parcel_total_weight": 3000,
"shipper": {
"name": "JuliShop",
"phone": "081234324283",
"email": "julishop@gmail.com",
"district": "31.75.08",
"address": "Jl Kampung Pulo Pinang Ranti",
"postcode": "13510",
"geoloc": ""
},
"receiver": {
"name": "JuliBuyer",
"phone": "012931232139819",
"email": "julibuyer@gmail.com",
"district": "31.75.08",
"address": "Jalan Halim Perdanakusuma, RT.3/RW.4, Halim Perdana Kusumah",
"postcode": "13610",
"geoloc": ""
},
"items": [
{
"item_name": "Laptop 2",
"item_desc": "Laptop ROG",
"item_category": "Elektronik",
"item_quantity": 2,
"declared_value": 15000000,
"weight": 2000
},
{
"item_name": "SSD 256GB",
"item_desc": "SSD Samsung 256GB",
"item_category": "Elektronik",
"item_quantity": 1,
"declared_value": 1200000,
"weight": 1000
}
],
"use_insurance": true,
"declared_value": 16200000,
"expect_time": "2022-05-12 14:00:00"
});
var config = {
method: 'post',
url: 'https://us-central1-appgregator.cloudfunctions.net/antaraja/service/order',
headers: {
'x-api-key': 'U2FsdGVkX1++ZZ4P1XMNg5SK1wAlLl+43SGcdaHpyt+f0fBNSVUHaKvtsRWP4Eu75QTIU5i2oAaBORnsQrRGYQ==',
'name': 'ft-4',
'connection_name': 'delivery02',
'base_path': 'https://doit-sit.anteraja.id/importir',
'access_key': 'Anteraja_x_importir_SIT',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Last updated