App
User
Get profile
Retrieve user profile
Example request
GET /app/profile HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJmaXJzdE5hbWUiOm51bGwsImxhc3ROYW1lIjpudWxsLCJzdWIiOiIxMCIsInBob25lIjpudWxsLCJkaXNjb250b1Rva2VuIjoidG9rZW4iLCJpZCI6MTAsImV4cCI6MTY0MDUyMTYyNSwiZW1haWwiOiJ1c2VyMUB1c2Vycy5jb20ifQ.MGiHSdihmETwYhn5xtwAaGspwteb8wRCu4X-z2-932j5uE7C2IsopBWGxtjGm5htAYwyYWIwPm4MeEvDb5-65g
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJmaXJzdE5hbWUiOiJUZXN0IiwibGFzdE5hbWUiOiJUZXN0Iiwic3ViIjoiMSIsInBob25lIjoiKzcoMDAwKTEyMy00Ni02NyIsImRpc2NvbnRvVG9rZW4iOm51bGwsImlkIjoxLCJleHAiOjE2NDA1MjE2MjYsImVtYWlsIjoiZW1haWwxQGdtYWlsLmNvbSJ9.N15yfPj5lKAMihitBaPfUqk29SHJySvXIWlNO8JlTC-z4BsnlLdtSoC9M-5pOnTB328GmM8hVmJuycCHqtxxtw
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 464
{
"id" : 1,
"phone" : "+7(000)123-46-67",
"email" : "email1@gmail.com",
"email_verified" : "1",
"first_name" : "Test",
"last_name" : "Test",
"city_id" : "9",
"points" : "220",
"banned" : "0",
"banned_verified" : "0",
"last_visit" : "2016-08-12 10:01:25",
"city" : {
"id" : 9,
"title" : "Москва"
},
"social_accounts" : [ ],
"verifications" : [ ],
"city_name" : "Москва",
"balance" : 220,
"UID" : "QWEqwe123"
}
Sign in
You can pass either 'email' or 'phone', or sign in with social account
Request fields
| Path | Type | Description |
|---|---|---|
|
|
|
|
|
Phone number |
|
|
Password |
|
|
Social ID of User. |
|
|
Social type of User. Allowed values: "vk", "ok", "fb" |
|
|
Information about User from social network. |
|
|
Token from user’s device. |
|
|
Social ID of User. |
Example request
POST /app/login HTTP/1.1
Content-Type: application/json
Host: localhost:8080
Content-Length: 57
{
"email" : "email1@gmail.com",
"password" : "1234"
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
JWT |
|
|
Disconto profile info |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 841
{
"data" : {
"id" : 1,
"phone" : "+7(000)123-46-67",
"email" : "email1@gmail.com",
"email_verified" : "1",
"first_name" : "Test",
"last_name" : "Test",
"city_id" : "9",
"points" : "220",
"banned" : "0",
"banned_verified" : "0",
"last_visit" : "2016-08-12 10:01:25",
"city" : {
"id" : 9,
"title" : "Москва"
},
"social_accounts" : [ ],
"verifications" : [ ],
"city_name" : "Москва",
"balance" : 220,
"UID" : "QWEqwe123"
},
"token" : "eyJhbGciOiJIUzUxMiJ9.eyJmaXJzdE5hbWUiOiJUZXN0IiwibGFzdE5hbWUiOiJUZXN0Iiwic3ViIjoiMSIsInBob25lIjoiKzcoMDAwKTEyMy00Ni02NyIsImRpc2NvbnRvVG9rZW4iOm51bGwsImlkIjoxLCJleHAiOjE2NDA1MjE2MjYsImVtYWlsIjoiZW1haWwxQGdtYWlsLmNvbSJ9.N15yfPj5lKAMihitBaPfUqk29SHJySvXIWlNO8JlTC-z4BsnlLdtSoC9M-5pOnTB328GmM8hVmJuycCHqtxxtw"
}
Counters
Retrieve count of receipts available for processing
Example request
GET /app/receipts/count HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJmaXJzdE5hbWUiOm51bGwsImxhc3ROYW1lIjpudWxsLCJzdWIiOiIxMCIsInBob25lIjpudWxsLCJkaXNjb250b1Rva2VuIjoidG9rZW4iLCJpZCI6MTAsImV4cCI6MTY0MDUyMTYyNSwiZW1haWwiOiJ1c2VyMUB1c2Vycy5jb20ifQ.MGiHSdihmETwYhn5xtwAaGspwteb8wRCu4X-z2-932j5uE7C2IsopBWGxtjGm5htAYwyYWIwPm4MeEvDb5-65g
Host: localhost:8080
Response fields
| Path | Type | Description |
|---|---|---|
|
|
Count of available for processing receipts |
Example response
HTTP/1.1 200 OK
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJmaXJzdE5hbWUiOm51bGwsImxhc3ROYW1lIjpudWxsLCJzdWIiOiIxMCIsInBob25lIjpudWxsLCJkaXNjb250b1Rva2VuIjoidG9rZW4iLCJpZCI6MTAsImV4cCI6MTY0MDUyMTYyNSwiZW1haWwiOiJ1c2VyMUB1c2Vycy5jb20ifQ.MGiHSdihmETwYhn5xtwAaGspwteb8wRCu4X-z2-932j5uE7C2IsopBWGxtjGm5htAYwyYWIwPm4MeEvDb5-65g
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 17
{
"count" : 0
}
Processed by user count
Example request
GET /app/history/count HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJmaXJzdE5hbWUiOm51bGwsImxhc3ROYW1lIjpudWxsLCJzdWIiOiIxMCIsInBob25lIjpudWxsLCJkaXNjb250b1Rva2VuIjoidG9rZW4iLCJpZCI6MTAsImV4cCI6MTY0MDUyMTYyNSwiZW1haWwiOiJ1c2VyMUB1c2Vycy5jb20ifQ.MGiHSdihmETwYhn5xtwAaGspwteb8wRCu4X-z2-932j5uE7C2IsopBWGxtjGm5htAYwyYWIwPm4MeEvDb5-65g
Host: localhost:8080
Response fields
| Path | Type | Description |
|---|---|---|
|
|
Number of receipts, processed by current user |
Example response
HTTP/1.1 200 OK
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJmaXJzdE5hbWUiOm51bGwsImxhc3ROYW1lIjpudWxsLCJzdWIiOiIxMCIsInBob25lIjpudWxsLCJkaXNjb250b1Rva2VuIjoidG9rZW4iLCJpZCI6MTAsImV4cCI6MTY0MDUyMTYyNiwiZW1haWwiOiJ1c2VyMUB1c2Vycy5jb20ifQ.3WhhNo6hXxlWUbUA0g1xuBm04S2lAVQ9_mbvpQmTJp1q36Fh4EqCA65N-DYZp_GKbz3xcR2wf9PqXXj0wwoAIA
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 17
{
"count" : 2
}
History
Retrieve single history item by id
Path parameters
| Parameter | Description |
|---|---|
|
Id of the history |
Example request
GET /app/history/1 HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJmaXJzdE5hbWUiOm51bGwsImxhc3ROYW1lIjpudWxsLCJzdWIiOiIxMCIsInBob25lIjpudWxsLCJkaXNjb250b1Rva2VuIjoidG9rZW4iLCJpZCI6MTAsImV4cCI6MTY0MDUyMTYyNSwiZW1haWwiOiJ1c2VyMUB1c2Vycy5jb20ifQ.MGiHSdihmETwYhn5xtwAaGspwteb8wRCu4X-z2-932j5uE7C2IsopBWGxtjGm5htAYwyYWIwPm4MeEvDb5-65g
Host: localhost:8080
Response fields
| Path | Type | Description |
|---|---|---|
|
|
Status of review(1-accepted, 2-rejected, 3-filled) |
|
|
If file was rejected, rejectStatus contains title - reason of rejection |
|
|
Id of reject-status |
|
|
Date of history-creation |
|
|
True if it was forced review |
|
|
Date of history-update |
|
|
Points, that user received for receipt-review |
|
|
Id of the history |
|
|
Id of reviewed receipt |
|
|
Review-results |
|
|
Id of the reviewer |
|
|
Photos(links) |
Example response
HTTP/1.1 200 OK
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJmaXJzdE5hbWUiOm51bGwsImxhc3ROYW1lIjpudWxsLCJzdWIiOiIxMCIsInBob25lIjpudWxsLCJkaXNjb250b1Rva2VuIjoidG9rZW4iLCJpZCI6MTAsImV4cCI6MTY0MDUyMTYyNiwiZW1haWwiOiJ1c2VyMUB1c2Vycy5jb20ifQ.3WhhNo6hXxlWUbUA0g1xuBm04S2lAVQ9_mbvpQmTJp1q36Fh4EqCA65N-DYZp_GKbz3xcR2wf9PqXXj0wwoAIA
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 2428
{
"id" : 1,
"userId" : 10,
"receiptId" : 3,
"checkedStatus" : 1,
"reviewResults" : "{\"id\":3,\"rejected\":false,\"rejectedQuestionKey\":null,\"questionAnswers\":[{\"key\":\"receipt\",\"body\":\"Это чек?\",\"batch\":1,\"booleanAnswer\":true,\"filledInfo\":null},{\"key\":\"readable\",\"body\":\"Информация на чеке читаема?\",\"batch\":2,\"booleanAnswer\":true,\"filledInfo\":null},{\"key\":\"modification\",\"body\":\"В чеке подрисованы/перерисованы цифры или названия товаров?\",\"batch\":3,\"booleanAnswer\":false,\"filledInfo\":null},{\"key\":\"one_photo\",\"body\":\"На фото один чек?\",\"batch\":4,\"booleanAnswer\":true,\"filledInfo\":null},{\"key\":\"photo\",\"body\":\"Чек сфотографирован полностью?\",\"batch\":5,\"booleanAnswer\":true,\"filledInfo\":null},{\"key\":\"brands\",\"body\":\"В чеке есть продукция Dior/Pepsi?\",\"batch\":6,\"booleanAnswer\":true,\"filledInfo\":null},{\"key\":\"productCount\",\"body\":\"Количество товара не меньше указанного?\",\"batch\":8,\"booleanAnswer\":true,\"filledInfo\":null},{\"key\":\"cities\",\"body\":\"Чек из города Moscow/Saint Petersburg?\",\"batch\":9,\"booleanAnswer\":true,\"filledInfo\":null},{\"key\":\"receipt-type\",\"body\":\"Укажите тип чека\",\"batch\":10,\"booleanAnswer\":null,\"filledInfo\":{\"answer\":\"qr\"}},{\"key\":\"products\",\"body\":\"Укажите количество товаров\",\"batch\":11,\"booleanAnswer\":null,\"filledInfo\":{\"counts\":[{\"name\":\"product1\",\"count\":1,\"id\":8}]}},{\"key\":\"products_with_count_and_subtotals\",\"body\":\"Укажите количество и суммарную цену товаров\",\"batch\":12,\"booleanAnswer\":null,\"filledInfo\":{\"counts_and_subtotals\":[{\"name\":\"Ketchup Torchyn Lahidnyi\",\"count\":3,\"id\":4,\"subtotal\":39.71}]}}],\"receiptDate\":\"22.11.2016\",\"receiptTime\":\"09:00\",\"receiptNumber\":null,\"sum\":30,\"coins\":35,\"eklz\":null,\"kpkCode\":null,\"kpkValue\":null,\"inn\":null,\"fn\":\"8712000101133561\",\"fd\":\"175152\",\"fpd\":\"738084474\"}",
"rejectStatusId" : null,
"forced" : null,
"points" : 1.2,
"createdAt" : 1.640348826015E9,
"updatedAt" : 1.640348826015E9,
"rejectStatus" : null,
"photos" : [ "https://cdn.apmcheck.ru/" ]
}
Retrieve history
Request parameters
| Parameter | Description |
|---|---|
|
Number of page. Optional. Default is 0; |
|
Size of page. Optional. Default is 10. |
|
Field of receipt, by which you want to sort elements and direction, separated by coma (Example: sort='createdAt,desc'). Optional. Default is: by field 'createdAt', direction - desc. |
Example request
GET /app/history?page=0&size=10&sort=createdAt%2Cdesc HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJmaXJzdE5hbWUiOm51bGwsImxhc3ROYW1lIjpudWxsLCJzdWIiOiIxMCIsInBob25lIjpudWxsLCJkaXNjb250b1Rva2VuIjoidG9rZW4iLCJpZCI6MTAsImV4cCI6MTY0MDUyMTYyNSwiZW1haWwiOiJ1c2VyMUB1c2Vycy5jb20ifQ.MGiHSdihmETwYhn5xtwAaGspwteb8wRCu4X-z2-932j5uE7C2IsopBWGxtjGm5htAYwyYWIwPm4MeEvDb5-65g
Host: localhost:8080
Response fields
| Path | Type | Description |
|---|---|---|
|
|
Array of elements |
|
|
Number of total pages |
|
|
Number of total existing elements |
|
|
True if this is last page, otherwise - false |
|
|
Size of one page |
|
|
Number of returned page |
|
|
Sorting characteristics, null if no sorting |
|
|
True if this is first page, otherwise - false |
|
|
Number of elements in 'content' |
|
|
Status of review(1-accepted, 2-rejected, 3-filled) |
|
|
If file was rejected, rejectStatus contains title – reason of rejection |
Example response
HTTP/1.1 200 OK
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJmaXJzdE5hbWUiOm51bGwsImxhc3ROYW1lIjpudWxsLCJzdWIiOiIxMCIsInBob25lIjpudWxsLCJkaXNjb250b1Rva2VuIjoidG9rZW4iLCJpZCI6MTAsImV4cCI6MTY0MDUyMTYyNiwiZW1haWwiOiJ1c2VyMUB1c2Vycy5jb20ifQ.3WhhNo6hXxlWUbUA0g1xuBm04S2lAVQ9_mbvpQmTJp1q36Fh4EqCA65N-DYZp_GKbz3xcR2wf9PqXXj0wwoAIA
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 896
{
"content" : [ {
"id" : 2,
"userId" : 10,
"receiptId" : 4,
"checkedStatus" : 2,
"reviewResults" : null,
"rejectStatusId" : null,
"forced" : null,
"points" : 1.2,
"createdAt" : 1.640348826043E9,
"updatedAt" : 1.640348826043E9,
"rejectStatus" : null
}, {
"id" : 1,
"userId" : 10,
"receiptId" : 3,
"checkedStatus" : 1,
"reviewResults" : null,
"rejectStatusId" : null,
"forced" : null,
"points" : 1.2,
"createdAt" : 1.640348826015E9,
"updatedAt" : 1.640348826015E9,
"rejectStatus" : null
} ],
"totalPages" : 1,
"totalElements" : 2,
"last" : true,
"first" : true,
"numberOfElements" : 2,
"sort" : [ {
"direction" : "DESC",
"property" : "id",
"ignoreCase" : false,
"nullHandling" : "NATIVE",
"ascending" : false,
"descending" : true
} ],
"size" : 10,
"number" : 0
}
Receipts
Retrieve next receipt for check
Example request
GET /app/receipts/next HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJmaXJzdE5hbWUiOm51bGwsImxhc3ROYW1lIjpudWxsLCJzdWIiOiIxMCIsInBob25lIjpudWxsLCJkaXNjb250b1Rva2VuIjoidG9rZW4iLCJpZCI6MTAsImV4cCI6MTY0MDUyMTYyNSwiZW1haWwiOiJ1c2VyMUB1c2Vycy5jb20ifQ.MGiHSdihmETwYhn5xtwAaGspwteb8wRCu4X-z2-932j5uE7C2IsopBWGxtjGm5htAYwyYWIwPm4MeEvDb5-65g
Host: localhost:8080
Response fields
| Path | Type | Description |
|---|---|---|
|
|
If true, than there is no receipt in response, for different reasons |
|
|
Questions |
|
|
If this question is reject-type, then if user’s answer is same as question’s 'rejectAnswer', than you make reject |
|
|
Id of the receipt |
|
|
Photos of the receipt |
|
|
Whether server could successfully parse QR from receipt, if true, there is no need for user to fill in QR-fields(fn, fd, fpd) |
|
|
JSON format of the receipt, received from Fiscal Service, this is not always present in response, null if couldn’t get it from the service |
|
|
Basic info about promo, should be shown to user. |
|
|
Milliseconds, left for review |
Example response
HTTP/1.1 200 OK
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJmaXJzdE5hbWUiOm51bGwsImxhc3ROYW1lIjpudWxsLCJzdWIiOiIxMCIsInBob25lIjpudWxsLCJkaXNjb250b1Rva2VuIjoidG9rZW4iLCJpZCI6MTAsImV4cCI6MTY0MDUyMTYyNSwiZW1haWwiOiJ1c2VyMUB1c2Vycy5jb20ifQ.MGiHSdihmETwYhn5xtwAaGspwteb8wRCu4X-z2-932j5uE7C2IsopBWGxtjGm5htAYwyYWIwPm4MeEvDb5-65g
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 2822
{
"qrParseSuccess" : null,
"millisLeft" : 12000000,
"promoInfo" : "This is cool promo! Please check our receipts very carefully.",
"questions" : [ {
"body" : "Это чек?",
"key" : "receipt",
"batch" : 1,
"type" : 0,
"rejectAnswer" : false,
"info" : [ ]
}, {
"body" : "Информация на чеке читаема?",
"key" : "readable",
"batch" : 2,
"type" : 0,
"rejectAnswer" : false,
"info" : [ ]
}, {
"body" : "В чеке подрисованы/перерисованы цифры или названия товаров?",
"key" : "modification",
"batch" : 3,
"type" : 0,
"rejectAnswer" : true,
"info" : [ ]
}, {
"body" : "На фото один чек?",
"key" : "one_photo",
"batch" : 4,
"type" : 0,
"rejectAnswer" : false,
"info" : [ ]
}, {
"body" : "Чек сфотографирован полностью?",
"key" : "photo",
"batch" : 5,
"type" : 0,
"rejectAnswer" : false,
"info" : [ ]
}, {
"body" : "В чеке есть продукция Dior/Pepsi?",
"key" : "brands",
"batch" : 6,
"type" : 1,
"rejectAnswer" : false,
"info" : [ ]
}, {
"body" : "Количество товара не меньше указанного?",
"key" : "productCount",
"batch" : 8,
"type" : 1,
"rejectAnswer" : false,
"info" : [ {
"id" : 7,
"name" : "Ice-cream Lasunka",
"count" : 2
}, {
"id" : 8,
"name" : "Dark Chocolate Roshen",
"count" : 3
} ]
}, {
"body" : "Чек из города Moscow/Saint Petersburg?",
"key" : "cities",
"batch" : 9,
"type" : 1,
"rejectAnswer" : false,
"info" : [ ]
}, {
"body" : "Укажите тип чека",
"key" : "receipt-type",
"batch" : 10,
"type" : 0,
"rejectAnswer" : null,
"info" : [ {
"type" : "kpk"
}, {
"type" : "product-receipt"
}, {
"type" : "qr"
} ]
}, {
"body" : "Укажите количество товаров",
"key" : "products",
"batch" : 11,
"type" : 1,
"rejectAnswer" : null,
"info" : [ {
"id" : 7,
"name" : "Ice-cream Lasunka"
}, {
"id" : 8,
"name" : "Chocolate Roshen Dark"
} ]
}, {
"body" : "Укажите количество и суммарную цену товаров",
"key" : "products_with_count_and_subtotals",
"batch" : 12,
"type" : 1,
"rejectAnswer" : null,
"info" : [ {
"id" : 6,
"name" : "Ketchup Torchyn Lahidnyi",
"multiplier" : null
}, {
"id" : 5,
"name" : "Ketchup Torchyn Shashlyck",
"multiplier" : null
} ]
} ],
"receiptId" : 3,
"photos" : [ "https://cdn.apmcheck.ru/" ],
"empty" : false
}
Refuse receipt checking
Sometimes user don’t want to continue with receipts review, for various reasons (photo is blurry etc)
Path parameters
| Parameter | Description |
|---|---|
|
Id of the receipt |
Example request
PUT /app/receipts/refuse/2 HTTP/1.1
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJmaXJzdE5hbWUiOm51bGwsImxhc3ROYW1lIjpudWxsLCJzdWIiOiIxMCIsInBob25lIjpudWxsLCJkaXNjb250b1Rva2VuIjoidG9rZW4iLCJpZCI6MTAsImV4cCI6MTY0MDUyMTYyNSwiZW1haWwiOiJ1c2VyMUB1c2Vycy5jb20ifQ.MGiHSdihmETwYhn5xtwAaGspwteb8wRCu4X-z2-932j5uE7C2IsopBWGxtjGm5htAYwyYWIwPm4MeEvDb5-65g
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJmaXJzdE5hbWUiOm51bGwsImxhc3ROYW1lIjpudWxsLCJzdWIiOiIxMCIsInBob25lIjpudWxsLCJkaXNjb250b1Rva2VuIjoidG9rZW4iLCJpZCI6MTAsImV4cCI6MTY0MDUyMTYyNSwiZW1haWwiOiJ1c2VyMUB1c2Vycy5jb20ifQ.MGiHSdihmETwYhn5xtwAaGspwteb8wRCu4X-z2-932j5uE7C2IsopBWGxtjGm5htAYwyYWIwPm4MeEvDb5-65g
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Send result
'receipt-type' should be: 'qr', 'kpk', 'product-receipt'
Request fields
| Path | Type | Description |
|---|---|---|
|
|
Id of the receipt |
|
|
Answers on questions |
|
|
Should be true if answer on some question was the same as 'rejectAnswer' |
|
|
Date on receipt |
|
|
Time on receipt |
|
|
Number of receipt |
|
|
Total sum on receipt(integer) |
|
|
Coins of total sum |
|
|
EKLZ of the receipt |
|
|
KpkCode of the receipt |
|
|
KpkValue |
|
|
INN |
|
|
FN |
|
|
FD |
|
|
FPD |
|
|
Key of question, that is the reason of rejection (approve=false in this case) |
Example request
POST /app/receipts/review HTTP/1.1
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJmaXJzdE5hbWUiOm51bGwsImxhc3ROYW1lIjpudWxsLCJzdWIiOiIxMCIsInBob25lIjpudWxsLCJkaXNjb250b1Rva2VuIjoidG9rZW4iLCJpZCI6MTAsImV4cCI6MTY0MDUyMTYyNSwiZW1haWwiOiJ1c2VyMUB1c2Vycy5jb20ifQ.MGiHSdihmETwYhn5xtwAaGspwteb8wRCu4X-z2-932j5uE7C2IsopBWGxtjGm5htAYwyYWIwPm4MeEvDb5-65g
Host: localhost:8080
Content-Length: 2555
{
"id" : 3,
"rejected" : false,
"rejectedQuestionKey" : null,
"questionAnswers" : [ {
"key" : "receipt",
"body" : "Это чек?",
"batch" : 1,
"booleanAnswer" : true,
"filledInfo" : null
}, {
"key" : "readable",
"body" : "Информация на чеке читаема?",
"batch" : 2,
"booleanAnswer" : true,
"filledInfo" : null
}, {
"key" : "modification",
"body" : "В чеке подрисованы/перерисованы цифры или названия товаров?",
"batch" : 3,
"booleanAnswer" : false,
"filledInfo" : null
}, {
"key" : "one_photo",
"body" : "На фото один чек?",
"batch" : 4,
"booleanAnswer" : true,
"filledInfo" : null
}, {
"key" : "photo",
"body" : "Чек сфотографирован полностью?",
"batch" : 5,
"booleanAnswer" : true,
"filledInfo" : null
}, {
"key" : "brands",
"body" : "В чеке есть продукция Dior/Pepsi?",
"batch" : 6,
"booleanAnswer" : true,
"filledInfo" : null
}, {
"key" : "productCount",
"body" : "Количество товара не меньше указанного?",
"batch" : 8,
"booleanAnswer" : true,
"filledInfo" : null
}, {
"key" : "cities",
"body" : "Чек из города Moscow/Saint Petersburg?",
"batch" : 9,
"booleanAnswer" : true,
"filledInfo" : null
}, {
"key" : "receipt-type",
"body" : "Укажите тип чека",
"batch" : 10,
"booleanAnswer" : null,
"filledInfo" : {
"answer" : "qr"
}
}, {
"key" : "products",
"body" : "Укажите количество товаров",
"batch" : 11,
"booleanAnswer" : null,
"filledInfo" : {
"counts" : [ {
"name" : "product1",
"count" : 1,
"id" : 8
} ]
}
}, {
"key" : "products_with_count_and_subtotals",
"body" : "Укажите количество и суммарную цену товаров",
"batch" : 12,
"booleanAnswer" : null,
"filledInfo" : {
"counts_and_subtotals" : [ {
"name" : "Ketchup Torchyn Lahidnyi",
"count" : 3,
"id" : 4,
"subtotal" : 39.71
} ]
}
} ],
"receiptDate" : "22.11.2016",
"receiptTime" : "09:00",
"receiptNumber" : null,
"sum" : 30,
"coins" : 35,
"eklz" : null,
"kpkCode" : null,
"kpkValue" : null,
"inn" : null,
"fn" : "8712000101133561",
"fd" : "175152",
"fpd" : "738084474"
}
Example response
HTTP/1.1 200 OK
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJmaXJzdE5hbWUiOm51bGwsImxhc3ROYW1lIjpudWxsLCJzdWIiOiIxMCIsInBob25lIjpudWxsLCJkaXNjb250b1Rva2VuIjoidG9rZW4iLCJpZCI6MTAsImV4cCI6MTY0MDUyMTYyNSwiZW1haWwiOiJ1c2VyMUB1c2Vycy5jb20ifQ.MGiHSdihmETwYhn5xtwAaGspwteb8wRCu4X-z2-932j5uE7C2IsopBWGxtjGm5htAYwyYWIwPm4MeEvDb5-65g
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Disputes API
Dispute
Create
Request fields
| Path | Type | Description |
|---|---|---|
|
|
Receipt UUID |
|
|
Dispute title |
|
|
Dispute details |
Example request
POST /api/disputes HTTP/1.1
Content-Type: application/json
api-key: 42a19283-31ef-41de-9dc1-3a1903e9fec1
Host: localhost:8080
Content-Length: 146
{
"receiptUuid" : "ba77bb1a-f9c3-4855-acad-69f5f990cfc2",
"question" : "Review results was incorrect",
"title" : "Please re-check receipt"
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
Receipt UUID |
|
|
Dispute ID |
|
|
Dispute status |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 107
{
"receiptUuid" : "ba77bb1a-f9c3-4855-acad-69f5f990cfc2",
"disputeId" : 1,
"disputeStatus" : "TODO"
}
Errors
Standard error-response properties
| Property-name | Description |
|---|---|
code |
Standard error code |
description |
Generic description |
localizedDescription |
More specific description, context-dependent |
requestId |
Unique request identification, by which specific request can be identified and tracked on server |
uri |
Method and url of your request |
Standard error-codes and descriptions
| Code | Standard description | HTTP status |
|---|---|---|
0001 |
Entity not found |
400 |
0018 |
Daily limit of the rejected receipts exceeded |
400 |
0010 |
Your time on review of this receipt has run out |
400 |
0006 |
Permission to this resource is requiered |
403 |
0013 |
Invalid format of files |
400 |
0011 |
You have already submitted your decision on this receipt |
400 |
0020 |
Message not readable. |
500 |
0007 |
Access denied, token is either absent, invalid, or expired |
401 |
0012 |
Invalid login-password combination |
401 |
0002 |
Invalid parameter value |
400 |
0015 |
File too large |
400 |
0008 |
Api-key invalid or absent |
401 |
0017 |
Too many requests. |
400 |
0003 |
Couldn’t parse request |
400 |
0005 |
Sorry, we have some problems with our data |
500 |
0014 |
Daily limit of the submitted receipts exceeded |
400 |
0019 |
These aren’t the Droids you’re looking for |
500 |
0009 |
Some required answers are absent |
400 |
0004 |
Oops, something went wrong |
500 |
0016 |
Promo was already ended or not started yet |
401 |
0021 |
Receipt not found. |
500 |
Services API
Processing receipt
Push arrival and reprocess receipt
Request fields
| Path | Type | Description |
|---|---|---|
|
|
Ids of receipts |
Example request
PUT /api/receipts/reprocessing/withArrival HTTP/1.1
Content-Type: application/json
Authorization: general_api_key
Host: localhost:8080
Content-Length: 25
{
"ids" : [ 1, 2, 3 ]
}
Example response
HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Trigger receipt reprocessing
Path parameters
| Parameter | Description |
|---|---|
|
Receipt id |
Request parameters
| Parameter | Description |
|---|---|
|
Admin’s id |
Example request
GET /api/receipts/processing/trigger/3?adminId=3234 HTTP/1.1
Authorization: general_api_key
Host: localhost:8080
Example response
HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Promo
Create
Request fields
| Path | Type | Description |
|---|---|---|
|
|
Name, required |
|
|
Description |
|
|
Start date, required, example "1986-04-08T12:30" |
|
|
End date, required, example "1986-04-08T12:30" |
|
|
Moderators info |
|
|
Id of the promo owner(should exist), required |
|
|
promo url |
|
|
config, required |
|
|
priority, required |
Example request
POST /api/promos HTTP/1.1
Content-Type: application/json
Authorization: general_api_key
Host: localhost:8080
Content-Length: 261
{
"promo_owner_id" : 1,
"starts_at" : "1986-04-08T12:30",
"expires_at" : "1986-04-08T12:30",
"name" : "Test Promo",
"description" : "description",
"priority" : 0,
"checkers_information" : "some text",
"promo_url" : "some url",
"config" : { }
}
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 329
{
"id" : 3,
"name" : "Test Promo",
"startsAt" : 5.13333E8,
"expiresAt" : 5.13333E8,
"description" : "description",
"promoOwnerId" : 1,
"checkersInformation" : "some text",
"promoUrl" : "some url",
"config" : "{ }",
"priority" : 0,
"createdAt" : 1.640348828856E9,
"updatedAt" : null,
"deletedAt" : null
}
Update
Path parameters
| Parameter | Description |
|---|---|
|
Id of the promo(should exist) |
Request fields
| Path | Type | Description |
|---|---|---|
|
|
Name, required |
|
|
Description |
|
|
Start date, required, example "1986-04-08T12:30" |
|
|
End date, required, example "1986-04-08T12:30" |
|
|
Moderators info |
|
|
Id of the promo owner(should exist), required |
|
|
promo url |
|
|
config, required |
|
|
priority, required |
Example request
PUT /api/promos/1 HTTP/1.1
Content-Type: application/json
Authorization: general_api_key
Host: localhost:8080
Content-Length: 261
{
"promo_owner_id" : 2,
"starts_at" : "1986-04-08T12:30",
"expires_at" : "1986-04-08T12:30",
"name" : "Test Promo",
"description" : "description",
"priority" : 0,
"checkers_information" : "some text",
"promo_url" : "some url",
"config" : { }
}
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 329
{
"id" : 1,
"name" : "Test Promo",
"startsAt" : 5.13333E8,
"expiresAt" : 5.13333E8,
"description" : "description",
"promoOwnerId" : 2,
"checkersInformation" : "some text",
"promoUrl" : "some url",
"config" : "{ }",
"priority" : 0,
"createdAt" : 1.640348825188E9,
"updatedAt" : null,
"deletedAt" : null
}
Reviews
Assign receipt to moderator
Request parameters
| Parameter | Description |
|---|---|
|
ID of the receipt |
|
ID of the user |
Example request
PUT /api/reviews/start HTTP/1.1
Authorization: general_api_key
Host: localhost:8080
Content-Type: application/x-www-form-urlencoded
receiptId=9&userId=45
Example response
HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Health check
Perform a service health-check
Retrieve service health-check
Example request
GET /api/health HTTP/1.1
Host: localhost:8080
Response fields
| Path | Type | Description |
|---|---|---|
|
|
Service status. Should be "ok" |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 21
{
"status" : "ok"
}
Images
Upload images
Upload any image
Request parts
| Part | Description |
|---|---|
|
Any images |
Example request
POST /api/images HTTP/1.1
Content-Type: multipart/form-data; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
api-key: 8b917c90-5d8f-4008-bbf7-01df92b3bd73
Host: localhost:8080
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=images
Content-Type: multipart/form-data
���� JFIF �� ;CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 90
�� C
�� C
�� @ @" ��
�� � } !1AQa"q2���#B��R��$3br�
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz���������������������������������������������������������������������������
�� � w !1AQaq"2�B���� #3R�br�
$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ? �[�e �x=7�)y�01��du�I�sVA�Akf,s\V���Zf��m߈,���X��QϧZ���������<��b�r���rWw*�z���c־X���S���hPC��9�5���N!Gq���jો�&�c��u�m��?���uk�km�:i�m;e�����נ��0_D���,.2�#�=A�Ϳ~�Z煡�V��o������O���p��S���|I����7�V�c��L��>DW0 �� ����Vp�BN��2��������i2���Gri$.(��x��Ś
���J&���:7�Ѓ��j���N+�N���ڳ�3���6kƾ#O
x_Tԧ�Ein�1�\)8��Ϸ rq�^�\��-#�E���C|�6q������YV���)vF���&����m{��F�5���[�4��7�,~����K�Ң�׃4�`�#U�cb2Z����^HB���nAٛ }e��_Aj��uօim�h��V��� "��x3��3������ V�R�}np� 9iw�#�h/<��@ ���m�����[���N� �i`����ц�T��Ia���
�g��;�5��v{�4V�ʳ�e\g�zW��k��mR� PѼ]����VŴ���0 0� ���FU>�:�*p^���{����&����̫;�1?.� 2/��17�_j��85�)�+x��W���M�5h��[�����E5��eA��j�G(�������IK���UF��w�|�zji��X&]�cl��F�}_����V�X���u��߮��(��� 2� �d�9� �
���7��g���/��9,�~��% ���3'��L������!����b�۰P9$�1_�0�a�����#m�Ft'�>P�k�� ��Ե��4N���K[_)t�q�\��5���%�c��%����#�x�D���i�.J62J�j� �ޣ�T����O~ ����E!�#�#��s_*��i�x�]SQ�4���� �l���3��hN�rz6+����kz}���=�����7����q� GolQRr�t��%}X��X�F���i�l6��o������+�/O�k�'P1$j���~;�oE��gׯ��42˻�ye2r}p�ο[�-�ׁ4 ��"�cc*�� �}E{l�RQ]��ٜ=�ϻe���Mц����k��R��K∅p�n���2� 3��ް�$P��*>f*�qׁ�|��^7�R2�u6��UC�� �~�Y�^Jq]��a�Ú�~_�����f��ols�(v��%���E{'�ϊ���k����*c��y�,�R��<�6�������B����}*���5�^q�*q�c���R�Vk��F��Tx�15͔1�&W�V|�@5���W�ua�>�Ц�Dێז%��{.'ץii�
��).�AU��y�o@��|�1�ܤ<to,��Y�Z.3�u�l�ŹF1�ә��=���"�Œ@�N�{4�}Ԉ"/���/��ͨ�/�[�B�r?B+��U�K�ـ�N� z�� ��g��<�c�!*�L`*2��Ũ�����o�O�?��
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
Response fields
| Path | Type | Description |
|---|---|---|
|
|
Status of the request |
|
|
Images keys on cdn |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 86
{
"urls" : [ "7dddeec8-1eb7-4a92-bf09-a094661ae532.jpeg" ],
"status" : "success"
}
Force review
Force review
Request fields
| Path | Type | Description |
|---|---|---|
|
|
ID of the receipt |
|
|
Type of receipt(qr, kpk, product-receipt), optional |
|
|
fd, optional |
|
|
fpd, optional |
|
|
fn, optional |
|
|
inn, optional |
|
|
receipt number, optional |
|
|
kpk code, optional |
|
|
Retailer id |
|
|
kpk value, optional |
|
|
date, optional |
|
|
eklz, optional |
|
|
Optional (required only if receipt’s previous sum is not null) |
|
|
ID of the reviewer |
|
|
Reject-status id. If provided, receipt will be rejected by this status, optional |
|
|
New answers, required if not a reject(rejectStatusId is not provided) |
|
|
difference count, should be present if in this promo send_result_as_difference is set to true, optional |
|
|
difference count, should be present if in this promo send_result_as_difference is set to true, optional |
|
|
difference subtotal, should be present if in this promo send_result_as_difference is set to true, optional, type - float number |
Example request
PUT /api/receipts/reviews/force HTTP/1.1
Content-Type: application/json
Authorization: general_api_key
Host: localhost:8080
Content-Length: 1051
{
"receiptId" : 8,
"reviewerId" : 435,
"total" : 250.4,
"inn" : "234235125124353415234",
"fd" : "3423423",
"fpd" : "342354235235",
"fn" : "43252352352345342",
"date" : [ 2021, 12, 24, 14, 27, 8, 715000000 ],
"receiptType" : "qr",
"eklz" : null,
"kpkCode" : null,
"kpkValue" : null,
"receiptNumber" : null,
"rejectStatusId" : null,
"retailerId" : null,
"answers" : [ {
"key" : "products",
"body" : "Укажите количество товаров",
"batch" : 11,
"booleanAnswer" : null,
"filledInfo" : {
"counts" : [ {
"name" : "product1",
"count" : 0,
"id" : 8
} ]
}
}, {
"key" : "products_with_count_and_subtotals",
"body" : "Укажите количество и суммарную цену товаров",
"batch" : 12,
"booleanAnswer" : null,
"filledInfo" : {
"counts_and_subtotals" : [ {
"name" : "Ketchup Torchyn Lahidnyi",
"count" : 8,
"id" : 4,
"subtotal" : 3.56
} ]
}
} ]
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
Standard response, updated |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1313
{
"response" : {
"uuid" : null,
"userUuid" : null,
"approved" : true,
"receiptId" : 8,
"receiptDate" : "2021-12-24T14:27:00",
"createdAt" : "2021-12-24T12:27:08Z",
"duplicate" : null,
"promoId" : 2,
"photos" : [ ],
"reviewers" : [ 435 ],
"rejectReason" : null,
"retailer" : {
"id" : null,
"name" : "Unknown",
"inn" : "234235125124353415234",
"store" : "Unknown"
},
"rejectKey" : null,
"answers" : {
"products_with_count_and_subtotals" : [ {
"name" : "Ketchup Torchyn Lahidnyi",
"count" : 8,
"id" : 4,
"subtotal" : 3.56
} ],
"products" : [ {
"name" : "product1",
"count" : 0,
"id" : 8
} ]
},
"total" : {
"sum" : 250.4,
"count" : 8,
"sum_subtotal" : 3.56
},
"rules" : null,
"rulesCount" : null,
"rulesPoints" : null,
"city" : {
"id" : -1,
"city" : "Unknown",
"region" : "Unknown",
"address" : "Unknown"
},
"promoPoints" : {
"earned" : 0,
"totalEarned" : 0,
"leftovers" : 3.56,
"leftoversInt" : 356
},
"source" : null,
"channel" : null,
"fnsReceipt" : null,
"qrString" : null,
"meta" : null,
"matchedPromos" : null
}
}
Get questions and previous credentials
Path parameters
| Parameter | Description |
|---|---|
|
ID of the receipt |
Example request
GET /api/receipts/reviews/force/8 HTTP/1.1
Authorization: general_api_key
Host: localhost:8080
Response fields
| Path | Type | Description |
|---|---|---|
|
|
Questions to answer |
|
|
Previous answers to those questions |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1022
{
"questions" : [ {
"body" : "Укажите количество товаров",
"key" : "products",
"batch" : 11,
"type" : 1,
"rejectAnswer" : null,
"info" : [ {
"id" : 7,
"name" : "Ice-cream Lasunka"
}, {
"id" : 8,
"name" : "Chocolate Roshen Dark"
} ]
}, {
"body" : "Укажите количество и суммарную цену товаров",
"key" : "products_with_count_and_subtotals",
"batch" : 12,
"type" : 1,
"rejectAnswer" : null,
"info" : [ {
"id" : 6,
"name" : "Ketchup Torchyn Lahidnyi",
"multiplier" : null
}, {
"id" : 5,
"name" : "Ketchup Torchyn Shashlyck",
"multiplier" : null
} ]
} ],
"previousCredentials" : {
"products_with_count_and_subtotals" : [ {
"name" : "Ketchup Torchyn Lahidnyi",
"count" : 3,
"id" : 4,
"subtotal" : 26.51
} ],
"products" : [ {
"name" : "product1",
"count" : 7,
"id" : 8
} ]
}
}
Auto-review
By IDs
Example request
PUT /api/receipts/review/auto HTTP/1.1
Content-Type: application/json
Authorization: general_api_key
Host: localhost:8080
Content-Length: 8
[ 1, 2 ]
Example response
HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Regexp validation
Request parameters
| Parameter | Description |
|---|---|
|
Regexp |
Example request
GET /api/validations/regexp?regexp=.*Product1.* HTTP/1.1
Authorization: general_api_key
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 15
{"status":"ok"}
Reports
Promo
Request parameters
| Parameter | Description |
|---|---|
|
ID of the promo |
|
Start date, optional, format - yyyy-MM-dd’T’HH:mm |
|
End date, optional, format - yyyy-MM-dd’T’HH:mm |
Example request
GET /api/reports/promo.xlsx?promoId=1&from=2017-08-16T18%3A00%3A00&to=2017-08-18T18%3A00%3A59 HTTP/1.1
Authorization: general_api_key
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Content-Length: 18
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
.xlsx file content
Moderators report
Request parameters
| Parameter | Description |
|---|---|
|
ID of the user |
Example request
POST /api/reports/moderators HTTP/1.1
Authorization: general_api_key
Host: localhost:8080
Content-Type: application/x-www-form-urlencoded
userId=1
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 44
{
"status" : "Report generation started"
}
Promo&Money report
Request parameters
| Parameter | Description |
|---|---|
|
ID of the user |
|
ID of the promo |
Example request
POST /api/reports/promoWithMoney HTTP/1.1
Authorization: general_api_key
Host: localhost:8080
Content-Type: application/x-www-form-urlencoded
userId=1&promoId=1
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 44
{
"status" : "Report generation started"
}
Push result only
By IDs
Example request
PUT /api/receipts/result/push/ids HTTP/1.1
Content-Type: application/json
Authorization: general_api_key
Host: localhost:8080
Content-Length: 8
[ 1, 2 ]
Example response
HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Receipts
Retrieve result
Path parameters
| Parameter | Description |
|---|---|
|
The receipt’s uuid |
Example request
GET /api/receipts/ba77bb1a-f9c3-4855-acad-69f5f990cfc2 HTTP/1.1
api-key: 8b917c90-5d8f-4008-bbf7-01df92b3bd73
Host: localhost:8080
Response fields
| Path | Type | Description |
|---|---|---|
|
|
The receipt’s uuid |
|
|
State of the receipt ('ARRIVED' or 'REVIEWED') |
|
|
Promo’s id |
|
|
Photos(URLs) |
|
|
Receipt date |
|
|
Retailer info |
|
|
City info |
|
|
Creation time |
|
|
If the receipt is rejected, this object contains info about original receipt(which this is a duplicate of), else null |
|
|
Shows whether the receipt is approved |
|
|
The receipt’s id in the system |
|
|
Totals (by question )products_with_count_and_subtotals |
|
|
User’s UUID |
|
|
Receipt source |
|
|
Receipt channel |
|
|
Receipt metadata |
|
|
Ids of users, that reviewed this receipt |
|
|
Rejection reason (text), null if the receipt is approved |
|
|
Rejection-reason key, null if the receipt is approved |
|
|
List of rules triggered by this receipt |
|
|
Total count of rules applied to this receipt |
|
|
Total points of applied rules |
|
|
Question answers |
|
|
Promo Points object |
|
|
FNS receipt |
|
|
QR string parsed from receipt photo |
|
|
Matched promos |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1271
{
"state" : "REVIEWED",
"uuid" : "ba77bb1a-f9c3-4855-acad-69f5f990cfc2",
"userUuid" : null,
"approved" : false,
"receiptId" : 4,
"receiptDate" : "",
"createdAt" : "2021-12-24T12:27:06Z",
"duplicate" : null,
"promoId" : 2,
"photos" : [ ],
"reviewers" : [ 10, 11 ],
"rejectReason" : "Несоответствие продуктов в чеке условиям Акции",
"retailer" : {
"id" : null,
"name" : "Unknown",
"inn" : null,
"store" : "Unknown"
},
"rejectKey" : "NOT_QUANTITY_PRODUCT",
"answers" : {
"products_with_count_and_subtotals" : null,
"products_with_count" : {
"name" : "product1",
"id" : 8
},
"products" : [ {
"name" : "product1",
"count" : 1,
"id" : 8
} ]
},
"total" : {
"sum" : 30.35,
"count" : 0,
"sum_subtotal" : 0.0
},
"rules" : null,
"rulesCount" : null,
"rulesPoints" : null,
"city" : {
"id" : -1,
"city" : "Unknown",
"region" : "Unknown",
"address" : "Unknown"
},
"promoPoints" : {
"earned" : 0,
"totalEarned" : 0,
"leftovers" : 0.0,
"leftoversInt" : 0
},
"source" : null,
"channel" : null,
"fnsReceipt" : null,
"qrString" : null,
"meta" : null,
"matchedPromos" : null
}
Post QR receipt
Api-key is passed in header 'api-key', look into example request below
Request fields
| Path | Type | Description |
|---|---|---|
|
|
Stringified json, config of the receipt review |
|
|
Stringified json, receipt metadata (basically any data) |
|
|
Receipt channel (web, cbot, cbot_ok, cbot_vk, cbot_web, sms, telegram, wapp, etc), string |
|
|
Receipt QR code as string |
|
|
User’s UUID |
|
|
Receipt’s id in Promo’s system |
Example request
POST /api/receipts/qr HTTP/1.1
Content-Type: application/json
api-key: 8b917c90-5d8f-4008-bbf7-01df92b3bd73
Host: localhost:8080
Content-Length: 1455
{
"qrStr" : "t=20190113T154800&s=127.00&fn=8716000100025114&i=114318&fp=3578721879&n=1",
"userUuid" : "e2a23a9e-6bb5-4ba8-bee4-f3a9cdeed534",
"externalId" : 499,
"config" : "{\n \"products\" : [ {\n \"name\" : \"Ice-cream Lasunka\",\n \"id\" : 7\n }, {\n \"name\" : \"Chocolate Roshen Dark\",\n \"id\" : 8\n } ],\n \"brands\" : [ {\n \"name\" : \"Dior\",\n \"id\" : \"1\"\n }, {\n \"name\" : \"Pepsi\",\n \"id\" : \"2\"\n } ],\n \"cities\" : [ {\n \"name\" : \"Moscow\",\n \"id\" : \"1\"\n }, {\n \"name\" : \"Saint Petersburg\",\n \"id\" : \"2\"\n } ],\n \"callback\" : {\n \"url\" : \"http://some.promo.service/revizor/callback\",\n \"headers\" : [ {\n \"name\" : \"authorization\",\n \"values\" : [ \"some-api-token\" ]\n } ],\n \"method\" : \"POST\"\n },\n \"products_with_count\" : [ {\n \"name\" : \"Ice-cream Lasunka\",\n \"count\" : 2,\n \"id\" : 7\n }, {\n \"name\" : \"Dark Chocolate Roshen\",\n \"count\" : 3,\n \"id\" : 8\n } ],\n \"products_with_count_and_subtotals\" : [ {\n \"name\" : \"Ketchup Torchyn Lahidnyi\",\n \"id\" : 6,\n \"min_product_price\" : 45.5,\n \"max_product_price\" : 4500\n }, {\n \"name\" : \"Ketchup Torchyn Shashlyck\",\n \"id\" : 5,\n \"min_product_price\" : 50\n } ],\n \"products_with_count_subtotals_min_count\" : 1\n}",
"meta" : "{\n \"utm\" : \"api_docs\"\n}",
"channel" : "apidoc"
}
Response fields
| Path | Type | Description |
|---|---|---|
|
|
UUID of the receipt |
|
|
Status of the request |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 77
{
"uuid" : "15dfb5bc-2754-4c00-a6bd-61e2a5963365",
"status" : "success"
}
Update user uuids
Update user uuids for existing receipts. This method takes array of new-uuid—old-uuid objects and updates them.
Request fields
| Path | Type | Description |
|---|---|---|
|
|
Old user uuid |
|
|
New user uuid |
Example request
POST /api/receipts/users HTTP/1.1
Content-Type: application/json
api-key: 83d4a4b8-cba5-4c5b-910a-903115a5ae66
Host: localhost:8080
Content-Length: 128
[ {
"oldUuid" : "1",
"newUuid" : "2"
}, {
"oldUuid" : "3",
"newUuid" : "4"
}, {
"oldUuid" : "5",
"newUuid" : "6"
} ]
Response fields
| Path | Type | Description |
|---|---|---|
|
|
Request status |
|
|
Transaction uuid |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 88
{
"transactionUuid" : "1e035e9e-b030-4abe-b56d-dea0278f3614",
"status" : "success"
}
Rollback user uuids update
Rollback performed update of user uuids in receipts
Path parameters
| Parameter | Description |
|---|---|
|
UUID of transaction to rollback |
Example request
POST /api/receipts/change_transactions/b7228dda-2266-4c75-95b3-d6908dd1a675/rollback HTTP/1.1
Content-Type: application/json
api-key: 99cd5241-5a95-4884-8ef5-0e7d50f3b1c1
Host: localhost:8080
Response fields
| Path | Type | Description |
|---|---|---|
|
|
Request status |
|
|
Transaction uuid |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 88
{
"transactionUuid" : "21fdd79f-fc34-4a32-bd05-677cba3f441d",
"status" : "success"
}
Post receipt
Api-key is passed in header 'api-key', look into example request below
Request parameters
| Parameter | Description |
|---|---|
|
Json-string, config of the receipt review, optional |
|
Config of the question 'products_with_count.Question sounds like 'Количество каждого продукта не меньше указанного?'. So you can pass products and counts. Look into example request for details. |
|
Config of the question 'brands'. Question sounds like 'На чеке пристутствует продукция брендов * ?'. So you can pass names of brands. Look into example request for details. |
|
Config of the question 'products'. This is not question, actually, we just ask moderator to fill in counts of products, that you want to know about. So you give us products, and in final callback you will get counts of different products. Look into example request for details. |
|
Config of the question 'cities'. The question sounds like 'Этот чек из одного из городов: *?'. You give us cities and we can ask moderator about them. Look into example request for details. |
|
Callback config. Here you can configure url, method and headers, that we should use, when we want to give you some info. (Look into APM Callbacks Documentation). |
|
Source of the receipt (web/chatbot/etc). Any string up to 255 symbols. |
|
Channel of the receipt (web, cbot, cbot_ok, cbot_vk, cbot_web, sms, telegram, wapp, etc). Any string up to 255 symbols. |
|
User’s UUID |
|
Receipt’s id in Promo’s system |
Request parts
| Part | Description |
|---|---|
|
Photos, min 1, max 5 files. Note that if you’re using plain cURL requests you should pass filename along with parameter name, like 'Content-Disposition: form-data; name=photos; filename=receipt.jpg' |
Example request
POST /api/receipts HTTP/1.1
Content-Type: multipart/form-data; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
api-key: 8b917c90-5d8f-4008-bbf7-01df92b3bd73
Host: localhost:8080
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=config
{
"products_with_count" : [ {
"name" : "Ice-cream Lasunka",
"count" : 2,
"id" : 7
}, {
"name" : "Dark Chocolate Roshen",
"count" : 3,
"id" : 8
} ],
"brands" : [ {
"name" : "Dior",
"id" : "1"
}, {
"name" : "Pepsi",
"id" : "2"
} ],
"products_with_count_subtotals_min_count" : 1,
"products_with_count_and_subtotals" : [ {
"name" : "Ketchup Torchyn Lahidnyi",
"id" : 6,
"min_product_price" : 45.5,
"max_product_price" : 4500
}, {
"name" : "Ketchup Torchyn Shashlyck",
"id" : 5,
"min_product_price" : 50
} ],
"cities" : [ {
"name" : "Moscow",
"id" : "1"
}, {
"name" : "Saint Petersburg",
"id" : "2"
} ],
"callback" : {
"url" : "http://some.promo.service/revizor/callback",
"headers" : [ {
"name" : "authorization",
"values" : [ "some-api-token" ]
} ],
"method" : "POST"
},
"source" : "web",
"products" : [ {
"name" : "Ice-cream Lasunka",
"id" : 7
}, {
"name" : "Chocolate Roshen Dark",
"id" : 8
} ]
}
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=userUuid
c09a2ebb-ad43-4dc5-b0d2-10e22d41f303
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=externalId
345
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=source
api
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=channel
telegram
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=photos
Content-Type: multipart/form-data
���� JFIF �� ;CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 90
�� C
�� C
�� @ @" ��
�� � } !1AQa"q2���#B��R��$3br�
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz���������������������������������������������������������������������������
�� � w !1AQaq"2�B���� #3R�br�
$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ? �[�e �x=7�)y�01��du�I�sVA�Akf,s\V���Zf��m߈,���X��QϧZ���������<��b�r���rWw*�z���c־X���S���hPC��9�5���N!Gq���jો�&�c��u�m��?���uk�km�:i�m;e�����נ��0_D���,.2�#�=A�Ϳ~�Z煡�V��o������O���p��S���|I����7�V�c��L��>DW0 �� ����Vp�BN��2��������i2���Gri$.(��x��Ś
���J&���:7�Ѓ��j���N+�N���ڳ�3���6kƾ#O
x_Tԧ�Ein�1�\)8��Ϸ rq�^�\��-#�E���C|�6q������YV���)vF���&����m{��F�5���[�4��7�,~����K�Ң�׃4�`�#U�cb2Z����^HB���nAٛ }e��_Aj��uօim�h��V��� "��x3��3������ V�R�}np� 9iw�#�h/<��@ ���m�����[���N� �i`����ц�T��Ia���
�g��;�5��v{�4V�ʳ�e\g�zW��k��mR� PѼ]����VŴ���0 0� ���FU>�:�*p^���{����&����̫;�1?.� 2/��17�_j��85�)�+x��W���M�5h��[�����E5��eA��j�G(�������IK���UF��w�|�zji��X&]�cl��F�}_����V�X���u��߮��(��� 2� �d�9� �
���7��g���/��9,�~��% ���3'��L������!����b�۰P9$�1_�0�a�����#m�Ft'�>P�k�� ��Ե��4N���K[_)t�q�\��5���%�c��%����#�x�D���i�.J62J�j� �ޣ�T����O~ ����E!�#�#��s_*��i�x�]SQ�4���� �l���3��hN�rz6+����kz}���=�����7����q� GolQRr�t��%}X��X�F���i�l6��o������+�/O�k�'P1$j���~;�oE��gׯ��42˻�ye2r}p�ο[�-�ׁ4 ��"�cc*�� �}E{l�RQ]��ٜ=�ϻe���Mц����k��R��K∅p�n���2� 3��ް�$P��*>f*�qׁ�|��^7�R2�u6��UC�� �~�Y�^Jq]��a�Ú�~_�����f��ols�(v��%���E{'�ϊ���k����*c��y�,�R��<�6�������B����}*���5�^q�*q�c���R�Vk��F��Tx�15͔1�&W�V|�@5���W�ua�>�Ц�Dێז%��{.'ץii�
��).�AU��y�o@��|�1�ܤ<to,��Y�Z.3�u�l�ŹF1�ә��=���"�Œ@�N�{4�}Ԉ"/���/��ͨ�/�[�B�r?B+��U�K�ـ�N� z�� ��g��<�c�!*�L`*2��Ũ�����o�O�?��
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
Response fields
| Path | Type | Description |
|---|---|---|
|
|
UUID of the receipt |
|
|
Status of the request |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 77
{
"uuid" : "989abe5f-7ae6-456f-9eb0-85a628ceb775",
"status" : "success"
}
Add photos to receipt
Api-key is passed in header 'api-key', look into example request below
Path parameters
| Parameter | Description |
|---|---|
|
Receipt ID |
Request parts
| Part | Description |
|---|---|
|
Photos, min 1, max 5 files |
Example request
POST /api/receipts/1/photos HTTP/1.1
Content-Type: multipart/form-data; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Authorization: general_api_key
Host: localhost:8080
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=photos
Content-Type: multipart/form-data
���� JFIF �� ;CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 90
�� C
�� C
�� @ @" ��
�� � } !1AQa"q2���#B��R��$3br�
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz���������������������������������������������������������������������������
�� � w !1AQaq"2�B���� #3R�br�
$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ? �[�e �x=7�)y�01��du�I�sVA�Akf,s\V���Zf��m߈,���X��QϧZ���������<��b�r���rWw*�z���c־X���S���hPC��9�5���N!Gq���jો�&�c��u�m��?���uk�km�:i�m;e�����נ��0_D���,.2�#�=A�Ϳ~�Z煡�V��o������O���p��S���|I����7�V�c��L��>DW0 �� ����Vp�BN��2��������i2���Gri$.(��x��Ś
���J&���:7�Ѓ��j���N+�N���ڳ�3���6kƾ#O
x_Tԧ�Ein�1�\)8��Ϸ rq�^�\��-#�E���C|�6q������YV���)vF���&����m{��F�5���[�4��7�,~����K�Ң�׃4�`�#U�cb2Z����^HB���nAٛ }e��_Aj��uօim�h��V��� "��x3��3������ V�R�}np� 9iw�#�h/<��@ ���m�����[���N� �i`����ц�T��Ia���
�g��;�5��v{�4V�ʳ�e\g�zW��k��mR� PѼ]����VŴ���0 0� ���FU>�:�*p^���{����&����̫;�1?.� 2/��17�_j��85�)�+x��W���M�5h��[�����E5��eA��j�G(�������IK���UF��w�|�zji��X&]�cl��F�}_����V�X���u��߮��(��� 2� �d�9� �
���7��g���/��9,�~��% ���3'��L������!����b�۰P9$�1_�0�a�����#m�Ft'�>P�k�� ��Ե��4N���K[_)t�q�\��5���%�c��%����#�x�D���i�.J62J�j� �ޣ�T����O~ ����E!�#�#��s_*��i�x�]SQ�4���� �l���3��hN�rz6+����kz}���=�����7����q� GolQRr�t��%}X��X�F���i�l6��o������+�/O�k�'P1$j���~;�oE��gׯ��42˻�ye2r}p�ο[�-�ׁ4 ��"�cc*�� �}E{l�RQ]��ٜ=�ϻe���Mц����k��R��K∅p�n���2� 3��ް�$P��*>f*�qׁ�|��^7�R2�u6��UC�� �~�Y�^Jq]��a�Ú�~_�����f��ols�(v��%���E{'�ϊ���k����*c��y�,�R��<�6�������B����}*���5�^q�*q�c���R�Vk��F��Tx�15͔1�&W�V|�@5���W�ua�>�Ц�Dێז%��{.'ץii�
��).�AU��y�o@��|�1�ܤ<to,��Y�Z.3�u�l�ŹF1�ә��=���"�Œ@�N�{4�}Ԉ"/���/��ͨ�/�[�B�r?B+��U�K�ـ�N� z�� ��g��<�c�!*�L`*2��Ũ�����o�O�?��
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
Response fields
| Path | Type | Description |
|---|---|---|
|
|
Status of the request |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 26
{
"status" : "success"
}
Push arrival and result
By IDs
Example request
PUT /api/receipts/result/pushWithArrival/ids HTTP/1.1
Content-Type: application/json
Authorization: general_api_key
Host: localhost:8080
Content-Length: 8
[ 1, 2 ]
Example response
HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
By promo
repushing results if delivered = 2
Path parameters
| Parameter | Description |
|---|---|
|
Promo’s ID |
Example request
PUT /api/receipts/result/push/1 HTTP/1.1
Authorization: general_api_key
Host: localhost:8080
Example response
HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
By UUIDs
Example request
PUT /api/receipts/result/push/UUIDs HTTP/1.1
Content-Type: application/json
Authorization: general_api_key
Host: localhost:8080
Content-Length: 20
[ "UUId1", "UUID2" ]
Example response
HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Widget API
Receipts
Post receipt
Api-key is passed in header 'api-key', look into example request below
Request parameters
| Parameter | Description |
|---|---|
|
User’s UUID |
|
QR code as string |
|
Receipt source, e.g. qr scan, manual qr input or photos upload |
|
Receipt channel, e.g. web, cbot, cbot_ok, cbot_vk, cbot_web, sms, telegram, wapp, etc |
Request parts
| Part | Description |
|---|---|
|
Photos, min 1, max 5 files |
Example request
POST /api/widgets/receipts HTTP/1.1
Content-Type: multipart/form-data; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
api-key: 8b917c90-5d8f-4008-bbf7-01df92b3bd73
Host: localhost:8080
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=userUuid
257f42e1-4709-4c8c-8989-9f9d94d6fb4a
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=qrAsString
238275ff-f20e-4721-8a17-a792f4cf3697
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=source
widget-qr-scan
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=channel
promo-site
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=photos
Content-Type: multipart/form-data
���� JFIF �� ;CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 90
�� C
�� C
�� @ @" ��
�� � } !1AQa"q2���#B��R��$3br�
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz���������������������������������������������������������������������������
�� � w !1AQaq"2�B���� #3R�br�
$4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������� ? �[�e �x=7�)y�01��du�I�sVA�Akf,s\V���Zf��m߈,���X��QϧZ���������<��b�r���rWw*�z���c־X���S���hPC��9�5���N!Gq���jો�&�c��u�m��?���uk�km�:i�m;e�����נ��0_D���,.2�#�=A�Ϳ~�Z煡�V��o������O���p��S���|I����7�V�c��L��>DW0 �� ����Vp�BN��2��������i2���Gri$.(��x��Ś
���J&���:7�Ѓ��j���N+�N���ڳ�3���6kƾ#O
x_Tԧ�Ein�1�\)8��Ϸ rq�^�\��-#�E���C|�6q������YV���)vF���&����m{��F�5���[�4��7�,~����K�Ң�׃4�`�#U�cb2Z����^HB���nAٛ }e��_Aj��uօim�h��V��� "��x3��3������ V�R�}np� 9iw�#�h/<��@ ���m�����[���N� �i`����ц�T��Ia���
�g��;�5��v{�4V�ʳ�e\g�zW��k��mR� PѼ]����VŴ���0 0� ���FU>�:�*p^���{����&����̫;�1?.� 2/��17�_j��85�)�+x��W���M�5h��[�����E5��eA��j�G(�������IK���UF��w�|�zji��X&]�cl��F�}_����V�X���u��߮��(��� 2� �d�9� �
���7��g���/��9,�~��% ���3'��L������!����b�۰P9$�1_�0�a�����#m�Ft'�>P�k�� ��Ե��4N���K[_)t�q�\��5���%�c��%����#�x�D���i�.J62J�j� �ޣ�T����O~ ����E!�#�#��s_*��i�x�]SQ�4���� �l���3��hN�rz6+����kz}���=�����7����q� GolQRr�t��%}X��X�F���i�l6��o������+�/O�k�'P1$j���~;�oE��gׯ��42˻�ye2r}p�ο[�-�ׁ4 ��"�cc*�� �}E{l�RQ]��ٜ=�ϻe���Mц����k��R��K∅p�n���2� 3��ް�$P��*>f*�qׁ�|��^7�R2�u6��UC�� �~�Y�^Jq]��a�Ú�~_�����f��ols�(v��%���E{'�ϊ���k����*c��y�,�R��<�6�������B����}*���5�^q�*q�c���R�Vk��F��Tx�15͔1�&W�V|�@5���W�ua�>�Ц�Dێז%��{.'ץii�
��).�AU��y�o@��|�1�ܤ<to,��Y�Z.3�u�l�ŹF1�ә��=���"�Œ@�N�{4�}Ԉ"/���/��ͨ�/�[�B�r?B+��U�K�ـ�N� z�� ��g��<�c�!*�L`*2��Ũ�����o�O�?��
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
Response fields
| Path | Type | Description |
|---|---|---|
|
|
UUID of the receipt |
|
|
Status of the request |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 77
{
"uuid" : "e9ec5656-f363-4fdc-83dd-e6ff1bb62246",
"status" : "success"
}