Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
121 lines (121 sloc) 3.07 KB
{
"swagger": "2.0",
"info": {
"title": "K2 Expenses Receipts OCR",
"description": "Used to transfer file to ABBYY OCR and to convert xml response to json",
"version": "0.0.1"
},
"host": "k2-expenses-receipts-ocr.herokuapp.com",
"schemes": [ "http" ],
"tags": [
{
"name": "tag",
"description": "Entity of an account"
}
],
"produces": [
"application/json"
],
"paths": {
"/ocr/getApplicationInfo": {
"get": {
"description": "Process",
"operationId": "getApplicationInfo",
"produces": [ "application/json" ],
"responses": {
"200": {
"description": "OK",
"schema": { "type": "string" }
},
"default": {
"description": "Unexpected error (detail included)",
"schema": { "type": "string" }
}
}
}
},
"/ocr/processImage": {
"post": {
"description": "Process Image",
"operationId": "processImage",
"consumes": ["application/x-www-form-urlencoded"],
"produces": [ "application/json" ],
"parameters": [
{
"name": "country",
"in": "query",
"description": "Country",
"required": false,
"type": "string"
},
{
"in": "formData",
"name": "Image",
"required": true,
"type": "file"
}
],
"responses": {
"200": {
"description": "OK",
"schema": { "type": "string" }
},
"default": {
"description": "Unexpected error (detail included)",
"schema": { "type": "string" }
}
}
}
},
"/ocr/processReceipt/": {
"post": {
"description": "ProcessReceipt",
"operationId": "ProcessReceipt",
"consumes": ["application/x-www-form-urlencoded"],
"produces": [ "application/json" ],
"parameters": [
{
"name": "country",
"in":"query",
"description": "country",
"required": false,
"type": "string"
},
{
"in": "formData",
"name": "Image",
"required": true,
"type": "file"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type":"object",
"$ref": "#/definitions/ProcessedReceipt"
}
},
"default": {
"description": "Unexpected error (detail included)",
"schema": { "type": "string" }
}
}
}
}
},
"definitions": {
"ProcessedReceipt":{
"type": "object",
"properties":{
"taskId": {"type":"string"},
"currency": {"type":"string"},
"vendor": {"type":"string"},
"vendorAddress": {"type":"string"},
"date": {"type":"string"},
"total": {"type":"string"},
"tax": {"type":"string"}
}
}
}
}
You can’t perform that action at this time.