Getting template
Method: POST
Url: https://test.ninjalender.online/template/get
Headers:
header_key
content
Content-Type:
application/json;
Authorization
Bearer {{Token}}
Ninja-Lang
locale to witch we will translate titles (pl_PL, en_GB)
Where {{Token}} - token obtained during authorization
Request body:
Key
Type
Required
Description
params
JSON.object
+
Request parameters (in this case, an empty object)
Params:
Key
Type
Required
Description
id
int
+
Id of template
Response:
Key
Type
Description
code
int
Response code
message
string
Response message
data
JSON.object
Response data
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 where the key is the name of requisite, and in the values - description of requisite
Requisite example from body
Key
Type
Description
id
int
id of requisite
kind
int
Kind of requisite, defines data type for requisite value:
0 – string
1 – text
2 – number
3 – date
4 – boolean
5 – handbook(in the case of this kind, the system will expect, as the value requisite, one of the elements from the variants array) 6 - phone in international format 7 - valid email address
label
string
requisite name
required
boolean
is requisite required
variants
JSON.array
list of variants for handbook kind requisites
description
string
description of requisite
title
string
requisite title
Variants array example (from requisite)
Key
Type
Description
label
string
variant label
title
string
variants translated title
Request example:
Response example:
Success:
Error:
Error list:
Key
Message
-96
invalid key
-97
invalid token
-98
expired token
-99
system error
-100
access denied
-1020201
Params is required
-1020202
Id is blank
-1020203
Template not found
Last updated