People

Set person types

PUT
https://api.searchsoftware.nl/v4/records/people/{id}/types

Replaces the record's types with types; an empty list clears them. Each entry is a prefixed type ID as the record's types attribute returns (person_type:<sqid>) or a type's string_id. Active types come from GET /v4/records/{plural_slug}/types. At most 50. Requires people:write.

Body

application/json
typesarrayrequired

Type IDs or string_ids, such as ["person_type:Ab12", "candidate"]

Parameters

idstringrequiredpath

Person ID

Response

Types set

Response fields application/json
statusstringokrequired
Example
ok
dataSetTypesDatarequired
Show child attributes
typesArray<string>required

The record's types after the change.

linkedArray<string>required

Types added by this request.

unlinkedArray<string>required

Types removed by this request.

400Bad RequestErrorResponse

Invalid id or body

Response fields application/json
statusstringerrorrequired
Example
error
errorErrorBodyrequired
Show child attributes
codestringrequired

Stable machine-readable error code.

status_codeinteger<int32>required

HTTP status code for this response.

messagestringrequired

Human-readable error message.

Example
{
  "status": "error",
  "error": {
    "code": "INVALID_BODY",
    "status_code": 400,
    "message": "Invalid request body"
  }
}
401UnauthorizedErrorResponse

Invalid API key

Response fields application/json
statusstringerrorrequired
Example
error
errorErrorBodyrequired
Show child attributes
codestringrequired

Stable machine-readable error code.

status_codeinteger<int32>required

HTTP status code for this response.

messagestringrequired

Human-readable error message.

Example
{
  "status": "error",
  "error": {
    "code": "INVALID_API_KEY",
    "status_code": 401,
    "message": "Invalid API key"
  }
}
403ForbiddenErrorResponse

Insufficient scope

Response fields application/json
statusstringerrorrequired
Example
error
errorErrorBodyrequired
Show child attributes
codestringrequired

Stable machine-readable error code.

status_codeinteger<int32>required

HTTP status code for this response.

messagestringrequired

Human-readable error message.

Example
{
  "status": "error",
  "error": {
    "code": "FORBIDDEN",
    "status_code": 403,
    "message": "Insufficient scope"
  }
}
404Not FoundErrorResponse

Person not found

Response fields application/json
statusstringerrorrequired
Example
error
errorErrorBodyrequired
Show child attributes
codestringrequired

Stable machine-readable error code.

status_codeinteger<int32>required

HTTP status code for this response.

messagestringrequired

Human-readable error message.

Example
{
  "status": "error",
  "error": {
    "code": "NOT_FOUND",
    "status_code": 404,
    "message": "Record not found"
  }
}
422Unprocessable EntityErrorResponse

Unknown, archived or wrong-kind type, or more than 50

Response fields application/json
statusstringerrorrequired
Example
error
errorErrorBodyrequired
Show child attributes
codestringrequired

Stable machine-readable error code.

status_codeinteger<int32>required

HTTP status code for this response.

messagestringrequired

Human-readable error message.

Example
{
  "status": "error",
  "error": {
    "code": "VALIDATION_FAILED",
    "status_code": 422,
    "message": "Validation failed"
  }
}
500Internal Server ErrorErrorResponse

Internal server error

Response fields application/json
statusstringerrorrequired
Example
error
errorErrorBodyrequired
Show child attributes
codestringrequired

Stable machine-readable error code.

status_codeinteger<int32>required

HTTP status code for this response.

messagestringrequired

Human-readable error message.

Example
{
  "status": "error",
  "error": {
    "code": "INTERNAL_ERROR",
    "status_code": 500,
    "message": "Internal server error"
  }
}

Authorization

bearer_authhttp (bearer) in header

API key or OAuth access token in Authorization header

Scopes: people:write

oauth2_authoauth2

OAuth authorization code flow with mandatory S256 PKCE.

Scopes: people:write

apikey_authapiKey in query

API key in query string

Scopes: people:write