Skip to main content
POST
/
invoices
/
match-receipts
cURL
curl --request POST \
  --url https://api.useanima.sh/v1/invoices/match-receipts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "receipts": [
    {
      "receiptId": "<string>",
      "amountCents": 123,
      "currency": "<string>",
      "merchant": "<string>",
      "orderId": "<string>",
      "confirmationNumber": "<string>",
      "capturedAt": "2023-11-07T05:31:56Z",
      "transactionId": "<string>"
    }
  ],
  "invoiceIds": [
    "<string>"
  ]
}
'
{
  "matches": [
    {
      "receiptId": "<string>",
      "invoiceId": "<string>",
      "confidence": 123,
      "signals": [
        {
          "score": 123,
          "matched": true,
          "detail": "<string>"
        }
      ],
      "autoLinked": true
    }
  ],
  "exceptions": [
    {
      "receiptId": "<string>",
      "invoiceId": "<string>",
      "confidence": 123,
      "signals": [
        {
          "score": 123,
          "matched": true,
          "detail": "<string>"
        }
      ],
      "autoLinked": true
    }
  ],
  "unmatched": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

JWT Bearer token obtained from authentication. Pass as: Authorization: Bearer

Body

application/json

Input for bulk receipt-to-invoice matching.

receipts
object[]
required

Array of receipts to evaluate for matching.

invoiceIds
string[]

Optional subset of invoice IDs to match against; omit to match against all open invoices.

Response

200 - application/json

OK

Results of receipt-to-invoice matching.

matches
object[]
required

Receipts that matched an invoice above the confidence threshold.

exceptions
object[]
required

Receipts with ambiguous matches requiring manual review.

unmatched
string[]
required

Receipt IDs that could not be matched to any invoice.