Home
WooCommerce
Woocommerce Rest Api Coupon Input Structure
Woocommerce Rest Api Coupon Input Structure
Input for creating or updating a coupon.
Type: object
Properties: 13
E-Commerce Open-Source Order Product WordPress
CouponInput is a JSON Structure definition published by WooCommerce, describing 13 properties. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.
Properties
code
amount
discount_type
description
date_expires
individual_use
product_ids
excluded_product_ids
usage_limit
usage_limit_per_user
minimum_amount
maximum_amount
meta_data
Meta-schema: https://json-structure.org/meta/core/v0/#
JSON Structure
{
"$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-input-structure.json",
"name": "CouponInput",
"description": "Input for creating or updating a coupon.",
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Coupon code (required for create).",
"example": "string-value"
},
"amount": {
"type": "string",
"description": "Discount amount as a decimal string.",
"example": "string-value"
},
"discount_type": {
"type": "string",
"description": "Discount type.",
"enum": [
"percent",
"fixed_cart",
"fixed_product"
],
"example": "percent"
},
"description": {
"type": "string",
"description": "Admin description.",
"example": "A sample description"
},
"date_expires": {
"type": "datetime",
"description": "Expiry date.",
"example": "2026-05-03T14:30:00Z"
},
"individual_use": {
"type": "boolean",
"description": "Whether usable alone.",
"example": true
},
"product_ids": {
"type": "array",
"description": "Applicable product IDs.",
"items": {
"type": "int32"
},
"example": [
1
]
},
"excluded_product_ids": {
"type": "array",
"description": "Excluded product IDs.",
"items": {
"type": "int32"
},
"example": [
1
]
},
"usage_limit": {
"type": "int32",
"description": "Total usage limit.",
"example": 1
},
"usage_limit_per_user": {
"type": "int32",
"description": "Per-customer usage limit.",
"example": 1
},
"minimum_amount": {
"type": "string",
"description": "Minimum order amount.",
"example": "string-value"
},
"maximum_amount": {
"type": "string",
"description": "Maximum order amount.",
"example": "string-value"
},
"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"
]
}
}
}
Every JSON Structure here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for json structure
4 MCP tools reach this
find_json_structuresBrowse and filter every JSON Structure in the catalog.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools →
Call it yourself
curl for this page
This JSON Structure
curl "https://apis.io/api/v1/json-structures/woocommerce-rest-api-coupon-input-structure"
All json structure
curl "https://apis.io/api/v1/json-structures?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms .
A second provider on the same verified email joins the account you already have.