Update the order code and name format
curl --request PATCH \ --url https://example.com/api/v1/order-format-settings \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "codeEnabled": true, "codePadding": 1, "codeSeparator": "example", "codeTemplate": "example", "nameDateStyle": "medium", "nameLocale": "example", "nameTemplate": "example", "renewalNameTemplate": "example" }'Updates any of the code and name templates, separator, padding, date style and language; omitted fields stay as they are. A template, the separator or the language sent as null or an empty text resets to its default. Null or an empty text resets this value to its default. 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 the settings.manage permission.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”object
Turns code generation on or off.
Digits the order number is zero-padded to; 0 adds none.
Template of new order codes; it needs {n}. 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. Null or an empty text resets this value to its default.
medium reads dates like Oct 1, 2026; workspace follows the date format.
Language tag for medium dates, such as en-US or es-MX. Null or an empty text resets this value to its default.
Template of the name of new orders. 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. Null or an empty text resets this value to its default.
Template of the name of new renewing orders. 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. Null or an empty text resets this value to its default.
Responses
Section titled “Responses”The updated order format.
object
How a workspace’s new orders are coded and named. Only orders created afterwards use it: existing codes and names are never rewritten.
object
Whether new orders get a generated code. Off leaves new orders without one.
Digits the order number is zero-padded to; 0 adds none.
The text {sep} stands for.
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.
The values a reset goes back to.
object
How {start} and {end} read: medium is a short date such as Oct 1, 2026, workspace follows the workspace date format.
Language tag for medium dates such as es-MX; null reads in English.
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.
The placeholder names each kind of template accepts.
object
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
The sample order code, or null while code generation is off.
The sample name of a non-renewing order.
The sample name of a renewing order.
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.
The workspace date format that workspace dates use.
Example
{ "data": { "nameDateStyle": "medium", "placeholders": { "code": [ "company" ], "name": [ "type" ] } }}Validation error. Parse failures include field paths and expectations.
Validation error with safe field paths and expected values; submitted values are never returned.
object
object
Stable machine-readable error code.
object
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Unauthorized.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Forbidden.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}A template, separator, padding or language is not valid; fields says which and why.
Error envelope whose fields name each order format input that was rejected.
object
object
Stable machine-readable error code.
Each rejected input, by body field name, with a plain-language reason.
object
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Rate limit exceeded. Wait for Retry-After before retrying.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Headers
Section titled “Headers”Maximum requests in the current quota window.
Quota policy in requests and window seconds, for example 60;w=60.
Requests left in this quota window (zero when blocked).
Seconds until the current quota window resets, when available from the rate-limit store.
Seconds until another request may be attempted.
Chelsea is operated by Arepa Labs LLC