Documentation

Getting started

Cluster API aims to enhance the efficiency and streamline the last mile delivery process for couriers. By providing a sorting mechanism and delivery optimization features in the courier app, the goal is to minimize wasted time, increase productivity, and maximize the potential of courier resources. This API is in staging in environment, if you want to use our production url, please contact us.

V1 Cluster

Returns a list of address with cluster and subcluster

post

This endpoint transform list of address into cluster with formatted address.

body
Header parameters
hmacstringRequired

Your hmac from Authentication section

AuthorizationstringRequired

Your basic auth from Authentication section

Responses
200

A JSON array of address with cluster and subcluster

application/json
post
/athletics
const raw = JSON.stringify({
"data": [
  {
    "waybill_no": "XXXX2313421", 
    "raw_address": "Jl apron 8", 
    "district": "Kemayoran", 
    "city": "Jakarta Pusat", 
    "province": "DKI Jakarta"
    },
  {
    "waybill_no": "XXXX2313422", 
    "raw_address": "Jl apron 1", 
    "district": "Kemayoran", 
    "city": "Jakarta Pusat", 
    "province": "DKI Jakarta"
    }
]
});

const requestOptions = {
  method: "POST",
  headers: Header,
  body: raw,
  redirect: "follow"
};

fetch("https://api-stg.oppna.dev/v1/athletics", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
.catch((error) => console.error(error));
{
  "data": [
    {
      "waybill_no": "XXXX2313421",
      "formatted_address": "Jl apron 8, Kemayoran, Jakarta Pusat",
      "cluster": "Apron 8",
      "subcluster": "Apron 8"
    },
    {
      "waybill_no": "XXXX2313422",
      "formatted_address": "Jl apron 1, Kemayoran, Jakarta Pusat",
      "cluster": "Apron 1",
      "subcluster": "Apron 1"
    }
  ],
  "message": "SUCCESS",
  "code": "01",
  "processed_time": 1.2314
}

V1 Feedback

Store cluster feedback for address that missclustered

post

This endpoint store list of address that missclustered into corrected cluster.

body
Header parameters
hmacstringRequired

Your hmac from Authentication section

AuthorizationstringRequired

Your basic auth from Authentication section

Responses
200

A JSON array of address with cluster and subcluster

application/json
post
/athletics/feedback
const raw = JSON.stringify({
"data": [
  {
    "address": "Jl apron 8", 
    "district": "Kemayoran", 
    "city": "Jakarta Pusat", 
    "province": "DKI Jakarta",
    "cluster": "apron",
    "th_name": "TH KEMAYORAN"
    },
  {
    "address": "Jl apron 1", 
    "district": "Kemayoran", 
    "city": "Jakarta Pusat", 
    "province": "DKI Jakarta",
    "cluster": "apron",
    "th_name": "TH KEMAYORAN"
    }
]
});

const requestOptions = {
  method: "POST",
  headers: Header,
  body: raw,
  redirect: "follow"
};

fetch("https://api-stg.oppna.dev/v1/athletics", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
.catch((error) => console.error(error));
{
  "data": [
    {
      "address": "Jl apron 8",
      "district": "Kemayoran",
      "city": "Jakarta Pusat",
      "province": "DKI Jakarta",
      "cluster": "Apron",
      "th_name": "TH KEMAYORAN"
    },
    {
      "address": "Jl apron 1",
      "district": "Kemayoran",
      "city": "Jakarta Pusat",
      "province": "DKI Jakarta",
      "cluster": "Apron",
      "th_name": "TH KEMAYORAN"
    }
  ],
  "message": "SUCCESS",
  "code": "01",
  "processed_time": 1.2314
}

Last updated

Was this helpful?