API Error Codes

A complete reference for all error codes returned by the Yuki API. Use this guide to understand what went wrong and how to resolve it quickly.

Error Response Format

All errors returned by the Yuki API follow RFC 7807 – Problem Details for HTTP APIs. Understanding this structure helps you handle errors programmatically.

{
    "type": "https://httpstatuses.com/400",
    "title": "Validation Error",
    "status": 400,
    "detail": "Portal id cannot be empty.",
    "instance": "/api/v1/portals/00000000-0000-0000-0000-000000000000",
    "errors": {
        "validation:invalid_input": [
            "Portal id cannot be empty."
        ]
    },
    "traceId": "ad89db24d04645ed383f4b90c1913602",
    "errorCode": "validation:invalid_input"
}

When a request is rejected field by field, the keys of errors are the names of the rejected fields instead of the error code. The errorCode stays the same, so read the keys rather than assuming they match it:

{
    "type": "https://httpstatuses.com/400",
    "title": "Validation Error",
    "status": 400,
    "detail": "One or more fields are invalid.",
    "instance": "/api/v1/domains/3fa85f64-5717-4562-b3fc-2c963f66afa6/users",
    "errors": {
        "email": [
            "The email field is not a valid email address."
        ],
        "language": [
            "The language klingon is not supported."
        ]
    },
    "traceId": "ad89db24d04645ed383f4b90c1913602",
    "errorCode": "validation:invalid_input"
}
FieldTypeDescription
typestringA URI that identifies the error type. Points to the relevant HTTP status documentation.
titlestringA short, human-readable summary of the error type.
statusintegerThe HTTP status code for this error.
detailstringA human-readable explanation of this specific occurrence. Sent on every error.
instancestringThe request path the API received. Sent on every error. The gateway fronts the API, so this may differ from the URL you called.
errorsobjectA map of arrays of descriptive messages. The keys are the names of the rejected fields when the request failed field-level validation, and the errorCode otherwise. Present on errors raised while the request is being handled; absent from the 401 and the 403 produced before the operation runs.
traceIdstringThe 32-character trace id taken from the W3C Trace Context traceparent header — the id alone, not the whole header. Always include this when contacting support.
errorCodestringThe stable feature:error_type identifier to branch on. Read it together with the HTTP status: a few codes are emitted with more than one status, listed below.

HTTP Status Codes

The Yuki API uses standard HTTP status codes to indicate the outcome of each request.

HTTP StatusMeaningWhen it occurs
200 OKSuccessThe request was processed successfully and a response body is returned.
201 CreatedResource createdA new resource was successfully created.
204 No ContentSuccess, no bodyThe request succeeded but there is no response body (e.g. DELETE).
400 Bad RequestInvalid requestThe request is malformed, missing required fields, or contains invalid values. This is also the status of every validation failure, including the *:validation_failed codes below.
401 UnauthorizedAuthentication failureThe access token is missing, expired, or invalid.
403 ForbiddenAuthorization failureThe authenticated user does not have permission to perform this action.
404 Not FoundResource not foundThe requested resource does not exist.
409 ConflictState conflictThe request conflicts with the current state of the resource.
422 Unprocessable EntityNot eligibleThe request is understood, but the target is not eligible for the operation. Used only by the PEPPOL eligibility checks.
429 Too Many RequestsRate limit exceededThe client has sent too many requests in a given time window.
500 Internal Server ErrorServer errorAn unexpected condition occurred on the server side.
502 Bad GatewayService downThe API is temporarily unavailable due to an upstream error (e.g., a dependency is down). Retry after a short delay.
503 Service UnavailableService overloaded or maintenanceThe API itself is overloaded or down for maintenance. Retry after a short delay.

Error Code Reference

The following tables list all error codes grouped by category.


Authentication

Error CodeHTTP StatusDescriptionResolution
authentication:unauthorized401, sometimes 400The request is missing a valid access token, or the token is invalid or expired.Include a valid Authorization: Bearer <token> header. Re-authenticate via Visma Connect to obtain a fresh token. The 400 variant carries the same meaning and the same remedy.
authentication:forbidden403The authenticated user does not have permission to perform this action.Verify that your application and user have been granted access to the requested resource in Yuki.

Validation

Error CodeHTTP StatusDescriptionResolution
validation:invalid_input400, sometimes 403 or 500The request contains one or more values the API cannot accept.Check the errors map for the messages that describe what is wrong with each value. The 403 is returned when the tenant identifier in your token is not a valid identifier; the 500 means the invalid value was detected too late to be reported as a request error — report that one with its traceId.
validation:missing_required_field400A required field is absent from the request body.Ensure all required fields are included in your request payload.

Companies

Error CodeHTTP StatusDescriptionResolution
companies:not_found404The specified company (administration) does not exist.Verify the administration ID and that it is accessible by your application.
companies:validation_failed400The request to create or modify a company failed validation.Check the errors map for details on which fields are invalid.
peppol:already_registered409The PEPPOL identifier is already registered.Verify the PEPPOL identifier and ensure it is unique before retrying.
peppol:network_unavailable502The PEPPOL network is temporarily unavailable.Retry the operation after a short delay.
peppol:validation_failed400The PEPPOL request failed validation.Check the errors map for details on which fields are invalid.
peppol:domain_not_eligible422The domain is not eligible for PEPPOL, so its companies cannot be registered on the network.Check that the domain is licensed for PEPPOL, then retry the request.
peppol:sending_not_eligible422PEPPOL sending is not available for this domain, so the company cannot send documents over the network.Sending requires a Small bundle or higher. Upgrade the bundle, then retry the request.
peppol:portal_not_enabled422PEPPOL is not enabled for the accounting portal, so none of its companies can be registered on the PEPPOL network.Contact Yuki to have PEPPOL enabled for the portal, then retry the request.

