> 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.

# Scan Receipt

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

Scan a document using the Receipt model in Staple to receive the structured data extracted. The documents would be left in the queue specified for any further manipulation.

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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: v1
  version: 1.0.0
paths:
  /v1/documents/scan/receipt:
    post:
      operationId: scanReceipt
      summary: Scan Receipt
      description: >-
        Scan a document using the Receipt model in Staple to receive the
        structured data extracted. The documents would 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_scanReceipt_Response_200'
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                files:
                  type: string
                  format: binary
                  description: File to upload
                qid:
                  type: string
                handwritten:
                  type: string
              required:
                - files
                - qid
                - handwritten
servers:
  - url: https://api.staple.io
    description: https://api.staple.io
components:
  schemas:
    Documents_scanReceipt_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: Documents_scanReceipt_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

### Scan Receipt



**Request**

```json
{}
```

**Response**

```json
{
  "scanDocuments": {
    "data": {
      "BigBoxes": [
        {
          "box": [
            94,
            110,
            401,
            189,
            247.5,
            149.5,
            "In namecheap\n",
            "V namecheap\n"
          ],
          "page": 0
        },
        {
          "box": [
            494,
            132,
            695,
            171,
            594.5,
            151.5,
            "RECEIPT\n",
            "RECEIPT\n"
          ],
          "page": 0
        },
        {
          "box": [
            783,
            92,
            1307,
            250,
            1045,
            171,
            "Namecheap , Inc.\n4600 East Washington Street Suite 305,\nPhoenix, AZ 85034\nUSA\nsupport@namecheap.com\n",
            "Namecheap , Inc.\n4600 East Washington Street Suite 305,\nPhoenix , AZ 85034\nUSA\nsupport@namecheap.com\n"
          ],
          "page": 0
        },
        {
          "box": [
            106,
            212,
            385,
            253,
            245.5,
            232.5,
            "www.namecheap.com\n",
            "www.namecheap.com\n"
          ],
          "page": 0
        },
        {
          "box": [
            477,
            217,
            712,
            245,
            594.5,
            231,
            "Order # 38334410\n",
            "Order # 38334410\n"
          ],
          "page": 0
        },
        {
          "box": [
            94,
            378,
            277,
            557,
            185.5,
            467.5,
            "Order Date\nOrder Number\nTransaction ID\nUser Name\nAddress\n",
            "Order Date\nOrder Number\nTransaction ID\nUser Name\nAddress\n"
          ],
          "page": 0
        },
        {
          "box": [
            739,
            373,
            949,
            484,
            844,
            428.5,
            "Payment Source\nInitial Charge\nFinal Cost\n",
            "Payment Source\nInitial Charge\nFinal Cost\n"
          ],
          "page": 0
        },
        {
          "box": [
            1021,
            377,
            1182,
            483,
            1101.5,
            430,
            ": Credit card\n: $ 3.05\n: $ 3.05\n",
            ": Creditcard\n: $ 3.05\n: $ 3.05\n"
          ],
          "page": 0
        },
        {
          "box": [
            374,
            377,
            677,
            670,
            525.5,
            523.5,
            ": 9/25/2018 5:18:14 AM\n: 38334410\n: 44430970\n: HAR DtonaRTer\n: Jamie Soo\n32 Carpenter Street\nSingapore\nNA\n059911\nSG\n",
            ": 9/25/2018 5:18:14 AM\n: 38334410\n: 44430970\n: HAR DtonaRTer\n: Jamie Soo\n32 Carpenter Street\nSingapore\nNA\n059911\nSG\n"
          ],
          "page": 0
        },
        {
          "box": [
            739,
            529,
            986,
            663,
            862.5,
            596,
            "Total Refund\nRefund Transaction\nID\nRefunded To\n",
            "Total Refund\nRefund Transaction\nID\nRefunded To\n"
          ],
          "page": 0
        },
        {
          "box": [
            1021,
            530,
            1116,
            595,
            1068.5,
            562.5,
            ": $ 0.00\n: N/A\n",
            ": $ 0.00\n: N/A\n"
          ],
          "page": 0
        },
        {
          "box": [
            405,
            609,
            429,
            645,
            417,
            627,
            "NA\n",
            "NA\n"
          ],
          "page": 0
        },
        {
          "box": [
            1022,
            636,
            1089,
            663,
            1055.5,
            649.5,
            ": N/A\n",
            ": N/A\n"
          ],
          "page": 0
        },
        {
          "box": [
            81,
            769,
            257,
            978,
            169,
            873.5,
            "TYPE\n| PURCHASE\nPURCHASE\nREGISTER\n",
            "TYPE\n| PURCHASE\nPURCHASE\nREGISTER\n"
          ],
          "page": 0
        },
        {
          "box": [
            328,
            770,
            560,
            909,
            444,
            839.5,
            "NAME\nPositiveSSL\n| Free WhoisGuard\n",
            "NAME\nPositiveSSL\n| Free WhoisGuard\n"
          ],
          "page": 0
        },
        {
          "box": [
            653,
            761,
            1051,
            982,
            852,
            871.5,
            "QTY DURATION , PRICE\n11\n$ 1.99\n1 year\n1 year\n1\n$ 0.00\n| 1 year\n$ 0.88\n11\n",
            "QTY DURATION , PRICE\n11\n$ 1.99\n1 year\n1 year\n1\n$ 0.00\n| 1 year\n$ 0.88\n11\n"
          ],
          "page": 0
        },
        {
          "box": [
            1090,
            766,
            1329,
            1073,
            1209.5,
            919.5,
            "SUB TOTAL\n$ 1.99\nSetup $ 0.00\n$ 0.00\nSetup $ 0.00\n$ 0.88\nICANN Fee $ 0.18\n$ 3.05\n$ 3.05\n",
            "SUB TOTAL\n$ 1.99\nSetup $ 0.00\n$ 0.00\nSetup $ 0.00\n$ 0.88\nICANN Fee $ 0.18\n$ 3.05\n$ 3.05\n"
          ],
          "page": 0
        },
        {
          "box": [
            332,
            934,
            593,
            1002,
            462.5,
            968,
            "Domain Registration\nnotarum.com\n",
            "Domain Registration\nnotarum.com\n"
          ],
          "page": 0
        },
        {
          "box": [
            738,
            931,
            832,
            979,
            785,
            955,
            "| 1 year\n",
            "| 1 year\n"
          ],
          "page": 0
        },
        {
          "box": [
            927,
            1004,
            1052,
            1070,
            989.5,
            1037,
            "Sub Total\nTOTAL\n",
            "Sub Total\nTOTAL\n"
          ],
          "page": 0
        },
        {
          "box": [
            90,
            1122,
            837,
            1238,
            463.5,
            1180,
            "Additional Transaction Details:\nOrder\n# ch_1DECfx12akwfvovnZXONOOLF\nApproval\n# ch_1DECfx12akwfvovnZXONOOLF\n",
            "Additional Transaction Details:\nOrder\n# ch_1DECfx12akwfvovnZXONOOLF\nApproval\n# ch_1DECfx12akwfvovnZXONOOLF\n"
          ],
          "page": 0
        }
      ],
      "Currency": {
        "UICategory": "VAT & Amounts",
        "UIName": "Currency",
        "UIType": "Text",
        "matches": [
          {
            "keyword": [
              959,
              1043,
              1046,
              1071,
              1002.5,
              1057,
              "TOTAL",
              "TOTAL"
            ],
            "match": "$",
            "matchmulti": "$ 3.05",
            "page": 0,
            "value": [
              1246,
              1043,
              1328,
              1072,
              1287,
              1057.5,
              "$3.05",
              "$ 3.05"
            ]
          },
          {
            "keyword": [
              927,
              1004,
              1052,
              1030,
              989.5,
              1017,
              "Sub Total",
              "Sub Total"
            ],
            "match": "$",
            "matchmulti": "$ 3.05",
            "page": 0,
            "value": [
              1241,
              1004,
              1327,
              1035,
              1284,
              1019.5,
              "$3.05",
              "$ 3.05"
            ]
          }
        ]
      },
      "Customer": null,
      "DetectedText": "In namecheap RECEIPT Namecheap , Inc. 4600 East Washington Street Suite 305, Phoenix, AZ 85034 USA support@namecheap.com www.namecheap.com Order # 38334410 Order Date Order Number Transaction ID User Name Address Payment Source Initial Charge Final Cost : Credit card : $ 3.05 : $ 3.05 : 9/25/2018 5:18:14 AM : 38334410 : 44430970 : HAR DtonaRTer : Jamie Soo 32 Carpenter Street Singapore 059911 SG Total Refund Refund Transaction ID Refunded To : $ 0.00 : N/A NA : N/A TYPE | PURCHASE PURCHASE REGISTER NAME PositiveSSL | Free WhoisGuard QTY DURATION , PRICE 11 1 year $ 1.99 1 1 year $ 0.00 11 $ 0.88 SUB TOTAL $ 1.99 Setup $ 0.00 $ 0.00 Setup $ 0.00 $ 0.88 ICANN Fee $ 0.18 $ 3.05 $ 3.05 Domain Registration notarum.com | 1 year Sub Total TOTAL Additional Transaction Details: Order # ch_1DECfx12akwfvovnZXONOOLF Approval # ch_1DECfx12akwfvovnZXONOOLF ",
      "DocSize": [
        [
          2000,
          1414
        ]
      ],
      "Email": {
        "UICategory": "Vendor & Customer",
        "UIName": "Email",
        "UIType": "Text",
        "matches": [
          {
            "keyword": [
              784,
              214,
              1117,
              251,
              950.5,
              232.5,
              "support@namecheap.com",
              "support@namecheap.com"
            ],
            "match": "support@namecheap.com",
            "matchmulti": "support@namecheap.com",
            "page": 0,
            "value": [
              784,
              214,
              1117,
              251,
              950.5,
              232.5,
              "support@namecheap.com",
              "support@namecheap.com"
            ]
          }
        ]
      },
      "GSTNumber": {
        "UICategory": "Vendor & Customer",
        "UIName": "GST Number",
        "UIType": "Text",
        "matches": [
          {
            "keyword": null,
            "match": null,
            "matchmulti": null,
            "page": null,
            "value": null
          }
        ]
      },
      "LineItems": [
        [
          {
            "Amount": [
              3.05
            ],
            "Description": [
              "Order Number",
              "Initial Charge",
              ": 38334410"
            ]
          },
          {
            "Amount": [
              3.05
            ],
            "Description": [
              "Transaction ID",
              "User Name",
              "Final Cost",
              ": 44430970",
              ": HAR DtonaRTer"
            ]
          }
        ]
      ],
      "LineItems_standardHeader": [
        [
          {
            "Description": "Order Number Initial Charge : 38334410",
            "LineAmount": 3.05,
            "Quantity": 1,
            "UnitAmount": 3.05
          },
          {
            "Description": "Transaction ID User Name Final Cost : 44430970 : HAR DtonaRTer",
            "LineAmount": 3.05,
            "Quantity": 1,
            "UnitAmount": 3.05
          }
        ]
      ],
      "OtherDate": {
        "UICategory": "Basic Information",
        "UIName": "Other Date",
        "UIType": "Date",
        "matches": [
          {
            "keyword": null,
            "match": "2018-09-25",
            "matchmulti": ": 9/25/2018 5:18:14 AM",
            "page": 0,
            "value": [
              377,
              375,
              674,
              408,
              525,
              391,
              ": 9/25/2018 5:18:14 AM"
            ]
          }
        ]
      },
      "SenderAddress": {
        "UICategory": "Vendor & Customer",
        "UIName": "Vendor Address",
        "UIType": "Text",
        "matches": [
          {
            "keyword": [
              783,
              92,
              1307,
              250,
              1045,
              171,
              "Namecheap , Inc.\n4600 East Washington Street Suite 305,\nPhoenix, AZ 85034\nUSA\nsupport@namecheap.com\n",
              "Namecheap , Inc.\n4600 East Washington Street Suite 305,\nPhoenix , AZ 85034\nUSA\nsupport@namecheap.com\n"
            ],
            "match": "Namecheap , Inc.\n4600 East Washington Street Suite 305,\nPhoenix, AZ 85034\nUSA\nsupport@namecheap.com\n",
            "matchmulti": "Namecheap , Inc. 4600 East Washington Street Suite 305, Phoenix , AZ 85034 USA support@namecheap.com",
            "page": 0,
            "value": [
              783,
              92,
              1307,
              250,
              1045,
              171,
              "Namecheap , Inc.\n4600 East Washington Street Suite 305,\nPhoenix, AZ 85034\nUSA\nsupport@namecheap.com\n",
              "Namecheap , Inc.\n4600 East Washington Street Suite 305,\nPhoenix , AZ 85034\nUSA\nsupport@namecheap.com\n"
            ]
          }
        ]
      },
      "ServiceCharge": {
        "UICategory": "VAT & Amounts",
        "UIName": "Service Charge",
        "UIType": "Amount",
        "matches": [
          {
            "keyword": null,
            "match": null,
            "matchmulti": null,
            "page": null,
            "value": null
          }
        ]
      },
      "SmallBoxes": [
        {
          "box": [
            94,
            110,
            401,
            188,
            247.5,
            149,
            "In namecheap",
            "V namecheap"
          ],
          "page": 0
        },
        {
          "box": [
            494,
            132,
            695,
            171,
            594.5,
            151.5,
            "RECEIPT",
            "RECEIPT"
          ],
          "page": 0
        },
        {
          "box": [
            794,
            92,
            1006,
            123,
            900,
            107.5,
            "Namecheap , Inc.",
            "Namecheap , Inc."
          ],
          "page": 0
        },
        {
          "box": [
            793,
            120,
            1306,
            155,
            1049.5,
            137.5,
            "4600 East Washington Street Suite 305,",
            "4600 East Washington Street Suite 305,"
          ],
          "page": 0
        },
        {
          "box": [
            793,
            146,
            1039,
            179,
            916,
            162.5,
            "Phoenix, AZ 85034",
            "Phoenix , AZ 85034"
          ],
          "page": 0
        },
        {
          "box": [
            794,
            179,
            849,
            208,
            821.5,
            193.5,
            "USA",
            "USA"
          ],
          "page": 0
        },
        {
          "box": [
            784,
            214,
            1117,
            251,
            950.5,
            232.5,
            "support@namecheap.com",
            "support@namecheap.com"
          ],
          "page": 0
        },
        {
          "box": [
            106,
            212,
            385,
            253,
            245.5,
            232.5,
            "www.namecheap.com",
            "www.namecheap.com"
          ],
          "page": 0
        },
        {
          "box": [
            477,
            217,
            712,
            245,
            594.5,
            231,
            "Order # 38334410",
            "Order # 38334410"
          ],
          "page": 0
        },
        {
          "box": [
            96,
            378,
            234,
            407,
            165,
            392.5,
            "Order Date",
            "Order Date"
          ],
          "page": 0
        },
        {
          "box": [
            96,
            416,
            277,
            444,
            186.5,
            430,
            "Order Number",
            "Order Number"
          ],
          "page": 0
        },
        {
          "box": [
            94,
            452,
            276,
            483,
            185,
            467.5,
            "Transaction ID",
            "Transaction ID"
          ],
          "page": 0
        },
        {
          "box": [
            96,
            492,
            237,
            520,
            166.5,
            506,
            "User Name",
            "User Name"
          ],
          "page": 0
        },
        {
          "box": [
            95,
            528,
            196,
            557,
            145.5,
            542.5,
            "Address",
            "Address"
          ],
          "page": 0
        },
        {
          "box": [
            739,
            375,
            949,
            411,
            844,
            393,
            "Payment Source",
            "Payment Source"
          ],
          "page": 0
        },
        {
          "box": [
            741,
            411,
            906,
            450,
            823.5,
            430.5,
            "Initial Charge",
            "Initial Charge"
          ],
          "page": 0
        },
        {
          "box": [
            741,
            454,
            870,
            484,
            805.5,
            469,
            "Final Cost",
            "Final Cost"
          ],
          "page": 0
        },
        {
          "box": [
            1023,
            377,
            1180,
            407,
            1101.5,
            392,
            ": Credit card",
            ": Creditcard"
          ],
          "page": 0
        },
        {
          "box": [
            1023,
            416,
            1113,
            447,
            1068,
            431.5,
            ": $ 3.05",
            ": $ 3.05"
          ],
          "page": 0
        },
        {
          "box": [
            1022,
            453,
            1114,
            486,
            1068,
            469.5,
            ": $ 3.05",
            ": $ 3.05"
          ],
          "page": 0
        },
        {
          "box": [
            377,
            375,
            674,
            408,
            525.5,
            391.5,
            ": 9/25/2018 5:18:14 AM",
            ": 9/25/2018 5:18:14 AM"
          ],
          "page": 0
        },
        {
          "box": [
            377,
            416,
            525,
            443,
            451,
            429.5,
            ": 38334410",
            ": 38334410"
          ],
          "page": 0
        },
        {
          "box": [
            377,
            453,
            524,
            483,
            450.5,
            468,
            ": 44430970",
            ": 44430970"
          ],
          "page": 0
        },
        {
          "box": [
            377,
            491,
            596,
            520,
            486.5,
            505.5,
            ": HAR DtonaRTer",
            ": HAR DtonaRTer"
          ],
          "page": 0
        },
        {
          "box": [
            376,
            527,
            531,
            560,
            453.5,
            543.5,
            ": Jamie Soo",
            ": Jamie Soo"
          ],
          "page": 0
        },
        {
          "box": [
            397,
            556,
            650,
            591,
            523.5,
            573.5,
            "32 Carpenter Street",
            "32 Carpenter Street"
          ],
          "page": 0
        },
        {
          "box": [
            401,
            587,
            535,
            620,
            468,
            603.5,
            "Singapore",
            "Singapore"
          ],
          "page": 0
        },
        {
          "box": [
            464,
            617,
            555,
            644,
            509.5,
            630.5,
            "059911",
            "059911"
          ],
          "page": 0
        },
        {
          "box": [
            401,
            645,
            436,
            671,
            418.5,
            658,
            "SG",
            "SG"
          ],
          "page": 0
        },
        {
          "box": [
            739,
            529,
            901,
            558,
            820,
            543.5,
            "Total Refund",
            "Total Refund"
          ],
          "page": 0
        },
        {
          "box": [
            741,
            566,
            986,
            596,
            863.5,
            581,
            "Refund Transaction",
            "Refund Transaction"
          ],
          "page": 0
        },
        {
          "box": [
            739,
            598,
            764,
            623,
            751.5,
            610.5,
            "ID",
            "ID"
          ],
          "page": 0
        },
        {
          "box": [
            741,
            634,
            902,
            663,
            821.5,
            648.5,
            "Refunded To",
            "Refunded To"
          ],
          "page": 0
        },
        {
          "box": [
            1023,
            530,
            1114,
            560,
            1068.5,
            545,
            ":$0.00",
            ": $ 0.00"
          ],
          "page": 0
        },
        {
          "box": [
            1022,
            566,
            1090,
            598,
            1056,
            582,
            ": N/A",
            ": N/A"
          ],
          "page": 0
        },
        {
          "box": [
            405,
            609,
            429,
            645,
            417,
            627,
            "NA",
            "NA"
          ],
          "page": 0
        },
        {
          "box": [
            1022,
            634,
            1089,
            665,
            1055.5,
            649.5,
            ": N/A",
            ": N/A"
          ],
          "page": 0
        },
        {
          "box": [
            164,
            768,
            254,
            799,
            209,
            783.5,
            "TYPE",
            "TYPE"
          ],
          "page": 0
        },
        {
          "box": [
            82,
            801,
            252,
            848,
            167,
            824.5,
            "| PURCHASE",
            "| PURCHASE"
          ],
          "page": 0
        },
        {
          "box": [
            90,
            866,
            243,
            919,
            166.5,
            892.5,
            "PURCHASE",
            "PURCHASE"
          ],
          "page": 0
        },
        {
          "box": [
            84,
            934,
            231,
            978,
            157.5,
            956,
            "REGISTER",
            "REGISTER"
          ],
          "page": 0
        },
        {
          "box": [
            442,
            768,
            546,
            798,
            494,
            783,
            "NAME",
            "NAME"
          ],
          "page": 0
        },
        {
          "box": [
            329,
            801,
            496,
            846,
            412.5,
            823.5,
            "PositiveSSL",
            "PositiveSSL"
          ],
          "page": 0
        },
        {
          "box": [
            330,
            866,
            560,
            913,
            445,
            889.5,
            "| Free WhoisGuard",
            "| Free WhoisGuard"
          ],
          "page": 0
        },
        {
          "box": [
            675,
            761,
            1024,
            809,
            849.5,
            785,
            "QTY DURATION , PRICE",
            "QTY DURATION , PRICE"
          ],
          "page": 0
        },
        {
          "box": [
            653,
            802,
            675,
            849,
            664,
            825.5,
            "11",
            "11"
          ],
          "page": 0
        },
        {
          "box": [
            741,
            808,
            827,
            840,
            784,
            824,
            "1 year",
            "1 year"
          ],
          "page": 0
        },
        {
          "box": [
            979,
            804,
            1046,
            835,
            1012.5,
            819.5,
            "$ 1.99",
            "$ 1.99"
          ],
          "page": 0
        },
        {
          "box": [
            661,
            867,
            675,
            920,
            668,
            893.5,
            "1",
            "1"
          ],
          "page": 0
        },
        {
          "box": [
            739,
            865,
            829,
            919,
            784,
            892,
            "1 year",
            "1 year"
          ],
          "page": 0
        },
        {
          "box": [
            979,
            869,
            1047,
            910,
            1013,
            889.5,
            "$ 0.00",
            "$ 0.00"
          ],
          "page": 0
        },
        {
          "box": [
            655,
            936,
            674,
            982,
            664.5,
            959,
            "11",
            "11"
          ],
          "page": 0
        },
        {
          "box": [
            983,
            934,
            1051,
            969,
            1017,
            951.5,
            "$ 0.88",
            "$ 0.88"
          ],
          "page": 0
        },
        {
          "box": [
            1114,
            766,
            1267,
            799,
            1190.5,
            782.5,
            "SUB TOTAL",
            "SUB TOTAL"
          ],
          "page": 0
        },
        {
          "box": [
            1252,
            802,
            1320,
            835,
            1286,
            818.5,
            "$ 1.99",
            "$ 1.99"
          ],
          "page": 0
        },
        {
          "box": [
            1160,
            834,
            1319,
            863,
            1239.5,
            848.5,
            "Setup $ 0.00",
            "Setup $ 0.00"
          ],
          "page": 0
        },
        {
          "box": [
            1254,
            872,
            1320,
            902,
            1287,
            887,
            "$ 0.00",
            "$ 0.00"
          ],
          "page": 0
        },
        {
          "box": [
            1162,
            900,
            1319,
            930,
            1240.5,
            915,
            "Setup $ 0.00",
            "Setup $ 0.00"
          ],
          "page": 0
        },
        {
          "box": [
            1254,
            938,
            1322,
            968,
            1288,
            953,
            "$ 0.88",
            "$ 0.88"
          ],
          "page": 0
        },
        {
          "box": [
            1091,
            966,
            1326,
            995,
            1208.5,
            980.5,
            "ICANN Fee $ 0.18",
            "ICANN Fee $ 0.18"
          ],
          "page": 0
        },
        {
          "box": [
            1241,
            1004,
            1327,
            1035,
            1284,
            1019.5,
            "$3.05",
            "$ 3.05"
          ],
          "page": 0
        },
        {
          "box": [
            1246,
            1043,
            1328,
            1072,
            1287,
            1057.5,
            "$3.05",
            "$ 3.05"
          ],
          "page": 0
        },
        {
          "box": [
            332,
            934,
            593,
            973,
            462.5,
            953.5,
            "Domain Registration",
            "Domain Registration"
          ],
          "page": 0
        },
        {
          "box": [
            331,
            967,
            509,
            1001,
            420,
            984,
            "notarum.com",
            "notarum.com"
          ],
          "page": 0
        },
        {
          "box": [
            738,
            928,
            832,
            987,
            785,
            957.5,
            "| 1 year",
            "| 1 year"
          ],
          "page": 0
        },
        {
          "box": [
            927,
            1004,
            1052,
            1030,
            989.5,
            1017,
            "Sub Total",
            "Sub Total"
          ],
          "page": 0
        },
        {
          "box": [
            959,
            1043,
            1046,
            1071,
            1002.5,
            1057,
            "TOTAL",
            "TOTAL"
          ],
          "page": 0
        },
        {
          "box": [
            90,
            1122,
            473,
            1152,
            281.5,
            1137,
            "Additional Transaction Details:",
            "Additional Transaction Details:"
          ],
          "page": 0
        },
        {
          "box": [
            96,
            1166,
            168,
            1194,
            132,
            1180,
            "Order",
            "Order"
          ],
          "page": 0
        },
        {
          "box": [
            376,
            1167,
            836,
            1201,
            606,
            1184,
            "# ch_1DECfx12akwfvovnZXONOOLF",
            "# ch_1DECfx12akwfvovnZXONOOLF"
          ],
          "page": 0
        },
        {
          "box": [
            95,
            1204,
            207,
            1237,
            151,
            1220.5,
            "Approval",
            "Approval"
          ],
          "page": 0
        },
        {
          "box": [
            376,
            1205,
            836,
            1237,
            606,
            1221,
            "# ch_1DECfx12akwfvovnZXONOOLF",
            "# ch_1DECfx12akwfvovnZXONOOLF"
          ],
          "page": 0
        }
      ],
      "Subtotal": {
        "UICategory": "VAT & Amounts",
        "UIName": "Subtotal",
        "UIType": "Amount",
        "matches": [
          {
            "keyword": [
              927,
              1004,
              1052,
              1030,
              989.5,
              1017,
              "Sub Total",
              "Sub Total"
            ],
            "match": 3.05,
            "matchmulti": "$ 3.05",
            "page": 0,
            "value": [
              1241,
              1004,
              1327,
              1035,
              1284,
              1019.5,
              "$3.05",
              "$ 3.05"
            ]
          }
        ]
      },
      "Supplier": null,
      "TableDetected": true,
      "Tables": [
        {
          "GridX": [
            94,
            1012,
            1336
          ],
          "GridY": [
            416,
            453,
            524
          ],
          "GridYPages": [
            0,
            0,
            0
          ],
          "HeaderPage": 0,
          "header": [],
          "headernum": 2
        }
      ],
      "TaxTotal": {
        "UICategory": "VAT & Amounts",
        "UIName": "Tax Total",
        "UIType": "Amount",
        "matches": [
          {
            "keyword": null,
            "match": null,
            "matchmulti": null,
            "page": null,
            "value": null
          }
        ]
      },
      "Total": {
        "UICategory": "VAT & Amounts",
        "UIName": "Total",
        "UIType": "Amount",
        "matches": [
          {
            "keyword": [
              959,
              1043,
              1046,
              1071,
              1002.5,
              1057,
              "TOTAL",
              "TOTAL"
            ],
            "match": 3.05,
            "matchmulti": "$ 3.05",
            "page": 0,
            "value": [
              1246,
              1043,
              1328,
              1072,
              1287,
              1057.5,
              "$3.05",
              "$ 3.05"
            ]
          }
        ]
      },
      "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": [
              106,
              212,
              385,
              253,
              245.5,
              232.5,
              "www.namecheap.com",
              "www.namecheap.com"
            ],
            "match": "www.namecheap.com",
            "matchmulti": "www.namecheap.com",
            "page": 0,
            "value": [
              106,
              212,
              385,
              253,
              245.5,
              232.5,
              "www.namecheap.com",
              "www.namecheap.com"
            ]
          }
        ]
      },
      "num_pages": 1
    },
    "docId": 8725,
    "status": "COMPLETED"
  }
}
```

