Skip to content

Preview moving a client field's links to Resources

GET
/clients/field-definitions/{id}/resource-conversion
Code sample: Shell / cURL
curl --request GET \
--url https://example.com/api/v1/clients/field-definitions/example/resource-conversion \
--header 'Authorization: Bearer <token>'

Shows what moving the links a client custom field holds into each company’s own (General) resources would do, without writing anything: per company a new link, a link the company already has (same address, so it is skipped), or a value that is not a link and stays in the field. Only a URL, TEXT or MULTILINE field that is not secret is planned; any other answers isConvertible false with nothing planned. rows samples the first 20 companies of each outcome and totals counts them all. Requires the settings.manage, clients.edit and clients.view_all permissions together, since the move reads every company.

id
required

Resource identifier (CUID2).

string
>= 1 characters

Resource identifier (CUID2).

What the move would do.

Media typeapplication/json
object
data
required

What moving a client custom field’s links into each company’s resources would do. Nothing is written.

object
deactivatesField
required

True when the field is active and every value becomes or already is a link, so the move turns the field off.

boolean
definition
required
object
id
required
string
kind
required

The input type a client custom field renders as.

string
Allowed values: TEXT MULTILINE CHECKBOX DROPDOWN FILE URL
name
required
string
isConvertible
required

False for a secret field and for a kind that never holds a link (CHECKBOX, DROPDOWN, FILE); nothing is planned then.

boolean
rows
required

The first 20 companies of each outcome, as a sample.

Array<object>
object
clientId
required
string
clientName
required
string
outcome
required
string
Allowed values: create duplicate not_link
value
required
string
totals
required

Companies per outcome: a new link, a link the company already has, and a value that is not a link and stays in the field.

object
create
required
integer
>= -9007199254740991 <= 9007199254740991
duplicate
required
integer
>= -9007199254740991 <= 9007199254740991
not_link
required
integer
>= -9007199254740991 <= 9007199254740991

Example

{
"data": {
"definition": {
"kind": "TEXT"
},
"rows": [
{
"outcome": "create"
}
]
}
}

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"
}
}

Not found.

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.