Deals
Overview
Deals are FlipGive's object to represent our commertial partner's deals and promotions, separate from cashback. These only work in the context of a link, and thus should never be independently displayed.
Actions
Index
Request
Path | /rewards/deals
Verb | GET
Required Parameters:
- currency: String, one of
["CAD", "USD"]. No default. Example:/rewards/deals?currency=USDOptional Paramters: - page:
- limit: Integer, defaults to
100, maximum of5000. Example:/rewards/deals?currency=USD&page[limit]=50 - offset: Integer, defaults to
0. Example:/rewards/deals?currency=USD&page[limit]=50&page[offset]=50
- limit: Integer, defaults to
- filters:
- link_id: Integer, no default. Sending a link_id will only return Deals for the given link. Example:
/rewards/deals?currency=USD&filters[link_id]=123456 - active: Boolean, defaults to true. Setting it to
truewill return active Deals only, setting it tofalsewill return only inactive deals. Example:/rewards/deals?currency=USD&filters[active]=false - coupon: Boolean, no default. Setting it to
truewill return Deals with coupon codes only, setting it tofalsewill return Deals with no coupon codes. Example:/rewards/deals?currency=USD&filters[coupon]=true - featured: Boolean, no default. Setting it to
truewill only return Deals that have been marked as featured, setting it tofalsewill return only deals which are not featured./rewards/deals?currency=USD&filters[featured]=true - starts_at_gt: Integer, used to filter Deals which start at timestamp is greater than the start date in Unix epoch time. Example:
/rewards/deals?currency=USD&filters[starts_at_gt]=1740691898 - starts_at_lt: Integer, used to filter Deals which start at timestamp is less than the start date in Unix epoch time. Example:
/rewards/deals?currency=USD&filters[starts_at_lt]=1740691898 - ends_at_gt: Integer, used to filter Deals which start at timestamp is greater than the end date in Unix epoch time. Example:
/rewards/deals?currency=USD&filters[ends_at_gt]=1740691898 - ends_at_lt: Integer, used to filter Deals which start at timestamp is less than the end date in Unix epoch time. Example:
/rewards/deals?currency=USD&filters[ends_at_lt]=1740691898
- link_id: Integer, no default. Sending a link_id will only return Deals for the given link. Example:
- order:
- ends_at: String, one of
["DESC", "ASC"], defaults toDESC, will sort Deals based on their end date whereDESCwill return the Deal ending the soonest first. Example:/rewards/deals?currency=USD&order[ends_at]=DESC - starts_at: String, one of
["DESC", "ASC"], will sort Deals based on their start date. Example:/rewards/deals?currency=USD&order[starts_at]=DESC - created_at: String, one of
["DESC", "ASC"], will sort Deals based on their creation date. Example:/rewards/deals?currency=USD&order[created_at]=DESC - rank: String, one of
["DESC", "ASC"], will sort Deals based on their rank score, as defined by deal provider. Example:/rewards/deals?currency=USD&order[rank]=DESC
- ends_at: String, one of
Response
The API's response will follow the jsonapi standard. The attributes inside the data object will be as follows:
Deals:
self: contains the url and params of the current request. next: contains the ur and params for the next page of results, if any.
Attributes:
| Attribute | Type | Description |
|---|---|---|
| link_id | Integer | The ID of the realated link. |
| brand_id | Integer | The ID of the link's realated brand. |
| description | String | The description of the deal, generaly used to be display on a link and deals details page. |
| label | String | A label for the deal, generaly display on top of the link where several links would be display. |
| coupon_code | String | A coupon code that can be used on the marchant's page, usually at checkout. |
| currency | String | The currency of the deal, USD or CAD. |
| starts_at | TimeStamp | A timestamp of when the logo_url object was last updated. |
| ends_at | TimeStamp | A timestamp of when the logo_url object was last updated. |
| featured_at | TimeStamp | A timestamp of when the logo_url object was last updated. |
| deactivated_at | TimeStamp | A timestamp of when the logo_url object was last updated. |
| created_at | TimeStamp | A timestamp of when the logo_url object was last updated. |
| updated_at | TimeStamp | A timestamp of when the logo_url object was last updated. |
| url | String | The URL for the details of the promotion. |
| rank | Float | The rank of the deal, as provided by it's source of origin or FG staff. |