---
title: "Update accounting items"
method: POST
path: "/api/connector/v1/accountingItems/update"
tags: ["Accounting items"]
---

# Update accounting items

`POST /api/connector/v1/accountingItems/update`

Updates specified accounting items. You can use this operation to assign an accounting item to a different account or bill. Note this operation supports [Portfolio Access Tokens](https://mews-systems.gitbook.io/connector-api/concepts/multi-property/).

> **State Restrictions**: Only accounting items in specific states can be moved:
> - **Order items**: Must be in `Open` state
> - **Payments**: Must be in `Pending` state
> 
> Attempting to move items in other states (e.g., `Closed`, `Inactive`, `Charged`, `Failed`, `Canceled`) will result in an `Invalid AccountingItemId` error.

## Request body

- MultipleAccountingItemsUpdateParameters
  - `ClientToken` string, required — Token identifying the client application.
  - `AccessToken` string, required — Access token of the client application.
  - `Client` string, required — Name and version of the client application.
  - `EnterpriseId` string, uuid, nullable — Unique identifier of the enterprise. Required when using [Portfolio Access Tokens](https://mews-systems.gitbook.io/connector-api/concepts/multi-property), ignored otherwise.
  - `AccountingItemUpdates` AccountingItemUpdateParameters[], required — List of requested updates.
    - `AccountingItemId` string, uuid, required — Unique identifier of the `AccountingItem`.
    - `AccountId` GuidUpdateValue
      - `Value` string, uuid — Value which is to be updated.
    - `BillId` GuidUpdateValue, required
      - `Value` string, uuid — Value which is to be updated.

## Response `200`

OK

- AccountingItemUpdateResult
  - `OrderItems` OrderItemOld[], nullable — Updated order items.
    - `Id` string, uuid, required — Unique identifier of the item.
    - `AccountId` string, uuid, required — Unique identifier of the account (for example `Customer`) the item belongs to.
    - `OrderId` string, uuid, required — Unique identifier of the order (or `Reservation` which is a special type of order) the item belongs to.
    - `BillId` string, uuid, nullable — Unique identifier of the `Bill` the item is assigned to.
    - `AccountingCategoryId` string, uuid, nullable — Unique identifier of the `AccountingCategory` the item belongs to.
    - `UnitCount` integer — Unit count of item, i.e. the number of sub-items or units, if applicable.
    - `UnitAmount` Amount, required
      - `Currency` string, currency, required — ISO-4217 code of the [Currency](https://mews-systems.gitbook.io/connector-api/operations/currencies/#currency).
      - `NetValue` number, double, required — Net value without taxes.
      - `GrossValue` number, double, required — Gross value including all taxes.
      - `TaxValues` TaxValue[], required — The tax values applied.
        - `Code` string, nullable — Code corresponding to tax type.
        - `Value` number, double, required — Amount of tax applied.
      - `Breakdown` TaxBreakdown, required
        - `Items` TaxBreakdownItem[], required — Tax breakdown items per each tax rate applied.
          - `TaxRateCode` string, nullable — Tax rate code for the item. `null` for untaxed amounts.
          - `NetValue` number, double, required — The net value that the tax is calculated from.
          - `TaxValue` number, double, required — The value of the tax.
    - `Amount` ExtendedAmount, required
      - `Currency` string, currency, required — ISO-4217 code of the [Currency](https://mews-systems.gitbook.io/connector-api/operations/currencies/#currency).
      - `NetValue` number, double, required — Net value without taxes.
      - `GrossValue` number, double, required — Gross value including all taxes.
      - `TaxValues` TaxValue[], required — The tax values applied.
        - `Code` string, nullable — Code corresponding to tax type.
        - `Value` number, double, required — Amount of tax applied.
      - `Breakdown` TaxBreakdown, required
        - `Items` TaxBreakdownItem[], required — Tax breakdown items per each tax rate applied.
          - `TaxRateCode` string, nullable — Tax rate code for the item. `null` for untaxed amounts.
          - `NetValue` number, double, required — The net value that the tax is calculated from.
          - `TaxValue` number, double, required — The value of the tax.
      - `Value` number, double, nullable
      - `Net` number, double, nullable
      - `Tax` number, double, nullable
      - `TaxRate` number, double, nullable
    - `OriginalAmount` ExtendedAmount, required
      - `Currency` string, currency, required — ISO-4217 code of the [Currency](https://mews-systems.gitbook.io/connector-api/operations/currencies/#currency).
      - `NetValue` number, double, required — Net value without taxes.
      - `GrossValue` number, double, required — Gross value including all taxes.
      - `TaxValues` TaxValue[], required — The tax values applied.
        - `Code` string, nullable — Code corresponding to tax type.
        - `Value` number, double, required — Amount of tax applied.
      - `Breakdown` TaxBreakdown, required
        - `Items` TaxBreakdownItem[], required — Tax breakdown items per each tax rate applied.
          - `TaxRateCode` string, nullable — Tax rate code for the item. `null` for untaxed amounts.
          - `NetValue` number, double, required — The net value that the tax is calculated from.
          - `TaxValue` number, double, required — The value of the tax.
      - `Value` number, double, nullable
      - `Net` number, double, nullable
      - `Tax` number, double, nullable
      - `TaxRate` number, double, nullable
    - `RevenueType` string, required — Revenue type of the item.
    - `CreatorProfileId` string, uuid, required — Unique identifier of the user who created the item.
    - `UpdaterProfileId` string, uuid, required — Unique identifier of the user who updated the item.
    - `CreatedUtc` string, date, required — Creation date and time of the item in UTC timezone in ISO 8601 format.
    - `UpdatedUtc` string, date, required — Last update date and time of the item in UTC timezone in ISO 8601 format.
    - `ConsumedUtc` string, date, nullable — Date and time of the item consumption in UTC timezone in ISO 8601 format.
    - `CanceledUtc` string, date, nullable — Cancellation date and time of the item in UTC timezone in ISO 8601 format.
    - `ClosedUtc` string, date, nullable — Date and time of the item bill closure in UTC timezone in ISO 8601 format.
    - `StartUtc` string, date, nullable — Start date and time of the item in UTC timezone in ISO 8601 format.
    - `AccountingState` string, required — Accounting state of the item.
    - `Data` object, required — Additional data specific to particular order item.
      - `Discriminator` 'CancellationFee' | 'Rebate' | 'Deposit' | 'ExchangeRateDifference' | 'CustomItem' | 'Surcharge' | 'SurchargeDiscount' | 'SpaceOrder' | 'ProductOrder' | 'Other' | 'TaxCorrection' | 'ResourceUpgradeFee' | 'InvoiceFee'
      - `Value` union — Based on order item discriminator or `null` for types without any additional data.
        - RebateOrderItemData
          - `RebatedItemId` string, uuid, required — Unique identifier of `OrderItem` which has been rebated by current item.
        - ProductOrderItemData
          - `ProductId` string, uuid, required — Unique identifier of the `Product`.
          - `AgeCategoryId` string, uuid, nullable — Unique identifier of the `AgeCategory`.
  - `PaymentItems` PaymentItemOld[], nullable — Updated payment items.
    - `Id` string, uuid, required — Unique identifier of the item.
    - `AccountId` string, uuid, required — Unique identifier of the account (for example `Customer`) the item belongs to.
    - `BillId` string, uuid, nullable — Unique identifier of the `Bill` the item is assigned to.
    - `AccountingCategoryId` string, uuid, nullable — Unique identifier of the `AccountingCategory` the item belongs to.
    - `Amount` ExtendedAmount, required
      - `Currency` string, currency, required — ISO-4217 code of the [Currency](https://mews-systems.gitbook.io/connector-api/operations/currencies/#currency).
      - `NetValue` number, double, required — Net value without taxes.
      - `GrossValue` number, double, required — Gross value including all taxes.
      - `TaxValues` TaxValue[], required — The tax values applied.
        - `Code` string, nullable — Code corresponding to tax type.
        - `Value` number, double, required — Amount of tax applied.
      - `Breakdown` TaxBreakdown, required
        - `Items` TaxBreakdownItem[], required — Tax breakdown items per each tax rate applied.
          - `TaxRateCode` string, nullable — Tax rate code for the item. `null` for untaxed amounts.
          - `NetValue` number, double, required — The net value that the tax is calculated from.
          - `TaxValue` number, double, required — The value of the tax.
      - `Value` number, double, nullable
      - `Net` number, double, nullable
      - `Tax` number, double, nullable
      - `TaxRate` number, double, nullable
    - `OriginalAmount` ExtendedAmount, required
      - `Currency` string, currency, required — ISO-4217 code of the [Currency](https://mews-systems.gitbook.io/connector-api/operations/currencies/#currency).
      - `NetValue` number, double, required — Net value without taxes.
      - `GrossValue` number, double, required — Gross value including all taxes.
      - `TaxValues` TaxValue[], required — The tax values applied.
        - `Code` string, nullable — Code corresponding to tax type.
        - `Value` number, double, required — Amount of tax applied.
      - `Breakdown` TaxBreakdown, required
        - `Items` TaxBreakdownItem[], required — Tax breakdown items per each tax rate applied.
          - `TaxRateCode` string, nullable — Tax rate code for the item. `null` for untaxed amounts.
          - `NetValue` number, double, required — The net value that the tax is calculated from.
          - `TaxValue` number, double, required — The value of the tax.
      - `Value` number, double, nullable
      - `Net` number, double, nullable
      - `Tax` number, double, nullable
      - `TaxRate` number, double, nullable
    - `AmountDefault` ExtendedAmount
      - `Currency` string, currency, required — ISO-4217 code of the [Currency](https://mews-systems.gitbook.io/connector-api/operations/currencies/#currency).
      - `NetValue` number, double, required — Net value without taxes.
      - `GrossValue` number, double, required — Gross value including all taxes.
      - `TaxValues` TaxValue[], required — The tax values applied.
        - `Code` string, nullable — Code corresponding to tax type.
        - `Value` number, double, required — Amount of tax applied.
      - `Breakdown` TaxBreakdown, required
        - `Items` TaxBreakdownItem[], required — Tax breakdown items per each tax rate applied.
          - `TaxRateCode` string, nullable — Tax rate code for the item. `null` for untaxed amounts.
          - `NetValue` number, double, required — The net value that the tax is calculated from.
          - `TaxValue` number, double, required — The value of the tax.
      - `Value` number, double, nullable
      - `Net` number, double, nullable
      - `Tax` number, double, nullable
      - `TaxRate` number, double, nullable
    - `Notes` string, nullable — Additional notes.
    - `SettlementId` string, nullable — Identifier of the settled payment from the external system (ApplePay/GooglePay).
    - `ConsumedUtc` string, required — Date and time of the item consumption in UTC timezone in ISO 8601 format.
    - `ClosedUtc` string, nullable — Date and time of the item bill closure in UTC timezone in ISO 8601 format.
    - `AccountingState` string, required — Accounting state of the item.
    - `State` string, required — Payment state of the item.
    - `Identifier` string, nullable — External payment identifier.
    - `Data` object, required — Additional data specific to particular payment item.
      - `Discriminator` 'CreditCard' | 'Invoice' | 'Cash' | 'Unspecified' | 'BadDebts' | 'WireTransfer' | 'ExchangeRateDifference' | 'ExchangeRoundingDifference' | 'BankCharges' | 'Cheque' | 'Other'
      - `Value` union — Based on payment item data discriminator or `null` for types without any additional data.
        - PaymentCardPaymentData
          - `PaymentCardId` string, uuid, nullable — Unique identifier of the `CreditCard`.
        - InvoicePaymentData
          - `InvoiceId` string, uuid, required — Unique identifier of the invoice `Bill`.

## Other responses

- `204` — Server has successfully fulfilled the request and there is no additional information to send back.
- `400` — Error caused by the client app, e.g. in case of malformed request or invalid identifier of a resource. In most cases, such an error signifies a bug in the client app (consumer of the API).
- `401` — Error caused by usage of invalid ClientToken, AccessToken, or you may not have the necessary permission to use the endpoint.
- `403` — Server error that should be reported to the end user of the client app. Happens for example when the server-side validation fails or when a business-logic check is violated.
- `408` — Error caused by heavy request that takes too long to process (typically tens of seconds). To get around this, request data in smaller batches. For more information, see [Request timeouts](https://mews-systems.gitbook.io/connector-api/guidelines/requests#request-timeouts)
- `429` — Error caused by too many requests sent in a given amount of time. Response contains `Retry-After` header indicating how long the user agent should wait before making a follow-up request. For more information, see [Request limits](https://mews-systems.gitbook.io/connector-api/guidelines/requests#request-limits).
- `500` — Unexpected error on the Mews side. This may be due to a software fault. If such a situation occurs, the error will be logged and the development team notified, however you can raise an issue through GitHub on our [documentation repository](https://github.com/MewsSystems/gitbook-connector-api).

---

[API](https://skmtc.net/mews/apis/connector-api.md) · [All operations](https://skmtc.net/mews/apis/connector-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mews/connector-api/revisions/4bf95cbc375f/schema)
