1. PO
Onflow Open API
  • Getting Started
  • API
    • Config
      • Get Warehouse
      • Get Brand
      • Upload file
    • Product
      • Create Product
      • Assign Product
      • Get Product List
      • Get Product Detail
      • Delete Product
      • Get Stock
    • PO
      • Get PO List
        GET
      • Create PO
        POST
      • Cancel PO
        PUT
    • Shipment
      • B2C shipment
        • Get B2C Shipment
        • Create B2C Shipment
          • Create B2C Shipment
        • Cancel B2C Shipment
          • Cancel B2C Shipment
  1. PO

Create PO

POST
/api/v1/purchase-orders/create
This API is used to create PO. At this stage, PO status = TRANSIT.

Request

Header Params

Body Params application/json

Examples

Responses

🟢201
application/json
Body

🟠404
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/purchase-orders/create' \
--header 'Authorization: {{token}}' \
--header 'Accept-Language: vi' \
--header 'Content-Type: application/json' \
--data-raw '{
    "warehouse_code": "ONF_WH_HN_LB",
    "vas": [
        "CO_INSPECTION"
    ],
    "merchant_po_reference": "PO-{{timestamp}}",
    "packages": [
        {
            "package_code": "PKG_01",
            "weight": 100,
            "length": 1,
            "width": 1,
            "height": 1,
            "items": [
                {
                    "oasin": "OASIN2200579",
                    "product_quantity": 1000
                }
            ],
            "package_note": "Note package"
        }
    ],
    "estimated_arrival_time": 1791173499,
    "po_documents": [
        {
            "document_type": "INVOICE",
            "document_url": "https://nhl.sgp1.cdn.digitaloceanspaces.com/ts/11b8565e514a42ab9eca71ad8a254489.docx",
            "print_quantity": 1
        }
    ],
    "note": "Inbound note"
}'
Response Response Example
201 - Success
{
    "data": {
        "created_time": 1770694275,
        "updated_time": 1770694275,
        "po_code": "OAPO232716061",
        "merchant_po_reference": "PO08989008",
        "status_info": {
            "value": 280,
            "label": "Đang vận chuyển"
        },
        "estimated_arrival_time": 1770841420
    },
    "error": false,
    "error_code": null,
    "log_id": null,
    "messages": "OK",
    "total": 1,
    "version": "1.0.3",
    "error_detail": null
}
Modified at 2026-03-06 01:36:20
Previous
Get PO List
Next
Cancel PO
Built with