**SDK Code**

```python Scan Receipt
import requests

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

payload = "-----011000010111000001101001--\r\n"
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "multipart/form-data; boundary=---011000010111000001101001"
}

response = requests.post(url, data=payload, headers=headers)

print(response.json())
```

```javascript Scan Receipt
const url = 'https://api.staple.io/v1/documents/scan/receipt';
const form = new FormData();

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 Scan Receipt
package main

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

func main() {

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

	payload := strings.NewReader("-----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 Scan Receipt
require 'uri'
require 'net/http'

url = URI("https://api.staple.io/v1/documents/scan/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\n"

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

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

HttpResponse<String> response = Unirest.post("https://api.staple.io/v1/documents/scan/receipt")
  .header("x-api-key", "<apiKey>")
  .body("-----011000010111000001101001--\r\n")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.staple.io/v1/documents/scan/receipt', [
  'headers' => [
    'Content-Type' => 'multipart/form-data; boundary=---011000010111000001101001',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Scan Receipt
using RestSharp;

var client = new RestClient("https://api.staple.io/v1/documents/scan/receipt");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "multipart/form-data; boundary=---011000010111000001101001");
request.AddParameter("undefined", "-----011000010111000001101001--\r\n", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Scan Receipt
import Foundation

let headers = ["x-api-key": "<apiKey>"]
let parameters = []

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/scan/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()
```

