> This is Payabli documentation. For a complete page index, fetch https://docs.payabli.com/llms.txt — append .md to any page URL for lightweight markdown. For section-level indexes, query parameters, and other AI-optimized access methods, see https://docs.payabli.com/ai-agents.md

# Use the OCR engine

> Learn how to use Payabli's OCR engine via the API to recognize text and import invoices and bills

Use Payabli's OCR (Optical Character Recognition) engine to recognize and scrape text from bills and invoices directly from your PDF or image files, simplifying your data management. You can then use the OCR engine's output to add new invoices and bills in Payabli via the API.

If you need help understanding the difference between invoices and bills, see [this resource](/guides/platform-bills-vs-invoices). Note that the OCR engine is also separate from [vendor enrichment](/guides/pay-out-vendor-enrichment-overview): OCR *extracts bill and invoice data* from a PDF or image, while enrichment finds *which payment methods a vendor accepts* and their contact details.

## Process the document

Before you begin, note that the bill and invoice `typeResult` values return the information needed to create the specified kind of record in Payabli, so make sure you choose the right one. You can't use a bill `typeResult` OCR output to import an invoice, and vice versa.

The first step is to choose whether you need to process an image file or a base64-encoded string version of your bill or invoice.

#### Upload a file

See [the API reference](/developers/api-reference/import/ocr-a-file) for complete details about this endpoint.

#### Build the request

Make a POST request to **/Import/ocrDocumentForm/\{typeResult}**, uploading the file. The OCR engine supports pdf, jpg, jpeg, png, and gif files.

This example is for a bill, notice that the `typeResult` path parameter is `bill`. If you want to OCR an invoice for a customer, this value should be `invoice`.

```curl
curl -L 'https://api-sandbox.payabli.com/api/Import/ocrDocumentForm/bill' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --form 'file=@"/C:/Users/accounting/Desktop/invoices/paulsPaper_invoice.pdf"'
```

#### Copy the response

Copy the content inside the `resultData` object. This content makes up the body of the add bill or add invoice request you make in the next step.

#### Expand for long code example

```json Bill example maxLines=15
    {
      "isSuccess": true,
      "responseText": "Success",
      "responseCode": 1,
      "responseData": {
        "resultData": {
          "billNumber": "6654477",
          "netAmount": 3000.21,
          "billDate": "2024-02-01T00:00:00",
          "dueDate": "2024-02-01T00:00:00",
          "comments": null,
          "billItems": [
            {
              "itemTotalAmount": 3000.0,
              "itemTaxAmount": 0,
              "itemTaxRate": 0,
              "itemProductCode": null,
              "itemProductName": "Paper Airplane Stock",
              "itemDescription": "",
              "itemCommodityCode": null,
              "itemUnitOfMeasure": null,
              "itemCost": 3.0,
              "itemQty": 1000,
              "itemMode": null,
              "itemCategories": []
            }
          ],
          "mode": 0,
          "accountingField1": null,
          "accountingField2": "VBGEB-45841",
          "additionalData": {
            "category": "Job Supplies",
            "currency_code": "USD",
            "type": "invoice",
            "reference_number": "VBGEB-45841"
          },
          "vendor": {
            "vendorNumber": null,
            "name1": "Paul\u0027s Paper Supply",
            "name2": "Paul\u0027s Paper Supply Company",
            "ein": null,
            "phone": "970-222-2121",
            "email": null,
            "address1": "123 North 1st St",
            "address2": null,
            "city": null,
            "state": null,
            "zip": null,
            "country": null,
            "mcc": null,
            "locationCode": null,
            "contacts": null,
            "billingData": {
              "id": 0,
              "bankName": "",
              "routingAccount": "",
              "accountNumber": "",
              "typeAccount": "",
              "bankAccountHolderName": "",
              "bankAccountHolderType": "Business",
              "bankAccountFunction": 0
            },
            "paymentMethod": null,
            "vendorStatus": 1,
            "remitAddress1": null,
            "remitAddress2": null,
            "remitCity": null,
            "remitState": null,
            "remitZip": null,
            "remitCountry": null,
            "payeeName1": null,
            "payeeName2": null,
            "customerVendorAccount": null,
            "internalReferenceId": null,
            "customField1": null,
            "customField2": null,
            "additionalData": {
              "web": "www.paulspaper.com"
            }
          },
          "endDate": null,
          "frequency": null,
          "terms": null,
          "status": 0,
          "lotNumber": null,
          "attachments": [
            {
              "ftype": "pdf",
              "filename": "paulsPaper_sample Invoice.pdf",
              "fileDescriptor": null,
              "furl": null,
              "fContent": "JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCA2MTIgNzkyXQogICAvQ29udGVudHMgNCAwIFIgL1Jlc291cmNlcyA8PCAvRm9udCA8PCAvRjEgNSAwIFIgPj4gPj4gPj4KZW5kb2JqCjQgMCBvYmoKPDwgL0xlbmd0aCAzMzggPj4Kc3RyZWFtCkJUCi9GMSAxNiBUZiA1MCA3NDAgVGQgKElOVk9JQ0UpIFRqCi9GMSAxMCBUZiA1MCA3MTAgVGQgKEludm9pY2UgTm8uIDY2NTQ0NzcpIFRqCjUwIDY5NSBUZCAoRGF0ZTogMi8xLzIwMjQpIFRqCjUwIDY2NSBUZCAoRnJvbTogUGF1bCdzIFBhcGVyIFN1cHBseSkgVGoKNTAgNjUwIFRkICgxMjMgTm9ydGggMXN0IFN0LCBEdXJhbmdvLCBDTyA4MTMwMSkgVGoKNTAgNjIwIFRkIChUbzogQmlsbCBGcmFua3MpIFRqCjUwIDYwNSBUZCAoNTI1IEFuaW1hcyBWaWV3IERyaXZlLCBEdXJhbmdvLCBDTyA4MTMwMSkgVGoKNTAgNTc1IFRkIChJdGVtOiBBNCBQYXBlciB4IDEwMCkgVGoKNTAgNTYwIFRkIChBbW91bnQ6ICQyNTAuMDApIFRqCkVUCmVuZHN0cmVhbQplbmRvYmoKNSAwIG9iago8PCAvVHlwZSAvRm9udCAvU3VidHlwZSAvVHlwZTEgL0Jhc2VGb250IC9IZWx2ZXRpY2EgPj4KZW5kb2JqCnhyZWYKMCA2CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAwOSAwMDAwMCBuIAowMDAwMDAwMDU4IDAwMDAwIG4gCjAwMDAwMDAxMTUgMDAwMDAgbiAKMDAwMDAwMDI2NiAwMDAwMCBuIAowMDAwMDAwNjU2IDAwMDAwIG4gCnRyYWlsZXIKPDwgL1NpemUgNiAvUm9vdCAxIDAgUiA+PgpzdGFydHhyZWYKNzMzCiUlRU9G"
            }
          ]
        },
        "rawData": {
          "account_number": null,
          "bill_to": {
            "address": "525 Animas View Drive\nDurango, CO 81301",
            "name": "Bill Franks",
            "vat_number": null
          },
          "cashback": null,
          "category": "Job Supplies",
          "created_date": "2024-01-31 19:57:12",
          "currency_code": "USD",
          "date": "2024-02-01 00:00:00",
          "delivery_date": null,
          "discount": null,
          "document_reference_number": null,
          "document_title": null,
          "document_type": "invoice",
          "due_date": "2024-02-01",
          "duplicate_of": null,
          "external_id": null,
          "guest_count": null,
          "id": 182145841,
          "img_file_name": "182145841.jpg",
          "insurance": null,
          "invoice_number": "6654477",
          "is_approved": null,
          "is_duplicate": false,
          "lat": null,
          "line_items": [
            {
              "category": null,
              "date": null,
              "description": "Paper Airplane Stock",
              "discount": null,
              "discount_rate": null,
              "end_date": null,
              "full_description": null,
              "hsn": null,
              "id": 803620149,
              "order": 0,
              "price": 3.0,
              "quantity": 1000.0,
              "reference": null,
              "section": null,
              "sku": null,
              "start_date": null,
              "tags": [],
              "tax": null,
              "tax_rate": null,
              "text": "1000\tPaper Airplane Stock\t\t\t3.00\t3000.00",
              "total": 3000.0,
              "type": "product",
              "unit_of_measure": null,
              "upc": null,
              "weight": null
            }
          ],
          "lng": null,
          "notes": null,
          "ocr_text": "2/1/2024\tInvoice No. 6654477\n\nTo\nBill Franks\n525 Animas View Drive\nDurango, CO 81301\n\nShip To\nBill Franks\n\nInstructions\nKnock three times\n\nQuantity\tDescription\t\t\tUnit Price\tTotal\n\n1000\tPaper Airplane Stock\t\t\t3.00\t3000.00\n\n\tSubtotal\n\n\tSales Tax\t\t0.21\n\tShipping \u0026 Handling\t\t0.00\n\n\tTotal Due\t\t3000.21\n\n\tDue upon receipt\n\tThank you for your business!\n\nPaul\u0027s Paper Supply Company\n\tPaul\u0027s\nTel 970-222-2121\t123 North 1st St\twww.paulspaper.com\nFax 970-222-2122\tDurango, CO 81301\tpaul@paper.com\t\tpaper",
          "order_date": null,
          "payment": {
            "terms": null,
            "card_number": null,
            "display_name": null,
            "type": null
          },
          "purchase_order_number": null,
          "rounding": null,
          "reference_number": "VBGEB-45841",
          "server_name": null,
          "service_end_date": null,
          "service_start_date": null,
          "ship_date": null,
          "ship_to": {
            "address": "Durango, CO 81301",
            "name": "Bill Franks",
            "vat_number": null
          },
          "shipping": null,
          "status": null,
          "store_number": null,
          "subtotal": 3000.0,
          "tax": 0.21,
          "tax_lines": [],
          "timezone_offset": null,
          "tip": null,
          "total": 3000.21,
          "total_weight": null,
          "tracking_number": null,
          "updated_date": "2024-01-31 19:57:13",
          "vendor": {
            "types": null,
            "abn_number": null,
            "account_number": null,
            "address": "123 North 1st St",
            "bank_name": null,
            "bank_number": null,
            "bank_swift": null,
            "category": null,
            "email": null,
            "external_id": null,
            "fax_number": "970-222-2122",
            "iban": null,
            "name": "Paul\u0027s Paper Supply",
            "phone_number": "970-222-2121",
            "parsed_address": {
              "city": null,
              "country": null,
              "postcode": null,
              "state": null,
              "street_address": "123 North 1st St"
            },
            "raw_name": "Paul\u0027s Paper Supply Company",
            "reg_number": null,
            "type": null,
            "vat_number": null,
            "web": "www.paulspaper.com"
          },
          "weights": null
        }
      },
      "pageidentifier": null,
      "roomId": 0
    }
```

