Шаблоны оформления карт API 1.7.0
Методы API для работы с разделом «Шаблоны оформления карт».
Базовый путь: https://{IP_контроллера}/api/v1.
Версия описания API: 1.7.0.
Примеры используют placeholder-значения для паролей, token, UUID, адресов и секретов. Перед выполнением запроса замените их на значения вашего контроллера.
Методы раздела
| Метод | Путь |
|---|---|
GET | /card_design_template |
POST | /card_design_template |
GET | /card_design_template/{uuid} |
PUT | /card_design_template/{uuid} |
DELETE | /card_design_template/{uuid} |
GET /card_design_template
Раздел: Шаблоны оформления карт.
Возвращает список шаблонов оформления карт.
Параметры и ответы по OpenAPI
{
"description": "Returns list of card design template",
"responses": {
"200": {
"description": "Successfully returned specified page of registered card design template",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"uuid",
"name",
"type",
"identifierType"
],
"properties": {
"uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"identifierType": {
"type": "string"
},
"style": {
"type": "object"
},
"items": {
"type": "array",
"items": {
"type": "object"
}
}
},
"additionalProperties": false
}
}
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}
Примеры по OpenAPI
Сформированы по схеме контроллера; значения полей необходимо заменить.
Пример запроса
curl -k -X GET "https://{IP_контроллера}/api/v1/card_design_template" \
-H "Authorization: Bearer <token>"
Пример ответа
[
{
"uuid": "string",
"name": "string",
"type": "string",
"identifierType": "string",
"style": {},
"items": [
{}
]
}
]
POST /card_design_template
Раздел: Шаблоны оформления карт.
Добавляет шаблон оформления карты.
Параметры и ответы по OpenAPI
{
"description": "Add new card design template to system",
"requestBody": {
"description": "Creates new card design template in database",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"name",
"type",
"identifierType"
],
"properties": {
"uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"identifierType": {
"type": "string"
},
"style": {
"type": "object"
},
"items": {
"type": "array",
"items": {
"type": "object"
}
}
},
"additionalProperties": false
}
}
}
},
"responses": {
"201": {
"description": "card design template has been successfully added",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"409": {
"description": "card design template already exists",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}
Примеры по OpenAPI
Сформированы по схеме контроллера; значения полей необходимо заменить.
Пример запроса
curl -k -X POST "https://{IP_контроллера}/api/v1/card_design_template" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"name": "string",
"type": "string",
"identifierType": "string",
"style": {},
"items": [
{}
]
}'
Пример тела запроса
{
"uuid": "string",
"name": "string",
"type": "string",
"identifierType": "string",
"style": {},
"items": [
{}
]
}
Пример ответа
{
"success": false,
"message": "string",
"data": {}
}
GET /card_design_template/{uuid}
Раздел: Шаблоны оформления карт.
Возвращает указанный шаблон оформления карты.
Параметры и ответы по OpenAPI
{
"description": "Get specified card design template",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "Got specified card design template",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"name",
"type",
"identifierType"
],
"properties": {
"uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"identifierType": {
"type": "string"
},
"style": {
"type": "object"
},
"items": {
"type": "array",
"items": {
"type": "object"
}
}
},
"additionalProperties": false
}
}
}
},
"400": {
"description": "Invalid UUID",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Specified card design template was not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}
Примеры по OpenAPI
Сформированы по схеме контроллера; значения полей необходимо заменить.
Пример запроса
curl -k -X GET "https://{IP_контроллера}/api/v1/card_design_template/{uuid}" \
-H "Authorization: Bearer <token>"
Пример ответа
{
"uuid": "string",
"name": "string",
"type": "string",
"identifierType": "string",
"style": {},
"items": [
{}
]
}
PUT /card_design_template/{uuid}
Раздел: Шаблоны оформления карт.
Изменяет шаблон оформления карты.
Параметры и ответы по OpenAPI
{
"description": "Modify card design template",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"uuid",
"name",
"type",
"identifierType"
],
"properties": {
"uuid": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[089abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"identifierType": {
"type": "string"
},
"style": {
"type": "object"
},
"items": {
"type": "array",
"items": {
"type": "object"
}
}
},
"additionalProperties": false
}
}
}
},
"responses": {
"200": {
"description": "card design template successfully modified",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Invalid UUID",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Specified card design template does not exist",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}
Примеры по OpenAPI
Сформированы по схеме контроллера; значения полей необходимо заменить.
Пример запроса
curl -k -X PUT "https://{IP_контроллера}/api/v1/card_design_template/{uuid}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"uuid": "string",
"name": "string",
"type": "string",
"identifierType": "string",
"style": {},
"items": [
{}
]
}'
Пример тела запроса
{
"uuid": "string",
"name": "string",
"type": "string",
"identifierType": "string",
"style": {},
"items": [
{}
]
}
Пример ответа
{
"success": false,
"message": "string",
"data": {}
}
DELETE /card_design_template/{uuid}
Раздел: Шаблоны оформления карт.
Удаляет шаблон оформления карты.
Параметры и ответы по OpenAPI
{
"description": "Delete card design template",
"parameters": [
{
"in": "path",
"name": "uuid",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "card design template successfully deleted",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"400": {
"description": "Invalid UUID",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"404": {
"description": "Specified card design template does not exist",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
},
"500": {
"description": "Something went wrong. It seems there is a bug on server",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"success"
],
"properties": {
"success": {
"type": "boolean",
"example": false
},
"message": {
"type": "string"
},
"data": {
"type": "object"
}
}
}
}
}
}
}
}
Примеры по OpenAPI
Сформированы по схеме контроллера; значения полей необходимо заменить.
Пример запроса
curl -k -X DELETE "https://{IP_контроллера}/api/v1/card_design_template/{uuid}" \
-H "Authorization: Bearer <token>"
Пример ответа
{
"success": false,
"message": "string",
"data": {}
}