Xuất kho — Tạo

Tạo phiếu xuất kho, trừ tồn khi hoàn tất.

Xem Markdown

Tạo phiếu xuất kho với danh sách mặt hàng xuất và kho nguồn.

Endpoint

MethodEndpointMô tả
POST/api/v1/shops/{shop_id}/exportTạo phiếu xuất

Tham số

Tham sốVị tríKiểuBắt buộcMô tả
shop_idđường dẫnstringCóID cửa hàng
warehouse_idthânstringCóKho xuất
export_itemsthânobject[]CóMặt hàng xuất
statusthânintegerCóTrạng thái phiếu

Kiểm thử tại chỗ

POSThttps://pos.hitechcloud.vn/api/v1/shops/{shop_id}/export

Nhập tham số và API Key rồi bấm Gửi thử. Key không được lưu lại.

Tham số đường dẫn
Body
cURL mẫu (POST)
curl -X POST "https://pos.hitechcloud.vn/api/v1/shops/shop_0a1b2c3d/export" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "export_list": {
    "warehouse_id": "wh_main",
    "status": 0,
    "export_items": [
      {
        "variation_id": "var_1001",
        "quantity": 5
      }
    ]
  }
}'
Phản hồi mẫu
{
  "status": "success",
  "data": {
    "id": "exp_4001",
    "status": 0
  }
}