UntangledAPI
Api referenceExtract

Extract structured fields from an invoice

POST
/v1/extract/invoice

Authorization

x-api-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.untangledapi.com/v1/extract/invoice" \  -H "Content-Type: application/json" \  -d '{    "document": {}  }'
{
  "data": {
    "invoiceNumber": "string",
    "issueDate": "string",
    "dueDate": "string",
    "vendor": {
      "name": "string",
      "address": "string",
      "taxId": "string"
    },
    "customer": {
      "name": "string",
      "address": "string"
    },
    "lineItems": [
      {
        "description": "string",
        "quantity": 0,
        "unitPrice": 0,
        "amount": 0
      }
    ],
    "subtotal": 0,
    "tax": 0,
    "total": 0,
    "currency": "string"
  },
  "model": "string",
  "usage": {
    "inputTokens": 0,
    "outputTokens": 0
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}
{
  "error": {
    "code": "plan_limit_exceeded",
    "message": "string",
    "details": {
      "plan": "free",
      "bucketHeu": 0,
      "requestedHeu": 0,
      "upgradeUrl": "http://example.com"
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": null
  }
}