```json Invoice example maxLines=15
  {
    "isSuccess": true,
    "responseText": "Success",
    "responseCode": 1,
    "responseData": {
        "resultData": {
            "customerData": {
                "customerId": 0,
                "firstName": "Bill Franks",
                "lastName": null,
                "company": "",
                "customerNumber": null,
                "billingAddress1": null,
                "billingAddress2": null,
                "billingCity": null,
                "billingState": null,
                "billingZip": null,
                "billingCountry": null,
                "billingPhone": null,
                "billingEmail": null,
                "shippingAddress1": "Durango, CO 81301",
                "shippingAddress2": null,
                "shippingCity": null,
                "shippingState": null,
                "shippingZip": null,
                "shippingCountry": null,
                "additionalData": {},
                "identifierFields": null
            },
            "invoiceData": {
                "invoiceNumber": "6654477",
                "invoiceDate": "2024-02-01 00:00:00",
                "invoiceDueDate": "2024-02-01",
                "invoiceEndDate": null,
                "invoiceStatus": 0,
                "invoiceType": 0,
                "frequency": null,
                "paymentTerms": "-",
                "termsConditions": null,
                "notes": null,
                "tax": 0.21,
                "discount": null,
                "invoiceAmount": 3000.21,
                "freightAmount": null,
                "dutyAmount": null,
                "purchaseOrder": null,
                "firstName": "Bill Franks",
                "lastName": null,
                "company": "",
                "shippingAddress1": "Durango, CO 81301",
                "shippingAddress2": null,
                "shippingCity": null,
                "shippingState": null,
                "shippingZip": null,
                "shippingCountry": null,
                "shippingEmail": null,
                "shippingPhone": null,
                "shippingFromZip": null,
                "summaryCommodityCode": null,
                "items": [
                    {
                        "itemTotalAmount": 3000.0,
                        "itemTaxAmount": 0,
                        "itemTaxRate": 0,
                        "itemProductCode": null,
                        "itemProductName": "Paper Airplane Stock",
                        "itemDescription": "",
                        "itemCommodityCode": null,
                        "itemUnitOfMeasure": null,
                        "itemCost": 3.0,
                        "itemQty": 1000,
                        "itemMode": null,
                        "itemCategories": []
                    }
                ],
                "attachments": [
                    {
                        "ftype": "pdf",
                        "filename": "paulsPaper_sample Invoice.pdf",
                        "fileDescriptor": null,
                        "furl": null,
                        "fContent": "JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCA2MTIgNzkyXQogICAvQ29udGVudHMgNCAwIFIgL1Jlc291cmNlcyA8PCAvRm9udCA8PCAvRjEgNSAwIFIgPj4gPj4gPj4KZW5kb2JqCjQgMCBvYmoKPDwgL0xlbmd0aCAzMzggPj4Kc3RyZWFtCkJUCi9GMSAxNiBUZiA1MCA3NDAgVGQgKElOVk9JQ0UpIFRqCi9GMSAxMCBUZiA1MCA3MTAgVGQgKEludm9pY2UgTm8uIDY2NTQ0NzcpIFRqCjUwIDY5NSBUZCAoRGF0ZTogMi8xLzIwMjQpIFRqCjUwIDY2NSBUZCAoRnJvbTogUGF1bCdzIFBhcGVyIFN1cHBseSkgVGoKNTAgNjUwIFRkICgxMjMgTm9ydGggMXN0IFN0LCBEdXJhbmdvLCBDTyA4MTMwMSkgVGoKNTAgNjIwIFRkIChUbzogQmlsbCBGcmFua3MpIFRqCjUwIDYwNSBUZCAoNTI1IEFuaW1hcyBWaWV3IERyaXZlLCBEdXJhbmdvLCBDTyA4MTMwMSkgVGoKNTAgNTc1IFRkIChJdGVtOiBBNCBQYXBlciB4IDEwMCkgVGoKNTAgNTYwIFRkIChBbW91bnQ6ICQyNTAuMDApIFRqCkVUCmVuZHN0cmVhbQplbmRvYmoKNSAwIG9iago8PCAvVHlwZSAvRm9udCAvU3VidHlwZSAvVHlwZTEgL0Jhc2VGb250IC9IZWx2ZXRpY2EgPj4KZW5kb2JqCnhyZWYKMCA2CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAwOSAwMDAwMCBuIAowMDAwMDAwMDU4IDAwMDAwIG4gCjAwMDAwMDAxMTUgMDAwMDAgbiAKMDAwMDAwMDI2NiAwMDAwMCBuIAowMDAwMDAwNjU2IDAwMDAwIG4gCnRyYWlsZXIKPDwgL1NpemUgNiAvUm9vdCAxIDAgUiA+PgpzdGFydHhyZWYKNzMzCiUlRU9G"
                    }
                ],
                "additionalData": {
                    "category": "Job Supplies",
                    "currency_code": "USD",
                    "type": "invoice",
                    "reference_number": "VBGIJ-80131"
                }
            },
            "scheduledOptions": null
        },
        "rawData": {
            "account_number": null,
            "bill_to": {
                "address": "525 Animas View Drive\nDurango, CO 81301",
                "name": "Bill Franks",
                "vat_number": null
            },
            "cashback": null,
            "category": "Job Supplies",
            "created_date": "2024-02-22 03:33:56",
            "currency_code": "USD",
            "date": "2024-02-01 00:00:00",
            "delivery_date": null,
            "discount": null,
            "document_reference_number": null,
            "document_title": null,
            "document_type": "invoice",
            "due_date": "2024-02-01",
            "duplicate_of": null,
            "external_id": null,
            "guest_count": null,
            "id": 186980131,
            "img_file_name": "186980131.pdf",
            "insurance": null,
            "invoice_number": "6654477",
            "is_approved": null,
            "is_duplicate": false,
            "lat": null,
            "line_items": [
                {
                    "category": null,
                    "date": null,
                    "description": "Paper Airplane Stock",
                    "discount": null,
                    "discount_rate": null,
                    "end_date": null,
                    "full_description": "Paper Airplane Stock",
                    "hsn": null,
                    "id": 827010392,
                    "order": 0,
                    "price": 3.0,
                    "quantity": 1000.0,
                    "reference": null,
                    "section": null,
                    "sku": null,
                    "start_date": null,
                    "tags": [],
                    "tax": null,
                    "tax_rate": null,
                    "text": "1000\tPaper Airplane Stock\t\t\t3.00\t3000.00",
                    "total": 3000.0,
                    "type": "product",
                    "unit_of_measure": null,
                    "upc": null,
                    "weight": null
                }
            ],
            "lng": null,
            "notes": null,
            "ocr_text": "2/1/2024\tInvoice No. 6654477\n\nTo\nBill Franks\n525 Animas View Drive\nDurango, CO 81301\nShip To\nBill Franks\n\nInstructions\nKnock three times\n\nQuantity\tDescription\t\t\tUnit Price\tTotal\n\n1000\tPaper Airplane Stock\t\t\t3.00\t3000.00\n\n\tSubtotal\n\n\tSales Tax\t\t0.21\n\tShipping & Handling\t\t0.00\n\n\tTotal Due\t\t3000.21\n\n\tDue upon receipt\n\tThank you for your business!\n\nPaul’s Paper Supply Company\n\tPaul's\nTel 970-222-2121\t123 North 1st St\twww.paulspaper.com\nFax 970-222-2122\tDurango, CO 81301\tpaul@paper.com\t\tpaper",
            "order_date": null,
            "payment": {
                "terms": null,
                "card_number": null,
                "display_name": null,
                "type": null
            },
            "purchase_order_number": null,
            "rounding": null,
            "reference_number": "VBGIJ-80131",
            "server_name": null,
            "service_end_date": null,
            "service_start_date": null,
            "ship_date": null,
            "ship_to": {
                "address": "Durango, CO 81301",
                "name": "Bill Franks",
                "vat_number": null
            },
            "shipping": null,
            "status": null,
            "store_number": null,
            "subtotal": 3000.0,
            "tax": 0.21,
            "tax_lines": [],
            "timezone_offset": null,
            "tip": null,
            "total": 3000.21,
            "total_weight": null,
            "tracking_number": null,
            "updated_date": "2024-02-22 03:33:57",
            "vendor": {
                "types": null,
                "abn_number": null,
                "account_number": null,
                "address": "123 North 1st St",
                "bank_name": null,
                "bank_number": null,
                "bank_swift": null,
                "category": null,
                "email": "paul@paper.com",
                "external_id": null,
                "fax_number": "970-222-2122",
                "iban": null,
                "name": "Paul’s Paper Supply",
                "phone_number": "970-222-2121",
                "parsed_address": {
                    "city": null,
                    "country": null,
                    "postcode": null,
                    "state": null,
                    "street_address": "123 North 1st St"
                },
                "raw_name": "Paul’s Paper Supply Company",
                "reg_number": null,
                "type": null,
                "vat_number": null,
                "web": "www.paulspaper.com"
            },
            "weights": null
        }
    },
    "pageidentifier": null,
    "roomId": 0
}
```

