POST
/
ext
/
v1
/
invoice-receivables
Create sales invoice
curl --request POST \
  --url https://api.light.inc/rest/ext/v1/invoice-receivables \
  --header 'Content-Type: application/json;charset=UTF-8' \
  --data '{
  "companyEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "description": "<string>",
  "currency": "USD",
  "paymentType": "BANK_TRANSFER",
  "payeeBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "invoiceDate": "2023-12-25",
  "dueDate": "2023-12-25",
  "customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "invoiceTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "netTerms": 123,
  "poNumber": "<string>",
  "invoiceTemplateAdditionalText": "<string>",
  "areLinesWithTax": true,
  "lines": [
    {
      "productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "quantity": 123,
      "taxCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "discount": {
        "type": "PERCENTAGE"
      },
      "priceOverwrite": 123,
      "productNameOverwrite": "<string>",
      "avataxCode": "<string>",
      "billingStart": "2023-12-25",
      "billingEnd": "2023-12-25"
    }
  ]
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "contractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "companyEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "amount": 123,
  "paymentType": "BANK_TRANSFER",
  "payeeBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "invoiceDate": "2023-12-25",
  "dueDate": "2023-12-25",
  "customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "invoiceTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "invoiceTemplateAdditionalText": "<string>",
  "invoiceNumber": "<string>",
  "state": "ARCHIVED",
  "openedAt": "2023-11-07T05:31:56Z",
  "netTerms": 123,
  "poNumber": "<string>",
  "description": "<string>",
  "currency": "USD",
  "taxEngineName": "AVATAX",
  "areLinesWithTax": true,
  "localCurrencyFxRate": 123,
  "groupCurrencyFxRate": 123,
  "lines": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "invoiceReceivableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "quantity": 123,
      "taxCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "discount": {
        "type": "PERCENTAGE"
      },
      "discountAmount": 123,
      "netAmount": 123,
      "taxAmount": 123,
      "avataxCode": "<string>",
      "billingStart": "2023-12-25",
      "billingEnd": "2023-12-25",
      "priceOverwrite": 123,
      "productNameOverwrite": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "accrualTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "accrualStartDate": "2023-12-25",
      "accrualEndDate": "2023-12-25",
      "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"
            }
          ]
        }
      ]
    }
  ],
  "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",
  "updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "failureContext": {
    "name": "<string>",
    "cause": {
      "cause": {
        "stackTrace": [
          {
            "classLoaderName": "<string>",
            "moduleName": "<string>",
            "moduleVersion": "<string>",
            "methodName": "<string>",
            "fileName": "<string>",
            "lineNumber": 123,
            "nativeMethod": true,
            "className": "<string>"
          }
        ],
        "message": "<string>",
        "localizedMessage": "<string>"
      },
      "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>"
    },
    "type": "BAD_REQUEST",
    "errors": [
      {
        "type": "<string>",
        "message": "<string>",
        "path": [
          "<string>"
        ],
        "context": {}
      }
    ]
  }
}

Body

application/json;charset=UTF-8

Response

default - application/json;charset=UTF-8

default response

The response is of type object.