Domains

Error CodeHTTP StatusDescriptionResolution
domains:not_found404The specified domain does not exist.Verify the domain identifier and that it belongs to the correct administration.
domains:validation_failed400The domain request failed one or more validation rules.Check the errors map for field-level validation messages.
domains:creation_failed400, sometimes 500The domain could not be created.Review the request payload and ensure it meets all domain creation requirements. A 500 means the domain was accepted but a later step of creating it failed on our side; report that one with its traceId rather than retrying.
domains:update_failed500The domain was accepted for update but the update did not complete.This is not a conflict you can resolve by changing the request. Retry after a short delay, and if it persists report it with its traceId.
domains:already_exists409A domain with the requested name already exists, or the name is reserved.Choose a different domain name and retry.
domains:user_not_found404The specified user does not exist in this domain.Verify the e-mail address, and that the user has access to this domain.
domains:user_already_exists409The e-mail address already has access to this domain.Read the existing user instead of creating it, or use a different e-mail address.

Portals

Error CodeHTTP StatusDescriptionResolution
portals:not_found404The specified portal does not exist.Verify the portal identifier and that it is accessible by your application.
portals:validation_failed400The portal request failed one or more validation rules.Check the errors map for details on which fields are invalid.
portals:user_not_found404The specified portal user does not exist.Verify the user identifier or e-mail address, and that the user belongs to this portal.
portals:user_already_exists409The e-mail address is already a user of this portal.Read or update the existing user instead of creating it, or use a different e-mail address.
portals:user_update_failed500The portal user was accepted for update but the update did not complete.Retry after a short delay. If it persists, report it with its traceId.

Contacts

Error CodeHTTP StatusDescriptionResolution
contacts:not_found404The specified contact does not exist.Verify the contact identifier and that it is accessible by your application.
contacts:cannot_be_deleted409The contact cannot be deleted because it is referenced by other records or is required by the system.Remove any dependencies or references to the contact before attempting deletion.
contacts:creation_failed500The contact was accepted but creating it did not complete.Retry after a short delay. If it persists, report it with its traceId.
contacts:update_failed500The contact was accepted for update but the update did not complete.Retry after a short delay. If it persists, report it with its traceId.

Rate Limiting

Rate limiting is enforced at the API gateway level and returns HTTP 429 Too Many Requests. These responses do not include an application-level errorCode field. Check the Retry-After response header for the number of seconds to wait before retrying. If you are consistently hitting rate limits, contact Yuki Support to review your quota.


Server Errors

Error CodeHTTP StatusDescriptionResolution
server:internal_error500A known internal error occurred on the server.This is not related to your request. Retry after a short delay. If the issue persists, contact Yuki Support and provide the traceId from the error response.
server:unexpected_error500An unhandled exception occurred that does not map to a known error type.Retry after a short delay. If the issue persists, contact Yuki Support and provide the traceId.

Handling Errors in Your Application

Follow these best practices to handle API errors gracefully in your integration.

Check the HTTP status code first

Use the HTTP status code as the primary signal to branch your error handling logic before inspecting the errorCode field.

const response = await fetch('https://apirest.yukiworks.be/v1/administrations', {
  headers: { Authorization: `Bearer ${accessToken}` }
});

if (!response.ok) {
  const body = await response.json();
  console.error(`[${body.errorCode}] ${body.title} (traceId: ${body.traceId})`);

  switch (body.errorCode) {
    case 'authentication:unauthorized':
      // Token missing, invalid or expired — redirect to login and re-authenticate
      break;
    case 'authentication:forbidden':
      // User lacks permission — show access denied message
      break;
    case 'validation:invalid_input':
    case 'validation:missing_required_field':
      // Surface the per-field messages to the user
      console.error(body.errors);
      break;
    case 'companies:not_found':
    case 'domains:not_found':
    case 'portals:not_found':
      // Resource does not exist — handle gracefully
      break;
    default:
      // Generic fallback — log traceId for support
      console.error('traceId:', body.traceId);
      break;
  }
}

Implement retry logic with back-off

For transient errors (429, 503, 502), retry the request with exponential back-off.

async function fetchWithRetry(url, options, maxRetries = 3) {
  for (let attempt = 0; attempt < maxRetries; attempt++) {
    const response = await fetch(url, options);
    if (response.status !== 429 && response.status !== 503) {
      return response;
    }
    // Wait before retrying: 1s, 2s, 4s ...
    const delay = Math.pow(2, attempt) * 1000;
    await new Promise(resolve => setTimeout(resolve, delay));
  }
  throw new Error('Max retries reached');
}

Log the traceId

Always log the traceId from error responses. Should you need to contact support, providing this value allows Yuki's team to investigate the exact request in question.

Need Help?

If you encounter an error not listed here, or if you believe a server error is impacting your integration, reach out to the Yuki support team.

  • Support portal: yukisoftware.com/be-nl/support
  • Include in your report: the traceId, the endpoint called, the request payload (redacted of sensitive data), and the timestamp of the error.