# Combo

> Base URL: `https://pos.pages.fm/api/v1`. Authenticate with the `api_key` query parameter.

## Combo list

`GET /shops/{SHOP_ID}/combo_products`

Get list of combo products

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `SHOP_ID` | path | integer | yes | Shop ID |

### Responses

- `200` Success (object)

```json
{
  "success": true,
  "data": []
}
```

## Create combo

`POST /shops/{SHOP_ID}/combo_products`

Create combo product

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `SHOP_ID` | path | integer | yes | Shop ID |

### Request body

Request body containing combo product information to create

- `combo_product` (object, required): 
  - `name` (string, required): Combo name
  - `currency` (string): Currency
  - `start_time` (integer): Start time
  - `end_time` (integer): End time
  - `order_sources` (object[]): Order sources
  - `order_types` (string[], required): Order types
  - `livestream_manager_ids` (string[]): Livestream manager IDs
  - `is_value_combo` (boolean, required): Discount type (true: combo value / false: discount combo)
  - `value_combo` (integer): Combo value
  - `is_use_percent` (boolean, required): Discount by percent
  - `discount_amount` (integer): Discount value
  - `discount_by_percent` (integer): Percentage discount
  - `max_discount_by_percent` (integer): Maximum discount value
  - `is_free_shipping` (boolean): Is free shipping
  - `bonus_products` (object[]): Bonus products
  - `is_variation` (boolean, required): Apply to variation (true) / Apply to product (false)
  - `variations` (object[]): Applicable variation information
  - `is_categories` (boolean): Apply to category
  - `categories` (object[]): Applicable categories

```json
{
  "combo_product": {
    "name": "Combo 1",
    "currency": "VND",
    "start_time": 1745946000,
    "end_time": 1746637199,
    "order_sources": [
      {
        "key": "-3",
        "account": null
      },
      {
        "key": "-1",
        "account": "406"
      }
    ],
    "order_types": [
      "all"
    ],
    "is_value_combo": false,
    "value_combo": 0,
    "is_use_percent": false,
    "discount_amount": 100000,
    "discount_by_percent": 5,
    "max_discount_by_percent": 100000,
    "is_free_shipping": false,
    "is_variation": true,
    "variations": [
      {
        "count": 1,
        "product_id": "0cffd0a6-0a06-4471-a139-cf81aa1fcc6f",
        "variation_id": "821e1337-a04b-473a-b07c-805a572c465a"
      }
    ]
  }
}
```

### Responses

- `200` Success (object)

```json
{
  "success": true
}
```