### Documents_scanReceipt_example



**Request**

```json
{
  "files": "<file: string>",
  "handwritten": "[true]",
  "qid": "1"
}
```

**Response**

```json
{
  "scanDocuments": {
    "data": {
      "BigBoxes": [
        {
          "box": [
            94,
            110,
            401,
            189,
            247.5,
            149.5,
            "In namecheap\n",
            "V namecheap\n"
          ],
          "page": 0
        },
        {
          "box": [
            494,
            132,
            695,
            171,
            594.5,
            151.5,
            "RECEIPT\n",
            "RECEIPT\n"
          ],
          "page": 0
        },
        {
          "box": [
            783,
            92,
            1307,
            250,
            1045,
            171,
            "Namecheap , Inc.\n4600 East Washington Street Suite 305,\nPhoenix, AZ 85034\nUSA\nsupport@namecheap.com\n",
            "Namecheap , Inc.\n4600 East Washington Street Suite 305,\nPhoenix , AZ 85034\nUSA\nsupport@namecheap.com\n"
          ],
          "page": 0
        },
        {
          "box": [
            106,
            212,
            385,
            253,
            245.5,
            232.5,
            "www.namecheap.com\n",
            "www.namecheap.com\n"
          ],
          "page": 0
        },
        {
          "box": [
            477,
            217,
            712,
            245,
            594.5,
            231,
            "Order # 38334410\n",
            "Order # 38334410\n"
          ],
          "page": 0
        },
        {
          "box": [
            94,
            378,
            277,
            557,
            185.5,
            467.5,
            "Order Date\nOrder Number\nTransaction ID\nUser Name\nAddress\n",
            "Order Date\nOrder Number\nTransaction ID\nUser Name\nAddress\n"
          ],
          "page": 0
        },
        {
          "box": [
            739,
            373,
            949,
            484,
            844,
            428.5,
            "Payment Source\nInitial Charge\nFinal Cost\n",
            "Payment Source\nInitial Charge\nFinal Cost\n"
          ],
          "page": 0
        },
        {
          "box": [
            1021,
            377,
            1182,
            483,
            1101.5,
            430,
            ": Credit card\n: $ 3.05\n: $ 3.05\n",
            ": Creditcard\n: $ 3.05\n: $ 3.05\n"
          ],
          "page": 0
        },
        {
          "box": [
            374,
            377,
            677,
            670,
            525.5,
            523.5,
            ": 9/25/2018 5:18:14 AM\n: 38334410\n: 44430970\n: HAR DtonaRTer\n: Jamie Soo\n32 Carpenter Street\nSingapore\nNA\n059911\nSG\n",
            ": 9/25/2018 5:18:14 AM\n: 38334410\n: 44430970\n: HAR DtonaRTer\n: Jamie Soo\n32 Carpenter Street\nSingapore\nNA\n059911\nSG\n"
          ],
          "page": 0
        },
        {
          "box": [
            739,
            529,
            986,
            663,
            862.5,
            596,
            "Total Refund\nRefund Transaction\nID\nRefunded To\n",
            "Total Refund\nRefund Transaction\nID\nRefunded To\n"
          ],
          "page": 0
        },
        {
          "box": [
            1021,
            530,
            1116,
            595,
            1068.5,
            562.5,
            ": $ 0.00\n: N/A\n",
            ": $ 0.00\n: N/A\n"
          ],
          "page": 0
        },
        {
          "box": [
            405,
            609,
            429,
            645,
            417,
            627,
            "NA\n",
            "NA\n"
          ],
          "page": 0
        },
        {
          "box": [
            1022,
            636,
            1089,
            663,
            1055.5,
            649.5,
            ": N/A\n",
            ": N/A\n"
          ],
          "page": 0
        },
        {
          "box": [
            81,
            769,
            257,
            978,
            169,
            873.5,
            "TYPE\n| PURCHASE\nPURCHASE\nREGISTER\n",
            "TYPE\n| PURCHASE\nPURCHASE\nREGISTER\n"
          ],
          "page": 0
        },
        {
          "box": [
            328,
            770,
            560,
            909,
            444,
            839.5,
            "NAME\nPositiveSSL\n| Free WhoisGuard\n",
            "NAME\nPositiveSSL\n| Free WhoisGuard\n"
          ],
          "page": 0
        },
        {
          "box": [
            653,
            761,
            1051,
            982,
            852,
            871.5,
            "QTY DURATION , PRICE\n11\n$ 1.99\n1 year\n1 year\n1\n$ 0.00\n| 1 year\n$ 0.88\n11\n",
            "QTY DURATION , PRICE\n11\n$ 1.99\n1 year\n1 year\n1\n$ 0.00\n| 1 year\n$ 0.88\n11\n"
          ],
          "page": 0
        },
        {
          "box": [
            1090,
            766,
            1329,
            1073,
            1209.5,
            919.5,
            "SUB TOTAL\n$ 1.99\nSetup $ 0.00\n$ 0.00\nSetup $ 0.00\n$ 0.88\nICANN Fee $ 0.18\n$ 3.05\n$ 3.05\n",
            "SUB TOTAL\n$ 1.99\nSetup $ 0.00\n$ 0.00\nSetup $ 0.00\n$ 0.88\nICANN Fee $ 0.18\n$ 3.05\n$ 3.05\n"
          ],
          "page": 0
        },
        {
          "box": [
            332,
            934,
            593,
            1002,
            462.5,
            968,
            "Domain Registration\nnotarum.com\n",
            "Domain Registration\nnotarum.com\n"
          ],
          "page": 0
        },
        {
          "box": [
            738,
            931,
            832,
            979,
            785,
            955,
            "| 1 year\n",
            "| 1 year\n"
          ],
          "page": 0
        },
        {
          "box": [
            927,
            1004,
            1052,
            1070,
            989.5,
            1037,
            "Sub Total\nTOTAL\n",
            "Sub Total\nTOTAL\n"
          ],
          "page": 0
        },
        {
          "box": [
            90,
            1122,
            837,
            1238,
            463.5,
            1180,
            "Additional Transaction Details:\nOrder\n# ch_1DECfx12akwfvovnZXONOOLF\nApproval\n# ch_1DECfx12akwfvovnZXONOOLF\n",
            "Additional Transaction Details:\nOrder\n# ch_1DECfx12akwfvovnZXONOOLF\nApproval\n# ch_1DECfx12akwfvovnZXONOOLF\n"
          ],
          "page": 0
        }
      ],
      "Currency": {
        "UICategory": "VAT & Amounts",
        "UIName": "Currency",
        "UIType": "Text",
        "matches": [
          {
            "keyword": [
              959,
              1043,
              1046,
              1071,
              1002.5,
              1057,
              "TOTAL",
              "TOTAL"
            ],
            "match": "$",
            "matchmulti": "$ 3.05",
            "page": 0,
            "value": [
              1246,
              1043,
              1328,
              1072,
              1287,
              1057.5,
              "$3.05",
              "$ 3.05"
            ]
          },
          {
            "keyword": [
              927,
              1004,
              1052,
              1030,
              989.5,
              1017,
              "Sub Total",
              "Sub Total"
            ],
            "match": "$",
            "matchmulti": "$ 3.05",
            "page": 0,
            "value": [
              1241,
              1004,
              1327,
              1035,
              1284,
              1019.5,
              "$3.05",
              "$ 3.05"
            ]
          }
        ]
      },
      "Customer": null,
      "DetectedText": "In namecheap RECEIPT Namecheap , Inc. 4600 East Washington Street Suite 305, Phoenix, AZ 85034 USA support@namecheap.com www.namecheap.com Order # 38334410 Order Date Order Number Transaction ID User Name Address Payment Source Initial Charge Final Cost : Credit card : $ 3.05 : $ 3.05 : 9/25/2018 5:18:14 AM : 38334410 : 44430970 : HAR DtonaRTer : Jamie Soo 32 Carpenter Street Singapore 059911 SG Total Refund Refund Transaction ID Refunded To : $ 0.00 : N/A NA : N/A TYPE | PURCHASE PURCHASE REGISTER NAME PositiveSSL | Free WhoisGuard QTY DURATION , PRICE 11 1 year $ 1.99 1 1 year $ 0.00 11 $ 0.88 SUB TOTAL $ 1.99 Setup $ 0.00 $ 0.00 Setup $ 0.00 $ 0.88 ICANN Fee $ 0.18 $ 3.05 $ 3.05 Domain Registration notarum.com | 1 year Sub Total TOTAL Additional Transaction Details: Order # ch_1DECfx12akwfvovnZXONOOLF Approval # ch_1DECfx12akwfvovnZXONOOLF ",
      "DocSize": [
        [
          2000,
          1414
        ]
      ],
      "Email": {
        "UICategory": "Vendor & Customer",
        "UIName": "Email",
        "UIType": "Text",
        "matches": [
          {
            "keyword": [
              784,
              214,
              1117,
              251,
              950.5,
              232.5,
              "support@namecheap.com",
              "support@namecheap.com"
            ],
            "match": "support@namecheap.com",
            "matchmulti": "support@namecheap.com",
            "page": 0,
            "value": [
              784,
              214,
              1117,
              251,
              950.5,
              232.5,
              "support@namecheap.com",
              "support@namecheap.com"
            ]
          }
        ]
      },
      "GSTNumber": {
        "UICategory": "Vendor & Customer",
        "UIName": "GST Number",
        "UIType": "Text",
        "matches": [
          {
            "keyword": null,
            "match": null,
            "matchmulti": null,
            "page": null,
            "value": null
          }
        ]
      },
      "LineItems": [
        [
          {
            "Amount": [
              3.05
            ],
            "Description": [
              "Order Number",
              "Initial Charge",
              ": 38334410"
            ]
          },
          {
            "Amount": [
              3.05
            ],
            "Description": [
              "Transaction ID",
              "User Name",
              "Final Cost",
              ": 44430970",
              ": HAR DtonaRTer"
            ]
          }
        ]
      ],
      "LineItems_standardHeader": [
        [
          {
            "Description": "Order Number Initial Charge : 38334410",
            "LineAmount": 3.05,
            "Quantity": 1,
            "UnitAmount": 3.05
          },
          {
            "Description": "Transaction ID User Name Final Cost : 44430970 : HAR DtonaRTer",
            "LineAmount": 3.05,
            "Quantity": 1,
            "UnitAmount": 3.05
          }
        ]
      ],
      "OtherDate": {
        "UICategory": "Basic Information",
        "UIName": "Other Date",
        "UIType": "Date",
        "matches": [
          {
            "keyword": null,
            "match": "2018-09-25",
            "matchmulti": ": 9/25/2018 5:18:14 AM",
            "page": 0,
            "value": [
              377,
              375,
              674,
              408,
              525,
              391,
              ": 9/25/2018 5:18:14 AM"
            ]
          }
        ]
      },
      "SenderAddress": {
        "UICategory": "Vendor & Customer",
        "UIName": "Vendor Address",
        "UIType": "Text",
        "matches": [
          {
            "keyword": [
              783,
              92,
              1307,
              250,
              1045,
              171,
              "Namecheap , Inc.\n4600 East Washington Street Suite 305,\nPhoenix, AZ 85034\nUSA\nsupport@namecheap.com\n",
              "Namecheap , Inc.\n4600 East Washington Street Suite 305,\nPhoenix , AZ 85034\nUSA\nsupport@namecheap.com\n"
            ],
            "match": "Namecheap , Inc.\n4600 East Washington Street Suite 305,\nPhoenix, AZ 85034\nUSA\nsupport@namecheap.com\n",
            "matchmulti": "Namecheap , Inc. 4600 East Washington Street Suite 305, Phoenix , AZ 85034 USA support@namecheap.com",
            "page": 0,
            "value": [
              783,
              92,
              1307,
              250,
              1045,
              171,
              "Namecheap , Inc.\n4600 East Washington Street Suite 305,\nPhoenix, AZ 85034\nUSA\nsupport@namecheap.com\n",
              "Namecheap , Inc.\n4600 East Washington Street Suite 305,\nPhoenix , AZ 85034\nUSA\nsupport@namecheap.com\n"
            ]
          }
        ]
      },
      "ServiceCharge": {
        "UICategory": "VAT & Amounts",
        "UIName": "Service Charge",
        "UIType": "Amount",
        "matches": [
          {
            "keyword": null,
            "match": null,
            "matchmulti": null,
            "page": null,
            "value": null
          }
        ]
      },
      "SmallBoxes": [
        {
          "box": [
            94,
            110,
            401,
            188,
            247.5,
            149,
            "In namecheap",
            "V namecheap"
          ],
          "page": 0
        },
        {
          "box": [
            494,
            132,
            695,
            171,
            594.5,
            151.5,
            "RECEIPT",
            "RECEIPT"
          ],
          "page": 0
        },
        {
          "box": [
            794,
            92,
            1006,
            123,
            900,
            107.5,
            "Namecheap , Inc.",
            "Namecheap , Inc."
          ],
          "page": 0
        },
        {
          "box": [
            793,
            120,
            1306,
            155,
            1049.5,
            137.5,
            "4600 East Washington Street Suite 305,",
            "4600 East Washington Street Suite 305,"
          ],
          "page": 0
        },
        {
          "box": [
            793,
            146,
            1039,
            179,
            916,
            162.5,
            "Phoenix, AZ 85034",
            "Phoenix , AZ 85034"
          ],
          "page": 0
        },
        {
          "box": [
            794,
            179,
            849,
            208,
            821.5,
            193.5,
            "USA",
            "USA"
          ],
          "page": 0
        },
        {
          "box": [
            784,
            214,
            1117,
            251,
            950.5,
            232.5,
            "support@namecheap.com",
            "support@namecheap.com"
          ],
          "page": 0
        },
        {
          "box": [
            106,
            212,
            385,
            253,
            245.5,
            232.5,
            "www.namecheap.com",
            "www.namecheap.com"
          ],
          "page": 0
        },
        {
          "box": [
            477,
            217,
            712,
            245,
            594.5,
            231,
            "Order # 38334410",
            "Order # 38334410"
          ],
          "page": 0
        },
        {
          "box": [
            96,
            378,
            234,
            407,
            165,
            392.5,
            "Order Date",
            "Order Date"
          ],
          "page": 0
        },
        {
          "box": [
            96,
            416,
            277,
            444,
            186.5,
            430,
            "Order Number",
            "Order Number"
          ],
          "page": 0
        },
        {
          "box": [
            94,
            452,
            276,
            483,
            185,
            467.5,
            "Transaction ID",
            "Transaction ID"
          ],
          "page": 0
        },
        {
          "box": [
            96,
            492,
            237,
            520,
            166.5,
            506,
            "User Name",
            "User Name"
          ],
          "page": 0
        },
        {
          "box": [
            95,
            528,
            196,
            557,
            145.5,
            542.5,
            "Address",
            "Address"
          ],
          "page": 0
        },
        {
          "box": [
            739,
            375,
            949,
            411,
            844,
            393,
            "Payment Source",
            "Payment Source"
          ],
          "page": 0
        },
        {
          "box": [
            741,
            411,
            906,
            450,
            823.5,
            430.5,
            "Initial Charge",
            "Initial Charge"
          ],
          "page": 0
        },
        {
          "box": [
            741,
            454,
            870,
            484,
            805.5,
            469,
            "Final Cost",
            "Final Cost"
          ],
          "page": 0
        },
        {
          "box": [
            1023,
            377,
            1180,
            407,
            1101.5,
            392,
            ": Credit card",
            ": Creditcard"
          ],
          "page": 0
        },
        {
          "box": [
            1023,
            416,
            1113,
            447,
            1068,
            431.5,
            ": $ 3.05",
            ": $ 3.05"
          ],
          "page": 0
        },
        {
          "box": [
            1022,
            453,
            1114,
            486,
            1068,
            469.5,
            ": $ 3.05",
            ": $ 3.05"
          ],
          "page": 0
        },
        {
          "box": [
            377,
            375,
            674,
            408,
            525.5,
            391.5,
            ": 9/25/2018 5:18:14 AM",
            ": 9/25/2018 5:18:14 AM"
          ],
          "page": 0
        },
        {
          "box": [
            377,
            416,
            525,
            443,
            451,
            429.5,
            ": 38334410",
            ": 38334410"
          ],
          "page": 0
        },
        {
          "box": [
            377,
            453,
            524,
            483,
            450.5,
            468,
            ": 44430970",
            ": 44430970"
          ],
          "page": 0
        },
        {
          "box": [
            377,
            491,
            596,
            520,
            486.5,
            505.5,
            ": HAR DtonaRTer",
            ": HAR DtonaRTer"
          ],
          "page": 0
        },
        {
          "box": [
            376,
            527,
            531,
            560,
            453.5,
            543.5,
            ": Jamie Soo",
            ": Jamie Soo"
          ],
          "page": 0
        },
        {
          "box": [
            397,
            556,
            650,
            591,
            523.5,
            573.5,
            "32 Carpenter Street",
            "32 Carpenter Street"
          ],
          "page": 0
        },
        {
          "box": [
            401,
            587,
            535,
            620,
            468,
            603.5,
            "Singapore",
            "Singapore"
          ],
          "page": 0
        },
        {
          "box": [
            464,
            617,
            555,
            644,
            509.5,
            630.5,
            "059911",
            "059911"
          ],
          "page": 0
        },
        {
          "box": [
            401,
            645,
            436,
            671,
            418.5,
            658,
            "SG",
            "SG"
          ],
          "page": 0
        },
        {
          "box": [
            739,
            529,
            901,
            558,
            820,
            543.5,
            "Total Refund",
            "Total Refund"
          ],
          "page": 0
        },
        {
          "box": [
            741,
            566,
            986,
            596,
            863.5,
            581,
            "Refund Transaction",
            "Refund Transaction"
          ],
          "page": 0
        },
        {
          "box": [
            739,
            598,
            764,
            623,
            751.5,
            610.5,
            "ID",
            "ID"
          ],
          "page": 0
        },
        {
          "box": [
            741,
            634,
            902,
            663,
            821.5,
            648.5,
            "Refunded To",
            "Refunded To"
          ],
          "page": 0
        },
        {
          "box": [
            1023,
            530,
            1114,
            560,
            1068.5,
            545,
            ":$0.00",
            ": $ 0.00"
          ],
          "page": 0
        },
        {
          "box": [
            1022,
            566,
            1090,
            598,
            1056,
            582,
            ": N/A",
            ": N/A"
          ],
          "page": 0
        },
        {
          "box": [
            405,
            609,
            429,
            645,
            417,
            627,
            "NA",
            "NA"
          ],
          "page": 0
        },
        {
          "box": [
            1022,
            634,
            1089,
            665,
            1055.5,
            649.5,
            ": N/A",
            ": N/A"
          ],
          "page": 0
        },
        {
          "box": [
            164,
            768,
            254,
            799,
            209,
            783.5,
            "TYPE",
            "TYPE"
          ],
          "page": 0
        },
        {
          "box": [
            82,
            801,
            252,
            848,
            167,
            824.5,
            "| PURCHASE",
            "| PURCHASE"
          ],
          "page": 0
        },
        {
          "box": [
            90,
            866,
            243,
            919,
            166.5,
            892.5,
            "PURCHASE",
            "PURCHASE"
          ],
          "page": 0
        },
        {
          "box": [
            84,
            934,
            231,
            978,
            157.5,
            956,
            "REGISTER",
            "REGISTER"
          ],
          "page": 0
        },
        {
          "box": [
            442,
            768,
            546,
            798,
            494,
            783,
            "NAME",
            "NAME"
          ],
          "page": 0
        },
        {
          "box": [
            329,
            801,
            496,
            846,
            412.5,
            823.5,
            "PositiveSSL",
            "PositiveSSL"
          ],
          "page": 0
        },
        {
          "box": [
            330,
            866,
            560,
            913,
            445,
            889.5,
            "| Free WhoisGuard",
            "| Free WhoisGuard"
          ],
          "page": 0
        },
        {
          "box": [
            675,
            761,
            1024,
            809,
            849.5,
            785,
            "QTY DURATION , PRICE",
            "QTY DURATION , PRICE"
          ],
          "page": 0
        },
        {
          "box": [
            653,
            802,
            675,
            849,
            664,
            825.5,
            "11",
            "11"
          ],
          "page": 0
        },
        {
          "box": [
            741,
            808,
            827,
            840,
            784,
            824,
            "1 year",
            "1 year"
          ],
          "page": 0
        },
        {
          "box": [
            979,
            804,
            1046,
            835,
            1012.5,
            819.5,
            "$ 1.99",
            "$ 1.99"
          ],
          "page": 0
        },
        {
          "box": [
            661,
            867,
            675,
            920,
            668,
            893.5,
            "1",
            "1"
          ],
          "page": 0
        },
        {
          "box": [
            739,
            865,
            829,
            919,
            784,
            892,
            "1 year",
            "1 year"
          ],
          "page": 0
        },
        {
          "box": [
            979,
            869,
            1047,
            910,
            1013,
            889.5,
            "$ 0.00",
            "$ 0.00"
          ],
          "page": 0
        },
        {
          "box": [
            655,
            936,
            674,
            982,
            664.5,
            959,
            "11",
            "11"
          ],
          "page": 0
        },
        {
          "box": [
            983,
            934,
            1051,
            969,
            1017,
            951.5,
            "$ 0.88",
            "$ 0.88"
          ],
          "page": 0
        },
        {
          "box": [
            1114,
            766,
            1267,
            799,
            1190.5,
            782.5,
            "SUB TOTAL",
            "SUB TOTAL"
          ],
          "page": 0
        },
        {
          "box": [
            1252,
            802,
            1320,
            835,
            1286,
            818.5,
            "$ 1.99",
            "$ 1.99"
          ],
          "page": 0
        },
        {
          "box": [
            1160,
            834,
            1319,
            863,
            1239.5,
            848.5,
            "Setup $ 0.00",
            "Setup $ 0.00"
          ],
          "page": 0
        },
        {
          "box": [
            1254,
            872,
            1320,
            902,
            1287,
            887,
            "$ 0.00",
            "$ 0.00"
          ],
          "page": 0
        },
        {
          "box": [
            1162,
            900,
            1319,
            930,
            1240.5,
            915,
            "Setup $ 0.00",
            "Setup $ 0.00"
          ],
          "page": 0
        },
        {
          "box": [
            1254,
            938,
            1322,
            968,
            1288,
            953,
            "$ 0.88",
            "$ 0.88"
          ],
          "page": 0
        },
        {
          "box": [
            1091,
            966,
            1326,
            995,
            1208.5,
            980.5,
            "ICANN Fee $ 0.18",
            "ICANN Fee $ 0.18"
          ],
          "page": 0
        },
        {
          "box": [
            1241,
            1004,
            1327,
            1035,
            1284,
            1019.5,
            "$3.05",
            "$ 3.05"
          ],
          "page": 0
        },
        {
          "box": [
            1246,
            1043,
            1328,
            1072,
            1287,
            1057.5,
            "$3.05",
            "$ 3.05"
          ],
          "page": 0
        },
        {
          "box": [
            332,
            934,
            593,
            973,
            462.5,
            953.5,
            "Domain Registration",
            "Domain Registration"
          ],
          "page": 0
        },
        {
          "box": [
            331,
            967,
            509,
            1001,
            420,
            984,
            "notarum.com",
            "notarum.com"
          ],
          "page": 0
        },
        {
          "box": [
            738,
            928,
            832,
            987,
            785,
            957.5,
            "| 1 year",
            "| 1 year"
          ],
          "page": 0
        },
        {
          "box": [
            927,
            1004,
            1052,
            1030,
            989.5,
            1017,
            "Sub Total",
            "Sub Total"
          ],
          "page": 0
        },
        {
          "box": [
            959,
            1043,
            1046,
            1071,
            1002.5,
            1057,
            "TOTAL",
            "TOTAL"
          ],
          "page": 0
        },
        {
          "box": [
            90,
            1122,
            473,
            1152,
            281.5,
            1137,
            "Additional Transaction Details:",
            "Additional Transaction Details:"
          ],
          "page": 0
        },
        {
          "box": [
            96,
            1166,
            168,
            1194,
            132,
            1180,
            "Order",
            "Order"
          ],
          "page": 0
        },
        {
          "box": [
            376,
            1167,
            836,
            1201,
            606,
            1184,
            "# ch_1DECfx12akwfvovnZXONOOLF",
            "# ch_1DECfx12akwfvovnZXONOOLF"
          ],
          "page": 0
        },
        {
          "box": [
            95,
            1204,
            207,
            1237,
            151,
            1220.5,
            "Approval",
            "Approval"
          ],
          "page": 0
        },
        {
          "box": [
            376,
            1205,
            836,
            1237,
            606,
            1221,
            "# ch_1DECfx12akwfvovnZXONOOLF",
            "# ch_1DECfx12akwfvovnZXONOOLF"
          ],
          "page": 0
        }
      ],
      "Subtotal": {
        "UICategory": "VAT & Amounts",
        "UIName": "Subtotal",
        "UIType": "Amount",
        "matches": [
          {
            "keyword": [
              927,
              1004,
              1052,
              1030,
              989.5,
              1017,
              "Sub Total",
              "Sub Total"
            ],
            "match": 3.05,
            "matchmulti": "$ 3.05",
            "page": 0,
            "value": [
              1241,
              1004,
              1327,
              1035,
              1284,
              1019.5,
              "$3.05",
              "$ 3.05"
            ]
          }
        ]
      },
      "Supplier": null,
      "TableDetected": true,
      "Tables": [
        {
          "GridX": [
            94,
            1012,
            1336
          ],
          "GridY": [
            416,
            453,
            524
          ],
          "GridYPages": [
            0,
            0,
            0
          ],
          "HeaderPage": 0,
          "header": [],
          "headernum": 2
        }
      ],
      "TaxTotal": {
        "UICategory": "VAT & Amounts",
        "UIName": "Tax Total",
        "UIType": "Amount",
        "matches": [
          {
            "keyword": null,
            "match": null,
            "matchmulti": null,
            "page": null,
            "value": null
          }
        ]
      },
      "Total": {
        "UICategory": "VAT & Amounts",
        "UIName": "Total",
        "UIType": "Amount",
        "matches": [
          {
            "keyword": [
              959,
              1043,
              1046,
              1071,
              1002.5,
              1057,
              "TOTAL",
              "TOTAL"
            ],
            "match": 3.05,
            "matchmulti": "$ 3.05",
            "page": 0,
            "value": [
              1246,
              1043,
              1328,
              1072,
              1287,
              1057.5,
              "$3.05",
              "$ 3.05"
            ]
          }
        ]
      },
      "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": [
              106,
              212,
              385,
              253,
              245.5,
              232.5,
              "www.namecheap.com",
              "www.namecheap.com"
            ],
            "match": "www.namecheap.com",
            "matchmulti": "www.namecheap.com",
            "page": 0,
            "value": [
              106,
              212,
              385,
              253,
              245.5,
              232.5,
              "www.namecheap.com",
              "www.namecheap.com"
            ]
          }
        ]
      },
      "num_pages": 1
    },
    "docId": 8725,
    "status": "COMPLETED"
  }
}
```

