PUT /api-v1/chart-accounts/batch

Headers

  • WEAL-TOKEN string Required

    API token (can be retrieved from account settings)

  • TARGET-ORGANIZATION-ID integer

    ID of organization, for which the operation must be performed

application/json

Body Required

  • id integer
  • currencyId integer Required
  • businessUnitId integer
  • accountNumber string Required

    Format should match the following pattern: ^([1-9][0-9]*)*$.

  • organizationId integer
  • localizations object
    Hide localizations attributes Show localizations attributes object
    • id integer
    • en string
    • fr string
    • de string
    • it string
  • type string Required

    Values are BALANCE_SHEET, PL, or SYSTEM.

  • isActive boolean
  • startDate string Required
  • endDate string
  • isPurchaseInvoicesEnabled boolean
  • isSalesInvoicesEnabled boolean
  • isExpenseReportEnabled boolean
  • isCashAccountEnabled boolean
  • isPaymentMethodEnabled boolean
  • isFXAutoAdjustmentEnabled boolean
  • isBusinessUnitSplitEnabled boolean
  • warnings string
  • immobilizationChartOfAccountId integer
  • immobilizationType string

    Values are LINEAR_DEPRECIATION_DIRECT, NON_LINEAR_DEPRECIATION_DIRECT, LINEAR_DEPRECIATION_INDIRECT, or NON_LINEAR_DEPRECIATION_INDIRECT.

Responses

  • 200 application/json

    OK

    Hide response attribute Show response attribute object
    • items array[object]
      Hide items attributes Show items attributes object
      • errorCode object
        Hide errorCode attributes Show errorCode attributes object
        • errorCode string

          Values are NO_ERROR, NOT_IMPLEMENTED_YET, CONTACT_NOT_FOUND, FIELD_REQUIRED, VALIDATION_ERROR, DUPLICATION_ERROR, UNIQUE_CONSTRAINT_VIOLATION, WRONG_PASSWORD_FORMAT, WRONG_PASSWORD, ACTION_DENIED, NOT_FOUND, EXPECTED_ONE_FILE, UNIQUE_VIOLATION, CONTENT_EMPTY, INVALID_TYPE, CONVERSION_ERROR, FILE_PARSE_EXCEPTION, or IN_USE.

        • errorDetailValues array[object]
          Hide errorDetailValues attributes Show errorDetailValues attributes object
          • errorCode string
          • fieldName string
          • data string
          • isSevere boolean
      • freshRow object
      • freshData object
      • possibleWorkflows array[object]
        Hide possibleWorkflows attributes Show possibleWorkflows attributes object
        • id integer
        • name string
      • error boolean
      • severeError boolean
  • 400

    400 Bad Request

  • 401

    401 Unauthorized

  • 403

    403 Access Denied

  • 404

    404 Not Found

  • 500

    500 Internal Server Error

PUT /api-v1/chart-accounts/batch
curl \
 --request PUT 'https://wyzio.app/api-v1/chart-accounts/batch' \
 --header "Content-Type: application/json" \
 --header "WEAL-TOKEN: string" \
 --header "TARGET-ORGANIZATION-ID: 42" \
 --data '[{"id":42,"currencyId":42,"businessUnitId":42,"accountNumber":"string","organizationId":42,"localizations":{"id":42,"en":"string","fr":"string","de":"string","it":"string"},"type":"BALANCE_SHEET","isActive":true,"startDate":"string","endDate":"string","isPurchaseInvoicesEnabled":true,"isSalesInvoicesEnabled":true,"isExpenseReportEnabled":true,"isCashAccountEnabled":true,"isPaymentMethodEnabled":true,"isFXAutoAdjustmentEnabled":true,"isBusinessUnitSplitEnabled":true,"warnings":"string","immobilizationChartOfAccountId":42,"immobilizationType":"LINEAR_DEPRECIATION_DIRECT"}]'
Request examples
# Headers
WEAL-TOKEN: string
TARGET-ORGANIZATION-ID: 42

# Payload
[
  {
    "id": 42,
    "currencyId": 42,
    "businessUnitId": 42,
    "accountNumber": "string",
    "organizationId": 42,
    "localizations": {
      "id": 42,
      "en": "string",
      "fr": "string",
      "de": "string",
      "it": "string"
    },
    "type": "BALANCE_SHEET",
    "isActive": true,
    "startDate": "string",
    "endDate": "string",
    "isPurchaseInvoicesEnabled": true,
    "isSalesInvoicesEnabled": true,
    "isExpenseReportEnabled": true,
    "isCashAccountEnabled": true,
    "isPaymentMethodEnabled": true,
    "isFXAutoAdjustmentEnabled": true,
    "isBusinessUnitSplitEnabled": true,
    "warnings": "string",
    "immobilizationChartOfAccountId": 42,
    "immobilizationType": "LINEAR_DEPRECIATION_DIRECT"
  }
]
Response examples (200)
{
  "items": [
    {
      "errorCode": {
        "errorCode": "NO_ERROR",
        "errorDetailValues": [
          {
            "errorCode": "string",
            "fieldName": "string",
            "data": "string",
            "isSevere": true
          }
        ]
      },
      "freshRow": {},
      "freshData": {},
      "possibleWorkflows": [
        {
          "id": 42,
          "name": "string"
        }
      ],
      "error": true,
      "severeError": true
    }
  ]
}