Skip to content

Get the order code and name format

GET
/order-format-settings
Code sample: Shell / cURL
curl --request GET \
--url https://example.com/api/v1/order-format-settings \
--header 'Authorization: Bearer <token>'

Returns how the workspace generates the code and the name of new orders, every unset value resolved to its default, with the defaults a reset goes back to, the placeholders each template accepts and a preview of what the saved format generates for a sample order. Code placeholders: {company} is the company’s order prefix (such as ACME), {type} the order type’s code (such as HOURS), {n} the order number (required, once), {year} the four-digit year of the order, and {sep} the separator. Name placeholders: {type} is the order type’s name, {start} and {end} the order’s dates, and {renewalDay} the day of the month a renewing order renews on, such as 26th. A part in square brackets, such as [ – {end}], is dropped whenever a placeholder inside it has no value; brackets cannot be nested. Only orders created afterwards use the format: existing order codes and names are never rewritten. Requires one of the settings.manage, orders.create or orders.view permissions.

The workspace’s order format.

Media typeapplication/json
object
data
required

How a workspace’s new orders are coded and named. Only orders created afterwards use it: existing codes and names are never rewritten.

object
codeEnabled
required

Whether new orders get a generated code. Off leaves new orders without one.

boolean
codePadding
required

Digits the order number is zero-padded to; 0 adds none.

integer
<= 9
codeSeparator
required

The text {sep} stands for.

string
codeTemplate
required

Template of new order codes, resolved to its default when unset. Code placeholders: {company} is the company’s order prefix (such as ACME), {type} the order type’s code (such as HOURS), {n} the order number (required, once), {year} the four-digit year of the order, and {sep} the separator.

string
defaults
required

The values a reset goes back to.

object
codeSeparator
required
string
codeTemplate
required
string
nameTemplate
required
string
renewalNameTemplate
required
string
nameDateStyle
required

How {start} and {end} read: medium is a short date such as Oct 1, 2026, workspace follows the workspace date format.

string
Allowed values: medium workspace
nameLocale
required

Language tag for medium dates such as es-MX; null reads in English.

string | null
nameTemplate
required

Template of the name of new orders, resolved to its default when unset. Name placeholders: {type} is the order type’s name, {start} and {end} the order’s dates, and {renewalDay} the day of the month a renewing order renews on, such as 26th. A part in square brackets, such as [ – {end}], is dropped whenever a placeholder inside it has no value; brackets cannot be nested.

string
placeholders
required

The placeholder names each kind of template accepts.

object
code
required
Array<string>
Allowed values: company type n year sep
name
required
Array<string>
Allowed values: type start end renewalDay
preview
required

What the saved format generates for a sample: company ACME, type Hour block (code HOURS), order number 7, dates 2026-10-01 to 2026-10-31, and a Subscription starting 2026-10-26. Built by the same functions that name real orders.

object
code
required

The sample order code, or null while code generation is off.

string | null
name
required

The sample name of a non-renewing order.

string
renewalName
required

The sample name of a renewing order.

string
renewalNameTemplate
required

Template of the name of new renewing orders (subscriptions), resolved to its default when unset. Name placeholders: {type} is the order type’s name, {start} and {end} the order’s dates, and {renewalDay} the day of the month a renewing order renews on, such as 26th. A part in square brackets, such as [ – {end}], is dropped whenever a placeholder inside it has no value; brackets cannot be nested.

string
workspaceDateFormat
required

The workspace date format that workspace dates use.

string

Example

{
"data": {
"nameDateStyle": "medium",
"placeholders": {
"code": [
"company"
],
"name": [
"type"
]
}
}
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.