**SDK Code**

```python Documents_scanReceipt_example
import requests

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

files = { "files": "open('string', 'rb')" }
payload = {
    "handwritten": "[true]",
    "qid": "1"
}
headers = {"x-api-key": "<apiKey>"}

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

print(response.json())
```

```javascript Documents_scanReceipt_example
const url = 'https://api.staple.io/v1/documents/scan/receipt';
const form = new FormData();
form.append('files', 'string');
form.append('handwritten', '[true]');
form.append('qid', '1');

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 Documents_scanReceipt_example
package main

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

func main() {

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

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"handwritten\"\r\n\r\n[true]\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"qid\"\r\n\r\n1\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 Documents_scanReceipt_example
require 'uri'
require 'net/http'

url = URI("https://api.staple.io/v1/documents/scan/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=\"files\"; filename=\"string\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"handwritten\"\r\n\r\n[true]\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"qid\"\r\n\r\n1\r\n-----011000010111000001101001--\r\n"

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

```java Documents_scanReceipt_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

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

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

$client = new \GuzzleHttp\Client();

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

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

```csharp Documents_scanReceipt_example
using RestSharp;

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

```swift Documents_scanReceipt_example
import Foundation

let headers = ["x-api-key": "<apiKey>"]
let parameters = [
  [
    "name": "files",
    "fileName": "string"
  ],
  [
    "name": "handwritten",
    "value": "[true]"
  ],
  [
    "name": "qid",
    "value": "1"
  ]
]

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/scan/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()
```