List
List of emails with paging
POST https://do.workzeal.com/common/list/paging/24
Path Parameters
/24*
Int
Code of the module № 24 is Mail
Query Parameters
columns
String
List of columns
sorting_direction
Int
0: ASC 1: DSC
sorting_column
String
Column for sorting
page
Int
Page number
records_onpage
Int
Records on one page but not more than 500
Headers
Authorization*
String
Bearer XXXXX-XXXXXXX-XXXXX
Content-Type*
String
application/json
Answer
{
"status": "success",
"error": "",
"code": null,
"rows": 1,
"pages": 1,
"page": 1,
"value": "[
{"id":1,"subject":"Happy!"}
]"Example
curl --location --request
POST 'https://do.workzeal.com/common/list/paging/24
?records_onpage=50
&sorting_column=id
&user_ids=37
&sorting_direction=1
&date1=2021-01-01
&date2=2021-12-31
&page=1
&columns=id,subject,from,from_address,to,to_address,small_part_of_body' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer XXXXXX.XXXXXXX.XXXXXX' \
--data-raw ''<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://do.workzeal.com/common/list/paging/24
?records_onpage=50
&sorting_column=id
&user_ids=37
&sorting_direction=1
&date1=2021-01-01
&date2=2021-12-31
&page=1
&columns=id,subject,from,from_address,to,to_address,small_part_of_body',
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 XXXXX.XXXXXX.XXXXXX'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;var request = require('request');
var options = {
'method': 'POST',
'url': 'https://do.workzeal.com/common/list/paging/24
?records_onpage=50
&sorting_column=id
&user_ids=37
&sorting_direction=1
&date1=2021-01-01
&date2=2021-12-31
&page=1
&columns=id,subject,from,from_address,to,to_address,small_part_of_body',
'headers': {
'Content-Type': 'application/json',
'Authorization': 'Bearer XXXXXXX.XXXXXXX.XXXXXXX'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});Columns
id
Letter ID
from
From name
from_address
From address
to
To name
to_address
To address
cc
Copy
bcc
Hide copy
subject
Subject
date
Date
user_name
Username, owned an account
company_name
Client name
company_id
Client IS
contact_id
Contact ID
contact
Contact name
company_type_id
Client's type ID
company_type
Client's type
company_category_id
Client's category ID
company_category
Client's category
company_status_id
Client's status ID
company_status
Client's status
deal
Name of a deal that letter is related to
deal_id
Deal ID
message_id
Unique Message ID
attachment_flag
1: The letter has attachment 0: Has not
small_part_of_body
First 255 characters of the letter
body
Email content in HTML format ⚡️ It is not recommended to specify this column in large list queries. When possible, retrieve the position of a single email by ID. Filter parameter id=xx
Filtering
Columns for filtering
?id=1
?segment=1
?user_ids=1 0r ?user_ids=1,3,5
?date1=2021-12-01
?date2=2021-12-31
?subject=Hapy!
?to_address="[email protected]"
?from_address="[email protected]"
?company_id=1
?deal_id=1
?page=1
// id - Letter ID
// segment - Message folder ID (see description)
// user_ids - User ID whose accounts need to be viewed
// date1 - From date (YYYY.MM.DD format)
// date2 - To date (YYYY.MM.DD format)
// subject - Message subject
// to_address - Email address to
// from_address - Email address from (all emails for a deal)
// company_id - Counterparty ID (all emails for a company)
// deal_id - Deal ID
// page - Page number to retrieve
Users⚡️user_ids
Коды пользователей можно найти в раздели - пользоватли
⚡️segment
Inbox
Sent
Drafts
Trash
Spam
More
Ready-made custom filters
?user_filter_ids = 1
or
?user_filter_ids=1,2
Filters⚡️ user_filter_ids
Filter codes can be found in the filters section