Pepper Public API documentation version 2
https://www.pepper.com/rest_api/v2
Welcome
Generalities
This API follow some of the REST idioms.
It is available under the https://{hostname}/rest_api/v2
root URI.
Boolean parameters
Boolean parameters accepted by the API can be any of the following values:
- Truely boolean:
1
,true
,on
,yes
- Falsely boolean:
0
,false
,off
,no
, an empty string
Date format
All dates are, unless stated, in the Unix time format (number of seconds since 1, January 1970 at midnight).
Requests
Data is accessed using standard HTTPS requests in UTF-8 format. The following HTTP methods are used:
GET
: Retrieve a resourcePOST
: create or update a resourceDELETE
: delete a resource
Requests with payload
Some requests needs incoming data (usually POST
requests). Those data are sent using the standard HTTP form content. In this case, the Content-Type
can be either:
application/x-www-form-urlencoded
if there are only alphanumeric datamultipart/form-data
if there are files to upload along alphanumeric data
multipart/form-data
can be used in every POST
requests to avoid any problems.
"Simple" parameters can be passed using both query strings (in the URL) or form content, e.g ?return_activity=true
or ?activity_ids=2,3,9
.
Responses
All responses are JSON encoded with the Content-Type: application/json
HTTP header. They are validated following the JSON Schema specs. You can find all Pepper JSON Schema files in the /docs/api/schema
folder.
Success
A typical response without errors may look like this:
{
"data": {
"_type": "activity",
"activity_id": 33,
"updated": 1464276320
// ...
},
"messages": [],
"validation": []
}
The associated HTTP status code may be:
200 OK
201 Created
204 No Content
Error
A response with an error message:
{
"messages": [
"Comment was not found"
],
"validation": []
}
Note that error messages are contained in an array, even if there's only one error message.
The associated HTTP status code (and their global error codes, if applicable) may be:
400 Bad Request
- There is an issue with the request sent by the API client (e.g invalid parameters)401 Unauthorized
- The user isn't authorized to perform a specific action because he's not authenticated, banned, suspended, etcERROR_USER_NOT_AUTHENTICATED
(20042)ERROR_USER_SUSPENDED
(20035)ERROR_USER_BANNED
(20018)ERROR_USER_DELETED
(20043)ERROR_MUST_UPDATE
(4010) Encountered when apps must be updated by their user, e.g their version isn't the minimum required to use the API (this value is set in the Pepper admin interface, in Settings > Mobile apps)ERROR_MUST_UPDATE_TO_CHANGE_PASSWORD
(4011) Encountered only in thePOST /user/update
endpoint when trying to send thepassword
parameter although it's deprecated
404 Not Found
- The resource wasn't found, or has been deleted405 Method Not Allowed
- The HTTP method used isn't valid for this resource500 Internal Server Error
- There were a fatal error on the server side503 Service Unavailable
- The server is currently unable to handle the requestERROR_EMERGENCY_MODE_ENABLED
(5030) - Emergency mode is enabled for the requested route
Error with codes
A response with an error, and the Pepper-JSON-Format
HTTP header has the message
field defined to with_code
(please look above for more details):
{
"messages": [
{
"code": 20009,
"message": "Comment was not found"
}
],
"validation": []
}
Validation error
A response with a validation error:
{
"messages": [],
"validation": {
"thread_id": {
"thread_id": "The selected thread id is invalid."
}
}
}
validation
is an object containing error messages about each form parameters name.
Error / validation error with data
Specific endpoints can return data even if there was an error. The response will then look like this:
{
"data": {
"_type": "user",
"user_id": 1234,
"updated": 1464276320,
"username": "epoc"
// ...
},
"messages": [
{
"code": 20011,
"message": "You aren't allowed to perform this action"
}
],
"validation": []
}
Price Comparison
Compares prices of different products using the default price comparison service of the platform.
Returns offers found on the price comparison platform.
get /comparison/offers
Returns offers found on the price comparison platform.
Query Parameters
- offset: (integer - default: 0)
- item: (string)
An id from the price comparison search results.
HTTP status code 400
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"data": {
"id": "data",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"additional_data": {
"id": "additional_data",
"type": "object"
},
"messages": {
"id": "messages",
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
}
}
}
]
}
},
"validation": {
"id": "validation",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"cursor": {
"id": "cursor",
"type": "object",
"properties": {
"before": {
"type": "string"
},
"after": {
"type": "string"
}
}
}
},
"required": [
"messages",
"validation"
]
}
Gets all items that match the search query.
get /comparison/search
Gets all items that match the search query.
Query Parameters
- limit: (integer - default: 15)
- offset: (integer - default: 0)
- query: (string)
Gets all items that match the search query.
HTTP status code 400
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"data": {
"id": "data",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"additional_data": {
"id": "additional_data",
"type": "object"
},
"messages": {
"id": "messages",
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
}
}
}
]
}
},
"validation": {
"id": "validation",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"cursor": {
"id": "cursor",
"type": "object",
"properties": {
"before": {
"type": "string"
},
"after": {
"type": "string"
}
}
}
},
"required": [
"messages",
"validation"
]
}
Threads lists
Endpoints related to listing threads
Return a listing of threads.
get /thread
Return a listing of threads.
Query Parameters
- limit: (integer)
Use for standard pagination
- page: (integer)
Use for standard pagination
- before: (string)
Use for cursor pagination
- after: (string)
Use for cursor pagination
- criteria: (string)
string json of all get thread parameters except for pagination parameters
- type_id: (string)
Comma separated list of thread types. Example: 1,2.
- user_id: (integer)
- group_id: (integer)
- merchant_id: (integer)
If used along
merchant_ids
, this last will take precedence. - merchant_ids: (string)
Comma-separated list of merchant IDs from which to include threads assigned to. Takes precedence over
merchant_id
. - order_by: (one of hot, new, discussed, temperature)
- expired: (boolean)
- local: (boolean)
- event_id: (integer)
- include_deleted: (boolean)
Default: true. If the user is an administrator, then setting it to false will hide deleted deals.
- include_moderated: (boolean)
Default: true. If the user is a moderator, then setting it to false will hide moderated deals.
- no_user_group_subscription_filtering: (boolean)
Default, false. If True, the user's group subscriptions are not taken into account.
- location_ids: (string)
Comma separated list of location IDs. Cannot be used if
local
is not set to a truly value. - min_temperature: (integer)
Only return threads which temperature level is greater than the given value.
- excluded_merchant_ids: (string)
Comma-separated list of merchant IDs from which to exclude threads assigned to
- sorting_direction: (one of asc, desc - default: desc)
- indexed_only: (boolean - default: false)
Whether to get indexed threads only or not.
- mark_as_read: (boolean - default: false)
Mark the keyword feed as read? This must be accompanied by a criteria with whereabouts=keyword_alerts_feed
HTTP status code 200
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"_type": {
"id": "_type",
"type": "string"
},
"_representation": {
"id": "_type",
"type": "string"
},
"thread_id": {
"id": "thread_id",
"type": "integer"
},
"description": {
"id": "description",
"type": "string"
},
"description_parsed": {
"$ref": "parsedFormattedText.json"
},
"title": {
"id": "title",
"type": "string"
},
"origin": {
"id": "origin",
"type": "string"
},
"submitted": {
"id": "submitted",
"type": "integer"
},
"updated": {
"id": "updated",
"type": "integer"
},
"expired": {
"id": "expired",
"type": "boolean"
},
"title_prefix_tag": {
"id": "title_prefix_tag",
"type": "string"
},
"saved": {
"id": "saved",
"type": "boolean"
},
"saved_at": {
"id": "saved_at",
"type": "integer"
},
"status": {
"id": "status",
"type": "string"
},
"local": {
"id": "local",
"type": "boolean"
},
"comment_count": {
"id": "comment_count",
"type": "integer"
},
"group_count": {
"id": "group_count",
"type": "integer"
},
"hot_date": {
"id": "hot_date",
"type": "integer"
},
"price": {
"id": "price",
"type": "number"
},
"price_display": {
"type": "string"
},
"deal_uri": {
"id": "deal_uri",
"type": "string"
},
"short_uri": {
"id": "short_uri",
"type": "string"
},
"visit_uri": {
"id": "visit_uri",
"type": "string"
},
"editable": {
"id": "editable",
"type": "boolean"
},
"link_uri": {
"id": "link_uri",
"type": "string"
},
"temperature_rating": {
"id": "temperature_rating",
"type": "number"
},
"temperature_level": {
"id": "temperature_level",
"type": "string"
},
"is_hot": {
"id": "is_hot",
"type": "boolean"
},
"is_nsfw": {
"id": "is_nsfw",
"type": "boolean"
},
"is_free_shipping_voucher": {
"id": "is_free_shipping_voucher",
"type": "boolean"
},
"are_shipping_costs_free": {
"id": "are_shipping_costs_free",
"type": "boolean"
},
"shipping_costs": {
"id": "shipping_costs",
"type": "number"
},
"shipping_costs_display": {
"type": "string"
},
"next_best_price": {
"id": "next_best_price",
"type": "number"
},
"next_best_price_display": {
"type": "string"
},
"price_discount": {
"id": "price_discount",
"type": "integer"
},
"price_discount_display": {
"type": "string"
},
"is_trending": {
"id": "is_trending",
"type": "boolean"
},
"expiry_date": {
"id": "expiry_date",
"type": "integer"
},
"start_date": {
"id": "start_date",
"type": "integer"
},
"is_dangerous": {
"id": "is_dangerous",
"type": "boolean"
},
"is_deadly": {
"id": "is_deadly",
"type": "boolean"
},
"code": {
"id": "code",
"type": "string"
},
"percentage_off": {
"id": "percentage_off",
"type": "number"
},
"percentage_off_display": {
"type": "string"
},
"discount": {
"id": "discount",
"type": "string"
},
"price_off": {
"id": "price_off",
"type": "number"
},
"price_off_display": {
"type": "string"
},
"can_add_info": {
"id": "can_add_info",
"type": "boolean"
},
"group_ids": {
"id": "group_ids",
"type": "array",
"items": [
{
"type": "integer"
}
]
},
"groups": {
"id": "groups",
"type": "array",
"items": {
"$ref": "threadGroup.json"
}
},
"main_group": {
"$ref": "threadGroup.json"
},
"type": {
"$ref": "type.json"
},
"poster": {
"$ref": "user.json"
},
"image": {
"$ref": "image.json"
},
"merchant": {
"$ref": "merchant.json"
},
"tracking_pixel_url": {
"id": "tracking_pixel_url",
"type": "string"
},
"show_bumped_status": {
"id": "show_bumped_status",
"type": "boolean"
},
"icon_list_url": {
"id": "icon_list_url",
"type": "string"
},
"icon_detail_url": {
"id": "icon_detail_url",
"type": "string"
},
"is_verified": {
"id": "is_verified",
"type": "boolean"
},
"voucher_label": {
"id": "voucher_label",
"type": "object",
"translation": {
"type": "string"
},
"key": {
"type": "string"
}
}
},
"required": [
"thread_id",
"title",
"submitted",
"expired",
"comment_count",
"deal_uri",
"poster",
"type"
]
}
HTTP status code 400
Possible error messages:
Code | Name | Information |
---|---|---|
20001 | ERROR_MERCHANT_NOT_FOUND | Merchant not found. |
20002 | ERROR_THREAD_GROUP_NOT_FOUND | Thread group not found. |
20014 | ERROR_THREAD_GROUP_NOT_FOUND | Thread group doesn't exists. |
20019 | ERROR_USER_NOT_FOUND | User was not found. |
20020 | ERROR_USER_DELETED | User deleted. |
20005 | ERROR_EVENT_NOT_FOUND | Event not found. |
20033 | ERROR_INVALID_CURSOR_VALUE | The client tried to paginate threads using cursors which values are specific to personalized threads although personalization isn't active. |
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"data": {
"id": "data",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"additional_data": {
"id": "additional_data",
"type": "object"
},
"messages": {
"id": "messages",
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
}
}
}
]
}
},
"validation": {
"id": "validation",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"cursor": {
"id": "cursor",
"type": "object",
"properties": {
"before": {
"type": "string"
},
"after": {
"type": "string"
}
}
}
},
"required": [
"messages",
"validation"
]
}
Get the hottest threads.
get /thread/hottest
Get the hottest threads.
Query Parameters
- type_id: (integer)
- merchant_id: (integer)
If used along
merchant_ids
, this last will take precedence. - merchant_ids: (string)
Comma-separated list of merchant IDs from which to include threads assigned to. Takes precedence over
merchant_id
. - event_id: (integer)
- created_at: (integer)
- user_id: (integer)
- group_id: (integer)
- days: (one of day, 1, week, 7, month, 30, overall)
Either an integer or a string representing the timespan of the hottest threads to return.
- expired: (boolean - default: false)
Whether to include expired threads
- local: (boolean - default: true)
Whether to include local threads
- clearance: (boolean - default: false)
- limit: (integer - default: 20)
- page: (integer - default: 1)
- location_ids: (string)
Comma separated list of location IDs. Cannot be used if
local
is not set to a truly value. - excluded_merchant_ids: (string)
Comma-separated list of merchant IDs from which to exclude threads assigned to
HTTP status code 200
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"_type": {
"id": "_type",
"type": "string"
},
"_representation": {
"id": "_type",
"type": "string"
},
"thread_id": {
"id": "thread_id",
"type": "integer"
},
"description": {
"id": "description",
"type": "string"
},
"description_parsed": {
"$ref": "parsedFormattedText.json"
},
"title": {
"id": "title",
"type": "string"
},
"origin": {
"id": "origin",
"type": "string"
},
"submitted": {
"id": "submitted",
"type": "integer"
},
"updated": {
"id": "updated",
"type": "integer"
},
"expired": {
"id": "expired",
"type": "boolean"
},
"title_prefix_tag": {
"id": "title_prefix_tag",
"type": "string"
},
"saved": {
"id": "saved",
"type": "boolean"
},
"saved_at": {
"id": "saved_at",
"type": "integer"
},
"status": {
"id": "status",
"type": "string"
},
"local": {
"id": "local",
"type": "boolean"
},
"comment_count": {
"id": "comment_count",
"type": "integer"
},
"group_count": {
"id": "group_count",
"type": "integer"
},
"hot_date": {
"id": "hot_date",
"type": "integer"
},
"price": {
"id": "price",
"type": "number"
},
"price_display": {
"type": "string"
},
"deal_uri": {
"id": "deal_uri",
"type": "string"
},
"short_uri": {
"id": "short_uri",
"type": "string"
},
"visit_uri": {
"id": "visit_uri",
"type": "string"
},
"editable": {
"id": "editable",
"type": "boolean"
},
"link_uri": {
"id": "link_uri",
"type": "string"
},
"temperature_rating": {
"id": "temperature_rating",
"type": "number"
},
"temperature_level": {
"id": "temperature_level",
"type": "string"
},
"is_hot": {
"id": "is_hot",
"type": "boolean"
},
"is_nsfw": {
"id": "is_nsfw",
"type": "boolean"
},
"is_free_shipping_voucher": {
"id": "is_free_shipping_voucher",
"type": "boolean"
},
"are_shipping_costs_free": {
"id": "are_shipping_costs_free",
"type": "boolean"
},
"shipping_costs": {
"id": "shipping_costs",
"type": "number"
},
"shipping_costs_display": {
"type": "string"
},
"next_best_price": {
"id": "next_best_price",
"type": "number"
},
"next_best_price_display": {
"type": "string"
},
"price_discount": {
"id": "price_discount",
"type": "integer"
},
"price_discount_display": {
"type": "string"
},
"is_trending": {
"id": "is_trending",
"type": "boolean"
},
"expiry_date": {
"id": "expiry_date",
"type": "integer"
},
"start_date": {
"id": "start_date",
"type": "integer"
},
"is_dangerous": {
"id": "is_dangerous",
"type": "boolean"
},
"is_deadly": {
"id": "is_deadly",
"type": "boolean"
},
"code": {
"id": "code",
"type": "string"
},
"percentage_off": {
"id": "percentage_off",
"type": "number"
},
"percentage_off_display": {
"type": "string"
},
"discount": {
"id": "discount",
"type": "string"
},
"price_off": {
"id": "price_off",
"type": "number"
},
"price_off_display": {
"type": "string"
},
"can_add_info": {
"id": "can_add_info",
"type": "boolean"
},
"group_ids": {
"id": "group_ids",
"type": "array",
"items": [
{
"type": "integer"
}
]
},
"groups": {
"id": "groups",
"type": "array",
"items": {
"$ref": "threadGroup.json"
}
},
"main_group": {
"$ref": "threadGroup.json"
},
"type": {
"$ref": "type.json"
},
"poster": {
"$ref": "user.json"
},
"image": {
"$ref": "image.json"
},
"merchant": {
"$ref": "merchant.json"
},
"tracking_pixel_url": {
"id": "tracking_pixel_url",
"type": "string"
},
"show_bumped_status": {
"id": "show_bumped_status",
"type": "boolean"
},
"icon_list_url": {
"id": "icon_list_url",
"type": "string"
},
"icon_detail_url": {
"id": "icon_detail_url",
"type": "string"
},
"is_verified": {
"id": "is_verified",
"type": "boolean"
},
"voucher_label": {
"id": "voucher_label",
"type": "object",
"translation": {
"type": "string"
},
"key": {
"type": "string"
}
}
},
"required": [
"thread_id",
"title",
"submitted",
"expired",
"comment_count",
"deal_uri",
"poster",
"type"
]
}
HTTP status code 400
Possible error messages:
Code | Name | Information |
---|---|---|
20014 | ERROR_THREAD_GROUP_NOT_FOUND | Group not found. |
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"data": {
"id": "data",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"additional_data": {
"id": "additional_data",
"type": "object"
},
"messages": {
"id": "messages",
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
}
}
}
]
}
},
"validation": {
"id": "validation",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"cursor": {
"id": "cursor",
"type": "object",
"properties": {
"before": {
"type": "string"
},
"after": {
"type": "string"
}
}
}
},
"required": [
"messages",
"validation"
]
}
Search the threads. Uses traditional non-cursor pagination.
get /thread/search
Search the threads. Uses traditional non-cursor pagination.
Query Parameters
- limit: (integer)
Use for standard pagination
- page: (integer)
Use for standard pagination
- before: (string)
Use for cursor pagination
- after: (string)
Use for cursor pagination
- query: required (string)
- order_by: (one of relevance, hot, new, temperature)
- expired: (boolean)
Whether to include expired threads
- local: (boolean)
Whether to include local threads
- type_id: (string)
Comma separated list of thread types. Example: 1,2.
- merchant_id: (integer)
- group_id: (integer)
- location_ids: (string)
Comma separated list of location IDs. Cannot be used if
local
is not set to a truly value.
HTTP status code 200
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"_type": {
"id": "_type",
"type": "string"
},
"_representation": {
"id": "_type",
"type": "string"
},
"thread_id": {
"id": "thread_id",
"type": "integer"
},
"description": {
"id": "description",
"type": "string"
},
"description_parsed": {
"$ref": "parsedFormattedText.json"
},
"title": {
"id": "title",
"type": "string"
},
"origin": {
"id": "origin",
"type": "string"
},
"submitted": {
"id": "submitted",
"type": "integer"
},
"updated": {
"id": "updated",
"type": "integer"
},
"expired": {
"id": "expired",
"type": "boolean"
},
"title_prefix_tag": {
"id": "title_prefix_tag",
"type": "string"
},
"saved": {
"id": "saved",
"type": "boolean"
},
"saved_at": {
"id": "saved_at",
"type": "integer"
},
"status": {
"id": "status",
"type": "string"
},
"local": {
"id": "local",
"type": "boolean"
},
"comment_count": {
"id": "comment_count",
"type": "integer"
},
"group_count": {
"id": "group_count",
"type": "integer"
},
"hot_date": {
"id": "hot_date",
"type": "integer"
},
"price": {
"id": "price",
"type": "number"
},
"price_display": {
"type": "string"
},
"deal_uri": {
"id": "deal_uri",
"type": "string"
},
"short_uri": {
"id": "short_uri",
"type": "string"
},
"visit_uri": {
"id": "visit_uri",
"type": "string"
},
"editable": {
"id": "editable",
"type": "boolean"
},
"link_uri": {
"id": "link_uri",
"type": "string"
},
"temperature_rating": {
"id": "temperature_rating",
"type": "number"
},
"temperature_level": {
"id": "temperature_level",
"type": "string"
},
"is_hot": {
"id": "is_hot",
"type": "boolean"
},
"is_nsfw": {
"id": "is_nsfw",
"type": "boolean"
},
"is_free_shipping_voucher": {
"id": "is_free_shipping_voucher",
"type": "boolean"
},
"are_shipping_costs_free": {
"id": "are_shipping_costs_free",
"type": "boolean"
},
"shipping_costs": {
"id": "shipping_costs",
"type": "number"
},
"shipping_costs_display": {
"type": "string"
},
"next_best_price": {
"id": "next_best_price",
"type": "number"
},
"next_best_price_display": {
"type": "string"
},
"price_discount": {
"id": "price_discount",
"type": "integer"
},
"price_discount_display": {
"type": "string"
},
"is_trending": {
"id": "is_trending",
"type": "boolean"
},
"expiry_date": {
"id": "expiry_date",
"type": "integer"
},
"start_date": {
"id": "start_date",
"type": "integer"
},
"is_dangerous": {
"id": "is_dangerous",
"type": "boolean"
},
"is_deadly": {
"id": "is_deadly",
"type": "boolean"
},
"code": {
"id": "code",
"type": "string"
},
"percentage_off": {
"id": "percentage_off",
"type": "number"
},
"percentage_off_display": {
"type": "string"
},
"discount": {
"id": "discount",
"type": "string"
},
"price_off": {
"id": "price_off",
"type": "number"
},
"price_off_display": {
"type": "string"
},
"can_add_info": {
"id": "can_add_info",
"type": "boolean"
},
"group_ids": {
"id": "group_ids",
"type": "array",
"items": [
{
"type": "integer"
}
]
},
"groups": {
"id": "groups",
"type": "array",
"items": {
"$ref": "threadGroup.json"
}
},
"main_group": {
"$ref": "threadGroup.json"
},
"type": {
"$ref": "type.json"
},
"poster": {
"$ref": "user.json"
},
"image": {
"$ref": "image.json"
},
"merchant": {
"$ref": "merchant.json"
},
"tracking_pixel_url": {
"id": "tracking_pixel_url",
"type": "string"
},
"show_bumped_status": {
"id": "show_bumped_status",
"type": "boolean"
},
"icon_list_url": {
"id": "icon_list_url",
"type": "string"
},
"icon_detail_url": {
"id": "icon_detail_url",
"type": "string"
},
"is_verified": {
"id": "is_verified",
"type": "boolean"
},
"voucher_label": {
"id": "voucher_label",
"type": "object",
"translation": {
"type": "string"
},
"key": {
"type": "string"
}
}
},
"required": [
"thread_id",
"title",
"submitted",
"expired",
"comment_count",
"deal_uri",
"poster",
"type"
]
}
HTTP status code 400
Possible error messages:
Code | Name | Information |
---|---|---|
20014 | ERROR_THREAD_GROUP_NOT_FOUND | Group not found. |
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"data": {
"id": "data",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"additional_data": {
"id": "additional_data",
"type": "object"
},
"messages": {
"id": "messages",
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
}
}
}
]
}
},
"validation": {
"id": "validation",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"cursor": {
"id": "cursor",
"type": "object",
"properties": {
"before": {
"type": "string"
},
"after": {
"type": "string"
}
}
}
},
"required": [
"messages",
"validation"
]
}
Return one thread by its ID.
get /thread/{thread}
Return one thread by its ID.
URI Parameters
- thread: required (integer)
The thread ID
HTTP status code 200
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"_type": {
"id": "_type",
"type": "string"
},
"_representation": {
"id": "_type",
"type": "string"
},
"thread_id": {
"id": "thread_id",
"type": "integer"
},
"description": {
"id": "description",
"type": "string"
},
"description_parsed": {
"$ref": "parsedFormattedText.json"
},
"title": {
"id": "title",
"type": "string"
},
"origin": {
"id": "origin",
"type": "string"
},
"submitted": {
"id": "submitted",
"type": "integer"
},
"saved": {
"id": "saved",
"type": "boolean"
},
"saved_at": {
"id": "saved_at",
"type": "integer"
},
"is_new": {
"id": "is_new",
"type": "boolean"
},
"updated": {
"id": "updated",
"type": "integer"
},
"expired": {
"id": "expired",
"type": "boolean"
},
"status": {
"id": "status",
"type": "string"
},
"local": {
"id": "local",
"type": "boolean"
},
"comment_count": {
"id": "comment_count",
"type": "integer"
},
"new_comments_count": {
"id": "comment_count",
"type": "integer"
},
"group_count": {
"id": "group_count",
"type": "integer"
},
"hot_date": {
"id": "hot_date",
"type": "integer"
},
"price": {
"id": "price",
"type": "number"
},
"price_display": {
"type": "string"
},
"deal_uri": {
"id": "deal_uri",
"type": "string"
},
"short_uri": {
"id": "short_uri",
"type": "string"
},
"visit_uri": {
"id": "visit_uri",
"type": "string"
},
"editable": {
"id": "editable",
"type": "boolean"
},
"deletable": {
"id": "deletable",
"type": "boolean"
},
"link_uri": {
"id": "link_uri",
"type": "string"
},
"temperature_rating": {
"id": "temperature_rating",
"type": "number"
},
"temperature_level": {
"id": "temperature_level",
"type": "string"
},
"is_hot": {
"id": "is_hot",
"type": "boolean"
},
"is_nsfw": {
"id": "is_nsfw",
"type": "boolean"
},
"is_free_shipping_voucher": {
"id": "is_free_shipping_voucher",
"type": "boolean"
},
"next_best_price": {
"id": "next_best_price",
"type": "number"
},
"next_best_price_display": {
"type": "string"
},
"price_discount": {
"id": "price_discount",
"type": "integer"
},
"price_discount_display": {
"type": "string"
},
"are_shipping_costs_free": {
"id": "are_shipping_costs_free",
"type": "boolean"
},
"shipping_costs": {
"id": "shipping_costs",
"type": "number"
},
"shipping_costs_display": {
"type": "string"
},
"is_trending": {
"id": "is_trending",
"type": "boolean"
},
"expiry_date": {
"id": "expiry_date",
"type": "integer"
},
"start_date": {
"id": "start_date",
"type": "integer"
},
"is_dangerous": {
"id": "is_dangerous",
"type": "boolean"
},
"is_deadly": {
"id": "is_deadly",
"type": "boolean"
},
"code": {
"id": "code",
"type": "string"
},
"percentage_off": {
"id": "percentage_off",
"type": "number"
},
"percentage_off_display": {
"type": "string"
},
"discount": {
"id": "discount",
"type": "string"
},
"price_off": {
"id": "price_off",
"type": "number"
},
"price_off_display": {
"type": "string"
},
"can_add_info": {
"id": "can_add_info",
"type": "boolean"
},
"group_ids": {
"id": "group_ids",
"type": "array",
"items": [
{
"type": "integer"
}
]
},
"groups": {
"id": "groups",
"type": "array",
"items": {
"$ref": "threadGroup.json"
}
},
"main_group": {
"$ref": "threadGroup.json"
},
"location_display": {
"id": "location_display",
"type":"string"
},
"location_summary": {
"id": "location_summary",
"type":"string"
},
"location_ids": {
"id": "location_ids",
"type":"array",
"items": [
{
"type": "integer"
}
]
},
"locations_count": {
"id": "locations_count",
"type":"integer"
},
"dispatched_from": {
"$ref": "country.json"
},
"can_morph_into": {
"id": "can_morph_into",
"type": "array",
"items": [
{
"type": "string"
}
]
},
"is_locked": {
"id": "is_locked",
"type":"boolean"
},
"reported_expired": {
"id": "reported_expired",
"type": "boolean"
},
"can_report_expired": {
"id": "can_report_expired",
"type": "boolean"
},
"can_toggle_expiry": {
"id": "can_toggle_expiry",
"type": "boolean"
},
"reported_other": {
"id": "reported_other",
"type": "boolean"
},
"can_report_other": {
"id": "can_report_other",
"type": "boolean"
},
"reported_spam": {
"id": "reported_spam",
"type": "boolean"
},
"can_report_spam": {
"id": "can_report_spam",
"type": "boolean"
},
"reported_duplicate": {
"id": "reported_duplicate",
"type": "boolean"
},
"can_report_duplicate": {
"id": "can_report_duplicate",
"type": "boolean"
},
"reported": {
"id": "reported",
"type": "boolean"
},
"can_be_reported": {
"id": "can_be_reported",
"type": "boolean"
},
"top_comment_count": {
"id": "top_comment_count",
"type": "integer"
},
"type": {
"$ref": "type.json"
},
"poster": {
"$ref": "user.json"
},
"image": {
"$ref": "image.json"
},
"merchant": {
"$ref": "merchant.json"
},
"additional_info": {
"id": "additional_info",
"type": "array",
"items": {
"$ref": "additionalInfo.json"
}
},
"events": {
"id": "events",
"type": "array",
"items": {
"$ref": "eventList.json"
}
},
"pinned_event" : {
"$ref": "eventList.json"
},
"top_comments": {
"id": "top_comments",
"type": "array",
"items": {
"$ref": "comment.json"
}
},
"disclaimers": {
"id": "disclaimers",
"type": "array",
"items": {
"$ref": "threadDisclaimer.json"
}
},
"group_display_summary": {
"id": "group_display_summary",
"type": "string"
},
"tracking_pixel_url": {
"id": "tracking_pixel_url",
"type": "string"
},
"title_prefix_tag": {
"id": "title_prefix_tag",
"type": "string"
},
"display_price_as_free": {
"id": "display_price_as_free",
"type": "boolean"
},
"show_bumped_status": {
"id": "show_bumped_status",
"type": "boolean"
},
"thread_update_summary": {
"$ref": "threadUpdateSummary.json"
},
"icon_list_url": {
"id": "icon_list_url",
"type": "string"
},
"icon_detail_url": {
"id": "icon_detail_url",
"type": "string"
},
"display_poster_newbie_banner": {
"id": "display_poster_newbie_banner",
"type": "boolean"
},
"encourage_to_post_first_comment": {
"id": "encourage_to_post_first_comment",
"type": "boolean"
},
"should_display_claim_code_button": {
"type": "boolean"
},
"force_user_to_login_to_claim_code": {
"type": "boolean"
},
"can_claim_code": {
"type": "boolean"
},
"claimed_code": {
"type": "string"
},
"shareable_link": {
"type": "string"
},
"slots": {
"id": "slot",
"type": "array",
"items": {
"$ref": "imageSlot.json"
}
},
"insights" : {
"$ref": "threadInsights.json"
},
"show_first_deal_poster_banner": {
"type": "boolean"
},
"is_probably_expired": {
"id": "is_probably_expired",
"type": "boolean"
},
"is_verified": {
"id": "is_verified",
"type": "boolean"
},
"voucher_label": {
"id": "voucher_label",
"type": "object",
"translation": {
"id": "voucher_label_translation",
"type": "string"
},
"key": {
"id": "voucher_label_key",
"type": "string"
}
}
},
"required": [
"thread_id",
"title",
"submitted",
"expired",
"comment_count",
"poster",
"type"
]
}
HTTP status code 404
Possible error messages:
Code | Name | Information |
---|---|---|
20001 | ERROR_THREAD_NOT_FOUND | Thread was not found. |
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"data": {
"id": "data",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"additional_data": {
"id": "additional_data",
"type": "object"
},
"messages": {
"id": "messages",
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
}
}
}
]
}
},
"validation": {
"id": "validation",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"cursor": {
"id": "cursor",
"type": "object",
"properties": {
"before": {
"type": "string"
},
"after": {
"type": "string"
}
}
}
},
"required": [
"messages",
"validation"
]
}
HTTP status code 410
If the expected_type
parameter is different from the returned thread type
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"data": {
"id": "data",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"additional_data": {
"id": "additional_data",
"type": "object"
},
"messages": {
"id": "messages",
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
}
}
}
]
}
},
"validation": {
"id": "validation",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"cursor": {
"id": "cursor",
"type": "object",
"properties": {
"before": {
"type": "string"
},
"after": {
"type": "string"
}
}
}
},
"required": [
"messages",
"validation"
]
}
Get the comments of a thread.
get /thread/{thread}/comments
Get the comments of a thread.
URI Parameters
- thread: required (integer)
The thread ID
Query Parameters
- limit: (integer)
Use for standard pagination
- page: (integer)
Use for standard pagination
- before: (string)
Use for cursor pagination
- after: (string)
Use for cursor pagination
HTTP status code 200
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"comment_id": {
"id": "comment_id",
"type": "integer"
},
"parent_id": {
"id": "parent_id",
"type": "integer"
},
"thread_id": {
"id": "thread_id",
"type": "integer"
},
"posted": {
"id": "posted",
"type": "integer"
},
"updated": {
"id": "updated",
"type": "integer"
},
"status": {
"id": "status",
"type": "string"
},
"origin": {
"id": "origin",
"type": "string"
},
"content": {
"id": "content",
"$ref": "parsedFormattedText.json"
},
"likes": {
"id": "likes",
"type": "integer"
},
"can_like": {
"id": "can_like",
"type": "boolean"
},
"user_reaction_type": {
"id": "user_reaction_type",
"type": "string"
},
"reaction_counters": {
"id": "reaction_counters",
"$ref": "reactionCounters.json"
},
"permalink": {
"id": "permalink",
"type": "string"
},
"_type": {
"id": "_type",
"type": "string"
},
"poster": {
"$ref": "user.json"
},
"thread": {
"$ref": "thread.json"
},
"deletable": {
"id": "deletable",
"type": "boolean"
},
"reported_spam": {
"id": "reported_spam",
"type": "boolean"
},
"can_report_spam": {
"id": "can_report_spam",
"type": "boolean"
},
"reported_other": {
"id": "reported_other",
"type": "boolean"
},
"can_report_other": {
"id": "can_report_other",
"type": "boolean"
},
"hidden": {
"id": "hidden",
"type": "boolean"
},
"hidden_reason": {
"id": "hidden_reason",
"type": "string"
},
"edit_reason": {
"$ref": "commentEditReason.json"
},
"children_count": {
"id": "parent_id",
"type": "integer"
},
"highlighted_child": {
"$ref": "comment.json"
},
"replied_to": {
"$ref": "commentRepliedTo.json"
},
"can_reply": {
"id": "can_reply",
"type": "boolean"
},
"is_new": {
"id": "is_new",
"type": "boolean"
},
"has_new_children": {
"id": "has_new_children",
"type": "boolean"
}
},
"required": [
"comment_id",
"posted",
"updated",
"status",
"_type"
]
}
HTTP status code 400
Possible error messages:
Code | Name | Information |
---|---|---|
20013 | ERROR_THREAD_NOT_FOUND | The requested thread could not be found. |
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"data": {
"id": "data",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"additional_data": {
"id": "additional_data",
"type": "object"
},
"messages": {
"id": "messages",
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
}
}
}
]
}
},
"validation": {
"id": "validation",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"cursor": {
"id": "cursor",
"type": "object",
"properties": {
"before": {
"type": "string"
},
"after": {
"type": "string"
}
}
}
},
"required": [
"messages",
"validation"
]
}
Thread groups
Get all available thread groups. When listing parameters aren't set, return default groups (by internally setting list
to default
).
get /group
Get all available thread groups. When listing parameters aren't set, return default groups (by internally setting list
to default
).
Query Parameters
- limit: (integer - default: 20)
- page: (integer - default: 1)
- thread_type: (integer)
When given without
list
andsearch
: return only the default groups where a specific thread type can be posted. Otherwise used to filter groups by allowed thread type ID. - list: (one of default, popular, all - default: default)
Return the default, popular or all groups. Cannot be used along
search
andthread_type
. When using this parameter, groups are returned ordered as set in the admin interface. Ifsearch
,thread_type
andlist
aren't set,list
automatically defaults todefault
. - search: (string - minLength: 2)
Return only groups whose name matches the query. Cannot be used along
list
. - section: (one of all, deals, discussions - default: all)
Filter thread groups where this kind of thread type can be posted. Can only be used along
list
andsearch
.
HTTP status code 200
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"_type": {
"id": "_type",
"type": "string"
},
"group_id": {
"id": "group_id",
"type": "integer"
},
"name": {
"id": "name",
"type": "string"
},
"url_name": {
"id": "url_name",
"type": "string"
},
"default": {
"id": "default",
"type": "boolean"
},
"followable": {
"id": "followable",
"type": "boolean"
},
"followed": {
"id": "followed",
"type": "boolean"
},
"submittable_thread_types": {
"id": "submittable_thread_types",
"type": "array",
"items": [
{
"type": "integer"
}
]
},
"sections": {
"id": "sections",
"type": "array",
"items": [
{
"type": "string"
}
]
},
"image": {
"id": "image",
"$ref": "image.json"
},
"statistics": {
"id": "statistics",
"type": "object",
"properties": {
"thread_count": {
"id": "thread_count",
"type": "integer"
},
"comment_count": {
"id": "comment_count",
"type": "integer"
},
"active_deal_count": {
"id": "active_deal_count",
"type": "integer"
},
"active_voucher_count": {
"id": "active_voucher_count",
"type": "integer"
}
}
},
"pepper_url": {
"id": "pepper_url",
"type": "string"
},
"header_description": {
"id": "header_description",
"type": "string"
},
"hero_banner_smartphone_url": {
"id": "hero_banner_smartphone_url",
"type": "string"
},
"hero_banner_tablet_url": {
"id": "hero_banner_tablet_url",
"type": "string"
},
"icon_list_url": {
"id": "icon_list_url",
"type": "string"
},
"icon_detail_url": {
"id": "icon_detail_url",
"type": "string"
}
},
"required": [
"_type",
"group_id",
"name",
"url_name",
"default",
"followable",
"followed",
"submittable_thread_types",
"sections",
"statistics",
"header_description"
]
}
HTTP status code 400
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"data": {
"id": "data",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"additional_data": {
"id": "additional_data",
"type": "object"
},
"messages": {
"id": "messages",
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
}
}
}
]
}
},
"validation": {
"id": "validation",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"cursor": {
"id": "cursor",
"type": "object",
"properties": {
"before": {
"type": "string"
},
"after": {
"type": "string"
}
}
}
},
"required": [
"messages",
"validation"
]
}
Thread types
Get the list of thread types.
get /type
Get the list of thread types.
HTTP status code 200
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"_type": {
"id": "_type",
"type": "string"
},
"_representation": {
"id": "_type",
"type": "string"
},
"type_id": {
"id": "type_id",
"type": "integer"
},
"name": {
"id": "name",
"type": "string"
},
"short_name": {
"id": "short_name",
"type": "string"
},
"thread_type_url_name": {
"id": "thread_type_url_name",
"type": "string"
},
"dealable": {
"id": "dealable",
"type": "boolean"
},
"topic_filterable": {
"id": "topic_filterable",
"type": "boolean"
},
"featureable": {
"id": "featureable",
"type": "boolean"
}
},
"required": [
"type_id",
"name",
"short_name",
"thread_type_url_name",
"dealable",
"topic_filterable",
"_type"
]
}
Users
Get a specific user.
get /user/{user}
Get a specific user.
URI Parameters
- user: required (integer)
The user ID
Query Parameters
- include_stats: (boolean - default: false)
Include the user stats in the response?
HTTP status code 200
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"description": {
"id": "description",
"type": "string"
},
"title": {
"id": "title",
"type": "string"
},
"should_display_title_in_thread_lists": {
"id": "should_display_title_in_thread_lists",
"type": "boolean"
},
"threads": {
"id": "threads",
"type": "integer"
},
"active_threads": {
"id": "active_threads",
"type": "integer"
},
"joined": {
"id": "joined",
"type": "integer"
},
"last_active": {
"id": "last_active",
"type": "integer"
},
"likes_received": {
"id": "likes_received",
"type": "integer"
},
"threads_viewed": {
"id": "threads_viewed",
"type": "integer"
},
"view_count": {
"id": "view_count",
"type": "integer"
},
"comment_count": {
"id": "comment_count",
"type": "integer"
},
"followable": {
"id": "followable",
"type": "boolean"
},
"loyalty_tier": {
"id": "loyalty_tier",
"type": "integer"
},
"access_token": {
"id": "access_token",
"type": "object",
"properties": {
"token": {
"id": "token",
"type": "string"
},
"secret": {
"id": "secret",
"type": "string"
},
"_type": {
"id": "_type",
"type": "string"
}
}
},
"email": {
"id": "email",
"type": "string"
},
"facebook": {
"id": "facebook",
"type": "object",
"properties": {
"facebook_id": {
"id": "facebook_id",
"type": "integer"
},
"_type": {
"id": "_type",
"type": "string"
}
}
},
"twitter": {
"id": "twitter",
"type": "object",
"properties": {
"twitter_id": {
"id": "twitter_id",
"type": "integer"
},
"twitter_screen_name": {
"id": "twitter_screen_name",
"type": "string"
},
"_type": {
"id": "_type",
"type": "string"
}
}
},
"enabled_activity_types": {
"id": "enabled_activity_types",
"type": "array",
"items": {
"$ref": "activityType.json"
}
},
"user_id": {
"id": "user_id",
"type": "integer"
},
"username": {
"id": "username",
"type": "string"
},
"avatar": {
"id": "avatar",
"$ref": "image.json"
},
"background_image": {
"id": "background_image",
"$ref": "image.json"
},
"best_badge": {
"badge": {
"id": "badge",
"type": {
"$ref": "badgeUser.json"
}
}
},
"_type": {
"id": "_type",
"type": "string"
},
"icon_list_url": {
"id": "icon_list_url",
"type": "string"
},
"icon_detail_url": {
"id": "icon_detail_url",
"type": "string"
},
"user_type_icon_url": {
"type": "string"
},
"_representation": {
"id": "_type",
"type": "string"
}
},
"required": [
"user_id",
"username",
"_type"
]
}
HTTP status code 404
Possible error messages:
Code | Name | Information |
---|---|---|
20002 | ERROR_USER_NOT_FOUND | User was not found |
20043 | ERROR_USER_DELETED | User was deleted |
Merchants
Get a list of merchants.
get /merchant
Get a list of merchants.
Query Parameters
- limit: (integer)
Use for standard pagination
- page: (integer)
Use for standard pagination
- before: (string)
Use for cursor pagination
- after: (string)
Use for cursor pagination
- event_id: (integer)
Filter merchants assigned to this event.
HTTP status code 200
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"merchant_id": {
"id": "merchant_id",
"type": "integer"
},
"name": {
"id": "name",
"type": "string"
},
"url_name": {
"id": "url_name",
"type": "string"
},
"image": {
"$ref": "image.json"
},
"statistics": {
"id": "statistics",
"type": "object",
"properties": {
"hot_threads_count": {
"id": "hot_threads_count",
"type": "integer"
},
"hot_deals_count": {
"id": "hot_deals_count",
"type": "integer"
},
"hot_vouchers_count": {
"id": "hot_vouchers_count",
"type": "integer"
},
"active_thread_count": {
"id": "active_thread_count",
"type": "integer"
},
"active_deal_count": {
"id": "active_deal_count",
"type": "integer"
},
"active_voucher_count": {
"id": "active_voucher_count",
"type": "integer"
}
}
},
"_type": {
"id": "_type",
"type": "string"
},
"pepper_url": {
"id": "pepper_url",
"type": "string"
},
"merchant_external_url": {
"id": "merchant_external_url",
"type": "string"
},
"header_description": {
"id": "header_description",
"type": "string"
},
"hero_banner_smartphone_url": {
"id": "hero_banner_smartphone_url",
"type": "string"
},
"hero_banner_tablet_url": {
"id": "hero_banner_tablet_url",
"type": "string"
},
"icon_list_url": {
"id": "icon_list_url",
"type": "string"
},
"icon_detail_url": {
"id": "icon_detail_url",
"type": "string"
},
"referral_campaigns_promotion": {
"$ref": "merchantReferralCampaignsPromotion.json"
}
},
"required": [
"merchant_id",
"name",
"url_name",
"header_description",
"_type"
]
}
Get a merchant by URL name.
get /merchant/by_url_name/{urlName}
Get a merchant by URL name.
URI Parameters
- urlName: required (string)
The URL name
Query Parameters
- include_stats: (boolean)
Include the merchant statistics in the response?
HTTP status code 200
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"merchant_id": {
"id": "merchant_id",
"type": "integer"
},
"name": {
"id": "name",
"type": "string"
},
"url_name": {
"id": "url_name",
"type": "string"
},
"image": {
"$ref": "image.json"
},
"statistics": {
"id": "statistics",
"type": "object",
"properties": {
"hot_threads_count": {
"id": "hot_threads_count",
"type": "integer"
},
"hot_deals_count": {
"id": "hot_deals_count",
"type": "integer"
},
"hot_vouchers_count": {
"id": "hot_vouchers_count",
"type": "integer"
},
"active_thread_count": {
"id": "active_thread_count",
"type": "integer"
},
"active_deal_count": {
"id": "active_deal_count",
"type": "integer"
},
"active_voucher_count": {
"id": "active_voucher_count",
"type": "integer"
}
}
},
"_type": {
"id": "_type",
"type": "string"
},
"pepper_url": {
"id": "pepper_url",
"type": "string"
},
"merchant_external_url": {
"id": "merchant_external_url",
"type": "string"
},
"header_description": {
"id": "header_description",
"type": "string"
},
"hero_banner_smartphone_url": {
"id": "hero_banner_smartphone_url",
"type": "string"
},
"hero_banner_tablet_url": {
"id": "hero_banner_tablet_url",
"type": "string"
},
"icon_list_url": {
"id": "icon_list_url",
"type": "string"
},
"icon_detail_url": {
"id": "icon_detail_url",
"type": "string"
},
"referral_campaigns_promotion": {
"$ref": "merchantReferralCampaignsPromotion.json"
}
},
"required": [
"merchant_id",
"name",
"url_name",
"header_description",
"_type"
]
}
HTTP status code 404
Possible error messages:
Code | Name | Information |
---|---|---|
20001 | ERROR_MERCHANT_NOT_FOUND | Merchant not found. |
20005 | ERROR_MERCHANT_IS_DEACTIVATED | Merchant has been deleted. |
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"data": {
"id": "data",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"additional_data": {
"id": "additional_data",
"type": "object"
},
"messages": {
"id": "messages",
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
}
}
}
]
}
},
"validation": {
"id": "validation",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"cursor": {
"id": "cursor",
"type": "object",
"properties": {
"before": {
"type": "string"
},
"after": {
"type": "string"
}
}
}
},
"required": [
"messages",
"validation"
]
}
Search for merchants.
get /merchant/search
Search for merchants.
Query Parameters
- limit: (integer)
Use for standard pagination
- page: (integer)
Use for standard pagination
- before: (string)
Use for cursor pagination
- after: (string)
Use for cursor pagination
- query: required (string)
HTTP status code 200
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"merchant_id": {
"id": "merchant_id",
"type": "integer"
},
"name": {
"id": "name",
"type": "string"
},
"url_name": {
"id": "url_name",
"type": "string"
},
"image": {
"$ref": "image.json"
},
"statistics": {
"id": "statistics",
"type": "object",
"properties": {
"hot_threads_count": {
"id": "hot_threads_count",
"type": "integer"
},
"hot_deals_count": {
"id": "hot_deals_count",
"type": "integer"
},
"hot_vouchers_count": {
"id": "hot_vouchers_count",
"type": "integer"
},
"active_thread_count": {
"id": "active_thread_count",
"type": "integer"
},
"active_deal_count": {
"id": "active_deal_count",
"type": "integer"
},
"active_voucher_count": {
"id": "active_voucher_count",
"type": "integer"
}
}
},
"_type": {
"id": "_type",
"type": "string"
},
"pepper_url": {
"id": "pepper_url",
"type": "string"
},
"merchant_external_url": {
"id": "merchant_external_url",
"type": "string"
},
"header_description": {
"id": "header_description",
"type": "string"
},
"hero_banner_smartphone_url": {
"id": "hero_banner_smartphone_url",
"type": "string"
},
"hero_banner_tablet_url": {
"id": "hero_banner_tablet_url",
"type": "string"
},
"icon_list_url": {
"id": "icon_list_url",
"type": "string"
},
"icon_detail_url": {
"id": "icon_detail_url",
"type": "string"
},
"referral_campaigns_promotion": {
"$ref": "merchantReferralCampaignsPromotion.json"
}
},
"required": [
"merchant_id",
"name",
"url_name",
"header_description",
"_type"
]
}
HTTP status code 400
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"data": {
"id": "data",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"additional_data": {
"id": "additional_data",
"type": "object"
},
"messages": {
"id": "messages",
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
}
}
}
]
}
},
"validation": {
"id": "validation",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"cursor": {
"id": "cursor",
"type": "object",
"properties": {
"before": {
"type": "string"
},
"after": {
"type": "string"
}
}
}
},
"required": [
"messages",
"validation"
]
}
Get a merchant by ID.
get /merchant/{merchant}
Get a merchant by ID.
URI Parameters
- merchant: required (integer)
The merchant ID
Query Parameters
- include_stats: (boolean)
Include the merchant statistics in the response?
- get_thread_counts: (boolean)
make extra queries to populate thread counts for this merchant?
HTTP status code 200
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"merchant_id": {
"id": "merchant_id",
"type": "integer"
},
"name": {
"id": "name",
"type": "string"
},
"url_name": {
"id": "url_name",
"type": "string"
},
"image": {
"$ref": "image.json"
},
"statistics": {
"id": "statistics",
"type": "object",
"properties": {
"hot_threads_count": {
"id": "hot_threads_count",
"type": "integer"
},
"hot_deals_count": {
"id": "hot_deals_count",
"type": "integer"
},
"hot_vouchers_count": {
"id": "hot_vouchers_count",
"type": "integer"
},
"active_thread_count": {
"id": "active_thread_count",
"type": "integer"
},
"active_deal_count": {
"id": "active_deal_count",
"type": "integer"
},
"active_voucher_count": {
"id": "active_voucher_count",
"type": "integer"
}
}
},
"_type": {
"id": "_type",
"type": "string"
},
"pepper_url": {
"id": "pepper_url",
"type": "string"
},
"merchant_external_url": {
"id": "merchant_external_url",
"type": "string"
},
"header_description": {
"id": "header_description",
"type": "string"
},
"hero_banner_smartphone_url": {
"id": "hero_banner_smartphone_url",
"type": "string"
},
"hero_banner_tablet_url": {
"id": "hero_banner_tablet_url",
"type": "string"
},
"icon_list_url": {
"id": "icon_list_url",
"type": "string"
},
"icon_detail_url": {
"id": "icon_detail_url",
"type": "string"
},
"referral_campaigns_promotion": {
"$ref": "merchantReferralCampaignsPromotion.json"
}
},
"required": [
"merchant_id",
"name",
"url_name",
"header_description",
"_type"
]
}
HTTP status code 404
Possible error messages:
Code | Name | Information |
---|---|---|
20001 | ERROR_MERCHANT_NOT_FOUND | Merchant not found. |
Body
Type: application/json
Schema: Show
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"data": {
"id": "data",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"additional_data": {
"id": "additional_data",
"type": "object"
},
"messages": {
"id": "messages",
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"code": {
"type": "integer"
},
"message": {
"type": "string"
}
}
}
]
}
},
"validation": {
"id": "validation",
"oneOf": [
{
"type": "object"
},
{
"type": "array"
}
]
},
"cursor": {
"id": "cursor",
"type": "object",
"properties": {
"before": {
"type": "string"
},
"after": {
"type": "string"
}
}
}
},
"required": [
"messages",
"validation"
]
}