v1

latestOpenAPI 3.1.02026-07-24111290748.0 KB
Views

List view's items

List view's items, paginated, and ordered by the attribute specified in the data of view.

get/api/views/{view_id}/items

Path parameters

view_idinteger required

The ID of the view to list items from.

Query parameters

cursorstring
Example:MTU5MzE2NDMwMDAwMDAwMC1mYWxzZQ==

Value indicating your position in the list of all the view's items. If omitted, the first items of the list will be returned.

direction'prev' | 'next' nullable
Example:next
  • prev returns items before the cursor.
  • next returns items after the cursor.
ignored_iteminteger
Example:4742

ID of an item to ignore in the list of returned items.

limitinteger
Example:50

Maximum number of items to return.

order_by'created_datetime:asc' | 'created_datetime:desc' | 'updated_datetime:asc' | 'updated_datetime:desc' | 'last_message_datetime:asc' | 'last_message_datetime:desc' | 'last_received_message_datetime:asc' | 'last_received_message_datetime:desc' | 'closed_datetime:asc' | 'closed_datetime:desc' | 'snooze_datetime:asc' | 'snooze_datetime:desc' | 'priority:asc' | 'priority:desc'

Attribute used to order views.

Response

A list of view's items.

Example response

{
  "data": [
    {
      "language": "fr",
      "customer": {
        "id": 7,
        "email": "sender@gorgias.io",
        "name": "Sender Doe",
        "firstname": "Sender",
        "lastname": "Doe"
      },
      "assignee_user": {
        "id": 4,
        "email": "agent-smith@gorgias.io",
        "name": "John Smith",
        "firstname": "John",
        "lastname": "Smith"
      },
      "assignee_team": {
        "id": 8,
        "name": "Tech team",
        "decoration": {
          "emoji": {
            "colons": ":wink:",
            "emoticons": [
              ";)",
              ";-)"
            ],
            "id": "wink",
            "name": "Winking Face",
            "native": "😉",
            "skin": null,
            "unified": "1f609"
          }
        }
      },
      "subject": "Refund request",
      "meta": {},
      "tags": [
        {
          "id": 5,
          "name": "refund",
          "uri": "https://gorgias.gorgias.io/api/tags/5/"
        }
      ]
    }
  ],
  "meta": {
    "current_cursor": "MTU5MzE2NDMwMDAwMDAwMC1mYWxzZQ==",
    "next_items": "/api/views/10/items/?direction=next&ignored_item=1781&cursor=MTU5MzA5ODYyNDAwMDAwMC1mYWxzZQ%3D%3D",
    "prev_items": "/api/views/10/items/?direction=prev&cursor=MTU5MzEyMTk4MTAwMDAwMC1mYWxzZQ%3D%3D&ignored_item=1743"
  }
}