Skip to content

Suggest an order code prefix for a company name

GET
/clients/prefix-suggestion
Code sample: Shell / cURL
curl --request GET \
--url 'https://example.com/api/v1/clients/prefix-suggestion?name=example' \
--header 'Authorization: Bearer <token>'

Returns a prefix no company of the workspace holds, built from the name: the initials of its words, then the letters its first word begins with, and a number when all of those are taken. A name after d/b/a stands in for the whole name, and legal-form words such as Inc and LLC are ignored. Nothing is reserved: POST /clients with a blank prefix takes the next free one if another company claims it first. Requires the clients.create or settings.manage permission, as POST /clients does.

name
required

The company name to suggest a prefix for.

string
>= 1 characters <= 200 characters

The company name to suggest a prefix for.

The suggested prefix.

Media typeapplication/json
object
data
required
object
prefix
required

An order code prefix (2 to 10 letters or digits, uppercase) no company of the workspace holds, built from the name. A suggestion only: creating the company with a blank prefix takes the next free one if another company claims it first.

string

Example generated

{
"data": {
"prefix": "example"
}
}

Validation error. Parse failures include field paths and expectations.

Media typeapplication/json

Validation error with safe field paths and expected values; submitted values are never returned.

object
error
required
object
code
required

Stable machine-readable error code.

string
issues
Array<object>
object
expected
required
string
message
required
string
path
required
Array<string | number>
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

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

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.