FinBaze for Platforms

Reference

GraphQL errors carry a top-level extensions.code. Branch on the code, not the message. The REST routes (bulk jobs, statement files, downloads) answer { "error": { "type", "code", "message", "param", "request_id" } } with the same codes. Every response has an X-Request-Id header; send it to support. This page lists 159 codes.

Embed sessions and tokens#

CodeHTTPMeaningWhat to do
EMBED_SECRET_INVALID401The client secret is malformed or unknown.Create a new session and pass its clientSecret unchanged. Never reuse or edit a secret.
EMBED_SECRET_USED403The client secret was already exchanged.Secrets are single use. Return a new secret from fetchClientSecret every time; do not cache it.
EMBED_SECRET_EXPIRED403The client secret was not exchanged within its lifetime (15 minutes).Create the session as late as possible, in fetchClientSecret.
EMBED_SESSION_REVOKED401The session was revoked, or the user lost access or was disabled.The SDK asks fetchClientSecret for a new session once (reason: "revoked"). If your backend refuses, onSessionExpired fires.
EMBED_ORIGIN_NOT_ALLOWED403The page's origin is not in the platform's allowed origins (or not the session's origin).Add the origin in the developer portal under Embedding → Allowed origins. Test and live origins are separate.
EMBED_COMPONENT_NOT_ALLOWED403The component is not part of this session.Include it in components when you create the session.
EMBED_OPERATION_NOT_ALLOWED403An embed token tried to run a GraphQL document that is not in the operations manifest.Embed tokens only run FinBaze's own operations. Use the server API or a headless session for custom queries.
EMBED_FEATURE_DISABLED403A component feature (for example submit) is switched off for this session.Enable it in the session's components.<name>.features.
EMBED_CHAIN_EXPIRED403A chain of refreshed sessions reached its maximum lifetime (12 hours by default).The user signs in again in your product; mint a session without previousSessionId.
EMBED_APP_MISMATCH403The session was created for a different channel: a mobile session was used on the web embed, a web session on the mobile shell, or the wrong app id was named.Create the session with the same mobileAppId (or none, for web) that you use to open it, and pass that app id to the mobile SDK.
PLATFORM_HEADLESS_DISABLED403Headless sessions are not enabled for this platform.Ask FinBaze to enable platforms.headless, then add the origin as a headless origin.
UNAUTHENTICATED401Missing, expired or revoked token.Request a new token. The embed SDK maps this to EMBED_SESSION_REVOKED.
FORBIDDEN_TOKEN_TYPE403This kind of token cannot call the operation, for instance a server token calling grantTaxAuthorisation.Consent is given by the company's own user in an embed or headless session.
SERVER_TOKEN_REQUIREDOnly a platform server token can use this endpoint (data ingestion over HTTP).Call it with your secret or restricted key's token, not a user, embed or headless token.
SCOPE_MISSINGThe key or token lacks the scope the endpoint needs.Add the scope named in the message to the restricted key, or use a secret key.
CodeHTTPMeaningWhat to do
TAX_AUTHORISATION_REQUIRED403A return was submitted for a platform company that has not authorised FinBaze to file this tax (or revoked it).The company's admin authorises it in the onboarding or tax-authorisation component (or your headless UI). See Filing consent.
TAX_AUTHORISATION_STATEMENT_OUTDATED409The statement hash or version sent with grantTaxAuthorisation is not the text FinBaze would show now.Load taxAuthorisationStatement again, show it and send back its version and hash.
TAX_NOT_REGISTERED422A grant named a tax the company has no obligation for.Offer only the taxes in taxAuthorisationStatus.
FILING_DELEGATED_TO_FIRM403The company's accountant files this return, so the company cannot submit it.Hide the submit button; the accountant files it.
FILER_MUST_BE_INTERMEDIARY400The request (the corporate income tax deferral, nl_cit_uitstel) can only be filed by a tax intermediary with a BECON number. FinBaze files as a software supplier without a BECON number, so for a company with no accountant it is refused.Show it as a blocked reason, not a failure: the company's accountant files the deferral. taxFilingSubmitPreview.blockedReason carries the same code.
FIRM_NOT_AUTHORISED_FOR_TAX403A firm tried to file a tax its engagement does not cover.The company has to extend the engagement.
STEP_UP_REQUIRED403Your step_up provider lists this action and no valid confirmation came with the request. extensions.challenge is what to confirm.Confirm the user, sign the assertion and retry with FinBaze-Step-Up: <challengeId>.<jws>. See Delegated actions.
STEP_UP_CONFIGThe platform's step_up provider is not configured completely.Register the provider with jwksUrl (https) or keys.
STEP_UP_EXPIREDThe challenge or the assertion is past its lifetime (five minutes for a challenge, maxAgeSeconds for an assertion).Start the action again to get a new challenge, and sign the assertion with a short expiry.
STEP_UP_INVALIDThe assertion could not be verified: wrong signature, algorithm, issuer, audience or key id.Sign with ES256, EdDSA or RS256, iss = your platform id, aud = finbaze, and a kid your jwksUrl or keys serves.
STEP_UP_MISMATCHThe assertion names another challenge, nonce, action or user than the one being confirmed.Copy challenge_id, nonce and action from the challenge and set sub to the user it was for. A challenge works once.
FEATURE_NOT_ALLOWEDThe feature a provider or action needs (for example delegated.step_up) is not in this platform's allowance.Ask FinBaze to add it to your allowance.

Sending data#

CodeHTTPMeaningWhat to do
INVALID_LINEOne object of a call or bulk line could not be processed; path points at the field.Fix the field named in path and send the line again. In a bulk job the other lines were applied.
INVALID_METADATAmetadata is not up to 50 string values.Send only strings, at most 50 keys.
UNKNOWN_COMPANY404The company reference matches no company of your platform.Use the company's id or the externalId you gave it.
UNKNOWN_REFERENCEA reference to another object (a relation, product, project, employment) is not found for this company.Send the referenced object first, or fix the externalId.
FEATURE_DISABLED403The company's plan or the platform's limits hide this part of FinBaze, or FinBaze for Platforms is not enabled.Check the company's effective features (platformCompanyFeatures). See Features and limits.
OBJECT_FINALISED409The object is final (a finalised invoice, approved hours) and accepts metadata only.Correct a finalised invoice with a credit note (creditOf).
OBJECT_DELETED409You deleted this object earlier.Add restore: true to bring it back.
UNSUPPORTED_OPERATIONThe operation or document kind is not supported yet.See the operation's description or the changelog for what is available.
TOTAL_MISMATCHexpectedTotalMinor differs from what your prices and tax codes add up to.Check the prices and tax codes. Tax is derived from the tax code, never taken from the line.
AMOUNT_OUT_OF_RANGEAn amount is outside the range FinBaze stores.Check that amounts are in minor units.
CURRENCY_MISMATCHA transaction or balance has another currency than its account.Send each account's currency.
EXTERNAL_ID_TAKENexternalId is already used by another company of your platform.Use a unique externalId, or call again with the same id to get the same company.
LEGAL_NAME_REQUIREDlegalName is required when the register lookup has no match.Send legalName.
COMPANY_NOT_FOUNDNo such company for your platform.Check the id. Another platform's company looks the same as one that does not exist.
INGESTION_PAUSED503Ingestion is paused. Try again later.Retry later with the same Idempotency-Key.
IDEMPOTENCY_KEY_IN_USE409An upload with this Idempotency-Key is still in progress.Wait for it, then read the job; do not send it again.
IDEMPOTENCY_KEY_REUSED409This Idempotency-Key was used with a different body.Use a new key for a different body.
PAYLOAD_TOO_LARGE413The body is larger than the request limit.Split the file into several bulk jobs.
UNSUPPORTED_MEDIA_TYPE415The content type is not accepted.Send NDJSON (application/x-ndjson, optionally gzip), or the file types the endpoint lists.
UNKNOWN_OBJECTThe bulk job's object is not one of the supported names.Use one of the names the message lists: relations, products, projects, cost_centers, sales_invoices, purchase_invoices, journal_entries, employees, employments, worked_hours.
INVALID_PARAMETERA query parameter is missing or not one of the allowed values.Fix the parameter the message names.
INVALID_INPUTAn argument is invalid; the message says which.Fix the argument.
BAD_USER_INPUT400An argument failed validation. extensions.param names the argument.Fix the input; the message says what is wrong.
INTERNAL500FinBaze could not process the line or run.Retry with the same ids. If it persists, send the X-Request-Id to support.

Data sources and feeds#

CodeHTTPMeaningWhat to do
DATA_SOURCE_KEY_TAKENA data source with this key already exists.Use the existing source, or another key.
SOURCE_INACTIVEThe data source is paused or retired.Register a new source, or reactivate it in the portal.
NOT_ATTACHEDThe source is not attached to this company.Call attachDataSource for the company first.
UNKNOWN_ACCOUNT404The feed account is not known for this company.Create it with upsertFeedBankAccount before sending transactions.
PENDING_NOT_BOOKEDPending transactions are not accepted.Send a transaction once the bank has booked it.
IMMUTABLE_TRANSACTION409A booked transaction changed after it was delivered.Send a reversal (reverses) and a new transaction instead.
EMPTY_FILEThe statement file is empty.Check the export.
FILE_TOO_LARGE413The statement file is over the size limit.Split the file.
DESTINATION_KEY_TAKENAn export destination with this key exists.Use another key, or update the existing destination.
DESTINATION_IN_USEAn active export schedule still writes to this destination.Delete or pause the schedule first.
SCHEDULE_KEY_TAKENAn export schedule with this key exists.Use another key, or update the schedule.

Records and flows#

CodeHTTPMeaningWhat to do
UNKNOWN_RECORD_TYPEA flow template or record names a record type that is not defined.Define it with definePlatformRecordType first.
UNKNOWN_STATEA trigger names a state that is not a state of the record type.Use the states you defined.
UNKNOWN_TAX_CODEA template table names a tax code that does not exist.Use a code from the tax code list.
UNKNOWN_LEDGERA ledger the template names does not exist in the company's chart.Fix the ledger code in ledgers, or activate the template for companies whose chart has it.
INVALID_TEMPLATEThe flow template is not valid: the message has the path and line.Fix the template; testFlowTemplate checks it without writing anything.
INVALID_TRANSITIONA record or payment request cannot move to that state from where it is.Send a state the record type allows from the current one.
CUSTOM_FIELDS_INVALIDCustom field values do not match their definitions.Check the definitions with customFieldDefinitions.
CUSTOM_FIELD_LIMITThe number of custom field definitions reached the limit.Archive one you do not use.

Messages, policies and extensions#

CodeHTTPMeaningWhat to do
FIELD_CONTROL_INVALIDA field control (hidden, read-only, required) is not valid.Fix the control named in the message.
FIELD_LOCKEDA field is locked by the platform's field controls.Do not change it from this surface, or lift the control.
COPY_TEMPLATE_INVALIDA message copy template has problems (unknown placeholders, too long, links in model text).Fix what the message lists; previewPlatformMessageCopy renders it first.
ROUTING_NOT_ALLOWEDThe message type cannot be routed that way (the catalogue lists the allowed routings per type).Choose one of the type's allowed routings.
PREFERENCE_LOCKEDAccount-security email cannot be switched off.Leave that preference on.
UNKNOWN_PARTNER_ROLEThe platform has no such role in its roles_mapping policy.Add the role to the policy, or send a role it has.
ROUTING_NOT_CHANGEABLELifecycle, billing and account-security messages are never delivered for platform companies and their routing cannot be changed.Leave the rule out. See the message catalogue.
POLICY_INVALIDA policy in the bundle is not valid.Fix the policy the message names.
POLICY_NOT_OVERRIDABLEThis kind of policy cannot be overridden per company.Change it for the whole platform.
QUOTA_EXCEEDEDThe monthly quota of the feature is used up.Wait for the next month or ask for a higher quota.
FILING_APPROVAL_NOT_ENABLEDApproval applies only to companies of a platform with dual approval.Enable dual approval in the filing policy first.
FILING_APPROVAL_REQUIREDThe person who prepared a filing cannot approve it.Let a second person approve it.
FILING_NOT_READYOnly a filing that is ready can be approved.Finish the draft first.
FILING_SUBMIT_ROLEThe user's role cannot approve tax filings for this company.Use a user with the role the policy requires.
CUSTOM_ACTION_INVALIDA custom action is not valid.Fix the definition the message describes.
LINK_TEMPLATE_INVALIDA link template is not valid.Use an https URL with the placeholders the message lists.
SLOT_INVALIDThe extension slot does not exist or does not accept this item.Use a slot from platformCustomActions / the slot list.

Webhooks and events#

CodeHTTPMeaningWhat to do
ALREADY_DELIVEREDThis event was already delivered to the endpoint.Replay that delivery instead of resending the event.
ENDPOINT_DISABLEDThe endpoint is disabled.Enable it (and fix the cause: a 410 Gone or repeated failures disable it) before replaying.

Payments and delegated actions#

CodeHTTPMeaningWhat to do
PROVIDER_NOT_REGISTEREDThis platform has no enabled provider for the action.Register one with upsertPlatformProvider.
PROVIDER_CONFIG_INVALIDThe provider's configuration is not valid (for example step_up needs jwksUrl or keys).Fix the configuration the message names.
PROVIDER_KIND_NOT_ENABLEDThe payments provider does not handle this kind of request.Add the kind to the provider's kinds.
PAYMENT_REQUEST_EMPTYThe batch has no payable lines (held and blocked lines are excluded).Release or fix the lines.
PAYMENT_REQUEST_INVALID_LINEEvery line needs a verified IBAN snapshot and a positive amount.Verify the creditor's bank details in FinBaze.
PAYMENT_REQUEST_NOT_PAYABLEThe filing must be submitted or accepted before it can be paid.Create the request after the filing is submitted.
PAYMENT_REQUEST_UNSUPPORTEDOnly NL VAT and wage tax filings can be paid through a request.Pay other taxes outside FinBaze.
STATUS_NOT_REPORTABLEA partner can report sent, accepted, scheduled, failed or cancelled; paid comes from the bank.Push the bank transaction with its endToEndId; the request becomes paid by itself.
PAYMENT_LINK_INVALIDThe payment link is not an https URL on one of your allowedHosts.Add the host to the provider config or fix the URL.

Accounting firms#

CodeHTTPMeaningWhat to do
FIRM_ACCESS_DISABLEDfirm_access is hidden for the company.Show the key again (Features and limits).
FIRM_NOT_FOUNDNo firm matches the KvK number or connect code.Check the number; lookups are exact.
FIRM_HAS_NO_BECONTaxes were chosen, but the firm has no BECON number.Offer bookkeeping access only.
FIRM_ENGAGEMENT_STATEMENT_OUTDATEDThe statement changed since it was shown.Read firmEngagementStatement again and confirm the new text.
ENGAGEMENT_NOT_PENDINGThe request was already answered or expired.Reload the engagement.
ENGAGEMENT_NOT_ACTIVEThe engagement is not active.Reload the engagement.
COMPANY_ADMIN_REQUIREDThe user is not an admin of the company.A company admin has to do this.
FIRM_ADMIN_REQUIREDThe user is not an admin of the firm.A firm admin has to do this.
FIRM_LOOKUP_RATE_LIMITEDToo many firm lookups or requests for this company.Wait and try again; limits are per hour.
PLATFORM_END_REASON_NOT_ALLOWEDA platform ended an engagement with a reason that is not in its list.Use firm_access_hidden, company_closed, company_transferred or platform_request.
PLATFORM_COMPANY_USE_ENGAGEMENTA firm tried to connect a platform company through an invite link, onboarding or createClient.Connect it through an accountant connection: the company invites the firm, or the firm requests access.
NOT_A_PLATFORM_COMPANYThe company does not belong to a platform.Use the operations for direct companies.

Company lifecycle and transfers#

CodeHTTPMeaningWhat to do
COMPANY_SUSPENDEDThe company is suspended and read-only.Reactivate it with reactivatePlatformCompany.
COMPANY_CLOSEDThe company stopped trading; only final returns and exports still work.Reopen it within the reopen window, or leave it.
COMPANY_ARCHIVEDThe company is archived; only exports work.Export what you need.
INVALID_LIFECYCLE_TRANSITIONThe company's state does not allow this move.Read lifecycle.state first.
SUSPENDED_BY_FINBAZEFinBaze suspended the company; only FinBaze can reactivate it.Contact support.
INVALID_EFFECTIVE_DATEThe closing date is not valid.Use a date the closing checklist accepts.
REOPEN_WINDOW_PASSEDThe reopen window (90 days by default) has passed.The company cannot be reopened.
ARCHIVE_BLOCKEDA blocking closing checklist item is open.Complete it; companyClosingChecklist lists them.
FORCE_NOT_ALLOWEDOnly FinBaze staff can force this move.Do not pass force.
TRANSFER_CODE_INVALIDThe transfer code is wrong, used or unknown (they all fail the same way).Ask the sending platform for a new code.
TRANSFER_CODE_EXPIREDThe transfer code expired (14 days by default).Start the transfer again.
TRANSFER_ALREADY_PENDINGThe company already has a pending transfer.Cancel it with cancelCompanyTransfer.
TRANSFER_TO_SAME_PLATFORMThe target is the platform that owns the company.Choose another target.
TRANSFER_WRONG_TARGETThe code is for another kind of target.Use acceptCompanyTransfer for platform codes and the claim link for direct transfers.
TRANSFER_STATEMENT_OUTDATEDThe transfer statement changed since it was shown.Show it again and send the new hash.
TRANSFER_EMAIL_REQUIREDA transfer to direct FinBaze needs an email address.Send email.
TRANSFER_EMAIL_MISMATCHThe account claiming the company does not have the email the transfer was made for.Sign in with that address.

Support access#

CodeHTTPMeaningWhat to do
SUPPORT_ESCALATION_DISABLEDEscalation to FinBaze support is not enabled for the platform.Switch the support mode in the portal.
ESCALATION_CLOSEDThe support escalation is closed.Open a new one.
SUPPORT_MODE_FINBAZE_DIRECTSupport goes to FinBaze directly for this platform; there is no partner-first step.Use the escalation form or createSupportEscalation.
SUPPORT_NOT_A_PLATFORM_COMPANYSupport access applies to platform companies only.Use the normal support channels.
SUPPORT_COMPANY_ADMIN_REQUIREDOnly a company admin decides on support access.Ask an admin.
SUPPORT_GRANT_ALREADY_OPENA support access request or grant is already open for the company.Answer or end the open one first.
SUPPORT_GRANT_NOT_FOUNDNo such support access grant.Check the id.
SUPPORT_GRANT_NOT_PENDINGThe grant was already answered.Reload it.
SUPPORT_GRANT_NOT_ACTIVEThe grant is not active (expired, revoked or declined).Ask for a new one.
SUPPORT_GRANT_REQUIREDFinBaze staff need the company's consent before viewing it.Approve the request in support-access.
SUPPORT_GRANT_READ_ONLYSupport access is read-only.Support staff cannot change data.
SUPPORT_GRANT_DENIED_OPERATIONThe operation is not available through support access.Support staff cannot do this on the company's behalf.
SUPPORT_ATTESTATION_REQUIREDA break-glass access needs the staff member's attestation.Add the attestation.
SUPPORT_BREAK_GLASS_SECOND_ADMIN_REQUIREDBreak-glass access needs a second FinBaze admin to confirm.Ask a second admin.
INVALID_DURATIONThe access duration is outside the allowed range.Choose a shorter or longer period.
INVALID_REASONThe reason is missing or not one of the allowed values.Send a reason.

Sandbox#

CodeHTTPMeaningWhat to do
TEST_CLOCK_NOT_FOUNDNo such test clock for your platform.List clocks with testClocks.
TEST_CLOCK_LIMITThe platform reached its maximum number of test clocks.Delete one with deleteTestClock.
TEST_CLOCK_BACKWARDSA test clock only moves forward.Create a new clock for an earlier time.
TEST_CLOCK_RANGE_TOO_LARGEThe requested advance is longer than the maximum (400 days by default).Advance in several steps.
TEST_CLOCK_BUSYThe clock is still advancing.Wait until its status is ready again.
SANDBOX_ONLYThis operation (test clocks, demo companies, sample apps, the reset) is available in the sandbox only.Call the sandbox API (https://sandbox.api.platform.finbaze.com) with a test key.
SANDBOX_RESET_RUNNINGA reset of this sandbox is already running.Wait for it to finish.
SANDBOX_SIGN_IN_ONLYSandbox access is through your production FinBaze account.Sign in with your production account.
MIRRORED_FROM_PRODUCTIONThis sandbox object mirrors production and cannot be changed in the sandbox.Change it in production.

Platform, keys and limits#

CodeHTTPMeaningWhat to do
KEY_LIMIT_REACHEDA platform can have at most 10 active keys per environment.Revoke a key you no longer use.
RATE_LIMITED429Too many requests in the window (also: 5 sample apps a day).Back off and retry.
FORBIDDEN403The key or token may not do this.Check the key's scopes and the company's features.
NOT_FOUND404The object does not exist for your platform. Another platform's object looks the same.Check the id.
CONFLICT409The request conflicts with the current state.Read the object and decide again.
UNPROCESSABLE422The request is well-formed but cannot be processed.Read the message.
UNAVAILABLE503The service cannot answer now.Retry with the same idempotency key.

In the browser SDK#

FinBazeEmbedError has the same code values plus the message. Pass onError to loadFinBaze to receive them; per-component failures also arrive as the component's error event.