#### Upload a base64-encoded string

See [the API reference](/developers/api-reference/import/ocr-a-file) for complete details about this endpoint.

#### Build the request

Make a POST request to **/Import/ocrDocumentJson/\{typeResult}**, uploading the file. The OCR engine supports pdf, jpg, jpeg, png, and gif file types.

Send the base64-encoded content in the `fContent` field, as a string.

This example is for a bill, notice that the `typeResult` path parameter is `bill`. If you want to OCR an invoice for a customer, this value should be `invoice`.

```bash Request example maxLines=15
  curl -X POST https://api-sandbox.payabli.com/api/Import/ocrDocumentJson/bill \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
    -d '{
        "ftype": "pdf",
        "filename": "paulsPaper_invoice.pdf",
        "fContent": "JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCA2MTIgNzkyXQogICAvQ29udGVudHMgNCAwIFIgL1Jlc291cmNlcyA8PCAvRm9udCA8PCAvRjEgNSAwIFIgPj4gPj4gPj4KZW5kb2JqCjQgMCBvYmoKPDwgL0xlbmd0aCAzMzggPj4Kc3RyZWFtCkJUCi9GMSAxNiBUZiA1MCA3NDAgVGQgKElOVk9JQ0UpIFRqCi9GMSAxMCBUZiA1MCA3MTAgVGQgKEludm9pY2UgTm8uIDY2NTQ0NzcpIFRqCjUwIDY5NSBUZCAoRGF0ZTogMi8xLzIwMjQpIFRqCjUwIDY2NSBUZCAoRnJvbTogUGF1bCdzIFBhcGVyIFN1cHBseSkgVGoKNTAgNjUwIFRkICgxMjMgTm9ydGggMXN0IFN0LCBEdXJhbmdvLCBDTyA4MTMwMSkgVGoKNTAgNjIwIFRkIChUbzogQmlsbCBGcmFua3MpIFRqCjUwIDYwNSBUZCAoNTI1IEFuaW1hcyBWaWV3IERyaXZlLCBEdXJhbmdvLCBDTyA4MTMwMSkgVGoKNTAgNTc1IFRkIChJdGVtOiBBNCBQYXBlciB4IDEwMCkgVGoKNTAgNTYwIFRkIChBbW91bnQ6ICQyNTAuMDApIFRqCkVUCmVuZHN0cmVhbQplbmRvYmoKNSAwIG9iago8PCAvVHlwZSAvRm9udCAvU3VidHlwZSAvVHlwZTEgL0Jhc2VGb250IC9IZWx2ZXRpY2EgPj4KZW5kb2JqCnhyZWYKMCA2CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAwOSAwMDAwMCBuIAowMDAwMDAwMDU4IDAwMDAwIG4gCjAwMDAwMDAxMTUgMDAwMDAgbiAKMDAwMDAwMDI2NiAwMDAwMCBuIAowMDAwMDAwNjU2IDAwMDAwIG4gCnRyYWlsZXIKPDwgL1NpemUgNiAvUm9vdCAxIDAgUiA+PgpzdGFydHhyZWYKNzMzCiUlRU9G" }"
    }'
```

