OMSKhuyến mãi

Tìm kiếm Promotion theo Coupon

Tìm kiếm các chương trình khuyến mãi theo mã coupon. Trả về danh sách Promotion tương ứng (đã loại trùng theo promotion_id).

Endpoint

GET /v1/promotioncoupons/searchpromotion

Headers

TênBắt buộcMô tả
AuthorizationCó<JWT> của người dùng

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
codestringCóMã coupon cần tìm kiếm (exact match)

Response Schema

HTTP 200 - JSON Object

{
    "items": [
        {
            "id": 200,
            "company_id": 10311,
            "creator_id": 1,
            "group": 5,
            "type": 305,
            "scope_class": 3,
            "code": "LOYALTY2026",
            "name": "Giảm 10% cho khách VIP",
            "title": "Ưu đãi khách hàng thân thiết",
            "title_short": "Giảm 10%",
            "description": "Giảm 10% tổng đơn hàng",
            "value_type": 1,
            "value": 10,
            "status": 3,
            "date_started": 1741000000,
            "date_ended": 1743500000,
            "...": "..."
        }
    ]
}

Mỗi item trong mảng items là một đối tượng Promotion Object.

Error Codes

HTTPCodeMô tả
401error_jwt_is_requiredThiếu token xác thực
422error_code_requiredThiếu tham số code hoặc code rỗng

On this page