Wingfield Logo
Wingfield Partner API
User relation

Update relation external user ID

PATCH
/api/v1/external-services/{externalServiceId}/users/{userId}/relation

Update the external user ID for an existing user-service relationship.

Path Parameters

externalServiceId*string

External service ID (UUID).

Formatuuid
userId*string

User ID (UUID).

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

externalUserId*string

New external user ID for this relationship.

Error Responses

400

invalid_schema

Request validation failed.

401

missing_api_token

No authentication token provided.

401

invalid_api_token

Invalid or expired authentication token.

403

external_service_access_denied

Token does not match the requested external service.

404

user_relation_not_found

User relation was not found.

409

external_user_id_already_in_use

The submitted external user ID is already linked to a different user.

500

internal_server_error

Unexpected server error.

curl -X PATCH "https://dev.wingfield.systems/api/v1/external-services/497f6eca-6276-4993-bfeb-53cbbbba6f08/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/relation" \  -H "Content-Type: application/json" \  -d '{    "externalUserId": "string"  }'
{
  "userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
  "email": "user@example.com",
  "externalUserId": "string",
  "status": "PENDING",
  "user": null
}
{
  "error": {
    "type": "invalid_schema",
    "message": "string",
    "issues": [
      {}
    ]
  }
}
{
  "error": {
    "type": "missing_api_token",
    "message": "string"
  }
}
{
  "error": {
    "type": "external_service_access_denied",
    "message": "string"
  }
}
{
  "error": {
    "type": "user_relation_not_found",
    "message": "string"
  }
}
{
  "error": {
    "type": "external_user_id_already_in_use",
    "message": "string"
  }
}
{
  "error": {
    "type": "internal_server_error",
    "message": "string"
  }
}