FASTRAC-DOC-API V2 (B2B API STAGING)
  1. Check Tariff API
FASTRAC-DOC-API V2 (B2B API STAGING)
  • Overview
  • Changelog V2
  • Region API
    • Province
      GET
    • City
      GET
    • District
      GET
    • Sub-District
      GET
    • Post Code
      GET
    • Search Region
      POST
  • Courier API
    • All Courier
      GET
    • Courier Service
      GET
  • Check Tariff API
    • Check Tariff (Express Delivery)
      POST
    • Check Tariff (Instant Delivery)
      POST
    • Calculate Multi Items
      POST
  • Order API
    • Order Express
      POST
    • Order Instant
      POST
    • Cancel Order
      POST
    • Tracking Order
      GET
    • Item Categories
      GET
  • Webhook API
    • Example Webhook payload
    • Set Webhook
      POST
    • Get Webhook
      GET
  • User API
    • Balance History
      POST
  • API-Tariff
  • API-Order
  1. Check Tariff API

Calculate Multi Items

Testing
POST
/item/multi-items
B2B Calculate Multi-Item API
Objective: Provides an endpoint for B2B clients to calculate volumetric and actual weight for multiple items in a single API call. This API returns the final dimensions of the optimized packing box and the chargeable weight based on rounding logic.
Endpoint: POST item/multi-items (under the B2B route prefix)
Authentication: HTTP Basic Authentication (same as other B2B APIs).

Request#

Body Parameters#

Property NameData TypeRequiredNotes
courierStringYesThe courier to be used, which determines the volumetric division factor.
itemsArray of ObjectsYesAn array of item objects to be calculated.

items Object Parameters#

Property NameData TypeRequiredNotes
lengthNumberYesLength of the item in cm.
widthNumberYesWidth of the item in cm.
heightNumberYesHeight of the item in cm.
weightNumberYesWeight of the item in grams.
quantityNumberYesQuantity of this item.
nameStringYesName or description of the item.
Note: length, width, height, and weight are provided for a single item. The system will calculate the total based on the quantity.

Response#

API Response Explanation#

The following is the structure of the API response:
{
    "success": true,
    "message": "success",
    "data": {
        "desc": "RMK-123- Qty: 1 | Washmachine Qty: 2",
        "total_weight": 1400,
        "volumetric_weight": 20000,
        "final_actual_weight": 25000,
        "suggested_optimal_volumetric": "100x50x30"
    },
    "timestamp": "2025-08-14T06:23:41.289Z"
}

Response Properties#

success:
Type: Boolean
Description: Indicates whether the API request was successful.
message:
Type: String
Description: A message related to the API response.
data:
Type: Object
Description: Contains the detailed calculation results.
desc:
Type: String
Description: A consolidated description of all items and their quantities.
total_weight:
Type: Number
Description: The total actual weight of all items in grams.
volumetric_weight:
Type: Number
Description: The calculated volumetric weight of all items in grams, based on the total volume.
final_actual_weight:
Type: Number
Description: The final chargeable weight in grams, determined by comparing total, volumetric, and suggested optimal volumetric weights, and then applying rounding logic.
Note: This value should be used as the weight parameter in the tariff API.
suggested_optimal_volumetric:
Type: String
Description: The suggested optimal dimensions (L x W x H) for a single packing box that would fit all items.
timestamp:
Type: String
Description: The ISO 8601 timestamp of when the response was generated.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/item/multi-items' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Og==' \
--data-raw '{
    "courier": "idx",
    "items": [
        {
            "name": "RMK-123-",
            "length": 30,
            "width": 30,
            "height": 100,
            "weight": 200,
            "quantity": 1
        },

        {
            "name": "Washmachine",
            "length": 30,
            "width": 50,
            "height": 10,
            "weight": 600,
            "quantity": 2
        }
    ]
}'
Response Response Example
201 - 200 - Works fine.
{
    "success": true,
    "message": "success",
    "data": {
        "desc": "RMK-123- Qty: 1 | Washmachine Qty: 2",
        "total_weight": 1400,
        "volumetric_weight": 20000,
        "final_actual_weight": 25000,
        "suggested_optimal_volumetric": "100x50x30"
    },
    "timestamp": "2025-08-14T06:47:38.122Z"
}

Request

Authorization
Send your HTTP requests with an
Authorization
header that contains the word Basic followed by a space and a base64-encoded string username:password
Example:
Authorization: Basic *****************
Body Params application/json

Examples

Responses

🟢201200 - Works fine.
application/json
Body

🟠400400 - Bad request. Missing required parameters or parameters are not correct
🟠404404 - Not Found
Modified at 2025-08-28 10:27:13
Previous
Check Tariff (Instant Delivery)
Next
Order API
Built with