OMSOrder Promotion

Danh sách Order Promotion

Trả về danh sách khuyến mãi đã áp dụng trên đơn hàng, hỗ trợ phân trang và nhiều bộ lọc.

Endpoint

GET /v1/orderpromotions

Headers

TênBắt buộcMô tả
AuthorizationCó<JWT> của người dùng có quyền xem đơn hàng (order.view)

Query Parameters

TênKiểuBắt buộcMô tả
company_idintCóID công ty (tenant), phải trùng với công ty của phiên đăng nhập
pageintTrang hiện tại (mặc định 1)
limitintSố bản ghi mỗi trang (mặc định và tối đa 50)
sort_bystringSắp xếp theo: id, date_created, date_modified, ymd. Mặc định: id
sort_typestringKiểu sắp xếp: ASC, DESC. Mặc định: DESC
idintLọc theo ID order promotion
statusintLọc theo trạng thái (1: Hoạt động, 3: Vô hiệu hóa)
date_startedintThời gian tạo từ (UNIX timestamp)
date_endedintThời gian tạo đến (UNIX timestamp)
sale_order_idintLọc theo ID đơn hàng
customer_idintLọc theo ID khách hàng
product_idintLọc theo ID sản phẩm
product_variant_idintLọc theo ID biến thể sản phẩm
ymdintLọc theo ngày (định dạng YYYYMMDD)
promotion_idintLọc theo ID chương trình khuyến mãi
promotion_typeintLọc theo loại khuyến mãi
promotion_scopeintLọc theo phạm vi khuyến mãi
coupon_codestringLọc theo mã coupon

Response Schema

HTTP 200 - JSON Object

{
    "total": 150,
    "currentpage": 1,
    "limit": 50,
    "items": [
        {
            "id": 5001,
            "company_id": 10311,
            "sale_order_id": 10002414,
            "promotion_id": 200,
            "discount_amount": 98180,
            "status": 1,
            "...": "..."
        }
    ]
}

Mỗi item trong mảng items là một đối tượng Order Promotion Object, bao gồm các enriched fields (promotion, customer, customer_name, customer_phone).

Error Codes

HTTPCodeMô tả
401error_jwt_is_requiredThiếu token xác thực
403error_role_not_availableKhông có quyền order.view

On this page