Coupons

Create

POST https://api.vidi.cc/api/v2/coupons

Example of the request { "coupon": { "order_id": 4654, "coupon_code": "WELOVEBALI" } }

Headers

Name
Type
Description

X-Api-key

string

Request Body

Name
Type
Description

coupon_code

string

order_id

integer

{
	"data": {
		"id": "3007-259",
		"type": "coupon_redeem",
		"attributes": {
			"id": "3007-259",
			"coupon_code": "WELOVEBALI",
			"price_cents": {
				"in_subunit": "12795",
				"in_unit": "127.95",
				"in_format": "$127.95",
				"currency_id": "usd",
				"currency_disambiguate_symbol": "US$",
				"currency_exponent": 2,
				"currency_symbol": "US$"
			},
			"discount_amount_cents": {
				"in_subunit": "1024",
				"in_unit": "10.24",
				"in_format": "$10.24",
				"currency_id": "usd",
				"currency_disambiguate_symbol": "US$",
				"currency_exponent": 2,
				"currency_symbol": "US$"
			},
			"subtotal_price_cents": {
				"in_subunit": "11772",
				"in_unit": "117.72",
				"in_format": "$117.72",
				"currency_id": "usd",
				"currency_disambiguate_symbol": "US$",
				"currency_exponent": 2,
				"currency_symbol": "US$"
			},
			"total_price_cents": {
				"in_subunit": "11772",
				"in_unit": "117.72",
				"in_format": "$117.72",
				"currency_id": "usd",
				"currency_disambiguate_symbol": "US$",
				"currency_exponent": 2,
				"currency_symbol": "US$"
			},
			"discounted": true,
			"currency_code": "USD"
		}
	}
}

Delete

DELETE https://api.vidi.cc/api/v2/coupons

Example of the request: { "coupon": { "order_id": 4654 } }

Path Parameters

Name
Type
Description

X-Api-Key

string

Request Body

Name
Type
Description

order_id

integer

Last updated