Coupon is a JSON Structure definition published by WooCommerce, describing 17 properties. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.
{
"$schema": "https://json-structure.org/meta/core/v0/#",
"$id": "https://raw.githubusercontent.com/api-evangelist/woocommerce/refs/heads/main/json-structure/woocommerce-rest-api-coupon-structure.json",
"name": "Coupon",
"description": "A WooCommerce discount coupon.",
"type": "object",
"properties": {
"id": {
"type": "int32",
"description": "Coupon unique identifier.",
"example": 1
},
"code": {
"type": "string",
"description": "Coupon code used at checkout.",
"example": "string-value"
},
"amount": {
"type": "string",
"description": "The amount of discount as a decimal string.",
"example": "string-value"
},
"discount_type": {
"type": "string",
"description": "Determines the type of discount. Options: percent, fixed_cart, fixed_product.",
"enum": [
"percent",
"fixed_cart",
"fixed_product"
],
"example": "percent"
},
"description": {
"type": "string",
"description": "Coupon description shown in the admin.",
"example": "A sample description"
},
"date_expires": {
"type": "datetime",
"description": "Date the coupon expires, in the site timezone.",
"nullable": true,
"example": "2026-05-03T14:30:00Z"
},
"usage_count": {
"type": "int32",
"description": "Number of times the coupon has been used.",
"example": 1
},
"individual_use": {
"type": "boolean",
"description": "Whether the coupon can only be used alone (not with other coupons).",
"example": true
},
"product_ids": {
"type": "array",
"description": "List of product IDs the coupon applies to.",
"items": {
"type": "int32"
},
"example": [
1
]
},
"excluded_product_ids": {
"type": "array",
"description": "List of product IDs the coupon cannot be used for.",
"items": {
"type": "int32"
},
"example": [
1
]
},
"usage_limit": {
"type": "int32",
"description": "Maximum number of times the coupon can be used in total.",
"nullable": true,
"example": 1
},
"usage_limit_per_user": {
"type": "int32",
"description": "Maximum number of times per customer the coupon can be used.",
"nullable": true,
"example": 1
},
"minimum_amount": {
"type": "string",
"description": "Minimum order amount to use the coupon.",
"example": "string-value"
},
"maximum_amount": {
"type": "string",
"description": "Maximum order amount to use the coupon.",
"example": "string-value"
},
"date_created": {
"type": "datetime",
"description": "Date the coupon was created.",
"example": "2026-05-03T14:30:00Z"
},
"date_modified": {
"type": "datetime",
"description": "Date the coupon was last modified.",
"example": "2026-05-03T14:30:00Z"
},
"meta_data": {
"type": "array",
"description": "Custom metadata.",
"items": {
"type": "object",
"description": "Custom metadata key-value entry.",
"properties": {
"id": {
"type": "int32",
"description": "Metadata unique identifier.",
"example": 1
},
"key": {
"type": "string",
"description": "Metadata key.",
"example": "string-value"
},
"value": {
"type": "string",
"description": "Metadata value.",
"example": "string-value"
}
}
},
"example": [
"string-value"
]
}
}
}