Skip to main content
POST
/
accounting
/
invoice_credit_notes
curl --request POST \
  --url https://api.rootfi.dev/v3/accounting/invoice_credit_notes \
  --header 'Content-Type: application/json' \
  --header 'api_key: <api-key>' \
  --data '{
  "company_id": 1,
  "data": [
    {
      "contact_id": "123456",
      "document_number": "ROOTFI01",
      "posted_date": "2021-09-28T15:00:00.000Z",
      "currency_id": "GBP",
      "invoice_ids": [],
      "memo": "Test Invoice",
      "line_items": [
        {
          "account_id": "123456",
          "quantity": 1,
          "item_id": "123456",
          "tax_id": "123456",
          "unit_amount": 100,
          "total_discount": 0,
          "description": "Test Item"
        }
      ]
    }
  ]
}'
}'
{
  "data": {
    "status": "SUCCESS",
    "upload_job_id": "xQm2K441VosP8W4",
    "data": [
      {
        "job_id": "aXI9pUDA5T7E2LS",
        "status": "success",
        "response": {
          "platform_id": "3770712000001686032",
          "invoice_ids": [
            "3770712000000352003"
          ],
          "contact_id": "3770712000000225001",
          "currency_id": "3770712000000000099",
          "document_number": "CN-00038",
          "posted_date": "2023-05-05T00:00:00.000Z",
          "memo": "credit note memo",
          "status": "SUBMITTED",
          "tax_amount": 18,
          "total_amount": 57,
          "remaining_credit": 57,
          "updated_at": "2023-11-01T00:00:00.000Z",
          "raw_data": {
            "platform_id": "123456",
            "nominal_code": "Rootfi 01",
            "name": "Test Account",
            "description": "Test Description",
            "category": "LIABILITY",
            "sub_category": "Long Term Liabilities",
            "status": "ACTIVE"
          }
        },
        "error": null
      }
    ]
  },
  "request_timestamp": "2021-09-28T15:00:00.000Z",
  "response_timestamp": "2021-09-28T15:00:00.000Z",
  "request_id": "7a1c0e42-9f85-4d6e-bb5d-358a72913c0b"
}
An Invoice Credit Note is a financial transaction representing a reduction that can be applied against one or multiple invoices issued to Customers.

Additional Required Fields

To successfully create an invoice credit note, certain fields must be included in the raw_data object of the request body. The required fields are as follows:
IntegrationFieldDescription
SAGE_CLOUD_ACCOUNTINGcurrency_rateThe exchange rate to be used for the invoice credit note.
FRESH_BOOKScurrency_rateThe exchange rate between the currency of the invoice credit note and the base currency of the company.
curl --request POST \
  --url https://api.rootfi.dev/v3/accounting/invoice_credit_notes \
  --header 'Content-Type: application/json' \
  --header 'api_key: <api-key>' \
  --data '{
  "company_id": 1,
  "data": [
    {
      "contact_id": "123456",
      "document_number": "ROOTFI01",
      "posted_date": "2021-09-28T15:00:00.000Z",
      "currency_id": "GBP",
      "invoice_ids": [],
      "memo": "Test Invoice",
      "line_items": [
        {
          "account_id": "123456",
          "quantity": 1,
          "item_id": "123456",
          "tax_id": "123456",
          "unit_amount": 100,
          "total_discount": 0,
          "description": "Test Item"
        }
      ]
    }
  ]
}'
}'

Authorizations

api_key
string
header
required

Body

application/json
company_id
integer
required
Example:

1

data
accountingtypesInvoiceCreditNotesWriteRequest · object[]
required

Response

200 - application/json
data
accountingtypesCreateInvoiceCreditNotesResponseData · object
required
request_timestamp
string<date-time>
required

The time at which the request was received by the server

response_timestamp
string<date-time>
required

The time at which the response was sent by the server

request_id
string
required

The unique ID of the request