#### Copy the response

Copy the content inside the `resultData` object. This content makes up the body of the add bill or add invoice request you make in the next step.

#### Expand for long code example

```json Bill example maxLines=15
    {
      "isSuccess": true,
      "responseText": "Success",
      "responseCode": 1,
      "responseData": {
        "resultData": {
          "billNumber": "6654477",
          "netAmount": 3000.21,
          "billDate": "2024-02-01T00:00:00",
          "dueDate": "2024-02-01T00:00:00",
          "comments": null,
          "billItems": [
            {
              "itemTotalAmount": 3000.0,
              "itemTaxAmount": 0,
              "itemTaxRate": 0,
              "itemProductCode": null,
              "itemProductName": "Paper Airplane Stock",
              "itemDescription": "",
              "itemCommodityCode": null,
              "itemUnitOfMeasure": null,
              "itemCost": 3.0,
              "itemQty": 1000,
              "itemMode": null,
              "itemCategories": []
            }
          ],
          "mode": 0,
          "accountingField1": null,
          "accountingField2": "VBGEB-45841",
          "additionalData": {
            "category": "Job Supplies",
            "currency_code": "USD",
            "type": "invoice",
            "reference_number": "VBGEB-45841"
          },
          "vendor": {
            "vendorNumber": null,
            "name1": "Paul\u0027s Paper Supply",
            "name2": "Paul\u0027s Paper Supply Company",
            "ein": null,
            "phone": "970-222-2121",
            "email": null,
            "address1": "123 North 1st St",
            "address2": null,
            "city": null,
            "state": null,
            "zip": null,
            "country": null,
            "mcc": null,
            "locationCode": null,
            "contacts": null,
            "billingData": {
              "id": 0,
              "bankName": "",
              "routingAccount": "",
              "accountNumber": "",
              "typeAccount": "",
              "bankAccountHolderName": "",
              "bankAccountHolderType": "Business",
              "bankAccountFunction": 0
            },
            "paymentMethod": null,
            "vendorStatus": 1,
            "remitAddress1": null,
            "remitAddress2": null,
            "remitCity": null,
            "remitState": null,
            "remitZip": null,
            "remitCountry": null,
            "payeeName1": null,
            "payeeName2": null,
            "customerVendorAccount": null,
            "internalReferenceId": null,
            "customField1": null,
            "customField2": null,
            "additionalData": {
              "web": "www.paulspaper.com"
            }
          },
          "endDate": null,
          "frequency": null,
          "terms": null,
          "status": 0,
          "lotNumber": null,
          "attachments": [
            {
              "ftype": "pdf",
              "filename": "paulsPaper_sample Invoice.pdf",
              "fileDescriptor": null,
              "furl": null,
              "fContent": "JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCA2MTIgNzkyXQogICAvQ29udGVudHMgNCAwIFIgL1Jlc291cmNlcyA8PCAvRm9udCA8PCAvRjEgNSAwIFIgPj4gPj4gPj4KZW5kb2JqCjQgMCBvYmoKPDwgL0xlbmd0aCAzMzggPj4Kc3RyZWFtCkJUCi9GMSAxNiBUZiA1MCA3NDAgVGQgKElOVk9JQ0UpIFRqCi9GMSAxMCBUZiA1MCA3MTAgVGQgKEludm9pY2UgTm8uIDY2NTQ0NzcpIFRqCjUwIDY5NSBUZCAoRGF0ZTogMi8xLzIwMjQpIFRqCjUwIDY2NSBUZCAoRnJvbTogUGF1bCdzIFBhcGVyIFN1cHBseSkgVGoKNTAgNjUwIFRkICgxMjMgTm9ydGggMXN0IFN0LCBEdXJhbmdvLCBDTyA4MTMwMSkgVGoKNTAgNjIwIFRkIChUbzogQmlsbCBGcmFua3MpIFRqCjUwIDYwNSBUZCAoNTI1IEFuaW1hcyBWaWV3IERyaXZlLCBEdXJhbmdvLCBDTyA4MTMwMSkgVGoKNTAgNTc1IFRkIChJdGVtOiBBNCBQYXBlciB4IDEwMCkgVGoKNTAgNTYwIFRkIChBbW91bnQ6ICQyNTAuMDApIFRqCkVUCmVuZHN0cmVhbQplbmRvYmoKNSAwIG9iago8PCAvVHlwZSAvRm9udCAvU3VidHlwZSAvVHlwZTEgL0Jhc2VGb250IC9IZWx2ZXRpY2EgPj4KZW5kb2JqCnhyZWYKMCA2CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAwOSAwMDAwMCBuIAowMDAwMDAwMDU4IDAwMDAwIG4gCjAwMDAwMDAxMTUgMDAwMDAgbiAKMDAwMDAwMDI2NiAwMDAwMCBuIAowMDAwMDAwNjU2IDAwMDAwIG4gCnRyYWlsZXIKPDwgL1NpemUgNiAvUm9vdCAxIDAgUiA+PgpzdGFydHhyZWYKNzMzCiUlRU9G"
            }
          ]
        },
        "rawData": {
          "account_number": null,
          "bill_to": {
            "address": "525 Animas View Drive\nDurango, CO 81301",
            "name": "Bill Franks",
            "vat_number": null
          },
          "cashback": null,
          "category": "Job Supplies",
          "created_date": "2024-01-31 19:57:12",
          "currency_code": "USD",
          "date": "2024-02-01 00:00:00",
          "delivery_date": null,
          "discount": null,
          "document_reference_number": null,
          "document_title": null,
          "document_type": "invoice",
          "due_date": "2024-02-01",
          "duplicate_of": null,
          "external_id": null,
          "guest_count": null,
          "id": 182145841,
          "img_file_name": "182145841.jpg",
          "insurance": null,
          "invoice_number": "6654477",
          "is_approved": null,
          "is_duplicate": false,
          "lat": null,
          "line_items": [
            {
              "category": null,
              "date": null,
              "description": "Paper Airplane Stock",
              "discount": null,
              "discount_rate": null,
              "end_date": null,
              "full_description": null,
              "hsn": null,
              "id": 803620149,
              "order": 0,
              "price": 3.0,
              "quantity": 1000.0,
              "reference": null,
              "section": null,
              "sku": null,
              "start_date": null,
              "tags": [],
              "tax": null,
              "tax_rate": null,
              "text": "1000\tPaper Airplane Stock\t\t\t3.00\t3000.00",
              "total": 3000.0,
              "type": "product",
              "unit_of_measure": null,
              "upc": null,
              "weight": null
            }
          ],
          "lng": null,
          "notes": null,
          "ocr_text": "2/1/2024\tInvoice No. 6654477\n\nTo\nBill Franks\n525 Animas View Drive\nDurango, CO 81301\n\nShip To\nBill Franks\n\nInstructions\nKnock three times\n\nQuantity\tDescription\t\t\tUnit Price\tTotal\n\n1000\tPaper Airplane Stock\t\t\t3.00\t3000.00\n\n\tSubtotal\n\n\tSales Tax\t\t0.21\n\tShipping \u0026 Handling\t\t0.00\n\n\tTotal Due\t\t3000.21\n\n\tDue upon receipt\n\tThank you for your business!\n\nPaul\u0027s Paper Supply Company\n\tPaul\u0027s\nTel 970-222-2121\t123 North 1st St\twww.paulspaper.com\nFax 970-222-2122\tDurango, CO 81301\tpaul@paper.com\t\tpaper",
          "order_date": null,
          "payment": {
            "terms": null,
            "card_number": null,
            "display_name": null,
            "type": null
          },
          "purchase_order_number": null,
          "rounding": null,
          "reference_number": "VBGEB-45841",
          "server_name": null,
          "service_end_date": null,
          "service_start_date": null,
          "ship_date": null,
          "ship_to": {
            "address": "Durango, CO 81301",
            "name": "Bill Franks",
            "vat_number": null
          },
          "shipping": null,
          "status": null,
          "store_number": null,
          "subtotal": 3000.0,
          "tax": 0.21,
          "tax_lines": [],
          "timezone_offset": null,
          "tip": null,
          "total": 3000.21,
          "total_weight": null,
          "tracking_number": null,
          "updated_date": "2024-01-31 19:57:13",
          "vendor": {
            "types": null,
            "abn_number": null,
            "account_number": null,
            "address": "123 North 1st St",
            "bank_name": null,
            "bank_number": null,
            "bank_swift": null,
            "category": null,
            "email": null,
            "external_id": null,
            "fax_number": "970-222-2122",
            "iban": null,
            "name": "Paul\u0027s Paper Supply",
            "phone_number": "970-222-2121",
            "parsed_address": {
              "city": null,
              "country": null,
              "postcode": null,
              "state": null,
              "street_address": "123 North 1st St"
            },
            "raw_name": "Paul\u0027s Paper Supply Company",
            "reg_number": null,
            "type": null,
            "vat_number": null,
            "web": "www.paulspaper.com"
          },
          "weights": null
        }
      },
      "pageidentifier": null,
      "roomId": 0
    }
```

