Wingfield Logo
Wingfield Partner API
Organization

Claim organization relation

POST
/api/v1/external-services/{externalServiceId}/organization-relations/claim

Claim or confirm an organization relation using a connect token.

Path Parameters

externalServiceId*string

External service ID (UUID).

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

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

scope_permission_denied

Insufficient permissions for this operation.

403

external_service_access_denied

Token does not match the requested external service.

403

organization_access_denied

Service is not granted access to the organization.

404

connect_token_not_found

Connect token was not found.

409

connect_token_unusable

Connect token is already claimed, cancelled, or consumed.

409

external_organization_id_mismatch

The target organization relation exists, but external organization IDs differ.

409

external_organization_id_already_in_use

The submitted external organization ID is already linked to a different organization relation.

410

expired_connect_token

Connect token has expired.

422

malformed_connect_token

Connect token format is invalid.

curl -X POST "https://dev.wingfield.systems/api/v1/external-services/497f6eca-6276-4993-bfeb-53cbbbba6f08/organization-relations/claim" \  -H "Content-Type: application/json" \  -d '{    "connectToken": "string",    "externalOrganizationId": "string"  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "externalServiceId": "e8623a0d-39de-4963-9c6c-a25dc38e89c9",
  "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
  "externalOrganizationId": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "error": {
    "type": "invalid_schema",
    "message": "string",
    "issues": [
      {}
    ]
  }
}
{
  "error": {
    "type": "missing_api_token",
    "message": "string"
  }
}
{
  "error": {
    "type": "scope_permission_denied",
    "message": "string"
  }
}
{
  "error": {
    "type": "connect_token_not_found",
    "message": "string"
  }
}
{
  "error": {
    "type": "connect_token_unusable",
    "message": "string"
  }
}
{
  "error": {
    "type": "expired_connect_token",
    "message": "string"
  }
}
{
  "error": {
    "type": "malformed_connect_token",
    "message": "string"
  }
}