1. Config
Onflow Open API
  • Getting Started
  • Overall logic
  • Error code
  • API
    • Config
      • Get Warehouse
        GET
      • Get Brand
        GET
      • Get Province
        GET
      • Get District
        GET
      • Get Ward
        GET
      • Upload file
        POST
      • Pricing
        POST
    • Product
      • Create Product
      • Assign Product
      • Get Product List
      • Get Product Detail
      • Get Stock
      • Deactivate Product
    • PO
      • Create PO
      • Get PO List
      • Get PO Bill
      • Get PO Detail
      • Get PO Inspection Detail
      • Cancel PO
    • Shipment
      • B2C Shipment
        • Create B2C Shipment
        • Get B2C Shipment List
        • Get B2C Shipment Detail
        • Cancel B2C Shipment
        • Get B2C Return Inspection
      • B2C Return shipment
        • Create Return B2C Shipment
        • Get Return B2C Shipment List
        • Get Return B2C Shipment Detail
        • Cancel Return B2C Shipment
        • Get B2C Return Shipment Inspection
      • B2B Shipment
        • Create
        • Get list
        • Get detail
        • Cancel
      • B2B Return shipment
        • Create
        • Get list
        • Get detail
        • Cancel
        • Get B2B Return Shipment Inspection
    • Stock
      • Get inventory Batch/lot
      • Get inventory Expired date
      • Get inventory Expired percent
  • Webhook
    • Shipment
      • Updated Shipment Status
    • Return
      • Updated Return Status
    • PO
      • Updated PO Status
    • Stock
      • Updated Stock
  1. Config

Pricing

POST
/api/v1/shipments/pricing/calculation
This API is used to get shipping pricing when creating a retail order using Onflow shipping service.

Request

Authorization
Add parameter in header
Authorization
Example:
Authorization: ********************
Header Params

Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/api/v1/shipments/pricing/calculation' \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
    "warehouse_code": "ONF_WH_HCM_APD",
    "merchant_tracking_code_reference": "{{merchant_tracking_code_reference}}",
    "cod_amount": 1000.00,
    "use_insurance": true,
    "shipment_value": 100000.00,
    "is_check_content": true,
    "is_exchange_goods": true,
    "delivery_note": "Giao tới nhà có cổng hoa giấy",
    "shipment_type": "b2c",
    "recipient": {
        "recipient_name": "Nguyen Van A",
        "recipient_phone_number": "0909090915",
        "recipient_address": "Số 9 trà khúc",
        "recipient_ward_id": "{{ward_id}}",
        "recipient_district_id": "{{district_id}}",
        "recipient_city_id": "{{province_id}}",
        "recipient_ward": "Phường 02",
        "recipient_district": "Quận Tân Bình",
        "recipient_city": "Hồ Chí Minh"
    },
    "items": [
        {
            "oasin": "{{oasin}}",
            "product_quantity": 2,
            "customs_value": 20000,
            "stock_level": "A"
        }
    ]
}'
Response Response Example
{
    "data": [
        {
            "total_fee": 10000,
            "service_code": "NH-EC-STD-GHTK",
            "service_name": "Tiêu chuẩn",
            "carrier_code": "GHTK",
            "carrier_logo": "https://storage.googleapis.com/omisell-cloud/logo/courier/giaohangtietkiem.svg",
            "carrier_service_code": "GHTK-STD",
            "min_estimate_time": -0.0,
            "max_estimate_time": -0.0
        },
        {
            "total_fee": 21780.0,
            "service_code": "NH-STD-BEST",
            "service_name": "Giao hàng tiết kiệm",
            "carrier_code": "BEST",
            "carrier_logo": "https://nh-wms.sgp1.cdn.digitaloceanspaces.com/oms/bestexpress_1726740277.png",
            "carrier_service_code": "12491",
            "min_estimate_time": 3.0,
            "max_estimate_time": 5.0
        },
        {
            "total_fee": 31900,
            "service_code": "NH-STD-GHN",
            "service_name": "Giao hàng nhanh - Tiêu chuẩn",
            "carrier_code": "GHN",
            "carrier_logo": "https://storage.googleapis.com/omisell-cloud/logo/courier/ghn-01.svg",
            "carrier_service_code": "GHN-STD",
            "min_estimate_time": "N/A",
            "max_estimate_time": "N/A"
        },
        {
            "total_fee": 47088,
            "service_code": "NH-EC-STT",
            "service_name": "Tiêu chuẩn",
            "carrier_code": "VNP",
            "carrier_logo": "https://storage.googleapis.com/boxme-cloud/Logo/vnpost-ems.svg",
            "carrier_service_code": "CTN009",
            "min_estimate_time": 3.0,
            "max_estimate_time": 5.0
        },
        {
            "total_fee": 64800,
            "service_code": "NH-EC-FAST-STG",
            "service_name": "Nhanh",
            "carrier_code": "VNP",
            "carrier_logo": "https://storage.googleapis.com/boxme-cloud/Logo/vnpost-ems.svg",
            "carrier_service_code": "ETN011",
            "min_estimate_time": 3.0,
            "max_estimate_time": 5.0
        }
    ],
    "error": false,
    "error_code": null,
    "log_id": null,
    "messages": "OK",
    "total": 1,
    "version": "1.0.3"
}
Modified at 2026-05-15 03:27:46
Previous
Upload file
Next
Create Product
Built with