```json Invoice example maxLines=15
  {
    "isSuccess": true,
    "responseText": "Success",
    "responseCode": 1,
    "responseData": {
        "resultData": {
            "customerData": {
                "customerId": 0,
                "firstName": "Bill Franks",
                "lastName": null,
                "company": "",
                "customerNumber": null,
                "billingAddress1": null,
                "billingAddress2": null,
                "billingCity": null,
                "billingState": null,
                "billingZip": null,
                "billingCountry": null,
                "billingPhone": null,
                "billingEmail": null,
                "shippingAddress1": "Durango, CO 81301",
                "shippingAddress2": null,
                "shippingCity": null,
                "shippingState": null,
                "shippingZip": null,
                "shippingCountry": null,
                "additionalData": {},
                "identifierFields": null
            },
            "invoiceData": {
                "invoiceNumber": "6654477",
                "invoiceDate": "2024-02-01 00:00:00",
                "invoiceDueDate": "2024-02-01",
                "invoiceEndDate": null,
                "invoiceStatus": 0,
                "invoiceType": 0,
                "frequency": null,
                "paymentTerms": "-",
                "termsConditions": null,
                "notes": null,
                "tax": 0.21,
                "discount": null,
                "invoiceAmount": 3000.21,
                "freightAmount": null,
                "dutyAmount": null,
                "purchaseOrder": null,
                "firstName": "Bill Franks",
                "lastName": null,
                "company": "",
                "shippingAddress1": "Durango, CO 81301",
                "shippingAddress2": null,
                "shippingCity": null,
                "shippingState": null,
                "shippingZip": null,
                "shippingCountry": null,
                "shippingEmail": null,
                "shippingPhone": null,
                "shippingFromZip": null,
                "summaryCommodityCode": null,
                "items": [
                    {
                        "itemTotalAmount": 3000.0,
                        "itemTaxAmount": 0,
                        "itemTaxRate": 0,
                        "itemProductCode": null,
                        "itemProductName": "Paper Airplane Stock",
                        "itemDescription": "",
                        "itemCommodityCode": null,
                        "itemUnitOfMeasure": null,
                        "itemCost": 3.0,
                        "itemQty": 1000,
                        "itemMode": null,
                        "itemCategories": []
                    }
                ],
                "attachments": [
                    {
                        "ftype": "pdf",
                        "filename": "paulsPaper_sample Invoice.pdf",
                        "fileDescriptor": null,
                        "furl": null,
                        "fContent": "JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCA2MTIgNzkyXQogICAvQ29udGVudHMgNCAwIFIgL1Jlc291cmNlcyA8PCAvRm9udCA8PCAvRjEgNSAwIFIgPj4gPj4gPj4KZW5kb2JqCjQgMCBvYmoKPDwgL0xlbmd0aCAzMzggPj4Kc3RyZWFtCkJUCi9GMSAxNiBUZiA1MCA3NDAgVGQgKElOVk9JQ0UpIFRqCi9GMSAxMCBUZiA1MCA3MTAgVGQgKEludm9pY2UgTm8uIDY2NTQ0NzcpIFRqCjUwIDY5NSBUZCAoRGF0ZTogMi8xLzIwMjQpIFRqCjUwIDY2NSBUZCAoRnJvbTogUGF1bCdzIFBhcGVyIFN1cHBseSkgVGoKNTAgNjUwIFRkICgxMjMgTm9ydGggMXN0IFN0LCBEdXJhbmdvLCBDTyA4MTMwMSkgVGoKNTAgNjIwIFRkIChUbzogQmlsbCBGcmFua3MpIFRqCjUwIDYwNSBUZCAoNTI1IEFuaW1hcyBWaWV3IERyaXZlLCBEdXJhbmdvLCBDTyA4MTMwMSkgVGoKNTAgNTc1IFRkIChJdGVtOiBBNCBQYXBlciB4IDEwMCkgVGoKNTAgNTYwIFRkIChBbW91bnQ6ICQyNTAuMDApIFRqCkVUCmVuZHN0cmVhbQplbmRvYmoKNSAwIG9iago8PCAvVHlwZSAvRm9udCAvU3VidHlwZSAvVHlwZTEgL0Jhc2VGb250IC9IZWx2ZXRpY2EgPj4KZW5kb2JqCnhyZWYKMCA2CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAwOSAwMDAwMCBuIAowMDAwMDAwMDU4IDAwMDAwIG4gCjAwMDAwMDAxMTUgMDAwMDAgbiAKMDAwMDAwMDI2NiAwMDAwMCBuIAowMDAwMDAwNjU2IDAwMDAwIG4gCnRyYWlsZXIKPDwgL1NpemUgNiAvUm9vdCAxIDAgUiA+PgpzdGFydHhyZWYKNzMzCiUlRU9G"
                    }
                ],
                "additionalData": {
                    "category": "Job Supplies",
                    "currency_code": "USD",
                    "type": "invoice",
                    "reference_number": "VBGIJ-80131"
                }
            },
            "scheduledOptions": null
        },
        "rawData": {
            "account_number": null,
            "bill_to": {
                "address": "525 Animas View Drive\nDurango, CO 81301",
                "name": "Bill Franks",
                "vat_number": null
            },
            "cashback": null,
            "category": "Job Supplies",
            "created_date": "2024-02-22 03:33:56",
            "currency_code": "USD",
            "date": "2024-02-01 00:00:00",
            "delivery_date": null,
            "discount": null,
            "document_reference_number": null,
            "document_title": null,
            "document_type": "invoice",
            "due_date": "2024-02-01",
            "duplicate_of": null,
            "external_id": null,
            "guest_count": null,
            "id": 186980131,
            "img_file_name": "186980131.pdf",
            "insurance": null,
            "invoice_number": "6654477",
            "is_approved": null,
            "is_duplicate": false,
            "lat": null,
            "line_items": [
                {
                    "category": null,
                    "date": null,
                    "description": "Paper Airplane Stock",
                    "discount": null,
                    "discount_rate": null,
                    "end_date": null,
                    "full_description": "Paper Airplane Stock",
                    "hsn": null,
                    "id": 827010392,
                    "order": 0,
                    "price": 3.0,
                    "quantity": 1000.0,
                    "reference": null,
                    "section": null,
                    "sku": null,
                    "start_date": null,
                    "tags": [],
                    "tax": null,
                    "tax_rate": null,
                    "text": "1000\tPaper Airplane Stock\t\t\t3.00\t3000.00",
                    "total": 3000.0,
                    "type": "product",
                    "unit_of_measure": null,
                    "upc": null,
                    "weight": null
                }
            ],
            "lng": null,
            "notes": null,
            "ocr_text": "2/1/2024\tInvoice No. 6654477\n\nTo\nBill Franks\n525 Animas View Drive\nDurango, CO 81301\nShip To\nBill Franks\n\nInstructions\nKnock three times\n\nQuantity\tDescription\t\t\tUnit Price\tTotal\n\n1000\tPaper Airplane Stock\t\t\t3.00\t3000.00\n\n\tSubtotal\n\n\tSales Tax\t\t0.21\n\tShipping & Handling\t\t0.00\n\n\tTotal Due\t\t3000.21\n\n\tDue upon receipt\n\tThank you for your business!\n\nPaul’s Paper Supply Company\n\tPaul's\nTel 970-222-2121\t123 North 1st St\twww.paulspaper.com\nFax 970-222-2122\tDurango, CO 81301\tpaul@paper.com\t\tpaper",
            "order_date": null,
            "payment": {
                "terms": null,
                "card_number": null,
                "display_name": null,
                "type": null
            },
            "purchase_order_number": null,
            "rounding": null,
            "reference_number": "VBGIJ-80131",
            "server_name": null,
            "service_end_date": null,
            "service_start_date": null,
            "ship_date": null,
            "ship_to": {
                "address": "Durango, CO 81301",
                "name": "Bill Franks",
                "vat_number": null
            },
            "shipping": null,
            "status": null,
            "store_number": null,
            "subtotal": 3000.0,
            "tax": 0.21,
            "tax_lines": [],
            "timezone_offset": null,
            "tip": null,
            "total": 3000.21,
            "total_weight": null,
            "tracking_number": null,
            "updated_date": "2024-02-22 03:33:57",
            "vendor": {
                "types": null,
                "abn_number": null,
                "account_number": null,
                "address": "123 North 1st St",
                "bank_name": null,
                "bank_number": null,
                "bank_swift": null,
                "category": null,
                "email": "paul@paper.com",
                "external_id": null,
                "fax_number": "970-222-2122",
                "iban": null,
                "name": "Paul’s Paper Supply",
                "phone_number": "970-222-2121",
                "parsed_address": {
                    "city": null,
                    "country": null,
                    "postcode": null,
                    "state": null,
                    "street_address": "123 North 1st St"
                },
                "raw_name": "Paul’s Paper Supply Company",
                "reg_number": null,
                "type": null,
                "vat_number": null,
                "web": "www.paulspaper.com"
            },
            "weights": null
        }
    },
    "pageidentifier": null,
    "roomId": 0
}
```

