Coupons

Manage all coupons on your application

Get all coupons

GET https://wemx.app/api/v1/coupons

Returns all coupons made on your application

{
    "status": true,
    "current_page": 1,
    "data": [
        {
            "id": 1,
            "code": "PlHyUm2Bd",
            "discount_type": "percentage",
            "discount_amount": 50,
            "currency": "USD",
            "allowed_uses": 0,
            "coupon_type": "checkout",
            "applicable_products": [
                "17"
            ],
            "notes": null,
            "expires_at": null,
            "created_at": "2023-09-30T13:38:50.000000Z",
            "updated_at": "2023-09-30T18:28:31.000000Z"
        }
        // more results
    ],
    "first_page_url": "http://wemx.app/api/v1/coupons?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "http://wemx.app/api/v1/coupons?page=1",
    "links": [
        {
            "url": null,
            "label": "Previous",
            "active": false
        },
        {
            "url": "http://wemx.app/api/v1/coupons?page=1",
            "label": "1",
            "active": true
        },
        {
            "url": null,
            "label": "Next",
            "active": false
        }
    ],
    "next_page_url": null,
    "path": "http://wemx.app/api/v1/coupons",
    "per_page": 15,
    "prev_page_url": null,
    "to": 2,
    "total": 2
}

Filters (optional)

https://wemx.app/api/v1/coupons?filter[code]=PlHyUm2Bd

Available Filters:

id, code, discount_type, discount_amount, currency, allowed_uses, applicable_products, notes, expires_at, created_at

Sorting (optional)

https://wemx.app/api/v1/coupons?sort[created_at]=asc

Available Sorting Parameters:

id, code, discount_type, discount_amount, currency, allowed_uses, expires_at, created_at

Sorting operators

asc, desc, random

Dates (optional)

https://wemx.app/api/v1/coupons?date=30days

Last updated