Documentation

crm.item.list

Scope: catalog Permissions to execute: for all

Description and parameters

crm.item.list({entityTypeId: number, order: ?{} = null, filter: ?{} = null, start: ?number = 0})

Method returns array with SPA items with entityTypeId.

{
    "items": []
}

where each array element structure is similar to the response for query crm.item.get.

Parameters

Parameters Description
entityTypeIdSPA ID.
selectArray with field names for selection.
orderList for sorting, where key - field, value - ASC or DESC.
filterList for filtering. Filter example are below.
startStart for page navigation.

Processing of select

Parameter select can contain only field names for this smart process or '*'.

By default, retrieves all fields. Similar behaviour continues, if field list has '*'.


Examples:

  • Retrieves all fields.
    {
        "select": ["*", "title", "id"],
    }
  • Retrieves only the field id. Field names must be passed directly or via '*'.
    {
        "select": ["id", "uf_*"],
    }
  • Retrieves id, title and categoryId fields.
    {
        "select": ["id", "title", "categoryId"],
    }
  • Filter examples

    1. Find items with responsible user with ID 4
      {
          "filter": {
              "=assignedById": "4"
          }
      }
      
    2. Find items, located at final stages, available for all or with specific responsible user with ID 4
      {
          "filter": {
              "@stageId": ["DT132_17:SUCCESS", "DT132_17:FAIL"],
              "0": {
                  "logic": "OR",
                  "0": {
                      "=assignedById": 4             
                  },
                  "1": {
                      "=opened": "Y"
                  } 
              }
          }
      }
      
    3. Find items with completed user field with code ufCrm24_1616150749
      {
          "filter": {
              "!=ufCrm24_1616150749": ""
          }   
      }
      
    4. Find items, created, updated or moved within the period from 19.03 to 22.03
      {
          "filter": {
              ">createdTime":"2020-03-19T02:00:00+02:00",
              ">movedTime":"2020-03-19T02:00:00+02:00",
              ">updatedTime":"2020-03-19T02:00:00+02:00",
              "<createdTime":"2020-03-22T02:00:00+02:00",
              "<movedTime":"2020-03-22T02:00:00+02:00",
              "<updatedTime":"2020-03-22T02:00:00+02:00"
          }
      }
      
    5. Find items, available, updated, created or moved within the period from 19.03 to 22.03
      {
          "filter": {
              "logic":"OR",
              "0":{
                    ">createdTime":"2020-03-19T02:00:00+02:00",
                    "<createdTime":"2020-03-22T02:00:00+02:00"
              },
              "1":{
                    ">movedTime":"2020-03-19T02:00:00+02:00",
                    "<movedTime":"2020-03-22T02:00:00+02:00"
              },
              "2":{
                    ">updatedTime":"2020-03-19T02:00:00+02:00",
                    "<updatedTime":"2020-03-22T02:00:00+02:00"
              }
          }
      }
      


© «Bitrix24», 2001-2024