## Create the bill or invoice

After you get the OCR results, you can use the API to create a bill or invoice in Payabli. You'll need the contents of the `resultData` object returned in with the OCR response.

#### Create an invoice

Follow these steps to create an invoice (money in).

See [the API reference](/developers/api-reference/invoice/add-invoice) for complete details about this endpoint.

#### Build the request

Make a POST request to **/Invoice/\{entry}**, adding the content you copied from the `resultData` object from the OCR response. The `resultData` contents is the body of the request.

#### Expand for long code example

```json Invoice payload maxLines=15
    curl -L 'https://api-sandbox.payabli.com/api/Invoice/41035afaa7?forceCustomerCreation=false' 
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
    -d '{
      "customerData": {
          "customerId": 0,
          "firstName": "Bill Franks",
          "lastName": null,
          "company": "",
          "customerNumber": null,
          "billingAddress1": null,
          "billingAddress2": null,
          "billingCity": null,
          "billingState": null,
          "billingZip": null,
          "billingCountry": null,
          "billingPhone": null,
          "billingEmail": null,
          "shippingAddress1": "Durango, CO 81301",
          "shippingAddress2": null,
          "shippingCity": null,
          "shippingState": null,
          "shippingZip": null,
          "shippingCountry": null,
          "additionalData": {},
          "identifierFields": null
      },
      "invoiceData": {
          "invoiceNumber": "6654477",
          "invoiceDate": "2024-02-01 00:00:00",
          "invoiceDueDate": "2024-02-01",
          "invoiceEndDate": null,
          "invoiceStatus": 0,
          "invoiceType": 0,
          "frequency": null,
          "paymentTerms": "-",
          "termsConditions": null,
          "notes": null,
          "tax": 0.21,
          "discount": null,
          "invoiceAmount": 3000.21,
          "freightAmount": null,
          "dutyAmount": null,
          "purchaseOrder": null,
          "firstName": "Bill Franks",
          "lastName": null,
          "company": "",
          "shippingAddress1": "Durango, CO 81301",
          "shippingAddress2": null,
          "shippingCity": null,
          "shippingState": null,
          "shippingZip": null,
          "shippingCountry": null,
          "shippingEmail": null,
          "shippingPhone": null,
          "shippingFromZip": null,
          "summaryCommodityCode": null,
          "items": [
              {
                  "itemTotalAmount": 3000.0,
                  "itemTaxAmount": 0,
                  "itemTaxRate": 0,
                  "itemProductCode": null,
                  "itemProductName": "Paper Airplane Stock",
                  "itemDescription": "",
                  "itemCommodityCode": null,
                  "itemUnitOfMeasure": null,
                  "itemCost": 3.0,
                  "itemQty": 1000,
                  "itemMode": null,
                  "itemCategories": []
              }
          ],
          "attachments": [
              {
                  "ftype": "pdf",
                  "filename": "paulsPaper_sample Invoice.pdf",
                  "fileDescriptor": null,
                  "furl": null,
                  "fContent": "JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCA2MTIgNzkyXQogICAvQ29udGVudHMgNCAwIFIgL1Jlc291cmNlcyA8PCAvRm9udCA8PCAvRjEgNSAwIFIgPj4gPj4gPj4KZW5kb2JqCjQgMCBvYmoKPDwgL0xlbmd0aCAzMzggPj4Kc3RyZWFtCkJUCi9GMSAxNiBUZiA1MCA3NDAgVGQgKElOVk9JQ0UpIFRqCi9GMSAxMCBUZiA1MCA3MTAgVGQgKEludm9pY2UgTm8uIDY2NTQ0NzcpIFRqCjUwIDY5NSBUZCAoRGF0ZTogMi8xLzIwMjQpIFRqCjUwIDY2NSBUZCAoRnJvbTogUGF1bCdzIFBhcGVyIFN1cHBseSkgVGoKNTAgNjUwIFRkICgxMjMgTm9ydGggMXN0IFN0LCBEdXJhbmdvLCBDTyA4MTMwMSkgVGoKNTAgNjIwIFRkIChUbzogQmlsbCBGcmFua3MpIFRqCjUwIDYwNSBUZCAoNTI1IEFuaW1hcyBWaWV3IERyaXZlLCBEdXJhbmdvLCBDTyA4MTMwMSkgVGoKNTAgNTc1IFRkIChJdGVtOiBBNCBQYXBlciB4IDEwMCkgVGoKNTAgNTYwIFRkIChBbW91bnQ6ICQyNTAuMDApIFRqCkVUCmVuZHN0cmVhbQplbmRvYmoKNSAwIG9iago8PCAvVHlwZSAvRm9udCAvU3VidHlwZSAvVHlwZTEgL0Jhc2VGb250IC9IZWx2ZXRpY2EgPj4KZW5kb2JqCnhyZWYKMCA2CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAwOSAwMDAwMCBuIAowMDAwMDAwMDU4IDAwMDAwIG4gCjAwMDAwMDAxMTUgMDAwMDAgbiAKMDAwMDAwMDI2NiAwMDAwMCBuIAowMDAwMDAwNjU2IDAwMDAwIG4gCnRyYWlsZXIKPDwgL1NpemUgNiAvUm9vdCAxIDAgUiA+PgpzdGFydHhyZWYKNzMzCiUlRU9G"
              }
          ],
          "additionalData": {
              "category": "Job Supplies",
              "currency_code": "USD",
              "type": "invoice",
              "reference_number": "VBGIJ-80131"
          }
      },
      "scheduledOptions": null
  }
```

