Skip to main content

Conventions

Reference for cross-cutting technical conventions: field naming, special field types, pagination, localization, HTTP status codes, and error response shapes.

Field naming​

  • All fields use PascalCase (e.g. ReferenceCustomer, DateCreated).
  • Shared identifier fields are prefixed with Reference (e.g. ReferenceCustomer).
  • Internal identifier fields: Id (the resource's own ID) or Id<Resource> (a foreign key, e.g. IdSubscription).

Special field types​

Value typeJSON typeFormat / example
DatestringISO 8601 — "2025-01-31T00:00:00Z"
AmountintegerSmallest currency unit (cents) — 1999 = €19.99
CurrencystringISO 4217 — "EUR", "USD"
CountrystringISO 3166-1 alpha-2 — "FR", "US"
RegionstringISO 3166-2 — only for US, Canada (CA), Spain (ES)
LanguagestringISO 639 code or locale — "fr", "fr-FR"

Common object fields​

Every resource object includes these fields:

FieldTypeDescription
IdintegerInternal numeric identifier
LinksarrayHATEOAS links to related resources

Links format:

"Links": [
{ "rel": "self", "href": "/v1/Customer/42" }
]

Pagination​

All list endpoints accept:

ParameterDefaultDescription
Page11-based page index
SizePage10Items per page (max: 1000). Pass 0 to get only the total count without fetching items.

Paginated response shape:

{
"Count": 10,
"Page": 1,
"SizePage": 10,
"TotalItems": 42,
"DateGenerated": "2025-01-31T00:00:00Z",
"Items": [ ... ]
}
FieldDescription
CountItems returned in this page
TotalItemsTotal matching items across all pages
DateGeneratedWhen this list was generated

Localization​

Some fields (TitleLocalized, DescriptionLocalized) are resolved through a four-level fallback chain:

PrioritySourceCondition
1?lang= query parameterAlways takes precedence when provided
2Customer languageWhen the request targets a specific customer
3Segment languageWhen the request targets a specific segment
4Business languageCatch-all default

The lang value follows the language format above ("fr", "fr-FR", etc.).

HTTP status codes​

CodeMeaning
200OK — success, body contains the resource
201Created — resource created, body contains the new resource
204No content — success, no body
400Bad request — general client error
401Unauthorized — credentials missing or invalid
403Forbidden — credentials valid but action not permitted
404Not found — resource does not exist
409Conflict — duplicate reference or state conflict
422Unprocessable entity — validation errors (see error shape below)
500Internal server error

Error response shapes​

All non-422 errors return a single object:

{
"Code": "string",
"Message": "Human-readable description",
"Exception": "string",
"Target": "string"
}

Exception is only present on some 500 errors. Target is rarely returned; it identifies the field or resource at fault.

422 responses return an array of error objects:

[
{ "Code": "string", "Message": "string", "Target": "string" }
]