Statistics coupon
Method: GET
URL: /management/coupons/[ID]/statistics.json
PARAMETERS: { "subscription_page": "integer" # Pagination, starting on 1 (if 0 or null, no pagination) } RETURN: { "coupons": [ { "id": "1-teste", "code": "teste", "discount": 100, "duration": "once", "months": 0, "description": "100%" } ], "coupons_pagination": { "current": 1, "last": true/false } }
User groups coupon
method: GET
URL: /management/coupons/[ID]/user_groups.json
RETURN: { "name": "" #User group name }
TVOD prices coupon
method: GET
URL: /management/coupons/[id]/tvod_prices.json
RETURN: { "name": " " #TVOD name }
Coupon codes
method: GET
URL: /management/coupons/[ID]/codes.json
PARAMETERS: { "status": "available/unavailable" }
Remove TVOD price from coupon
method: POST
URL: /management/coupons/[ID]/remove_tvod_price/[TVOD_PRICE_ID].json
Coupons create
method: POST
URL: /management/coupons.json
PARAMETERS: { "coupon": { "code": "character varying", "status": "character varying", #[available | unavailable] "duration": "character varying", #[once | repeating | forever] "cycles": "integer", "discount": "integer", "max_redemptions": "integer", "expiration_date": "timestamp without time zone", "security": "character varying", #[public | restricted] "unique_redemption": "boolean", #[true | false] "release_date": "timestamp without time zone" } }
Delete coupon code
method: DELETE
URL: /management/coupons/[COUPON_ID]/codes/[ID].json