#### Read the results

If your request was successful, you'll receive a success response with the new invoice's ID in `responseData`.

```json
{
  "isSuccess": true,
  "responseText": "Success",
  "responseCode": 1,
  "responseData": 816,
  "pageidentifier": null,
}
```

#### Create a bill

Follow these steps to create a bill (money out).

See [the API reference](/developers/api-reference/bill/add-bill) for complete details about this endpoint.

#### Build the request

Make a POST request to **/Bill/single/\{entry}**, adding the content you copied from the `resultData` object from the OCR response. The `resultData` contents is the body of the request.

#### Expand for long code example

```json Bill example maxLines=15
    curl -L 'https://api-sandbox.payabli.com/api/Bill/single/41035afaa7'
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
    -d '{
      "billNumber": "6654477",
      "netAmount": 3000.21,
      "billDate": "2024-02-01T00:00:00",
      "dueDate": "2024-02-01T00:00:00",
      "comments": null,
      "billItems": [
          {
          "itemTotalAmount": 3000.0,
          "itemTaxAmount": 0,
          "itemTaxRate": 0,
          "itemProductCode": null,
          "itemProductName": "Paper Airplane Stock",
          "itemDescription": "",
          "itemCommodityCode": null,
          "itemUnitOfMeasure": null,
          "itemCost": 3.0,
          "itemQty": 1000,
          "itemMode": null,
          "itemCategories": []
          }
      ],
      "mode": 0,
      "accountingField1": null,
      "accountingField2": "VBGEB-45841",
      "additionalData": {
          "category": "Job Supplies",
          "currency_code": "USD",
          "type": "invoice",
          "reference_number": "VBGEB-45841"
      },
      "vendor": {
          "vendorNumber": null,
          "name1": "Paul\u0027s Paper Supply",
          "name2": "Paul\u0027s Paper Supply Company",
          "ein": null,
          "phone": "970-222-2121",
          "email": null,
          "address1": "123 North 1st St",
          "address2": null,
          "city": null,
          "state": null,
          "zip": null,
          "country": null,
          "mcc": null,
          "locationCode": null,
          "contacts": null,
          "billingData": {
          "id": 0,
          "bankName": "",
          "routingAccount": "",
          "accountNumber": "",
          "typeAccount": "",
          "bankAccountHolderName": "",
          "bankAccountHolderType": "Business",
          "bankAccountFunction": 0
          },
          "paymentMethod": null,
          "vendorStatus": 1,
          "remitAddress1": null,
          "remitAddress2": null,
          "remitCity": null,
          "remitState": null,
          "remitZip": null,
          "remitCountry": null,
          "payeeName1": null,
          "payeeName2": null,
          "customerVendorAccount": null,
          "internalReferenceId": null,
          "customField1": null,
          "customField2": null,
          "additionalData": {
          "web": "www.paulspaper.com"
          }
      },
      "endDate": null,
      "frequency": null,
      "terms": null,
      "status": 0,
      "lotNumber": null,
      "attachments": [
          {
          "ftype": "pdf",
          "filename": "paulsPaper_sample Invoice.pdf",
          "fileDescriptor": null,
          "furl": null,
          "fContent": "JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCA2MTIgNzkyXQogICAvQ29udGVudHMgNCAwIFIgL1Jlc291cmNlcyA8PCAvRm9udCA8PCAvRjEgNSAwIFIgPj4gPj4gPj4KZW5kb2JqCjQgMCBvYmoKPDwgL0xlbmd0aCAzMzggPj4Kc3RyZWFtCkJUCi9GMSAxNiBUZiA1MCA3NDAgVGQgKElOVk9JQ0UpIFRqCi9GMSAxMCBUZiA1MCA3MTAgVGQgKEludm9pY2UgTm8uIDY2NTQ0NzcpIFRqCjUwIDY5NSBUZCAoRGF0ZTogMi8xLzIwMjQpIFRqCjUwIDY2NSBUZCAoRnJvbTogUGF1bCdzIFBhcGVyIFN1cHBseSkgVGoKNTAgNjUwIFRkICgxMjMgTm9ydGggMXN0IFN0LCBEdXJhbmdvLCBDTyA4MTMwMSkgVGoKNTAgNjIwIFRkIChUbzogQmlsbCBGcmFua3MpIFRqCjUwIDYwNSBUZCAoNTI1IEFuaW1hcyBWaWV3IERyaXZlLCBEdXJhbmdvLCBDTyA4MTMwMSkgVGoKNTAgNTc1IFRkIChJdGVtOiBBNCBQYXBlciB4IDEwMCkgVGoKNTAgNTYwIFRkIChBbW91bnQ6ICQyNTAuMDApIFRqCkVUCmVuZHN0cmVhbQplbmRvYmoKNSAwIG9iago8PCAvVHlwZSAvRm9udCAvU3VidHlwZSAvVHlwZTEgL0Jhc2VGb250IC9IZWx2ZXRpY2EgPj4KZW5kb2JqCnhyZWYKMCA2CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAwOSAwMDAwMCBuIAowMDAwMDAwMDU4IDAwMDAwIG4gCjAwMDAwMDAxMTUgMDAwMDAgbiAKMDAwMDAwMDI2NiAwMDAwMCBuIAowMDAwMDAwNjU2IDAwMDAwIG4gCnRyYWlsZXIKPDwgL1NpemUgNiAvUm9vdCAxIDAgUiA+PgpzdGFydHhyZWYKNzMzCiUlRU9G"
          }
      ]
    }
```

#### Check the response

If your request was successful, you'll receive a success response with the new bill's ID in `responseData`.

```json
{
  "isSuccess": true,
  "responseText": "Success",
  "responseCode": 1,
  "responseData": 816,
  "pageidentifier": null,
}
```

## Related resources

See these related resources to help you get the most out of Payabli.

#### Related topics

* **[Manage bills with the API](/guides/pay-out-developer-bills-manage)** - Learn how to add and manage bills for vendors via the API
* **[Manage invoices with the API](/guides/pay-in-developer-invoices-manage)** - Learn how to create, update, delete, and send invoices with the Payabli API