Komerce Cost API

Shipping cost calculation

Operations 4

POST /calculate/domestic-cost Calculate domestic shipping cost #
POST /calculate/international-cost Calculate international shipping cost #
POST /calculate/district/domestic-cost Calculate domestic cost from district/subdistrict ids #
GET /tariff/api/v1/calculate Calculate delivery price #

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/komerce-cost-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

komerce-cost-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Komerce Cost API
  version: v1
  x-apievangelist-generated: '2026-07-19'
  x-apievangelist-method: generated
  x-refined-note:
  - x-apievangelist-source differs across the merged source definitions and was not carried
  description: 'Operations tagged Cost across 2 of this provider''s published API definitions: komerce-shipping-cost-openapi.yml, komerce-shipping-delivery-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://rajaongkir.komerce.id/api/v1
  description: Live environment
- url: https://api.collaborator.komerce.id
  description: Production environment
- url: https://api-sandbox.collaborator.komerce.id
  description: Sandbox environment
security:
- ApiKeyAuth: []
tags:
- name: Cost
  description: Shipping cost calculation
paths:
  /calculate/domestic-cost:
    post:
      operationId: calculateDomesticCost
      tags:
      - Cost
      summary: Calculate domestic shipping cost
      description: Estimate shipping cost between two Indonesian destination ids for one or more couriers.
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - origin
              - destination
              - weight
              - courier
              properties:
                origin:
                  type: integer
                  description: Destination id of the origin, from searchDomesticDestination.
                destination:
                  type: integer
                  description: Destination id of the destination, from searchDomesticDestination.
                weight:
                  type: integer
                  description: Package weight in grams.
                courier:
                  type: string
                  description: Courier code, or colon-separated list of courier codes.
                  example: jne
                price:
                  type: string
                  description: Sort/selection of shipping cost — lowest or highest.
                  enum:
                  - lowest
                  - highest
      responses:
        '200':
          description: Available courier services with cost and ETD
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomesticCostList'
        '400':
          description: Invalid or missing parameters
        '401':
          description: Missing or invalid API key
    servers:
    - url: https://rajaongkir.komerce.id/api/v1
      description: Live environment
  /calculate/international-cost:
    post:
      operationId: calculateInternationalCost
      tags:
      - Cost
      summary: Calculate international shipping cost
      description: Estimate international shipping cost between an Indonesian origin and a worldwide destination.
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - origin
              - destination
              - weight
              - courier
              properties:
                origin:
                  type: integer
                destination:
                  type: integer
                weight:
                  type: integer
                  description: Package weight in grams.
                courier:
                  type: string
                price:
                  type: string
                  enum:
                  - lowest
                  - highest
      responses:
        '200':
          description: Available international courier services with cost, currency and ETD
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternationalCostList'
        '400':
          description: Invalid or missing parameters
        '401':
          description: Missing or invalid API key
    servers:
    - url: https://rajaongkir.komerce.id/api/v1
      description: Live environment
  /calculate/district/domestic-cost:
    post:
      operationId: calculateDistrictDomesticCost
      tags:
      - Cost
      summary: Calculate domestic cost from district/subdistrict ids
      description: Form-based cost calculation using district or subdistrict ids obtained from the cascading province/city/district/subdistrict endpoints.
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - origin
              - destination
              - weight
              - courier
              properties:
                origin:
                  type: integer
                destination:
                  type: integer
                weight:
                  type: integer
                courier:
                  type: string
                price:
                  type: string
                  enum:
                  - lowest
                  - highest
      responses:
        '200':
          description: Available courier services with cost and ETD
        '400':
          description: Invalid or missing parameters
        '401':
          description: Missing or invalid API key
    servers:
    - url: https://rajaongkir.komerce.id/api/v1
      description: Live environment
  /tariff/api/v1/calculate:
    get:
      operationId: calculateDeliveryPrice
      tags:
      - Cost
      summary: Calculate delivery price
      description: Retrieve shipping cost estimates grouped by regular, cargo and instant service across the integrated 3PL couriers.
      parameters:
      - name: shipper_destination_id
        in: query
        required: true
        schema:
          type: integer
      - name: receiver_destination_id
        in: query
        required: true
        schema:
          type: integer
      - name: origin_pin_point
        in: query
        required: true
        description: Origin geolocation as "latitude,longitude" — required for instant courier estimation.
        schema:
          type: string
      - name: destination_pin_point
        in: query
        required: true
        description: Destination geolocation as "latitude,longitude".
        schema:
          type: string
      - name: weight
        in: query
        required: true
        description: Weight in kilograms; use a dot for decimal values.
        schema:
          type: number
          format: float
      - name: item_value
        in: query
        required: true
        description: Item price.
        schema:
          type: integer
      - name: cod
        in: query
        required: false
        description: yes/no — when yes the response reports COD coverage for the route.
        schema:
          type: string
          enum:
          - true
          - false
      responses:
        '200':
          description: Cost options grouped by service type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CalculateResponse'
        '401':
          description: Missing or invalid API key
    servers:
    - url: https://api.collaborator.komerce.id
      description: Production environment
    - url: https://api-sandbox.collaborator.komerce.id
      description: Sandbox environment
components:
  schemas:
    Meta:
      type: object
      properties:
        message:
          type: string
        code:
          type: integer
        status:
          type: string
    CourierCost:
      type: object
      properties:
        name:
          type: string
        code:
          type: string
        service:
          type: string
        description:
          type: string
        cost:
          type: integer
        etd:
          type: string
    InternationalCostList:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/Meta'
        data:
          type: array
          items:
            $ref: '#/components/schemas/InternationalCourierCost'
    InternationalCourierCost:
      allOf:
      - $ref: '#/components/schemas/CourierCost'
      - type: object
        properties:
          currency:
            type: string
          currency_updated_at:
            type: string
          currency_value:
            type: number
    DomesticCostList:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/Meta'
        data:
          type: array
          items:
            $ref: '#/components/schemas/CourierCost'
    CalculateResponse:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/Meta'
        data:
          type: object
          properties:
            calculate_reguler:
              type: array
              description: Couriers available for regular delivery.
              items:
                type: object
            calculate_cargo:
              type: array
              description: Couriers available for cargo delivery.
              items:
                type: object
            calculate_instant:
              type: array
              description: Couriers available for instant or same-day delivery.
              items:
                type: object
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: key
      description: Shipping Cost API key from the Collaborator dashboard (Developer -> Settings -> Api Key).
x-refined-from:
- komerce-shipping-cost-openapi.yml
- komerce-shipping-delivery-openapi.yml