Get all ambassadors (widget)
Headers
-
The domain of the user
Query parameters
-
page integer
page number
-
per_page integer
number of items per page
-
filter[is_absent] boolean
filter by is_absent
-
sort string
Sort by a specific field( for example: sort=distance&latitude=48.8566&longitude=2.3522)
Values are
distance
orlast_action_date
. -
latitude number
latitude: required to sort by distance
-
longitude number
longitude: required to sort by distance
GET /widget/ambassadors
curl \
-X GET https://domain.tld/api/v2/widget/ambassadors \
-H "X-Popsell-Domain: example.com"
Response examples (200)
{
"current_page": 42,
"data": [
{
"id_ambassador": 42,
"image": "string",
"full_name": "string",
"username": "string",
"description": "string",
"status": 42,
"availability": "string",
"unavailable": true,
"is_absent": true,
"absent_msg": "string",
"fb_account": "string",
"twitter_account": "string",
"instagram_account": "string",
"linkedIn_account": "string",
"youtube_account": "string",
"online": true,
"last_action_date": "string",
"location": "Paris"
}
],
"first_page_url": "string",
"from": 42,
"last_page": 42,
"last_page_url": "string",
"links": [
{
"url": "string",
"label": "string",
"active": true
}
],
"next_page_url": "string",
"path": "string",
"per_page": 42,
"prev_page_url": "string",
"to": 42,
"total": 42
}
Response examples (401)
{
"message": "Unauthorized."
}