Retrieves a list of coupons.
limit | integer [ 0 .. 1000 ] Limits the number of collection items to be returned. |
offset | integer >= 0 Specifies the starting point within the collection of items to be returned. |
filter | string Filters the collection items. This field requires
a special format. Use For more information, see Using filter with collections. |
q | string Use this field to perform a partial search of text fields. |
sort | Array of strings Sorts and orders the collection of items. To sort in descending
order, prefix with |
List of coupons retrieved.
Unauthorized access. Invalid credentials used.
Access forbidden.
$coupons = $client->coupons()->search([ 'filter' => 'status:issued', ]);
[- {
- "id": "cpn_0YVCNKF81GD778N4YNVGDJK558",
- "discount": {
- "amount": 0.01,
- "currency": "USD",
- "type": "fixed",
- "context": "items"
}, - "restrictions": [
- {
- "type": "discounts-per-redemption",
- "quantity": 0
}
], - "redemptionsCount": 0,
- "status": "draft",
- "description": "string",
- "issuedTime": "2019-08-24T14:15:22Z",
- "expiredTime": "2019-08-24T14:15:22Z",
- "createdTime": "2019-08-24T14:15:22Z",
- "updatedTime": "2019-08-24T14:15:22Z",
- "_links": [
- {
- "href": "string",
- "rel": "self"
}
]
}
]