# Upload Chart Of Accounts Data This API endpoint takes chart of accounts data and uploads it to a user’s FloQast tenant. Use this endpoint for operations such as adding, editing, and removing accounts inside of FloQast. Endpoint: PUT /api/v1/chart-of-accounts/upload Version: 1.0.0 Security: x-api-key ## Query parameters: - `allowRedirect` (boolean) If set to true, the API will return a 303 redirect response if the response payload is too large. The header and will also include the URL to the actual resource. Example: true ## Request fields (application/json): - `data` (array) Array of Chart Of Accounts Data - `data.entityId` (string, required) Id of entity Example: "5e94d5b63f557b001420bbe3" - `data.accounts` (array, required) Accounts data - `data.accounts.number` (string, required) Id of account Example: "35123" - `data.accounts.name` (string, required) Name of account Example: "Cash" ## Response 200 fields (application/json): - `data` (array) Array of Chart Of Accounts Data - `data.entityId` (string) Id of entity Example: "5e94d5b63f557b001420bbe3" - `data.accounts` (array) Accounts data - `data.accounts.number` (string) Example: "35123" - `data.accounts.name` (string) Example: "Cash" - `data.success` (boolean) Example: true - `data.error` (string) Error message, populated if success field is false Example: "Failed to validate entity ID" ## Response 303 fields (application/json): - `data` (object) - `data.url` (string) The URL to the new location of the resource. ## Response 400 fields (application/json): - `message` (object) Reason(s) for the errors related to incorrect query keys or values that are out of bound - `message.errors` (array) - `message.errors.field` (string) The field that caused the error Example: "entityId" - `message.errors.message` (string) The error message Example: "'entityId' should be a valid Mongo ObjectId" - `name` (string) BadRequest Example: "BadRequest" - `status` (integer) The HTTP status code. Example: 400 ## Response 401 fields (application/json): - `message` (string) Reason for the error such as incorrect service access, malformed, expired or deactivated token. Example: "Invalid token" - `name` (string) Unauthorized Example: "Unauthorized" - `status` (integer) The HTTP status code. Example: 401 ## Response 413 fields (application/json): - `message` (string) Reason for the error related to the payload size Example: "Response size is greater than 1MB" - `name` (string) PayloadTooLarge Example: "PayloadTooLarge" - `status` (integer) The HTTP status code. Example: 413