---
title: "Create adjustment transaction"
method: POST
path: "/companies/{companyId}/sync/expenses/adjustment-transactions"
tags: ["Adjustments"]
---

# Create adjustment transaction

`POST /companies/{companyId}/sync/expenses/adjustment-transactions`

## Request

- Base URL: `https://api.codat.io`
- URL: `https://api.codat.io/companies/{companyId}/sync/expenses/adjustment-transactions`
- Auth: API key in header `Authorization`

Use the *Create adjustment expense* endpoint to create an [adjustment](https://docs.codat.io/sync-for-expenses-api#/schemas/AdjustmentTransactionRequest) in the accounting software for a given company's connection. 

Adjustments represent write-offs and transaction alterations, such as foreign exchange adjustments, in the form of a journal entry. 

### Supported Integrations

| Integration           | Supported |
|-----------------------|-----------|
| QuickBooks Desktop    | Yes       |

## Request body

- AdjustmentTransactionRequest[]
  - `id` string, uuid, required: Your unique identifier for the transaction.
  - `date` 1, required (unresolved $ref)
  - `currency` string, required: Currency the transaction was recorded in.
  - `currencyRate` CurrencyRate (unresolved $ref)
  - `reference` string, nullable: User-friendly reference for the adjustment transaction.
  - `lines` AdjustmentTransactionLine[], required: Array of transaction lines.
    - `amount` number, required: Amount of the line. A positive line represents a debit; a negative line represents a credit.
    - `accountRef` RecordRef, required
      - `id` string: Identifier of linked reference from mapping options.
    - `description` string: Any private, company notes about the transaction.
    - `trackingRefs` TrackingRefAdjustmentTransaction[], nullable
      - `id` string: Unique identifier of the linked reference from mapping options or the unique identifier of the linked customer or supplier.
      - `dataType` 'trackingCategories' | 'customers' | 'suppliers': The type of the linked reference
    - `invoiceTo` InvoiceTo, nullable: Unique identifier for the customer billed for the transaction. The `invoiceTo` object is currently supported only for QuickBooks Online and QuickBooks Desktop.
      - `id` string: identifier of customer.
      - `type` 'customer': The type of contact.

## Response `200`

OK

- AdjustmentTransactionResponse
  - `syncId` string, uuid: Unique id of sync created

## Other responses

- `400`: The request made is not valid.
- `401`: Your API request was not properly authorized.
- `402`: An account limit has been exceeded. The type of limit is described in the error property: - You have exceeded the 50-company limit that applies to a Free plan. Delete any companies you no longer need and retry the request. - The requested sync schedule is not allowed. You requested an hourly sync schedule but this functionality is not included in the Free plan. - Your Free account is older than 365 days and has expired. Contact support@codat.io.
- `403`: You are using an outdated API key or a key not associated with that resource.
- `404`: One or more of the resources you referenced could not be found. This might be because your company or data connection id is wrong, or was already deleted.
- `429`: Too many requests were made in a given amount of time. Wait a short period and then try again.
- `500`: There is a problem with our server. Please try again later.
- `503`: The Codat API is temporarily offline for maintenance. Please try again later.

---

[API](https://skmtc.dev/codatio/apis/sync-for-expenses-v1.md) - [All operations](https://skmtc.dev/codatio/apis/sync-for-expenses-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/codatio/apis/sync-for-expenses-v1/revisions/ca501f1fd9a0?raw)
