# API: List coupon batches

# listPromoBatches

A list of available coupon batches. Return will also include coupons related to batch

TIP

This API call uses pagination for results.

# Optional parameters

Parameter Description
page Which page to return (default:0)

# Request

GET /admin/api.php?api_id=API_ID&api_key=API_KEY&call=listPromoBatches

# PHP Samples

# Response

{
    "success": true,
    "batches": [
        {
            "id": 2,
            "name": "XOXO",
            "status": "Active",
            "prefix": "XO-",
            "coupon_type": "cart",
            "type": "percent",
            "value": "1.00",
            "complexity": "2",
            "notes": "",
            "coupon_config": {
                "cycle": "once",
                "increase_in_days": "",
                "applyto": "price",
                "clients": "all",
                "client_id": "",
                "notes": "",
                "apply_products": "0",
                "apply_categories": "1",
                "apply_domains": "0",
                "apply_addons": "0",
                "apply_forms": "0",
                "categories": [
                    "42"
                ],
                "cycles": [
                    "Monthly"
                ]
            },
            "created_at": "2022-03-14 03:20:34",
            "updated_at": "2023-06-21 23:40:36",
            "coupons_count": 4,
            "coupons_used": "0",
            "coupons": [
                {
                    "id": 65,
                    "batch_id": "2",
                    "active": "1",
                    "code": "XO-UKFXB9618V7Q",
                    "status": "Active",
                    "coupon_type": "cart",
                    "type": "percent",
                    "applyto": "price",
                    "cycle": "once",
                    "options": "0",
                    "value": 1,
                    "cycles": {
                        "Monthly": "Monthly"
                    },
                    "products": [],
                    "categories": {
                        "42": "42"
                    },
                    "upgrades": "all",
                    "addons": [],
                    "domains": [],
                    "forms": [],
                    "expires": "0000-00-00",
                    "max_usage": "0",
                    "num_usage": "0",
                    "clients": "all",
                    "client_id": "0",
                    "notes": "",
                    "max_client_usage": "0",
                    "increase_in_days": "0",
                    "min_cart_amount": "0.00",
                    "prompt_cart_amount": "0.00"
                },
                {
                    "id": 66,
                    "batch_id": "2",
                    "active": "1",
                    "code": "XO-ATBGNR62JHVE",
                    "status": "Active",
                    "coupon_type": "cart",
                    "type": "percent",
                    "applyto": "price",
                    "cycle": "once",
                    "options": "0",
                    "value": 1,
                    "cycles": {
                        "Monthly": "Monthly"
                    },
                    "products": [],
                    "categories": {
                        "42": "42"
                    },
                    "upgrades": "all",
                    "addons": [],
                    "domains": [],
                    "forms": [],
                    "expires": "0000-00-00",
                    "max_usage": "0",
                    "num_usage": "0",
                    "clients": "all",
                    "client_id": "0",
                    "notes": "",
                    "max_client_usage": "0",
                    "increase_in_days": "0",
                    "min_cart_amount": "0.00",
                    "prompt_cart_amount": "0.00"
                },
                {
                    "id": 67,
                    "batch_id": "2",
                    "active": "1",
                    "code": "XO-DPOCABN0LX8K",
                    "status": "Active",
                    "coupon_type": "cart",
                    "type": "percent",
                    "applyto": "price",
                    "cycle": "once",
                    "options": "0",
                    "value": 1,
                    "cycles": {
                        "Monthly": "Monthly"
                    },
                    "products": [],
                    "categories": {
                        "42": "42"
                    },
                    "upgrades": "all",
                    "addons": [],
                    "domains": [],
                    "forms": [],
                    "expires": "0000-00-00",
                    "max_usage": "0",
                    "num_usage": "0",
                    "clients": "all",
                    "client_id": "0",
                    "notes": "",
                    "max_client_usage": "0",
                    "increase_in_days": "0",
                    "min_cart_amount": "0.00",
                    "prompt_cart_amount": "0.00"
                },
                {
                    "id": 68,
                    "batch_id": "2",
                    "active": "1",
                    "code": "XO-PAFEQTS34ULN",
                    "status": "Active",
                    "coupon_type": "cart",
                    "type": "percent",
                    "applyto": "price",
                    "cycle": "once",
                    "options": "0",
                    "value": 1,
                    "cycles": {
                        "Monthly": "Monthly"
                    },
                    "products": [],
                    "categories": {
                        "42": "42"
                    },
                    "upgrades": "all",
                    "addons": [],
                    "domains": [],
                    "forms": [],
                    "expires": "0000-00-00",
                    "max_usage": "0",
                    "num_usage": "0",
                    "clients": "all",
                    "client_id": "0",
                    "notes": "",
                    "max_client_usage": "0",
                    "increase_in_days": "0",
                    "min_cart_amount": "0.00",
                    "prompt_cart_amount": "0.00"
                }
            ]
        }
    ],
    "call": "listPromoBatches",
    "sorter": {
        "perpage": 100,
        "totalpages": 1,
        "sorterrecords": "40",
        "sorterpage": 1
    },
    "server_time": 1693395736
}
Last Updated: 9/30/2024, 2:47:06 PM