Skip to main content
POST
/
v1
/
invoice-payables
Create invoice payable
curl --request POST \
  --url https://api.light.inc/v1/invoice-payables \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json;charset=UTF-8' \
  --data '{
  "vendorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "amount": 123,
  "currency": "USD",
  "processingMode": "DATA_ONLY"
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "type": "REIMBURSEMENT",
  "metadata": {
    "type": "VENDOR_INVOICE_METADATA"
  },
  "invoicePayableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "state": "INIT",
  "failureReason": "EMAIL_NOT_ALLOWED",
  "failureContext": {
    "type": "BAD_REQUEST",
    "errors": [
      {
        "type": "<string>",
        "clientMessage": "<string>",
        "message": "<string>",
        "path": [
          "<string>"
        ],
        "context": {}
      }
    ],
    "stackTrace": [
      {
        "classLoaderName": "<string>",
        "moduleName": "<string>",
        "moduleVersion": "<string>",
        "methodName": "<string>",
        "fileName": "<string>",
        "lineNumber": 123,
        "nativeMethod": true,
        "className": "<string>"
      }
    ],
    "message": "<string>",
    "suppressed": [
      {
        "stackTrace": [
          {
            "classLoaderName": "<string>",
            "moduleName": "<string>",
            "moduleVersion": "<string>",
            "methodName": "<string>",
            "fileName": "<string>",
            "lineNumber": 123,
            "nativeMethod": true,
            "className": "<string>"
          }
        ],
        "message": "<string>",
        "localizedMessage": "<string>"
      }
    ],
    "localizedMessage": "<string>",
    "name": "<string>"
  },
  "warningContext": {
    "type": "BAD_REQUEST",
    "errors": [
      {
        "type": "<string>",
        "clientMessage": "<string>",
        "message": "<string>",
        "path": [
          "<string>"
        ],
        "context": {}
      }
    ],
    "stackTrace": [
      {
        "classLoaderName": "<string>",
        "moduleName": "<string>",
        "moduleVersion": "<string>",
        "methodName": "<string>",
        "fileName": "<string>",
        "lineNumber": 123,
        "nativeMethod": true,
        "className": "<string>"
      }
    ],
    "message": "<string>",
    "suppressed": [
      {
        "stackTrace": [
          {
            "classLoaderName": "<string>",
            "moduleName": "<string>",
            "moduleVersion": "<string>",
            "methodName": "<string>",
            "fileName": "<string>",
            "lineNumber": 123,
            "nativeMethod": true,
            "className": "<string>"
          }
        ],
        "message": "<string>",
        "localizedMessage": "<string>"
      }
    ],
    "localizedMessage": "<string>",
    "name": "<string>"
  },
  "approvalNote": "<string>",
  "cancellationReason": "<string>",
  "payeeName": "<string>",
  "payeeIban": "<string>",
  "payeeBban": "<string>",
  "payeeBic": "<string>",
  "payeeBankCode": "<string>",
  "payeeSwedishBankgiroNumber": "<string>",
  "payeeCountry": "UNDEFINED",
  "payeeAddress": "<string>",
  "payeeZipcode": "<string>",
  "payeeBankName": "<string>",
  "payeeBankCountry": "UNDEFINED",
  "payeeBankAddress": "<string>",
  "payeeBankZipcode": "<string>",
  "payeeCity": "<string>",
  "payeeBankCity": "<string>",
  "vendorId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "vendorDetailsOcr": {
    "avatarUrl": "<string>",
    "name": "<string>",
    "email": "<string>",
    "phoneNumber": {
      "countryCode": "UNDEFINED",
      "localNumber": "<string>"
    },
    "website": "<string>",
    "country": "UNDEFINED",
    "city": "<string>",
    "address": "<string>",
    "zipcode": "<string>",
    "bankAccountNumber": "<string>",
    "bankAccountBic": "<string>",
    "domesticBankAccountNumber": "<string>",
    "domesticBankAccountCode": "<string>",
    "vatId": "<string>"
  },
  "companyEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "invoiceNumber": "<string>",
  "amount": 123,
  "currency": "USD",
  "description": "<string>",
  "senderBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "fiNumber": "<string>",
  "norKidReference": "<string>",
  "paymentAt": "2023-11-07T05:31:56Z",
  "ocrCompletedAt": "2023-11-07T05:31:56Z",
  "canceledAt": "2023-11-07T05:31:56Z",
  "issuedDate": "2023-12-25",
  "dueDate": "2023-12-25",
  "invoiceCreatedAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "purchaseOrderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "lineItemsIncludeTax": true,
  "localCurrencyFxRate": 123,
  "groupCurrencyFxRate": 123,
  "lineItems": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "invoicePayableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "type": "REIMBURSEMENT",
      "metadata": {
        "type": "REIMBURSEMENT"
      },
      "amount": 123,
      "netAmount": 123,
      "description": "<string>",
      "taxCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "taxAmount": 123,
      "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "costCenterId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "shouldAmortize": true,
      "amortizationStartDate": "2023-12-25",
      "amortizationEndDate": "2023-12-25",
      "amortizationScheduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "amortizationTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "customPropertiesOld": {
        "items": {}
      },
      "aiValueSuggestions": [
        {
          "field": "<string>",
          "fieldValues": [
            "<string>"
          ],
          "reasoning": "<string>"
        }
      ],
      "customProperties": [
        {
          "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "groupInternalName": "<string>",
          "values": [
            {
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "groupInternalName": "<string>",
              "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "internalName": "<string>",
              "label": "<string>",
              "context": "<string>",
              "createdAt": "2023-11-07T05:31:56Z",
              "updatedAt": "2023-11-07T05:31:56Z"
            }
          ]
        }
      ],
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "customProperties": [
    {
      "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "groupInternalName": "<string>",
      "values": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "groupInternalName": "<string>",
          "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "internalName": "<string>",
          "label": "<string>",
          "context": "<string>",
          "createdAt": "2023-11-07T05:31:56Z",
          "updatedAt": "2023-11-07T05:31:56Z"
        }
      ]
    }
  ],
  "paymentPausedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "paymentPausedAt": "2023-11-07T05:31:56Z",
  "senderEmail": "<string>",
  "documentName": "<string>"
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.

