Get all chatrooms of an ambassador

GET /chat/ambassadors/{ambassador}/chatrooms

Get all chatrooms of an ambassador and of his guest accounts

Headers

  • X-Popsell-Brand integer Required

    The id of the target brand

Path parameters

  • ambassador integer Required

    The ambassador id

Query parameters

  • sort string

    Sort chatrooms by one of the following fields

    Value is last_action_date.

  • filter[last_action_date_before] string

    Retrieve chatrooms with last action date before a date

  • filter[archived] boolean

    Retrieve archived chatrooms

  • filter[commented] string

    Retrieve commented chatrooms

    Values are commented or not_commented.

  • filter[flag] integer

    Retrieve flagged chatrooms

    Values are 1 or 2.

  • filter[type_chatroom] string

    Retrieve chatrooms by type

    Values are 0 or 7.

Responses

  • 200 application/json

    Returns the chatrooms of an ambassador

    Hide response attributes Show response attributes object
    • current_page integer(int32)
    • data array[object]

      Additional properties are allowed.

    • first_page_url string
    • from integer(int32)
    • last_page integer(int32)
    • last_page_url string
    • next_page_url string
    • path string
    • per_page integer(int32)
    • prev_page_url string(nullable)
    • to integer(int32)
    • total integer(int32)
  • 401 application/json

    Unauthorized.

    Hide response attribute Show response attribute object
    • message string
  • 403

    Forbidden - You don't have permission to access this route

GET /chat/ambassadors/{ambassador}/chatrooms
curl \
 --request GET 'https://domain.tld/api/v2/chat/ambassadors/{ambassador}/chatrooms' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "X-Popsell-Brand: 42"
Response examples (200)
{
  "current_page": 42,
  "data": [
    {}
  ],
  "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."
}