> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.staple.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.staple.ai/_mcp/server.

# Extract Receipt

POST https://api.staple.io/v1/documents/extract/receipt
Content-Type: multipart/form-data

Extract the structured data from a document using the Receipt model in Staple. The document would NOT be left in the queue specified for any further manipulation.

Reference: https://docs.staple.ai/api-reference/v1/documents/extract-receipt

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: v1
  version: 1.0.0
paths:
  /v1/documents/extract/receipt:
    post:
      operationId: extractReceipt
      summary: Extract Receipt
      description: >-
        Extract the structured data from a document using the Receipt model in
        Staple. The document would NOT be left in the queue specified for any
        further manipulation.
      tags:
        - documents
      parameters:
        - name: x-api-key
          in: header
          description: API key issued by Staple.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Documents_extractReceipt_Response_200'
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: File to upload
              required:
                - file
servers:
  - url: https://api.staple.io
    description: https://api.staple.io
components:
  schemas:
    Documents_extractReceipt_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: Documents_extractReceipt_Response_200
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key issued by Staple.
    bearerAuth:
      type: http
      scheme: bearer
      description: JWT obtained from the login endpoint.

```

## Examples



**Request**

```json
{
  "file": "<file: string>"
}
```

**Response**

```json
{
  "BigBoxes": [
    {
      "box": [
        287,
        215,
        704,
        383,
        495.5,
        299,
        "NTUC FAIRPRICE\nCLEMENTI A\nblk 451 Clementi Ave 3\n# 01-307 Singapore 120451\n67743663\nPHONE\n",
        "NTUC FAIRPRICE\nCLEMENTI A\nblk 451 Clementi Ave 3\n# 01-307 Singapore 120451\n67743663\nTEL\n"
      ],
      "page": 0
    },
    {
      "box": [
        326,
        418,
        675,
        486,
        500.5,
        452,
        "583CS0191L\nUEN No\nM4-0004578-0\nGST No\n",
        "583CS0191L\nUEN No\nM4-0004578-0\nGST No\n"
      ],
      "page": 0
    },
    {
      "box": [
        124,
        522,
        913,
        1617,
        518.5,
        1069.5,
        "1.35\nCHEF LG ONION RED\nCHINA BROCCOLI FLOWR\n0.92\n0.98\nCHINA CAULIFLOWER\n2.80\nCHUAN HUAT EGGS 55G\n3.95\nFRESH BLUEBERRIES\n4.50\nNormal Price\n0.84\nFRESH GREEN PEPPER\n1.90\nH HP8611S EGG SHAPER\n1.05\nPSR TH/PARSLEY 50G\nT HNEY CHERRY TOMATO\n1.50\n3.30\nTHAI R/B MANGO ( M )\n$ 18.59\nTOTAL\n$ 18.59\nMASTER\nACNT NO.XXXXXXXXXXXX0714\nTERMINAL\n93000749\nTRANSACTION DATE\n29/03/19 22:34:57\nTRANS\nNUMBER\n008144\nAUTH\nCODE: R88302\nAPPROVED ( CONTACTLESS )\nNO SIGNATURE REQUIRED\n********************\n***********\nTOTAL\nSAVINGS\n$ 0.55\n***********\nКXX\nDescription\nRate\nAfter GST\nTx Amnt\n*****\nGST\n7.00%\n18.59\n1.22\n*****\n*****\nTotal Items\n10\nLIM LEH TIN\nSt: CLA\nRg 3\nCh: 4864\nTr: 8144\n22:33\n29/03/19\n",
        "1.35\nCHEF LG ONION RED\nCHINA BROCCOLI FLOWR\n0.92\n0.98\nCHINA CAULIFLOWER\n2.80\nCHUAN HUAT EGGS 55G\n3.95\nFRESH BLUEBERRIES\n4.50\nNormal Price\n0.84\nFRESH GREEN PEPPER\n1.90\nH HP8611S EGG SHAPER\n1.05\nPSR TH/PARSLEY 50G\nT HNEY CHERRY TOMATO\n1.50\n3.30\nTHAI R/B MANGO ( M )\n$ 18.59\nTOTAL\n$ 18.59\nMASTER\nACNT NO.XXXXXXXXXXXX0714\nTERMINAL\n93000749\nTRANSACTION DATE\n29/03/19 22:34:57\nTRANS\nNUMBER\n008144\nAUTH\nCODE: R88302\nAPPROVED ( CONTACTLESS )\nNO SIGNATURE REQUIRED\n********************\n***********\nTOTAL\nSAVINGS\n$ 0.55\n***********\nКXX\nDescription\nRate\nAfter GST\nTx Amnt\n*****\nGST\n7.00%\n18.59\n1.22\n*****\n*****\nTotal Items\n10\nLIM LEH TIN\nSt: CLA\nRg 3\nCh: 4864\nTr: 8144\n22:33\n29/03/19\n"
      ],
      "page": 0
    },
    {
      "box": [
        146,
        1248,
        475,
        1269,
        310.5,
        1258.5,
        "********************\n",
        "********************\n"
      ],
      "page": 0
    },
    {
      "box": [
        720,
        1251,
        902,
        1267,
        811,
        1259,
        "***********\n",
        "***********\n"
      ],
      "page": 0
    },
    {
      "box": [
        861,
        1316,
        902,
        1333,
        881.5,
        1324.5,
        "КXX\n",
        "КXX\n"
      ],
      "page": 0
    },
    {
      "box": [
        815,
        1383,
        870,
        1402,
        842.5,
        1392.5,
        "*****\n",
        "*****\n"
      ],
      "page": 0
    },
    {
      "box": [
        831,
        1448,
        870,
        1465,
        850.5,
        1456.5,
        "*****\n",
        "*****\n"
      ],
      "page": 0
    },
    {
      "box": [
        214,
        1647,
        850,
        1875,
        532,
        1761,
        "Thank You For Shopping With Us !\nKeep receipt for exchange or refund.\nMedicine and hygiene-sensitive\nproducts are not exchangeable\nor returnable\nSee in-store poster for details\n",
        "Thank You For Shopping With Us !\nKeep receipt for exchange or refund.\nMedicine and hygiene-sensitive\nproducts are not exchangeable\nor returnable\nSee in-store poster for details\n"
      ],
      "page": 0
    }
  ],
  "Currency": {
    "UICategory": "VAT & Amounts",
    "UIName": "Currency",
    "UIType": "Text",
    "matches": [
      {
        "keyword": [
          140,
          967,
          241,
          1002,
          190.5,
          984.5,
          "MASTER",
          "MASTER"
        ],
        "match": "$",
        "matchmulti": "$ 18.59",
        "page": 0,
        "value": [
          761,
          965,
          866,
          1004,
          813.5,
          984.5,
          "$18.59",
          "$ 18.59"
        ]
      }
    ]
  },
  "Customer": null,
  "DetectedText": "NTUC FAIRPRICE CLEMENTI A blk 451 Clementi Ave 3 # 01-307 Singapore 120451 PHONE 67743663 UEN No 583CS0191L GST No M4-0004578-0 CHEF LG ONION RED 1.35 CHINA BROCCOLI FLOWR 0.92 CHINA CAULIFLOWER 0.98 CHUAN HUAT EGGS 55G 2.80 FRESH BLUEBERRIES 3.95 Normal Price 4.50 FRESH GREEN PEPPER 0.84 H HP8611S EGG SHAPER 1.90 PSR TH/PARSLEY 50G 1.05 T HNEY CHERRY TOMATO 1.50 THAI R/B MANGO ( M ) 3.30 TOTAL $ 18.59 MASTER $ 18.59 ACNT NO.XXXXXXXXXXXX0714 TERMINAL 93000749 TRANSACTION DATE 29/03/19 22:34:57 TRANS NUMBER 008144 AUTH CODE: R88302 APPROVED ( CONTACTLESS ) NO SIGNATURE REQUIRED TOTAL SAVINGS $ 0.55 *********** Description Rate After GST Tx Amnt GST 7.00% 18.59 1.22 ***** Total Items 10 LIM LEH TIN St: CLA Rg 3 Ch: 4864 Tr: 8144 22:33 29/03/19 ******************** *********** КXX ***** ***** Thank You For Shopping With Us ! Keep receipt for exchange or refund. Medicine and hygiene-sensitive products are not exchangeable or returnable See in-store poster for details ",
  "DocSize": [
    [
      1984,
      1056
    ]
  ],
  "Email": {
    "UICategory": "Vendor & Customer",
    "UIName": "Email",
    "UIType": "Text",
    "matches": [
      {
        "keyword": null,
        "match": null,
        "matchmulti": null,
        "page": null,
        "value": null
      }
    ]
  },
  "GSTNumber": {
    "UICategory": "Vendor & Customer",
    "UIName": "GST Number",
    "UIType": "Text",
    "matches": [
      {
        "keyword": null,
        "match": null,
        "matchmulti": null,
        "page": null,
        "value": null
      }
    ]
  },
  "LineItems": [
    [
      {
        "Amount": [
          1.35
        ],
        "Description": [
          "CHEF LG ONION RED"
        ]
      },
      {
        "Amount": [
          0.92
        ],
        "Description": [
          "CHINA BROCCOLI FLOWR"
        ]
      },
      {
        "Amount": [
          0.98
        ],
        "Description": [
          "CHINA CAULIFLOWER"
        ]
      },
      {
        "Amount": [
          2.8
        ],
        "Description": [
          "CHUAN HUAT EGGS 55G"
        ]
      },
      {
        "Amount": [
          3.95
        ],
        "Description": [
          "FRESH BLUEBERRIES",
          "Normal Price",
          "4.50"
        ]
      },
      {
        "Amount": [
          0.84
        ],
        "Description": [
          "FRESH GREEN PEPPER"
        ]
      },
      {
        "Amount": [
          1.9
        ],
        "Description": [
          "H HP8611S EGG SHAPER"
        ]
      },
      {
        "Amount": [
          1.05
        ],
        "Description": [
          "PSR TH/PARSLEY 50G"
        ]
      },
      {
        "Amount": [
          1.5
        ],
        "Description": [
          "T HNEY CHERRY TOMATO"
        ]
      },
      {
        "Amount": [
          3.3
        ],
        "Description": [
          "THAI R/B MANGO ( M )"
        ]
      }
    ]
  ],
  "LineItems_standardHeader": [
    [
      {
        "Description": "CHEF LG ONION RED",
        "LineAmount": 1.35,
        "Quantity": 1,
        "UnitAmount": 1.35
      },
      {
        "Description": "CHINA BROCCOLI FLOWR",
        "LineAmount": 0.92,
        "Quantity": 1,
        "UnitAmount": 0.92
      },
      {
        "Description": "CHINA CAULIFLOWER",
        "LineAmount": 0.98,
        "Quantity": 1,
        "UnitAmount": 0.98
      },
      {
        "Description": "CHUAN HUAT EGGS 55G",
        "LineAmount": 2.8,
        "Quantity": 1,
        "UnitAmount": 2.8
      },
      {
        "Description": "FRESH BLUEBERRIES Normal Price 4.50",
        "LineAmount": 3.95,
        "Quantity": 1,
        "UnitAmount": 3.95
      },
      {
        "Description": "FRESH GREEN PEPPER",
        "LineAmount": 0.84,
        "Quantity": 1,
        "UnitAmount": 0.84
      },
      {
        "Description": "H HP8611S EGG SHAPER",
        "LineAmount": 1.9,
        "Quantity": 1,
        "UnitAmount": 1.9
      },
      {
        "Description": "PSR TH/PARSLEY 50G",
        "LineAmount": 1.05,
        "Quantity": 1,
        "UnitAmount": 1.05
      },
      {
        "Description": "T HNEY CHERRY TOMATO",
        "LineAmount": 1.5,
        "Quantity": 1,
        "UnitAmount": 1.5
      },
      {
        "Description": "THAI R/B MANGO ( M )",
        "LineAmount": 3.3,
        "Quantity": 1,
        "UnitAmount": 3.3
      }
    ]
  ],
  "OtherDate": {
    "UICategory": "Basic Information",
    "UIName": "Other Date",
    "UIType": "Date",
    "matches": [
      {
        "keyword": null,
        "match": "2019-03-29",
        "matchmulti": "29/03/19",
        "page": 0,
        "value": [
          552,
          1578,
          687,
          1617,
          619,
          1597,
          "29/03/19"
        ]
      }
    ]
  },
  "SenderAddress": {
    "UICategory": "Vendor & Customer",
    "UIName": "Vendor Address",
    "UIType": "Text",
    "matches": [
      {
        "keyword": [
          287,
          215,
          704,
          383,
          495.5,
          299,
          "NTUC FAIRPRICE\nCLEMENTI A\nblk 451 Clementi Ave 3\n# 01-307 Singapore 120451\n67743663\nPHONE\n",
          "NTUC FAIRPRICE\nCLEMENTI A\nblk 451 Clementi Ave 3\n# 01-307 Singapore 120451\n67743663\nTEL\n"
        ],
        "match": "NTUC FAIRPRICE\nCLEMENTI A\nblk 451 Clementi Ave 3\n# 01-307 Singapore 120451\n67743663\nPHONE\n",
        "matchmulti": "NTUC FAIRPRICE CLEMENTI A blk 451 Clementi Ave 3 # 01-307 Singapore 120451 TEL 67743663",
        "page": 0,
        "value": [
          287,
          215,
          704,
          383,
          495.5,
          299,
          "NTUC FAIRPRICE\nCLEMENTI A\nblk 451 Clementi Ave 3\n# 01-307 Singapore 120451\n67743663\nPHONE\n",
          "NTUC FAIRPRICE\nCLEMENTI A\nblk 451 Clementi Ave 3\n# 01-307 Singapore 120451\n67743663\nTEL\n"
        ]
      }
    ]
  },
  "ServiceCharge": {
    "UICategory": "VAT & Amounts",
    "UIName": "Service Charge",
    "UIType": "Amount",
    "matches": [
      {
        "keyword": null,
        "match": null,
        "matchmulti": null,
        "page": null,
        "value": null
      }
    ]
  },
  "SmallBoxes": [
    {
      "box": [
        373,
        212,
        614,
        252,
        493.5,
        232,
        "NTUC FAIRPRICE",
        "NTUC FAIRPRICE"
      ],
      "page": 0
    },
    {
      "box": [
        408,
        249,
        580,
        283,
        494,
        266,
        "CLEMENTI A",
        "CLEMENTI A"
      ],
      "page": 0
    },
    {
      "box": [
        305,
        279,
        687,
        324,
        496,
        301.5,
        "blk 451 Clementi Ave 3",
        "blk 451 Clementi Ave 3"
      ],
      "page": 0
    },
    {
      "box": [
        289,
        314,
        704,
        357,
        496.5,
        335.5,
        "# 01-307 Singapore 120451",
        "# 01-307 Singapore 120451"
      ],
      "page": 0
    },
    {
      "box": [
        376,
        350,
        425,
        386,
        400.5,
        368,
        "PHONE",
        "TEL"
      ],
      "page": 0
    },
    {
      "box": [
        464,
        348,
        601,
        383,
        532.5,
        365.5,
        "67743663",
        "67743663"
      ],
      "page": 0
    },
    {
      "box": [
        343,
        417,
        445,
        454,
        394,
        435.5,
        "UEN No",
        "UEN No"
      ],
      "page": 0
    },
    {
      "box": [
        484,
        416,
        657,
        452,
        570.5,
        434,
        "583CS0191L",
        "583CS0191L"
      ],
      "page": 0
    },
    {
      "box": [
        327,
        452,
        428,
        490,
        377.5,
        471,
        "GST No",
        "GST No"
      ],
      "page": 0
    },
    {
      "box": [
        467,
        451,
        676,
        486,
        571.5,
        468.5,
        "M4-0004578-0",
        "M4-0004578-0"
      ],
      "page": 0
    },
    {
      "box": [
        124,
        521,
        413,
        562,
        268.5,
        541.5,
        "CHEF LG ONION RED",
        "CHEF LG ONION RED"
      ],
      "page": 0
    },
    {
      "box": [
        788,
        518,
        853,
        554,
        820.5,
        536,
        "1.35",
        "1.35"
      ],
      "page": 0
    },
    {
      "box": [
        125,
        554,
        468,
        597,
        296.5,
        575.5,
        "CHINA BROCCOLI FLOWR",
        "CHINA BROCCOLI FLOWR"
      ],
      "page": 0
    },
    {
      "box": [
        788,
        554,
        854,
        589,
        821,
        571.5,
        "0.92",
        "0.92"
      ],
      "page": 0
    },
    {
      "box": [
        127,
        594,
        417,
        630,
        272,
        612,
        "CHINA CAULIFLOWER",
        "CHINA CAULIFLOWER"
      ],
      "page": 0
    },
    {
      "box": [
        789,
        590,
        855,
        622,
        822,
        606,
        "0.98",
        "0.98"
      ],
      "page": 0
    },
    {
      "box": [
        128,
        625,
        453,
        665,
        290.5,
        645,
        "CHUAN HUAT EGGS 55G",
        "CHUAN HUAT EGGS 55G"
      ],
      "page": 0
    },
    {
      "box": [
        788,
        624,
        855,
        655,
        821.5,
        639.5,
        "2.80",
        "2.80"
      ],
      "page": 0
    },
    {
      "box": [
        129,
        662,
        419,
        699,
        274,
        680.5,
        "FRESH BLUEBERRIES",
        "FRESH BLUEBERRIES"
      ],
      "page": 0
    },
    {
      "box": [
        790,
        658,
        855,
        688,
        822.5,
        673,
        "3.95",
        "3.95"
      ],
      "page": 0
    },
    {
      "box": [
        165,
        695,
        367,
        732,
        266,
        713.5,
        "Normal Price",
        "Normal Price"
      ],
      "page": 0
    },
    {
      "box": [
        405,
        693,
        471,
        729,
        438,
        711,
        "4.50",
        "4.50"
      ],
      "page": 0
    },
    {
      "box": [
        132,
        729,
        437,
        768,
        284.5,
        748.5,
        "FRESH GREEN PEPPER",
        "FRESH GREEN PEPPER"
      ],
      "page": 0
    },
    {
      "box": [
        792,
        725,
        857,
        762,
        824.5,
        743.5,
        "0.84",
        "0.84"
      ],
      "page": 0
    },
    {
      "box": [
        133,
        763,
        472,
        801,
        302.5,
        782,
        "H HP8611S EGG SHAPER",
        "H HP8611S EGG SHAPER"
      ],
      "page": 0
    },
    {
      "box": [
        792,
        762,
        858,
        793,
        825,
        777.5,
        "1.90",
        "1.90"
      ],
      "page": 0
    },
    {
      "box": [
        134,
        799,
        456,
        835,
        295,
        817,
        "PSR TH/PARSLEY 50G",
        "PSR TH/PARSLEY 50G"
      ],
      "page": 0
    },
    {
      "box": [
        794,
        798,
        860,
        830,
        827,
        814,
        "1.05",
        "1.05"
      ],
      "page": 0
    },
    {
      "box": [
        136,
        833,
        475,
        871,
        305.5,
        852,
        "T HNEY CHERRY TOMATO",
        "T HNEY CHERRY TOMATO"
      ],
      "page": 0
    },
    {
      "box": [
        794,
        833,
        859,
        864,
        826.5,
        848.5,
        "1.50",
        "1.50"
      ],
      "page": 0
    },
    {
      "box": [
        136,
        867,
        420,
        906,
        278,
        886.5,
        "THAI R/B MANGO ( M )",
        "THAI R/B MANGO ( M )"
      ],
      "page": 0
    },
    {
      "box": [
        793,
        866,
        860,
        896,
        826.5,
        881,
        "3.30",
        "3.30"
      ],
      "page": 0
    },
    {
      "box": [
        147,
        933,
        310,
        971,
        228.5,
        952,
        "TOTAL",
        "TOTAL"
      ],
      "page": 0
    },
    {
      "box": [
        653,
        931,
        863,
        967,
        758,
        949,
        "$18.59",
        "$ 18.59"
      ],
      "page": 0
    },
    {
      "box": [
        140,
        967,
        241,
        1002,
        190.5,
        984.5,
        "MASTER",
        "MASTER"
      ],
      "page": 0
    },
    {
      "box": [
        761,
        965,
        866,
        1004,
        813.5,
        984.5,
        "$18.59",
        "$ 18.59"
      ],
      "page": 0
    },
    {
      "box": [
        139,
        997,
        549,
        1038,
        344,
        1017.5,
        "ACNT NO.XXXXXXXXXXXX0714",
        "ACNT NO.XXXXXXXXXXXX0714"
      ],
      "page": 0
    },
    {
      "box": [
        141,
        1033,
        275,
        1070,
        208,
        1051.5,
        "TERMINAL",
        "TERMINAL"
      ],
      "page": 0
    },
    {
      "box": [
        312,
        1033,
        446,
        1070,
        379,
        1051.5,
        "93000749",
        "93000749"
      ],
      "page": 0
    },
    {
      "box": [
        142,
        1068,
        412,
        1107,
        277,
        1087.5,
        "TRANSACTION DATE",
        "TRANSACTION DATE"
      ],
      "page": 0
    },
    {
      "box": [
        452,
        1068,
        743,
        1107,
        597.5,
        1087.5,
        "29/03/19 22:34:57",
        "29/03/19 22:34:57"
      ],
      "page": 0
    },
    {
      "box": [
        143,
        1103,
        225,
        1137,
        184,
        1120,
        "TRANS",
        "TRANS"
      ],
      "page": 0
    },
    {
      "box": [
        263,
        1103,
        361,
        1137,
        312,
        1120,
        "NUMBER",
        "NUMBER"
      ],
      "page": 0
    },
    {
      "box": [
        400,
        1103,
        501,
        1137,
        450.5,
        1120,
        "008144",
        "008144"
      ],
      "page": 0
    },
    {
      "box": [
        143,
        1138,
        208,
        1172,
        175.5,
        1155,
        "AUTH",
        "AUTH"
      ],
      "page": 0
    },
    {
      "box": [
        246,
        1138,
        450,
        1172,
        348,
        1155,
        "CODE: R88302",
        "CODE: R88302"
      ],
      "page": 0
    },
    {
      "box": [
        281,
        1171,
        654,
        1207,
        467.5,
        1189,
        "APPROVED ( CONTACTLESS )",
        "APPROVED ( CONTACTLESS )"
      ],
      "page": 0
    },
    {
      "box": [
        281,
        1206,
        643,
        1244,
        462,
        1225,
        "NO SIGNATURE REQUIRED",
        "NO SIGNATURE REQUIRED"
      ],
      "page": 0
    },
    {
      "box": [
        156,
        1268,
        308,
        1313,
        232,
        1290.5,
        "TOTAL",
        "TOTAL"
      ],
      "page": 0
    },
    {
      "box": [
        354,
        1268,
        594,
        1313,
        474,
        1290.5,
        "SAVINGS",
        "SAVINGS"
      ],
      "page": 0
    },
    {
      "box": [
        699,
        1268,
        872,
        1313,
        785.5,
        1290.5,
        "$0.55",
        "$ 0.55"
      ],
      "page": 0
    },
    {
      "box": [
        143,
        1310,
        329,
        1339,
        236,
        1324.5,
        "***********",
        "***********"
      ],
      "page": 0
    },
    {
      "box": [
        149,
        1341,
        334,
        1377,
        241.5,
        1359,
        "Description",
        "Description"
      ],
      "page": 0
    },
    {
      "box": [
        423,
        1341,
        489,
        1377,
        456,
        1359,
        "Rate",
        "Rate"
      ],
      "page": 0
    },
    {
      "box": [
        564,
        1341,
        715,
        1377,
        639.5,
        1359,
        "After GST",
        "After GST"
      ],
      "page": 0
    },
    {
      "box": [
        755,
        1341,
        871,
        1377,
        813,
        1359,
        "TxAmnt",
        "Tx Amnt"
      ],
      "page": 0
    },
    {
      "box": [
        152,
        1404,
        198,
        1437,
        175,
        1420.5,
        "GST",
        "GST"
      ],
      "page": 0
    },
    {
      "box": [
        460,
        1408,
        543,
        1444,
        501.5,
        1426,
        "7.00%",
        "7.00%"
      ],
      "page": 0
    },
    {
      "box": [
        636,
        1408,
        716,
        1444,
        676,
        1426,
        "18.59",
        "18.59"
      ],
      "page": 0
    },
    {
      "box": [
        810,
        1408,
        872,
        1444,
        841,
        1426,
        "1.22",
        "1.22"
      ],
      "page": 0
    },
    {
      "box": [
        148,
        1440,
        231,
        1471,
        189.5,
        1455.5,
        "*****",
        "*****"
      ],
      "page": 0
    },
    {
      "box": [
        153,
        1470,
        339,
        1513,
        246,
        1491.5,
        "Total Items",
        "Total Items"
      ],
      "page": 0
    },
    {
      "box": [
        377,
        1472,
        407,
        1512,
        392,
        1492,
        "10",
        "10"
      ],
      "page": 0
    },
    {
      "box": [
        427,
        1503,
        615,
        1548,
        521,
        1525.5,
        "LIM LEH TIN",
        "LIM LEH TIN"
      ],
      "page": 0
    },
    {
      "box": [
        152,
        1543,
        252,
        1576,
        202,
        1559.5,
        "St: CLA",
        "St: CLA"
      ],
      "page": 0
    },
    {
      "box": [
        411,
        1543,
        477,
        1583,
        444,
        1563,
        "Rg 3",
        "Rg 3"
      ],
      "page": 0
    },
    {
      "box": [
        551,
        1544,
        668,
        1584,
        609.5,
        1564,
        "Ch: 4864",
        "Ch: 4864"
      ],
      "page": 0
    },
    {
      "box": [
        793,
        1547,
        912,
        1579,
        852.5,
        1563,
        "Tr: 8144",
        "Tr: 8144"
      ],
      "page": 0
    },
    {
      "box": [
        377,
        1576,
        461,
        1616,
        419,
        1596,
        "22:33",
        "22:33"
      ],
      "page": 0
    },
    {
      "box": [
        552,
        1578,
        687,
        1617,
        619.5,
        1597.5,
        "29/03/19",
        "29/03/19"
      ],
      "page": 0
    },
    {
      "box": [
        146,
        1248,
        475,
        1269,
        310.5,
        1258.5,
        "********************",
        "********************"
      ],
      "page": 0
    },
    {
      "box": [
        720,
        1251,
        902,
        1267,
        811,
        1259,
        "***********",
        "***********"
      ],
      "page": 0
    },
    {
      "box": [
        861,
        1316,
        902,
        1333,
        881.5,
        1324.5,
        "КXX",
        "КXX"
      ],
      "page": 0
    },
    {
      "box": [
        815,
        1383,
        870,
        1402,
        842.5,
        1392.5,
        "*****",
        "*****"
      ],
      "page": 0
    },
    {
      "box": [
        831,
        1448,
        870,
        1465,
        850.5,
        1456.5,
        "*****",
        "*****"
      ],
      "page": 0
    },
    {
      "box": [
        255,
        1647,
        817,
        1689,
        536,
        1668,
        "Thank You For Shopping With Us !",
        "Thank You For Shopping With Us !"
      ],
      "page": 0
    },
    {
      "box": [
        214,
        1681,
        850,
        1726,
        532,
        1703.5,
        "Keep receipt for exchange or refund.",
        "Keep receipt for exchange or refund."
      ],
      "page": 0
    },
    {
      "box": [
        272,
        1714,
        794,
        1760,
        533,
        1737,
        "Medicine and hygiene-sensitive",
        "Medicine and hygiene-sensitive"
      ],
      "page": 0
    },
    {
      "box": [
        271,
        1752,
        780,
        1798,
        525.5,
        1775,
        "products are not exchangeable",
        "products are not exchangeable"
      ],
      "page": 0
    },
    {
      "box": [
        413,
        1787,
        640,
        1829,
        526.5,
        1808,
        "or returnable",
        "or returnable"
      ],
      "page": 0
    },
    {
      "box": [
        252,
        1824,
        799,
        1873,
        525.5,
        1848.5,
        "See in-store poster for details",
        "See in-store poster for details"
      ],
      "page": 0
    }
  ],
  "Subtotal": {
    "UICategory": "VAT & Amounts",
    "UIName": "Subtotal",
    "UIType": "Amount",
    "matches": [
      {
        "keyword": null,
        "match": null,
        "matchmulti": null,
        "page": null,
        "value": null
      }
    ]
  },
  "Supplier": null,
  "TableDetected": true,
  "Tables": [
    {
      "GridX": [
        124,
        778,
        873
      ],
      "GridY": [
        518,
        554,
        590,
        624,
        658,
        725,
        762,
        798,
        833,
        866,
        928
      ],
      "GridYPages": [
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      "HeaderPage": 0,
      "header": [],
      "headernum": 2
    }
  ],
  "TaxTotal": {
    "UICategory": "VAT & Amounts",
    "UIName": "Tax Total",
    "UIType": "Amount",
    "matches": [
      {
        "keyword": [
          152,
          1404,
          198,
          1437,
          175,
          1420.5,
          "GST",
          "GST"
        ],
        "match": 1.22,
        "matchmulti": "1.22",
        "page": 0,
        "value": [
          810,
          1408,
          872,
          1444,
          841,
          1426,
          "1.22",
          "1.22"
        ]
      }
    ]
  },
  "Total": {
    "UICategory": "VAT & Amounts",
    "UIName": "Total",
    "UIType": "Amount",
    "matches": [
      {
        "keyword": [
          140,
          967,
          241,
          1002,
          190.5,
          984.5,
          "MASTER",
          "MASTER"
        ],
        "match": 18.59,
        "matchmulti": "$ 18.59",
        "page": 0,
        "value": [
          761,
          965,
          866,
          1004,
          813.5,
          984.5,
          "$18.59",
          "$ 18.59"
        ]
      }
    ]
  },
  "Type": "receipt",
  "UENNumber": {
    "UICategory": "Vendor & Customer",
    "UIName": "UEN Number",
    "UIType": "Text",
    "matches": [
      {
        "keyword": null,
        "match": null,
        "matchmulti": null,
        "page": null,
        "value": null
      }
    ]
  },
  "URL": {
    "UICategory": "Vendor & Customer",
    "UIName": "URL",
    "UIType": "Text",
    "matches": [
      {
        "keyword": null,
        "match": null,
        "matchmulti": null,
        "page": null,
        "value": null
      }
    ]
  },
  "num_pages": 1
}
```

**SDK Code**

```python Extract Receipt
import requests

url = "https://api.staple.io/v1/documents/extract/receipt"

files = { "file": "open('string', 'rb')" }
headers = {"x-api-key": "<apiKey>"}

response = requests.post(url, files=files, headers=headers)

print(response.json())
```

```javascript Extract Receipt
const url = 'https://api.staple.io/v1/documents/extract/receipt';
const form = new FormData();
form.append('file', 'string');

const options = {method: 'POST', headers: {'x-api-key': '<apiKey>'}};

options.body = form;

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Extract Receipt
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.staple.io/v1/documents/extract/receipt"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Extract Receipt
require 'uri'
require 'net/http'

url = URI("https://api.staple.io/v1/documents/extract/receipt")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n"

response = http.request(request)
puts response.read_body
```

```java Extract Receipt
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.staple.io/v1/documents/extract/receipt")
  .header("x-api-key", "<apiKey>")
  .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n")
  .asString();
```

```php Extract Receipt
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.staple.io/v1/documents/extract/receipt', [
  'multipart' => [
    [
        'name' => 'file',
        'filename' => 'string',
        'contents' => null
    ]
  ]
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Extract Receipt
using RestSharp;

var client = new RestClient("https://api.staple.io/v1/documents/extract/receipt");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddParameter("undefined", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Extract Receipt
import Foundation

let headers = ["x-api-key": "<apiKey>"]
let parameters = [
  [
    "name": "file",
    "fileName": "string"
  ]
]

let boundary = "---011000010111000001101001"

var body = ""
var error: NSError? = nil
for param in parameters {
  let paramName = param["name"]!
  body += "--\(boundary)\r\n"
  body += "Content-Disposition:form-data; name=\"\(paramName)\""
  if let filename = param["fileName"] {
    let contentType = param["content-type"]!
    let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
    if (error != nil) {
      print(error as Any)
    }
    body += "; filename=\"\(filename)\"\r\n"
    body += "Content-Type: \(contentType)\r\n\r\n"
    body += fileContent
  } else if let paramValue = param["value"] {
    body += "\r\n\r\n\(paramValue)"
  }
}

let request = NSMutableURLRequest(url: NSURL(string: "https://api.staple.io/v1/documents/extract/receipt")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```