💵Tarif

All about tarif service

Destination

Returns the list of regional goals throughout Indonesia

Query params

  • keyword: City name or zip code

const myHeaders = new Headers();
myHeaders.append("x-api-key", "xyz");

const requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.collaborator.komerce.my.id/tariff/api/v1/destination/search?keyword=cimaung", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Calculate

Returns shipping tarif cost

Query params

  • shipper_destination_id: From destionation id

  • receiver_destination_id: From destionation id

  • weight: The weight of an item

  • item_value: Price of an item

  • cod: yes/no

GET /client/api/v1/calculate

const myHeaders = new Headers();
myHeaders.append("x-api-key", "xyz");

const requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch('https://api.collaborator.komerce.my.id/tariff/api/v1/calculate?shipper_destination_id=17596&receiver_destination_id=5056&weight=1&item_value=200000&cod=yes', requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Last updated