Modify batch of accounting periods

POST /api-v1/accounting-period/batch

Headers

  • TARGET-ORGANIZATION-ID integer(int32)

    ID of organization, for which the operation must be performed

  • WEAL-TOKEN string Required

    API token (can be retrieved from account settings)

application/json

Body Required

accountingPeriods

  • budgetExist boolean
  • endDate string
  • fiscalYear integer(int32)
  • flatRateAccounts array[object]
    Hide flatRateAccounts attributes Show flatRateAccounts attributes object
    • flatRate string
    • flatRateChartAccountsIds array[integer]
    • id integer
  • id integer
  • isLocked boolean
  • lockedUntil string
  • ntdrRate1AccountsIds array[integer]
  • ntdrRate2AccountsIds array[integer]
  • ntdrRate_1 string
  • ntdrRate_2 string
  • startDate string
  • status string

    Values are OPEN, CLOSED, or INACTIVE.

  • vatRule object
    Hide vatRule attributes Show vatRule attributes object
    • id integer
    • name object
      Hide name attributes Show name attributes object
      • de string
      • en string
      • fr string
      • it string
    • rule string

      Values are NONE, AGREED_SERVICE, RECEIVED_COMPENSATION, NTDR_AGREED_SERVICE, NTDR_RECEIVED_COMPENSATION, FLAT_RATE_RECEIVED_COMPENSATION, or FLAT_RATE_AGREED_SERVICE.

Responses

  • 200 */*

    OK

    Hide response attribute Show response attribute object
    • items array[object]
      Hide items attributes Show items attributes object
      • error boolean
      • 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
          • data string
          • errorCode string
          • fieldName string
          • isSevere boolean
      • freshData object
      • freshRow object
      • possibleWorkflows array[object]
        Hide possibleWorkflows attributes Show possibleWorkflows attributes object
        • id integer
        • name string
      • severeError boolean
  • 400

    400 Bad Request

  • 401

    401 Unauthorized

  • 403

    403 Access Denied

  • 404

    404 Not Found

  • 500

    500 Internal Server Error

POST /api-v1/accounting-period/batch
curl \
 --request POST 'https://wyzio.app/api-v1/accounting-period/batch' \
 --header "Content-Type: application/json" \
 --header "TARGET-ORGANIZATION-ID: 42" \
 --header "WEAL-TOKEN: string" \
 --data '[{"budgetExist":true,"endDate":"string","fiscalYear":42,"flatRateAccounts":[{"flatRate":"string","flatRateChartAccountsIds":[42],"id":42}],"id":42,"isLocked":true,"lockedUntil":"string","ntdrRate1AccountsIds":[42],"ntdrRate2AccountsIds":[42],"ntdrRate_1":"string","ntdrRate_2":"string","startDate":"string","status":"OPEN","vatRule":{"id":42,"name":{"de":"string","en":"string","fr":"string","it":"string"},"rule":"NONE"}}]'
Request examples
# Headers
TARGET-ORGANIZATION-ID: 42
WEAL-TOKEN: string

# Payload
[
  {
    "budgetExist": true,
    "endDate": "string",
    "fiscalYear": 42,
    "flatRateAccounts": [
      {
        "flatRate": "string",
        "flatRateChartAccountsIds": [
          42
        ],
        "id": 42
      }
    ],
    "id": 42,
    "isLocked": true,
    "lockedUntil": "string",
    "ntdrRate1AccountsIds": [
      42
    ],
    "ntdrRate2AccountsIds": [
      42
    ],
    "ntdrRate_1": "string",
    "ntdrRate_2": "string",
    "startDate": "string",
    "status": "OPEN",
    "vatRule": {
      "id": 42,
      "name": {
        "de": "string",
        "en": "string",
        "fr": "string",
        "it": "string"
      },
      "rule": "NONE"
    }
  }
]
Response examples (200)
{
  "items": [
    {
      "error": true,
      "errorCode": {
        "errorCode": "NO_ERROR",
        "errorDetailValues": [
          {
            "data": "string",
            "errorCode": "string",
            "fieldName": "string",
            "isSevere": true
          }
        ]
      },
      "freshData": {},
      "freshRow": {},
      "possibleWorkflows": [
        {
          "id": 42,
          "name": "string"
        }
      ],
      "severeError": true
    }
  ]
}