Body

application/json;charset=UTF-8
vendorId
string<uuid> | null
amount
integer | null
currency
string | null
Example:

"USD"

processingMode
enum<string>
Available options:
DATA_ONLY,
OCR_AND_MERGE

Response

default - application/json;charset=UTF-8

default response

id
string<uuid>
type
enum<string>
Available options:
REIMBURSEMENT,
VENDOR_INVOICE
metadata
object
invoicePayableId
string<uuid>
companyId
string<uuid>
state
enum<string>
Available options:
INIT,
CREATED,
IN_DRAFT,
APPROVAL_REQUESTED,
APPROVAL_PENDING,
APPROVED_ACCOUNTING_ENTRY_PENDING,
DECLINED,
READY_FOR_PAYMENT_RELEASE,
PENDING_PAYMENT_APPROVAL,
PAYMENT_PAUSED,
SCHEDULED,
PAYMENT_PENDING,
PARTIALLY_PAID,
PAID,
COMPLETED,
RESET_PENDING,
CANCELLATION_PENDING,
CANCELLED,
DUPLICATED
failureReason
enum<string>
Available options:
EMAIL_NOT_ALLOWED,
ERP_ENTRY_FAILED,
OCR_FAILED,
PAYMENT_APPROVAL_DECLINED,
PAYMENT_FAILED,
RESETTING_INVOICE_FAILED,
APPROVAL_SUBMISSION_FAILED,
USER_INPUT_VALIDATION_FAILED,
DUPLICATE_INVOICE,
PAYMENT_REJECTED
failureContext
object
warningContext
object
approval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PN,
PR,
PS,
PT,
PW,
PY,
QA,
RE,
RO,
RS,
RU,
RW,
SA,
SB,
SC,
SD,
SE,
SF,
SG,
SH,
SI,
SJ,
SK,
SL,
SM,
SN,
SO,
SR,
SS,
ST,
SU,
SV,
SX,
SY,
SZ,
TA,
TC,
TD,
TF,
TG,
TH,
TJ,
TK,
TL,
TM,
TN,
TO,
TP,
TR,
TT,
TV,
TW,
TZ,
UA,
UG,
UK,
UM,
US,
UY,
UZ,
VA,
VC,
VE,
VG,
VI,
VN,
VU,
WF,
WS,
XI,
XU,
XK,
YE,
YT,
YU,
ZA,
ZM,
ZR,
ZW
payeeBankAddress
string
payeeBankZipcode
string
payeeCity
string
payeeBankCity
string
vendorId
string<uuid>
vendorDetailsOcr
object
companyEntityId
string<uuid>
invoiceNumber
string
amount
integer
currency
string
Example:

"USD"

description
string
senderBankAccountId
string<uuid>
fiNumber
string
norKidReference
string
paymentAt
string<date-time>
ocrCompletedAt
string<date-time>
canceledAt
string<date-time>
issuedDate
string<date>
dueDate
string<date>
invoiceCreatedAt
string<date-time>
updatedAt
string<date-time>
purchaseOrderId
string<uuid>
lineItemsIncludeTax
boolean
localCurrencyFxRate
number
groupCurrencyFxRate
number
lineItems
object[]
customProperties
object[]
paymentPausedBy
string<uuid>
paymentPausedAt
string<date-time>
senderEmail
string
documentName
string
I