List

Note

Keep in mind: the items in the list are returned according to the access level of the token owner.

About rights: access rights

List of deals with pagination

POST https://do.workzeal.com/common/list/paging/20

Path Parameters

Name Type Description
/20* Int Module code

Query Parameters

Name Type Description
columns* String List of columns
records_onpage Int Records per page, but no more than 500
page Int Page number
sorting_column String Sorting column
sorting_direction Int Sorting: 0 Asc, 1 Desc

Headers

Name Type Description
Authorization* String Bearer XXXXX-XXXXXXX-XXXXX
Content-Type* String application/json
{
  "status": "success",
  "error": "",
  "code": null,
  "rows": 1,
  "pages": 1,
  "page": 1,
  "value": "[
       {"id":1,"name":"Sale"}
  ]"
{
    // Response
}

Example

curl --location --request
POST 'https://do.workzeal.com/common/list/paging/20
?columns=id,name,type,status,sum
&records_onpage=1000
&sorting_direction=0
&sorting_column=id
&user_ids=37
&type_id=1
&date1=2021-01-01&date2=2022-12-31' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer XXXXX.XXXXX.XXXXX' \
--data-raw ''
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://do.workzeal.com/common/list/paging/20
  ?columns=id,name,type,status,sum
  &records_onpage=1000
  &sorting_direction=0
  &sorting_column=id
  &user_ids=37
  &type_id=1
  &date1=2021-01-01
  &date2=2022-12-31',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer XXXXXX.XXXXXX.XXXXX'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
// Some code

Filtering

Note

Note: you can use 2 filtering methods. Standard filtering by columns. Or by the ID of a saved filter that was created inside the application; for details, see filters in the application ⚡️

Filters are added to the request as query parameters and can be combined with each other:

  • company_id, client ID, only deals of one company: ?company_id=368132
  • id, deal ID: ?id=12345
  • user_ids, IDs of responsible persons, one or several: ?user_ids=37 or ?user_ids=1,3,5
  • type_id, deal type ID: ?type_id=1
  • status_id, deal status (stage) ID: ?status_id=5
  • date1, from date (format YYYY-MM-DD): ?date1=2026-01-01
  • date2, to date (format YYYY-MM-DD): ?date2=2026-12-31
  • tags, comma-separated tags: ?tags=vip,wholesale

Example: deals of one client:

curl --location --request POST 'https://do.workzeal.com/common/list/paging/20?company_id=368132&columns=id,name,status,sum' \
--header 'Authorization: Bearer XXXX-XXXXXXX-XXXXXXX' \
--header 'Content-Type: application/json' \
--data-raw 'null'

Note

This is a common pattern: pagination and the company_id, deal_id, user_ids, date1/date2, and tags filters work the same way in all modules of the universal list common/list/paging/{module}. Module codes: 1 for clients, 2 for tasks, 4 for documents, 5 for finance, 6 for sales, 20 for deals, 21 for products, 24 for email, 50 for the activity log.

Note

⚡️type_id ⚡️status_id

The codes can be found in the Directories section

Note

⚡️user_ids

User codes can be found in the Users section

Columns

Note

Note: columns with the company_ prefix contain information about the client, which can be either a legal entity or an individual. For a legal entity, company_name is the company name, and for an individual it is the individual's full name.

Name Description
id Deal ID
name Name
sum Amount
type_id Deal type code
type Deal type
status_id Deal status code
status Deal status
company_id Client code
company_name Client name
company_type Client type
company_status Client status
company_category Client category
company_tax_id Tax ID from the company's details list
company_country Client country
company_region Client region
company_city Client city
company_url Client website
user_id Code of the person responsible for the deal
user_name Person responsible for the deal
note Deal note
ADD_ Custom fields

Custom fields

Previous
Next