WooCommerce · JSON Structure

Woocommerce Rest Api Coupon Structure

A WooCommerce discount coupon.

Type: object Properties: 17
E-CommerceOpen-SourceOrderProductWordPress

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.

Properties

id code amount discount_type description date_expires usage_count individual_use product_ids excluded_product_ids usage_limit usage_limit_per_user minimum_amount maximum_amount date_created date_modified meta_data

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$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"
      ]
    }
  }
}

Work with this as data

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-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.