Skip to main content
POST
/
shipping
/
calculate-fee
curl --request POST \
  --url https://api.bitbybit.studio/customer/api/open/v1/shipping/calculate-fee \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "provider": "gosend",
  "origin": {
    "lat": -6.2087,
    "lng": 106.8456
  },
  "destination": {
    "lat": -6.1751,
    "lng": 106.865
  },
  "package": {
    "weight": 1500
  }
}
'
{
  "data": {
    "provider": "gosend",
    "currency": "IDR",
    "options": [
      {
        "serviceCode": "Instant",
        "serviceName": "GoSend Instant",
        "serviceType": "INSTANT",
        "courierGroup": null,
        "price": 28000,
        "currency": "IDR",
        "estimatedDelivery": null,
        "raw": {}
      },
      {
        "serviceCode": "SameDay",
        "serviceName": "GoSend Same Day",
        "serviceType": "EXPRESS",
        "courierGroup": null,
        "price": 18000,
        "currency": "IDR",
        "estimatedDelivery": null,
        "raw": {}
      }
    ]
  }
}
{
"error": {
"code": "VALIDATION_ERROR",
"message": "origin.districtId is required for KiriminAja Express"
}
}
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API key"
}
}

Authorizations

x-api-key
string
header
required

API key for authentication. Create one in Settings > Developer. The key must have the BITCRM product scope and an orders resource scope; required action depends on the endpoint (READ, WRITE, or DELETE).

Body

application/json
provider
enum<string>
required
Available options:
gosend,
kirimin_aja,
ride_blitz
origin
object
required
destination
object
required
package
object
required
options
object

Per-provider tuning. See endpoint description for which fields apply to which provider.

Response

Quote successful.

data
object