Getting the list of templates
Method: POST
Url: https://test.ninjalender.online/template/list
Headers:
header_key
content
Content-Type:
application/json;
Authorization
Bearer {{Token}}
Where {{Token}} - token obtained during authorization
Request body:
Key
Type
Required
Description
params
JSON.object
+
Request parameters
Params:
Key
Type
Required
Description
fields
JSON.array
-
A list of fields for serialization (which data of each template will be returned upon response). The entire list is provided in a table with an analysis of the answer. In case of absence, only id, label, description will be returned
Response:
Key
Type
Description
code
int
Response code
message
string
Response message
data
JSON.object
Response data
log_key
int
ID for current request log
data:
Key
Type
Description
id
int
Id of template
label
string
name of template
description
string
description of template
title
string
title of template
body
json.object
list of requisites in template
Request example:
1
{
2
"params" : {}
3
}
Copied!
Response example:
Success:
1
[
2
{
3
"code": 0,
4
"message": "ok",
5
"data": [
6
{
7
"id": 3,
8
"label": "1_8_test",
9
"description": null
10
},
11
{
12
"id": 1,
13
"label": "first_template",
14
"description": null
15
}
16
],
17
"log_key": "730"
18
}
19
]
Copied!
Error:
1
[
2
{
3
"code": -1020101,
4
"message": "Params is required",
5
"log_key": "748"
6
}
7
]
Copied!
Error list:
Key
Message
-96
invalid key
-97
invalid token
-98
expired token
-99
system error
-100
access denied
-1020101
Params is required
Last modified 1mo ago
Copy link