Coupons

All Coupons

GET https://yoursite.mavenseed.com/api/v1/coupons

Retrieve all coupons.

Path Parameters

Headers

[
    {
        "id": 33,
        "internal_coupon_id": "englishtea",
        "coupon_type": "coupon",
        "currency": "USD",
        "duration": "once",
        "duration_in_months": null,
        "max_redemptions": null,
        "amount_off": 6000,
        "percent_off": null,
        "redeem_by": null,
        "eligible_types": [
            "orders"
        ],
        "created_at": "2020-05-14T13:47:54.567-04:00",
        "updated_at": "2020-09-08T12:28:49.246-04:00",
        "supported_countries": [],
        "metadata": "{}",
        "coupons_orders_count": 0
    },
    {
        "id": 14,
        "internal_coupon_id": "blueberrymuffin",
        "coupon_type": "coupon",
        "currency": "USD",
        "duration": "once",
        "duration_in_months": null,
        "max_redemptions": null,
        "amount_off": 6000,
        "percent_off": null,
        "redeem_by": null,
        "eligible_types": [
            "orders"
        ],
        "created_at": "2020-04-09T11:54:36.083-04:00",
        "updated_at": "2020-08-03T13:03:11.995-04:00",
        "supported_countries": [
            "IN"
        ],
        "metadata": "{}",
        "coupons_orders_count": 4
    }
]

Show Coupon

GET https://yoursite.mavenseed.com/api/v1/coupons/:id

Retrieve a single coupon.

Headers

{
    "id": 33,
    "internal_coupon_id": "englishtea",
    "coupon_type": "coupon",
    "currency": "USD",
    "duration": "once",
    "duration_in_months": null,
    "max_redemptions": null,
    "amount_off": 6000,
    "percent_off": null,
    "redeem_by": null,
    "eligible_types": [
        "orders"
    ],
    "created_at": "2020-05-14T13:47:54.567-04:00",
    "updated_at": "2020-09-08T12:28:49.246-04:00",
    "supported_countries": [],
    "metadata": "{}",
    "coupons_orders_count": 0
}

Create Coupon

POST https://yoursite.mavenseed.com/api/v1/coupons

Create a coupon.

Headers

Request Body

{
    "id": 33,
    "internal_coupon_id": "englishtea",
    "coupon_type": "coupon",
    "currency": "USD",
    "duration": "once",
    "duration_in_months": null,
    "max_redemptions": null,
    "amount_off": 6000,
    "percent_off": null,
    "redeem_by": null,
    "eligible_types": [
        "orders"
    ],
    "created_at": "2020-05-14T13:47:54.567-04:00",
    "updated_at": "2020-09-08T12:28:49.246-04:00",
    "supported_countries": [],
    "metadata": "{}",
    "coupons_orders_count": 0
}

Update Coupon

PATCH https://yoursite.mavenseed.com/api/v1/coupons/:id

Update a single coupon. All of the above properties in create coupon are valid.

Headers

{
    "id": 33,
    "internal_coupon_id": "englishtea",
    "coupon_type": "coupon",
    "currency": "USD",
    "duration": "once",
    "duration_in_months": null,
    "max_redemptions": null,
    "amount_off": 6000,
    "percent_off": null,
    "redeem_by": null,
    "eligible_types": [
        "orders"
    ],
    "created_at": "2020-05-14T13:47:54.567-04:00",
    "updated_at": "2020-09-08T12:28:49.246-04:00",
    "supported_countries": [],
    "metadata": "{}",
    "coupons_orders_count": 0
}

Delete Coupon

DELETE https://yoursite.mavenseed.com/api/v1/coupons/:id

Path Parameters

Last updated