Skip to main content

Overview

The Smartbills API supports multiple languages and locales, allowing you to receive localized responses for your users. Use the Accept-Language header to specify the desired locale for each request.

Supported Locales

Default locale: If no Accept-Language header is provided, the API defaults to en-CA.

Setting the Locale

Include the Accept-Language header in your API requests to receive localized responses:

Code Examples

Localized Response Fields

When you specify a locale, the following elements are localized in API responses:

Error Messages

Error messages are returned in the requested language:

Category Names

Expense categories are automatically localized:

Status Labels

Status labels are localized based on the Accept-Language header:

Validation Messages

Field-level validation messages are returned in the requested language:

Fields That Are NOT Localized

The following fields are always returned as-is regardless of locale:
  • Identifiers: id, code, status (machine-readable values)
  • Amounts: amount, totalAmount (numeric values)
  • Dates: date, createdAt, updatedAt (ISO 8601 format)
  • Currencies: currency (ISO 4217 codes)
  • User-entered data: merchant, notes, description (stored as entered)
  • Error codes: code field in error responses (machine-readable)

Fallback Behavior

If a translation is not available for a specific locale, the API falls back to English (en-CA):
Since de-DE is not currently supported, responses will fall back to English.

Currency and Number Formatting

The API returns raw numeric values. Locale-specific formatting should be handled client-side:
Use your client-side locale formatting libraries:

Best Practices

Always include the Accept-Language header to ensure consistent localization. Do not rely on default behavior.
Store the user’s language preference in your application and include it in all API requests automatically.
Be aware that unsupported locales fall back to English. Design your UI to handle this gracefully.
The API returns raw values for amounts and dates. Use locale-aware formatting libraries on the client side for display.

Requesting New Languages

If you need support for additional languages, contact us at [email protected] with:
  • The language and locale you need
  • Your use case
  • Expected volume of requests
We regularly add new languages based on customer demand.

API Introduction

API overview and headers

Error Handling

Localized error messages

Authentication

Authentication and headers

Environments

Sandbox and production