POST Search Coupons
POST /sites/{site_id}/coupon_search
Operation ID: Search Coupons. Tags: sites. Security: oauth2_application.
Searches for coupons.
The Coupon Search document contains a search object that allows filtering on various attributes.
The query attribute specifies a complex query that can be used to narrow down the search. These are the list of searchable attributes:
-
coupon_id - String
-
description - String
-
type - one of {"single_code", "multiple_codes", "system_codes"}
-
enabled - boolean
Note that only searchable attributes can be used in sorting. In case no sorting attribute is specified the result is sorted by coupon_id.
The stats expand value is required to return the following fields in the Coupon document:
-
exported_code_count
-
redemption_count
-
total_codes_count
This endpoint may return the following faults:
- 400 - MalformedSearchParameterException - Thrown if the query is ill-formed.
Parameters
site_id(path, string, required) The site context.
Minimum length: 1.
Request body (required)
Media type: application/json, text/xml. Schema: search_request.
Responses
- 400
MalformedSearchParameterException- Thrown if the query is ill-formed.Media type:
application/json, text/xml. Schema:fault. - default
Media type:
application/json, text/xml. Schema:coupon_search_result.