Ourcart Receipt Processing API (11.1.0)

Download OpenAPI specification:Download

Receives receipt data

Fetches at most 10 processed receipts per invocation.
Invoke at most once every 10 seconds.

header Parameters
X-Api-Key
string

API Key

Responses

Response Schema: application/json
handle-id
string (Ourcart receipt ID)
object (Sent receipt image(s))

Information about the receipt in its original content type

object (Receipt)

The receipt portion of receipt data

object (Flaws)

A map of warning flags which may require the client's attention

object (Error)

At least one step in the processing flow did not complete successfully

requested-on
string <date-time> (The timestamp on which sent receipt image(s) were submitted)
consumed-on
string <date-time> (The timestamp on which sent receipt image(s) started processing)
completed-on
string <date-time> (The timestamp on which sent receipt image(s) completed processing resulting in receipt data)
attempted-transcription-method
string (The attempted transcription method)
Value: "AUTOMATIC, MANUALLY_ENHANCED"

AUTOMATIC if receipt was processed in a fully automatic way; MANUALLY_ENHANCED if receipt processing was enhanced by manual human intervention.

Response samples

Content type
application/json
{
  • "handle-id": "string",
  • "capture": {
    },
  • "receipt": {
    },
  • "flaws": {
    },
  • "error": {
    },
  • "requested-on": "2019-08-24T14:15:22Z",
  • "consumed-on": "2019-08-24T14:15:22Z",
  • "completed-on": "2019-08-24T14:15:22Z",
  • "attempted-transcription-method": "AUTOMATIC, MANUALLY_ENHANCED"
}

Sends receipt image(s)

Sends receipt image(s) for data extraction

header Parameters
X-Api-Key
string

API Key

Request Body schema:
client-code
required
string (Client Code)
client-handle-id
string (Receipt ID assigned by client)
client-user-id
string (End user ID assigned by client)
country
required
string (Country Code in Alpha-2 format)
transcription-method
required
string (Transcription Method)
Value: "AUTOMATIC, or MANUALLY_ENHANCED"

Choose MANUALLY_ENHANCED if you want receipt to be processed by human being as well, in case automatic transcription doesn't give good enough results

required
Array of objects (A list of Snapshot URLs, maximum 4)
Array of objects (A list of products which the client is interested in identifying on the receipt)
object (Callback upon receipt processing)

Callback to be performed upon receipt processing.
Callback represents a simple HTTP POST request to your API endpoint.
Callback payload's schema is the same as if you polled for processed receipt data in RP API.
Callback can optionally have authorization by header or ?auth query parameter (see auth-type below).
If callback request isn't done in 5 seconds, it is treated as failed. Retry policy allows 5 callback attempts, 4 minutes between each of them.

object (Callback upon receipt processing)

Callback to be performed upon receipt processing.
Callback represents a simple HTTP POST request to your API endpoint.
Callback payload's schema is the same as if you polled for processed receipt data in RP API.
Callback can optionally have authorization by header or ?auth query parameter (see auth-type below).
If callback request isn't done in 5 seconds, it is treated as failed. Retry policy allows 5 callback attempts, 4 minutes between each of them.

Responses

Response Schema: text/plain
string
Response Schema: text/plain
string

Request samples

Content type
{
  • "client-code": "string",
  • "client-handle-id": "string",
  • "client-user-id": "string",
  • "country": "string",
  • "transcription-method": "AUTOMATIC, or MANUALLY_ENHANCED",
  • "snapshots": [],
  • "products-of-interest": [
    ],
  • "callback": {
    },
  • "pre-callback": {
    }
}

Checks status of receipt processing

Checks current processing status of an individual receipt.

path Parameters
client-handle-id
required
string
header Parameters
X-Api-Key
string

API Key

Responses

Response Schema: application/json
client-handle-id
string (Client handle ID)
timestamp
string <date-time> (The timestamp of latest status change)
status
string (Current receipt processing status)
object (Map of flaws)
Response Schema: application/json
error
string (Error type)
error-message
string (Error message)

Response samples

Content type
application/json
{
  • "client-handle-id": "string",
  • "timestamp": "2019-08-24T14:15:22Z",
  • "status": "string",
  • "flaws": {
    }
}

Retrieves all health check data

Retrieves all health check data from DynamoDB as a map.

Responses

Response Schema: application/json
functionality
string (Functionality name)
description
string (Functionality description)
status
string (Health status)
timestamp
string (Timestamp of the health check)

Response samples

Content type
application/json
{
  • "functionality": "string",
  • "description": "string",
  • "status": "string",
  • "timestamp": "string"
}