### Search City Endpoint Example Source: https://komerceapi.readme.io/reference/search-city Demonstrates how to call the Search City API endpoint using Shell, retrieving cities for a specific province. ```Shell curl -X GET \ https://rajaongkir.komerce.id/api/v1/destination/city/3 \ -H 'Accept: application/json' ``` -------------------------------- ### RajaOngkir API V2 - Introduction and Integration Methods Source: https://komerceapi.readme.io/reference/rajaongkir-api Provides an overview of the RajaOngkir API V2, guiding users through registration, API key generation, and explaining the two integration methods: Step-by-Step (Hierarchical) and Direct Search (Instant Search). It details how each method works and their ideal use cases. ```APIDOC RajaOngkir API V2 Overview: **Purpose:** Access shipping data and perform cost calculations. **Key Steps:** 1. **Register for API Key:** Sign up on the RajaOngkir website and generate a unique API key for authentication. 2. **Choose Integration Method:** * **Step-by-Step Method (Hierarchical):** Suitable for forms with dropdowns. Involves sequential requests to get provinces, then cities, then districts, and finally subdistricts. Uses District IDs or Subdistrict IDs for cost calculation. * **Direct Search Method (Instant Search):** Ideal for search interfaces and autocomplete. Allows users to type location names directly and get instant results with complete location details. Uses Subdistrict IDs for cost calculation. **API Endpoints (Conceptual):** * **Step-by-Step:** * Search Province: GET /province * Search City: GET /city?province_id={id} * Search District: GET /district?city_id={id} * Search Subdistrict: GET /subdistrict?district_id={id} * Calculate Cost: POST /cost (using District/Subdistrict IDs) * **Direct Search:** * Search Destination: GET /destination?city_name={name} * Calculate Domestic Cost: POST /domestic-cost (using Subdistrict IDs) * Calculate International Cost: POST /international-cost (using Subdistrict IDs) **Dependencies:** Requires a valid RajaOngkir API key. ``` -------------------------------- ### Example Insurance Calculation Source: https://komerceapi.readme.io/reference/about-insurance Demonstrates the calculation of insurance value for an order using the JNE courier based on provided product price and shipping details. ```JSON (0.2% x 1000000) + 5000 = 2000 + 5000 = IDR 7000 ``` -------------------------------- ### Komerce API: Calculate Shipping Cost (GET) Source: https://komerceapi.readme.io/reference/error-condition-get-calculate-api Details the GET endpoint for calculating shipping costs. It specifies the URL, required authentication, necessary query parameters (weight, item_value), and common error conditions like unauthorized access or missing parameters. ```APIDOC API Endpoint: Calculate Shipping Cost Method: GET URL: https://api-sandbox.collaborator.komerce.id/tariff/api/v1/calculate Authentication: Required (API Key) Error Conditions: - HTTP Status: 401, Error Code: unauthorized What Went Wrong: The API key is missing or invalid. How to Fix It: Make sure to add a valid API Key in the request header. Location: Headers - HTTP Status: 422, Error Code: Unprocessable Entity What Went Wrong: Required query parameters are missing: weight and item_value. How to Fix It: Add both weight and item_value parameters to your request. They cannot be left empty. Location: Query Params Example of a Valid Request: GET /tariff/api/v1/calculate?weight=1000&item_value=500000 Authorization: Bearer Quick Tips: - Always include the Authorization header using the correct token format: Authorization: Bearer - Ensure required parameters are present: - weight: the total weight of the items (in grams) - item_value: the total value of the items (in currency) ``` -------------------------------- ### Store Order POST API Source: https://komerceapi.readme.io/reference/post-store-order Allows users to create an order by integrating data from destination search and cost calculation endpoints. It handles order validation, balance deduction for Bank Transfer payments, and supports COD and Bank Transfer methods. Phone numbers must adhere to specific formats (starting with 62 or 8). ```APIDOC POST https://api-sandbox.collaborator.komerce.id/order/api/v1/orders/store ## Overview The Store Order Endpoint allows users to create an order that will be validated and processed by Komerce. This endpoint integrates data obtained from previous steps: * Search Destination Endpoint → Provides origin & destination IDs. * Calculate Endpoint → Provides shipping cost details, including courier information. Once an order is created, the system automatically deducts the shipping fee from the user’s dashboard balance (if using the Bank Transfer method). If the balance is insufficient, the order will not be processed, and an error response will be returned. ## Key Features ✅ Seamless Order Creation – Integrates with previous endpoints to streamline the process. ✅ Automated Balance Deduction – Ensures smooth transactions for prepaid orders. ✅ Strict Data Validation – Ensures correct phone number format & other required fields. ✅ Supports Multiple Payment Methods – Including COD and Bank Transfer. ## How It Works 1️⃣ Required Data for Order Creation Users must provide the following details: * Order Information → Order date, brand name, shipper & receiver details. * Shipping Details → Courier name, service type, shipping cost. * Payment Method → COD or Bank Transfer. *Unfortunetly, we don't have invoicing method automaticly. But, you can use invoicing method if you contact our Business Development for request invoicing method.* * Product Details → Name, variant, weight, dimensions, quantity. 💡 Important: * Phone numbers must start with 62 or 8 (e.g., 6281234567890, 81234567890), not start with 0 or +62. * An insufficient balance will prevent order processing if your balance is less than the value of the shipping charges to be made. * Ensure all required fields are formatted correctly to avoid errors. 2️⃣ Order Processing & Validation Once an order is submitted: 1. The system validates the order details, including phone numbers, shipping cost, and payment method. 2. If using Bank Transfer, the shipping cost is deducted from the user’s balance. 3. If all data is valid, the order is sent to us for processing. 4. The system returns a confirmation response, indicating the order has been successfully created. ``` -------------------------------- ### GET Search Destination API Source: https://komerceapi.readme.io/reference/error-condition Retrieves destination search results from the Komerce API. Requires API Key authentication and a 'keyword' parameter for searching. Provides detailed error conditions for common issues like missing authentication or parameters. ```APIDOC API Endpoint: Search Destination Method: GET URL: {{Base_URL}}/tariff/api/v1/destination/search Authentication: Required (API Key) Parameters: - keyword (query, required): The search term for destinations. Cannot be empty. Error Conditions: - HTTP Status: 401, Error Code: unauthorized What Went Wrong: The API Key is missing or invalid. How to Fix It: Make sure to include a valid API Key in the request header. Field Affected: Authorization header - HTTP Status: 422, Error Code: Unprocessable Entity What Went Wrong: The 'Keyword' parameter is missing. How to Fix It: Add a valid 'keyword' parameter in your query. It cannot be left empty. Field Affected: Query params Example Request: GET /tariff/api/v1/destination/search?keyword=Jakarta Tips to Avoid Errors: - Always include the Authorization header with a valid token. - Do not leave the 'keyword' parameter empty — it’s required. - Use the correct endpoint and query structure. ``` -------------------------------- ### Get List of Provinces Source: https://komerceapi.readme.io/reference/rajaongkir-api Retrieves a list of all available provinces from the Komerce API. This is often a prerequisite for other location-based API calls. ```APIDOC Endpoint: GET /api/v1/destination/province Description: Retrieves a list of provinces. Parameters: - key: YOUR_API_KEY (Required, Header) - Your API authentication key. Returns: - A JSON object containing a list of provinces with their IDs and names. Example: curl --location 'https://rajaongkir.komerce.id/api/v1/destination/province' \ --header 'key: YOUR_API_KEY' ``` -------------------------------- ### RajaOngkir API V2 - Step-by-Step Methods Source: https://komerceapi.readme.io/reference/endpoint-rajaongkir-for-search-base Provides access to RajaOngkir API V2 functionalities for step-by-step location management and cost calculation. Includes searching provinces, cities, districts, subdistricts, and calculating costs. ```APIDOC RajaOngkir API V2 - Step-by-Step Endpoint RajaOngkir for Step-by-Step Method - Search Province (GET) - Retrieves a list of all available provinces. - Parameters: None - Returns: List of provinces with their IDs and names. - Search City (GET) - Retrieves a list of cities based on the provided province ID. - Parameters: - province: The ID of the province to filter cities by. - Returns: List of cities within the specified province. - Search District (GET) - Retrieves a list of districts based on the provided city ID. - Parameters: - city: The ID of the city to filter districts by. - Returns: List of districts within the specified city. - District Calculate Cost (POST) - Calculates shipping costs for domestic shipments based on origin, destination, weight, and courier. - Parameters: - origin: Origin city ID. - destination: Destination city ID. - weight: Shipment weight in grams. - courier: Courier service code (e.g., 'jne', 'pos', 'tiki'). - Returns: Shipping cost details for available couriers. - Search Subdistrict (GET) - Retrieves a list of subdistricts based on the provided district ID. - Parameters: - district: The ID of the district to filter subdistricts by. - Returns: List of subdistricts within the specified district. ``` -------------------------------- ### Komerce API Base URLs Source: https://komerceapi.readme.io/reference/base-url Provides the essential Base URLs for interacting with the Komerce API. It distinguishes between the Sandbox environment for testing and the Production environment for live operations, crucial for accurate data flow. ```APIDOC Base URLs: - Sandbox (Testing Environment): URL: https://api-sandbox.collaborator.komerce.id Description: Use for development and testing API integration without affecting live data. - Production (Live Environment): URL: https://api.collaborator.komerce.id Description: Use for live integration with actual customer data. Only use when integration is fully tested and ready for deployment. ``` -------------------------------- ### Search International Destination (GET) Source: https://komerceapi.readme.io/reference/search-international-destination Searches for international destinations based on a keyword. Useful for cross-border e-commerce, shipping, and logistics to ensure accurate global shipping needs. ```APIDOC Endpoint: Search International Destination Method: GET URL: https://rajaongkir.komerce.id/api/v1/destination/international-destination Purpose: Enables users to search for international destinations based on a keyword, integrating global location searches into systems. Credentials: Header Response: Users can click 'Try It!' to test the request and view the response. ``` -------------------------------- ### RajaOngkir API V2 - Step-by-Step Method Endpoints Source: https://komerceapi.readme.io/reference/woocommerce Provides access to RajaOngkir V2 API functionalities using a step-by-step approach. Includes endpoints for searching provinces, cities, districts, subdistricts, and calculating costs. ```APIDOC RajaOngkir API V2 - Step-by-Step Method: - Search Province (GET): Retrieves a list of all available provinces. Parameters: - key: Your RajaOngkir API key. - origin: (Optional) Origin province ID for filtering. - destination: (Optional) Destination province ID for filtering. Returns: JSON object containing province data. - Search City (GET): Retrieves a list of cities based on province. Parameters: - key: Your RajaOngkir API key. - province: The ID of the province to search cities within. Returns: JSON object containing city data. - Search District (GET): Retrieves a list of districts based on city. Parameters: - key: Your RajaOngkir API key. - city: The ID of the city to search districts within. Returns: JSON object containing district data. - Calculate Cost (POST): Calculates shipping costs for domestic shipments. Parameters: - key: Your RajaOngkir API key. - origin: Origin city ID. - destination: Destination city ID. - weight: Total weight of the shipment in grams. - courier: Courier code (e.g., 'jne', 'pos', 'tiki'). Returns: JSON object with shipping cost details. - Search Subdistrict (GET): Retrieves a list of subdistricts based on city. Parameters: - key: Your RajaOngkir API key. - city: The ID of the city to search subdistricts within. Returns: JSON object containing subdistrict data. ``` -------------------------------- ### Komerce Delivery API - Location & Webhook Source: https://komerceapi.readme.io/reference/endpoint-rajaongkir-for-search-base Handles location-based services and webhook configurations for the Komerce Delivery API (Komship). Includes searching destinations and setting up webhook notifications. ```APIDOC Komerce Delivery API - Location & Webhook - Search Destination (GET) - Searches for available delivery destinations. - Parameters: query (string) - Search term for destination. - Returns: List of matching destinations. - Related: Error Condition - GET Search Destination API - Calculate (GET) - Calculates shipping costs based on destination and package details. - Parameters: - destination_id: ID of the destination. - package_weight: Weight of the package. - package_dimensions: Dimensions of the package. - Returns: Available shipping options and costs. - Related: Error Condition - GET Calculate API - Webhook (PUT) - Configures or updates webhook endpoints for receiving real-time delivery status updates. - Parameters: - webhook_url: The URL to send notifications to. - events: List of events to subscribe to (e.g., 'order_shipped', 'order_delivered'). - Returns: Confirmation of webhook configuration. - Error Conditions: Invalid URL, unsupported events. ``` -------------------------------- ### Search Province API Endpoint Source: https://komerceapi.readme.io/reference/search-province Retrieves a comprehensive list of all Indonesian provinces with their corresponding unique identifiers. This data serves as the first level in the location hierarchy and is required to subsequently fetch cities and districts within each province. This endpoint is the starting point for the Step-by-Step Method integration approach in RajaOngkir API V2. ```APIDOC Search Province API GET https://rajaongkir.komerce.id/api/v1/destination/province Description: Retrieves a comprehensive list of all Indonesian provinces with their corresponding unique identifiers. This data serves as the first level in the location hierarchy and is required to subsequently fetch cities and districts within each province. This endpoint is the starting point for the Step-by-Step Method integration approach in RajaOngkir API V2. Parameters: None explicitly listed for this GET request in the provided text. Returns: A list of Indonesian provinces. (Inferred from description) Example: Click 'Try It!' to start a request and see the response here! (As per text) ``` -------------------------------- ### Komerce API - Plugins Source: https://komerceapi.readme.io/reference/endpoint-rajaongkir-for-search-base Details integration with third-party platforms, specifically the RajaOngkirXOpenAPI plugin for Woocommerce. ```APIDOC Komerce API - Plugins - RajaOngkirXOpenAPI - Woocommerce - Description: Integration plugin that connects Komerce API's RajaOngkir functionalities with the Woocommerce platform. - Functionality: Enables features like real-time shipping rate calculation, address validation, and order processing within Woocommerce using Komerce's backend services. - Setup: Requires installation and configuration of API keys and endpoint URLs within Woocommerce settings. ``` -------------------------------- ### Komerce API Endpoints Overview Source: https://komerceapi.readme.io/reference/rajaongkir-api Provides an overview of key Komerce API endpoints for shipping operations, including destination search, cost calculation, and waybill tracking. ```APIDOC API Endpoints: 1. **Destination Search**: * Domestic Destination Endpoint: Search by city name to get Subdistrict IDs. - Method: GET - Path: /api/v1/destination/domestic-destination - Purpose: Facilitates Direct Search Method, returns Subdistrict IDs. * International Destination Endpoint: Get international destinations. - Method: GET - Path: /api/v1/destination/international-destination (Assumed path) - Purpose: Retrieves international destination data. 2. **Cost Calculation Endpoint**: * Calculate shipping costs using Subdistrict IDs obtained from search results. - Method: POST (Assumed) - Path: /api/v1/cost/calculate (Assumed path) - Purpose: Computes shipping costs based on location IDs. - Inputs: Requires origin and destination Subdistrict IDs, package details. 3. **Waybills Endpoint**: * Real-time package tracking. - Method: GET (Assumed) - Path: /api/v1/waybill/{waybill_number} (Assumed path) - Purpose: Provides current status and location of shipments. Note: Specific paths and request bodies for Cost Calculation and Waybills are illustrative and may vary based on full API specification. ``` -------------------------------- ### Delivery API [Komship] - Endpoint Reference Source: https://komerceapi.readme.io/reference/base-url Provides an overview of the Delivery API endpoints provided by Komship. This section covers core functionalities such as searching destinations, calculating costs, managing orders, and tracking shipments. ```APIDOC Delivery API [Komship] Endpoints: - Introduction: /reference/delivery-api - Base URL: /reference/base-url - Search Destination (GET): /reference/search-destination - Error Condition: /reference/error-condition - Calculate (GET): /reference/calculate-destination - Error Condition: /reference/error-condition-get-calculate-api - Store Order (POST): /reference/post-store-order - About Insurance: /reference/about-insurance - Error Condition: /reference/negative-case-documentation-post-store-order-api - Cancel Order (PUT): /reference/put-cancel-order - Error Condition: /reference/error-condition-get-cancel-order-api - Detail Order (GET): /reference/get-detail-order - Pickup Order (POST): /reference/post-pickup-order - Label Order (POST): /reference/post-label-order - History AirwayBill (GET): /reference/get-history-airwaybill - Webhook (PUT): /reference/put-webhook ``` -------------------------------- ### Delivery API (Komship) - Webhook and Error Handling Source: https://komerceapi.readme.io/reference/calculate-destination Manages webhook configurations for receiving updates and provides documentation for common error conditions across various Komship API endpoints. ```APIDOC Webhook and Error Handling (Delivery API - Komship): - Webhook Configuration (PUT): - Description: Configures or updates webhook endpoints to receive real-time notifications. - Endpoint: /reference/put-webhook - Error Handling: - Error Condition - GET Search Destination API: - Description: Details specific error responses for the GET Search Destination API. - Endpoint: /reference/error-condition - Error Condition - GET Calculate API: - Description: Details specific error responses for the GET Calculate API. - Endpoint: /reference/error-condition-get-calculate-api - Error Condition : POST Store Order API: - Description: Details specific error responses for the POST Store Order API. - Endpoint: /reference/negative-case-documentation-post-store-order-api - Error Condition - PUT Cancel Order API: - Description: Details specific error responses for the PUT Cancel Order API. - Endpoint: /reference/error-condition-get-cancel-order-api ``` -------------------------------- ### Plugins - RajaOngkirXOpenAPI for Woocommerce Source: https://komerceapi.readme.io/reference/calculate-destination Information on integrating RajaOngkir functionality with Woocommerce via a specific OpenAPI plugin. ```APIDOC Plugins: - RajaOngkirXOpenAPI - Woocommerce: - Description: Documentation for the plugin that integrates RajaOngkir with Woocommerce. - Endpoint: /reference/woocommerce ``` -------------------------------- ### RajaOngkirXOpenAPI - Woocommerce Plugin Source: https://komerceapi.readme.io/reference/welcome-to-komerce-openapi Documentation for the RajaOngkirXOpenAPI plugin, designed for integration with Woocommerce. This section likely details how to use the plugin to leverage RajaOngkir's shipping services within a Woocommerce store. ```APIDOC Plugins: RajaOngkirXOpenAPI - Woocommerce: /reference/woocommerce ``` -------------------------------- ### RajaOngkir API V2 - Endpoint Reference Source: https://komerceapi.readme.io/reference/base-url Details the available endpoints for the RajaOngkir API V2, categorized by functionality. This includes methods for searching provinces, cities, districts, and calculating shipping costs. ```APIDOC RajaOngkir API V2 Endpoints: - Introduction: /reference/rajaongkir-api - Step-by-Step Method: - Search Province (GET): /reference/search-province - Search City (GET): /reference/search-city - Search District (GET): /reference/search-district - Calculate Cost (POST): /reference/calculate-cost - Search Subdistrict (GET): /reference/search-subdistrict - Direct Search Method: - Search Domestic Destination (GET): /reference/search-destination-rajaongkir - Search International Destination (GET): /reference/search-international-destination - Calculate Domestic Cost (POST): /reference/calculate-domestic-cost - Calculate International Cost (POST): /reference/calculate-international-cost - Tracking Airwaybills (POST): /reference/tracking-airwaybills ``` -------------------------------- ### Woocommerce Plugin Integration Source: https://komerceapi.readme.io/reference/search-city Information regarding the RajaOngkirXOpenAPI plugin for Woocommerce, facilitating integration with the RajaOngkir API. ```APIDOC Plugin Integration: Woocommerce Plugin: Name: RajaOngkirXOpenAPI Description: Integrates RajaOngkir API functionalities with Woocommerce stores. Features: - Real-time shipping cost calculation. - Province, city, and district selection. - Support for various courier services. Setup: - Install the plugin via the Woocommerce plugin directory. - Configure API keys and settings within Woocommerce. Documentation: - Refer to the plugin's specific documentation for detailed setup and usage instructions. ``` -------------------------------- ### RajaOngkir API: Province, City, and District Operations Source: https://komerceapi.readme.io/reference/post-pickup-order Provides endpoints for searching provinces, cities, and districts, essential for logistics and shipping calculations. Includes methods for retrieving detailed location information. ```APIDOC GET /reference/search-province - Retrieves a list of all available provinces. GET /reference/search-city - Retrieves a list of cities, optionally filtered by province ID. GET /reference/search-district - Retrieves a list of districts, optionally filtered by city ID. GET /reference/search-subdistrict - Retrieves a list of sub-districts, optionally filtered by district ID. ``` -------------------------------- ### Store Order Endpoint Request Payload Source: https://komerceapi.readme.io/reference/post-store-order A sample JSON payload for creating an order via the Store Order Endpoint. It includes details about the order, shipper, receiver, shipping, payment, and item specifics. ```json { "order_date": "2024-10-28 23:59:59", "brand_name": "Komship", "shipper_name": "Toko Official Komship", "shipper_phone": "6281234567689", "shipper_destination_id": 17588, "shipper_address": "order address detail", "shipper_email": "[[email protected]](mailto:[email protected])", "receiver_name": "Buyer A", "receiver_phone": "628123456789", "receiver_destination_id": 17589, "receiver_address": "order destination address detail", "shipping": "JNT", "shipping_type": "EZ", "payment_method": "COD", "shipping_cost": 22000, "shipping_cashback": 10000, "service_fee": 2500, "additional_cost": 1000, "grand_total": 317000, "cod_value": 317000, "insurance_value": 1000, "order_details": [ { "product_name": "Komship package", "product_variant_name": "Komship variant product", "product_price": 500000, "product_width": 5, "product_height": 2, "product_weight": 5100, "product_length": 20, "qty": 1, "subtotal": 500000 } ] } ``` -------------------------------- ### Delivery API: Destination Search and Calculation Source: https://komerceapi.readme.io/reference/post-pickup-order Facilitates searching for destinations and calculating shipping costs based on destination details. Includes specific error handling for these operations. ```APIDOC GET /reference/search-destination - Searches for available shipping destinations. Includes error conditions. GET /reference/calculate-destination - Calculates shipping costs based on destination. Includes error conditions for calculation. ``` -------------------------------- ### POST Store Order API Error Conditions Source: https://komerceapi.readme.io/reference/negative-case-documentation-post-store-order-api Details the error conditions for the POST Store Order API, including HTTP status codes, error codes, descriptions, and how to fix them. It covers common issues like missing or invalid `service_fee` and past `order_date` values. ```APIDOC API Endpoint: Store Order Method: POST URL: https://api-sandbox.collaborator.komerce.id/order/api/v1/orders/store Authentication: Required (API Key) Error Conditions: | HTTP Status | Error Code | What Went Wrong | How to Fix It | |-------------|-----------------|--------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------| | 400 | Bad Request | The `service_fee` is missing or not valid. | Provide a correct `service_fee`. Typically, it's 2.8% of the **grand total** or **COD value**, depending on context. | | 401 | Unauthorized | The API key is missing or invalid. | Make sure the **Authorization header** includes a valid API Key. | | 422 | Unprocessable Entity | The `order_date` is in the past. Example message: `order_date must be today or later` | Set `order_date` to today or a future date using this format: `YYYY-MM-DD HH:MM:SS` | ``` ```JSON { "service_fee": 2044000 // Example: Should be 2.8% of COD or grand total } ``` ```JSON { "order_date": "2025-06-01 10:00:00" // Example: Must not be in the past } ``` -------------------------------- ### Delivery API: Label Generation Source: https://komerceapi.readme.io/reference/post-pickup-order Enables the generation of shipping labels for orders, likely containing necessary tracking and recipient information. ```APIDOC POST /reference/post-label-order - Generates shipping labels for specified orders. ``` -------------------------------- ### Plugins - RajaOngkirXOpenAPI for Woocommerce Source: https://komerceapi.readme.io/reference/base-url Information regarding the integration plugin for Woocommerce, specifically the RajaOngkirXOpenAPI plugin, which facilitates connectivity between RajaOngkir services and Woocommerce platforms. ```APIDOC Plugins: - RajaOngkirXOpenAPI - Woocommerce: /reference/woocommerce Description: Integration plugin for Woocommerce to utilize RajaOngkir services. ``` -------------------------------- ### Delivery API (Komship) Endpoints Source: https://komerceapi.readme.io/reference/search-district Provides functionalities for managing deliveries and orders through the Komship platform. Includes endpoints for searching destinations, calculating costs, storing, canceling, and retrieving order details, as well as managing pickups and labels. ```APIDOC Delivery API (Komship) Endpoints: - Base URL: `https://api.komship.id/v1` - Search Destination (GET) Endpoint: `/destination` Description: Searches for shipping destinations. Related: Error Condition - GET Search Destination API - Calculate (GET) Endpoint: `/calculate` Description: Calculates shipping costs. Related: Error Condition - GET Calculate API - Store Order (POST) Endpoint: `/store_order` Description: Stores a new order. Related: About Insurance, Error Condition : POST Store Order API - Cancel Order (PUT) Endpoint: `/cancel_order` Description: Cancels an existing order. Related: Error Condition - PUT Cancel Order API - Detail Order (GET) Endpoint: `/detail_order` Description: Retrieves details of a specific order. - Pickup Order (POST) Endpoint: `/pickup_order` Description: Schedules a pickup for an order. - Label Order (POST) Endpoint: `/label_order` Description: Generates a shipping label for an order. - History AirwayBill (GET) Endpoint: `/history_airwaybill` Description: Retrieves the history of airway bills. - Webhook (PUT) Endpoint: `/webhook` Description: Manages webhook configurations. ``` -------------------------------- ### RajaOngkirXOpenAPI - Woocommerce Plugin Source: https://komerceapi.readme.io/reference/rajaongkir-api Information about the RajaOngkirXOpenAPI plugin for Woocommerce, which likely integrates RajaOngkir's shipping functionalities into the Woocommerce e-commerce platform. ```APIDOC RajaOngkirXOpenAPI - Woocommerce Plugin: **Purpose:** Integrates RajaOngkir shipping services with the Woocommerce platform. **Functionality:** Likely provides features such as real-time shipping cost calculation, destination selection, and potentially order syncing within Woocommerce, leveraging the RajaOngkir API. ``` -------------------------------- ### RajaOngkirXOpenAPI - Woocommerce Plugin Source: https://komerceapi.readme.io/reference Documentation for the RajaOngkirXOpenAPI plugin, designed for integration with Woocommerce. This section likely details how to use the plugin to leverage RajaOngkir's shipping services within a Woocommerce store. ```APIDOC Plugins: RajaOngkirXOpenAPI - Woocommerce: /reference/woocommerce ``` -------------------------------- ### Delivery API [Komship] - Core Operations Source: https://komerceapi.readme.io/reference/woocommerce Manages delivery operations through the Komship API, including searching destinations, calculating costs, storing orders, and managing order statuses. ```APIDOC Delivery API [Komship] - Core Operations: - Search Destination (GET): Searches for available delivery destinations. Parameters: - key: Your Komship API key. - destination: (Optional) Name or ID of the destination. Returns: JSON object with destination details. Error Condition: Invalid API key, missing parameters. - Calculate (GET): Calculates delivery costs based on origin, destination, and package details. Parameters: - key: Your Komship API key. - origin: Origin address details. - destination: Destination address details. - weight: Package weight. - dimensions: Package dimensions. Returns: JSON object with calculated shipping costs. Error Condition: Invalid address data, unsupported route. - Store Order (POST): Stores a new delivery order. Parameters: - key: Your Komship API key. - order_details: Object containing all necessary order information (sender, receiver, package, etc.). - insurance: (Optional) Details for insurance. Returns: JSON object with the created order details and tracking number. Error Condition: Missing required order fields, invalid data format. - Cancel Order (PUT): Cancels an existing order. Parameters: - key: Your Komship API key. - order_id: The ID of the order to cancel. Returns: Confirmation of order cancellation. Error Condition: Order already processed, invalid order ID. - Detail Order (GET): Retrieves detailed information for a specific order. Parameters: - key: Your Komship API key. - order_id: The ID of the order to retrieve. Returns: JSON object with comprehensive order details. - Pickup Order (POST): Schedules a pickup for an order. Parameters: - key: Your Komship API key. - order_id: The ID of the order for pickup. - pickup_address: Details of the pickup location. Returns: Confirmation of pickup scheduling. - Label Order (POST): Generates a shipping label for an order. Parameters: - key: Your Komship API key. - order_id: The ID of the order for which to generate a label. Returns: Shipping label data (e.g., PDF or base64 encoded). - History AirwayBill (GET): Retrieves the history of airwaybills. Parameters: - key: Your Komship API key. - airwaybill_number: (Optional) Specific airwaybill number to query. Returns: JSON object with airwaybill history. - Webhook (PUT): Configures or updates webhook settings for order status updates. Parameters: - key: Your Komship API key. - webhook_url: The URL to receive webhook notifications. - events: List of events to subscribe to (e.g., 'order_status_update'). Returns: Confirmation of webhook configuration. ``` -------------------------------- ### RajaOngkir API V2 Endpoints Source: https://komerceapi.readme.io/reference/welcome-to-komerce-openapi Provides access to RajaOngkir API functionalities for shipping cost calculations and delivery service information within Indonesia. Includes methods for searching provinces, cities, districts, and calculating costs. ```APIDOC RajaOngkir API V2: Introduction: /reference/rajaongkir-api Endpoint RajaOngkir for Step-by-Step Method: Search Province: GET /reference/search-province Search City: GET /reference/search-city Search District: GET /reference/search-district District Calculate Cost: POST /reference/calculate-cost Search Subdistrict: GET /reference/search-subdistrict Endpoint RajaOngkir for Direct Search Method: Search Domestic Destination: GET /reference/search-destination-rajaongkir Search International Destination: GET /reference/search-international-destination Calculate Domestic Cost: POST /reference/calculate-domestic-cost Calculate International Cost: POST /reference/calculate-international-cost Tracking Airwaybills: POST /reference/tracking-airwaybills ``` -------------------------------- ### RajaOngkirXOpenAPI - Woocommerce Plugin Source: https://komerceapi.readme.io/index Documentation for the RajaOngkirXOpenAPI plugin, designed for integration with Woocommerce. This section likely details how to use the plugin to leverage RajaOngkir's shipping services within a Woocommerce store. ```APIDOC Plugins: RajaOngkirXOpenAPI - Woocommerce: /reference/woocommerce ``` -------------------------------- ### RajaOngkir API V2 Endpoints Source: https://komerceapi.readme.io/reference Provides access to RajaOngkir API functionalities for shipping cost calculations and delivery service information within Indonesia. Includes methods for searching provinces, cities, districts, and calculating costs. ```APIDOC RajaOngkir API V2: Introduction: /reference/rajaongkir-api Endpoint RajaOngkir for Step-by-Step Method: Search Province: GET /reference/search-province Search City: GET /reference/search-city Search District: GET /reference/search-district District Calculate Cost: POST /reference/calculate-cost Search Subdistrict: GET /reference/search-subdistrict Endpoint RajaOngkir for Direct Search Method: Search Domestic Destination: GET /reference/search-destination-rajaongkir Search International Destination: GET /reference/search-international-destination Calculate Domestic Cost: POST /reference/calculate-domestic-cost Calculate International Cost: POST /reference/calculate-international-cost Tracking Airwaybills: POST /reference/tracking-airwaybills ``` -------------------------------- ### Delivery API: History and Webhook Management Source: https://komerceapi.readme.io/reference/post-pickup-order Provides access to shipment history via airwaybills and allows for webhook configuration to receive real-time updates on order status changes. ```APIDOC GET /reference/get-history-airwaybill - Retrieves the history of shipments associated with airwaybills. PUT /reference/put-webhook - Configures or updates webhook endpoints for receiving status updates. ``` -------------------------------- ### RajaOngkir API V2 Endpoints Source: https://komerceapi.readme.io/reference/search-destination Provides access to RajaOngkir services for domestic and international shipping. Includes functionalities for searching provinces, cities, districts, calculating costs, and tracking airwaybills. ```APIDOC RajaOngkir API V2: Endpoint RajaOngkir for Step-by-Step Method: - Search Province (GET): /reference/search-province - Search City (GET): /reference/search-city - Search District (GET): /reference/search-district - District Calculate Cost (POST): /reference/calculate-cost - Search Subdistrict (GET): /reference/search-subdistrict Endpoint RajaOngkir for Direct Search Method: - Search Domestic Destination (GET): /reference/search-destination-rajaongkir - Search International Destination (GET): /reference/search-international-destination - Calculate Domestic Cost (POST): /reference/calculate-domestic-cost - Calculate International Cost (POST): /reference/calculate-international-cost Tracking Airwaybills (POST): /reference/tracking-airwaybills ``` -------------------------------- ### RajaOngkir API V2 Endpoints Source: https://komerceapi.readme.io/index Provides access to RajaOngkir API functionalities for shipping cost calculations and delivery service information within Indonesia. Includes methods for searching provinces, cities, districts, and calculating costs. ```APIDOC RajaOngkir API V2: Introduction: /reference/rajaongkir-api Endpoint RajaOngkir for Step-by-Step Method: Search Province: GET /reference/search-province Search City: GET /reference/search-city Search District: GET /reference/search-district District Calculate Cost: POST /reference/calculate-cost Search Subdistrict: GET /reference/search-subdistrict Endpoint RajaOngkir for Direct Search Method: Search Domestic Destination: GET /reference/search-destination-rajaongkir Search International Destination: GET /reference/search-international-destination Calculate Domestic Cost: POST /reference/calculate-domestic-cost Calculate International Cost: POST /reference/calculate-international-cost Tracking Airwaybills: POST /reference/tracking-airwaybills ``` -------------------------------- ### Successful Order Creation Response Source: https://komerceapi.readme.io/reference/post-store-order JSON response indicating that an order has been successfully created by the API. ```json { "status": "success", "message": "Order has been created successfully", "order_id": "1234567890" } ``` -------------------------------- ### RajaOngkir API V2 Endpoints Source: https://komerceapi.readme.io/reference/search-district Provides access to various RajaOngkir API functionalities for domestic and international shipping. This includes searching for provinces, cities, districts, sub-districts, calculating costs, and tracking shipments. ```APIDOC RajaOngkir API V2 - Step-by-Step Method: - Search Province (GET) Endpoint: https://rajaongkir.komerce.id/api/v1/province/ Description: Retrieves a list of all Indonesian provinces. - Search City (GET) Endpoint: https://rajaongkir.komerce.id/api/v1/city/{province_id}/ Description: Retrieves a list of cities within a specified province. - Search District (GET) Endpoint: https://rajaongkir.komerce.id/api/v1/destination/district/{city_id}/ Description: Retrieves a list of districts within a specified city. - District Calculate Cost (POST) Endpoint: https://rajaongkir.komerce.id/api/v1/cost/ Description: Calculates shipping costs based on origin, destination, weight, and courier. - Search Subdistrict (GET) Endpoint: https://rajaongkir.komerce.id/api/v1/subdistrict/ Description: Retrieves a list of sub-districts within a specified district. RajaOngkir API V2 - Direct Search Method: - Search Domestic Destination (GET) Endpoint: https://rajaongkir.komerce.id/api/v1/destination/ Description: Searches for domestic shipping destinations. - Search International Destination (GET) Endpoint: https://rajaongkir.komerce.id/api/v1/international/destination/ Description: Searches for international shipping destinations. - Calculate Domestic Cost (POST) Endpoint: https://rajaongkir.komerce.id/api/v1/international/cost/ Description: Calculates domestic shipping costs. - Calculate International Cost (POST) Endpoint: https://rajaongkir.komerce.id/api/v1/international/cost/ Description: Calculates international shipping costs. - Tracking Airwaybills (POST) Endpoint: https://rajaongkir.komerce.id/api/v1/waybill/tracking/ Description: Tracks the status of shipments using airwaybill numbers. ``` -------------------------------- ### RajaOngkir API - Core Functionality Source: https://komerceapi.readme.io/reference/calculate-destination Provides access to RajaOngkir services for shipping-related operations. Includes searching provinces, cities, districts, and calculating domestic and international shipping costs. ```APIDOC RajaOngkir API V2: Endpoint Group: Step-by-Step Method - Search Province (GET): - Description: Retrieves a list of all available provinces. - Endpoint: /reference/search-province - Search City (GET): - Description: Retrieves a list of cities, optionally filtered by province. - Endpoint: /reference/search-city - Search District (GET): - Description: Retrieves a list of districts, optionally filtered by city. - Endpoint: /reference/search-district - Calculate Cost (POST): - Description: Calculates shipping costs based on origin, destination, and package details. - Endpoint: /reference/calculate-cost - Search Subdistrict (GET): - Description: Retrieves a list of subdistricts, optionally filtered by district. - Endpoint: /reference/search-subdistrict Endpoint Group: Direct Search Method - Search Domestic Destination (GET): - Description: Searches for domestic shipping destinations. - Endpoint: /reference/search-destination-rajaongkir - Search International Destination (GET): - Description: Searches for international shipping destinations. - Endpoint: /reference/search-international-destination - Calculate Domestic Cost (POST): - Description: Calculates domestic shipping costs. - Endpoint: /reference/calculate-domestic-cost - Calculate International Cost (POST): - Description: Calculates international shipping costs. - Endpoint: /reference/calculate-international-cost - Tracking Airwaybills (POST): - Description: Tracks the status of shipments using airwaybill numbers. - Endpoint: /reference/tracking-airwaybills ``` -------------------------------- ### Komerce API: Label Order Source: https://komerceapi.readme.io/reference/post-label-order Generates and prints shipping labels (resis) for orders. Supports bulk printing and various label formats. ```APIDOC POST https://api-sandbox.collaborator.komerce.id/order/api/v1/orders/print-label Description: Allows users to generate and print shipping labels (resis) for their orders. This feature supports both bulk printing and different label formats to accommodate various shipping and logistical needs. Parameters: order_no (string): The order number(s) to generate labels for. Multiple orders can be specified using a comma separator (,). page (string): The label format and page size for printing. Options include: - page_1: A4 size, 1 label per page - page_2: A4 size, 2 labels per page - page_4: A4 size, 4 labels per page (A6 format) - page_5: Thermal size 10cm x 10cm - page_6: Thermal size 10cm x 15cm Example Request Body (Single Order Label): ```json { "order_no": "KOM20240311012345", "page": "page_5" } ``` Example Request Body (Bulk Label Printing): ```json { "order_no": "KOM20240311012345, KOM20240311012346, KOM20240311012347", "page": "page_2" } ``` Example Success Response: ```json { "status": "success", "message": "Labels generated successfully.", "label_url": "" } ``` ```