# activateReplacementSourceOfRecord

Source: /openapi/thomas-federated.openapi.json

## Operation

| Method | URL |
|---|---|
| POST | https://cxi-api-prod-weu-interim-eraffmdbdmdmbdfz.a01.azurefd.net/v1/partner-access-requests/{grantId}/activate-replacement |

| Field | Value |
|---|---|
| operationId | activateReplacementSourceOfRecord |
| method | POST |
| server | https://cxi-api-prod-weu-interim-eraffmdbdmdmbdfz.a01.azurefd.net/v1 |
| path | /partner-access-requests/{grantId}/activate-replacement |
| tags | `Partner access governance` |
| summary | Activate an approved Partner access request as the replacement source of record |
| badges | None |

## Request Parameters

| Name | In | Required | Schema | Description |
|---|---|---|---|---|
| grantId | path | true | string |  |

## Request Body

| Content type | Schema refs |
|---|---|
| application/json | #/components/schemas/PartnerSorReplacementActivationDto |

## Responses

| Status | Description | Schema refs |
|---|---|---|
| 200 | The settled activation: the grant, its partner and API client, the data domains acquired, the active Service Membership, and the person who activated. Carries no secret and no unrelated tenant data. | #/components/schemas/PartnerSorReplacementActivationResultDto |
| 400 | Invalid UUID format for grantId | #/components/schemas/ApiErrorResponseDto |
| 401 | Invalid or missing authentication token (AUTH_TOKEN_INVALID) | #/components/schemas/ApiErrorResponseDto |
| 403 | The caller is not an eligible owner or integrations admin of the authenticated tenant, or is not a person at all (PARTNER_APPROVER_NOT_ELIGIBLE, AUTH_PRINCIPAL_NOT_HUMAN) | #/components/schemas/ApiErrorResponseDto |
| 404 | No access request exists at this id for the authenticated tenant (PARTNER_ACCESS_REQUEST_NOT_FOUND) | #/components/schemas/ApiErrorResponseDto |
| 409 | A previous Partner still holds source-of-record authority for this tenant, the replacement Partner, Tenant or API Client is no longer active, the grant is not in an activatable state, the grant confers no source-of-record authority, or the activation bundle conflicted and rolled back (SOR_AUTHORITY_ALREADY_HELD, PARTNER_NOT_ACTIVE, PARTNER_TENANT_NOT_ELIGIBLE, PARTNER_API_CLIENT_NOT_ACTIVE, GRANT_NOT_ACTIVATABLE, GRANT_NOT_SOURCE_OF_RECORD, PARTNER_SOR_ACTIVATION_CONFLICT) | #/components/schemas/ApiErrorResponseDto |

## Artifact Examples

### Response 400 example

```json
{
  "statusCode": 400,
  "message": "Validation failed (uuid is expected)",
  "error": "HTTP_BAD_REQUEST"
}
```

### Response 401 example

```json
{
  "statusCode": 401,
  "message": "Invalid or missing authentication token",
  "error": "AUTH_TOKEN_INVALID"
}
```
