Callback Format

The response object is part of the callback POST request and is permanently stored as part of the task object.

{
  "task_id": "5774cc78b01249ab09f089dd",
  "response": {
    "results": {
      "merchant_name": {
        "uuid": "bbb2805e-8605-4e1b-887d-abdfc1b6d2af",
        "value": "Liren’s Diner",
        "confidence": 0.94
      },
      "line_item": {
        "items": [
          {
            "uuid": "4d2eb731-3ff7-41d1-8e36-1c62412ca153",
            "group": {
              "item_price": {
                "uuid": "f0c6a9ac-a0cd-4792-8096-c8bddfc32258",
                "value": "16.50",
                "confidence": 0.98
              },
              "item_description": {
                "uuid": "41a40ba0-19e8-4a20-9bea-e3a7f8fa387a",
                "value": "Salmon Poke Bowl",
                "confidence": 0.97
              }
            }
          }
        ]
      }
    }
  },
  "document_pages": [
    {
      "width": 600,
      "height": 1200,
      "url": "https://api.scale.com/v1/task/5774cc78b01249ab09f089dd/..."
    }
  ],
  "audit_url": "https://dashboard.scale.com/audit?taskId=5774cc78b01249ab09f089dd",
  // additional fields
}

Field

Type

Description

response

object

A Document Model Response. See below.

document_pages

object array

A list of Document Page objects. See the Task Document Pages section.

audit_url

string

A link to audit the model results in the Scale dashboard.

Document Model Response

Field

Type

Description

results

object of objects

Object with keys and values that depend on the instructions.

In the results object, the list of keys and format of values will depend on instructions for the model. The corresponding value is either a Model Result List for labels that allow multiple results, Model Result Group for structured results, or Model Result Value for single value results.

Model Result List

Field

Type

Description

items

list of objects

List of Model Result Group or Model Result Value objects.

Model Result Group

Field

Type

Description

uuid

string

Unique identifier of the result

group

object of objects

Object with keys and values that depend on the instructions.

Model Result Value

Field

Type

Description

uuid

string

Unique identifier of the result

value

string

The value in a string format that depends on the instructions.

confidence

number

Estimated probability the result is correct, from 0 to 1.

📘

See the Callback section for more details about callbacks.