Menu
Create Coupon
This API helps you to create a new coupon.
POST
/couponsUse it in a workflow
- Add a step and choose the WooCommerce connector.
- Pick the Create Coupon action (under Coupons).
- Fill in the fields below, then reference the result from later steps as
{{createCoupon.response.data}}.
Request
Request body
Enter the body as JSON in the step's Body field.
{
"id": 0,
"code": "string",
"amount": "string",
"date_created": "2025-01-01T00:00:00Z",
"date_created_gmt": "2025-01-01T00:00:00Z",
"date_modified": "2025-01-01T00:00:00Z",
"date_modified_gmt": "2025-01-01T00:00:00Z",
"discount_type": "fixed_cart",
"description": "string",
"date_expires": "2025-01-01T00:00:00Z",
"date_expires_gmt": "2025-01-01T00:00:00Z",
"usage_count": 0
}
Response
Returns 201 with an object. Read it in later steps with {{createCoupon.response.data.<field>}}.
{
"id": 0,
"code": "string",
"amount": "string",
"date_created": "2025-01-01T00:00:00Z",
"date_created_gmt": "2025-01-01T00:00:00Z",
"date_modified": "2025-01-01T00:00:00Z",
"date_modified_gmt": "2025-01-01T00:00:00Z",
"discount_type": "fixed_cart",
"description": "string",
"date_expires": "2025-01-01T00:00:00Z",
"date_expires_gmt": "2025-01-01T00:00:00Z",
"usage_count": 0
}
Need more? See the WooCommerce guide for connection setup and behaviour shared by every action.
Was this page helpful?