# Offboarding

## Start Offboarding

> Start offboarding process process for a entity

```json
{"openapi":"3.0.1","info":{"title":"Entities","version":"1.0"},"tags":[{"name":"Offboardings","description":"Offboardings"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://tvdcustomauthdomain.auth.eu-central-1.amazoncognito.com/oauth2/token","scopes":{}}}}},"parameters":{"requestorId":{"schema":{"type":"string","format":"uuid"},"name":"Requestor-ID","in":"header","required":true,"description":"Unique requestor identification in UUID format"}},"schemas":{"StartOffboardingResult":{"title":"StartOffboardingResult","type":"object","properties":{"offboardingId":{"type":"string","format":"uuid","readOnly":true}},"required":["offboardingId"]},"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"EntityOffboardingData":{"title":"EntityOffboardingData","type":"object","properties":{"entityType":{"$ref":"#/components/schemas/OffboardingEntityTypeEnum"},"entityId":{"type":"string","format":"uuid","description":"Identification number in UUID format of the entity"},"reason":{"$ref":"#/components/schemas/OffboardingReasonEnum"}},"required":["entityType","entityId","reason"]},"OffboardingEntityTypeEnum":{"title":"OffboardingEntityTypeEnum","type":"string","enum":["BENEFICIAL_OWNER"]},"OffboardingReasonEnum":{"title":"OffboardingReasonEnum","type":"string","enum":["CUSTOMER_REQUEST_IMMEDIATE","CANCELLATION_BY_PARTNER_ORDINARY","CANCELLATION_BY_PARTNER_IMMEDIATE","DEATH_IMMEDIATE","DISSOLUTION_IMMEDIATE","INSOLVENCY_IMMEDIATE","COMPANY_STRUCTURE_CHANGES_IMMEDIATE"]}}},"paths":{"/entities/offboardings":{"post":{"summary":"Start Offboarding","operationId":"start-offboarding","description":"Start offboarding process process for a entity","tags":["Offboardings"],"parameters":[{"$ref":"#/components/parameters/requestorId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartOffboardingResult"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityOffboardingData"}}}}}}}}
```

## Get Offboardings

> Get list of offboardings for a entity

```json
{"openapi":"3.0.1","info":{"title":"Entities","version":"1.0"},"tags":[{"name":"Offboardings","description":"Offboardings"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://tvdcustomauthdomain.auth.eu-central-1.amazoncognito.com/oauth2/token","scopes":{}}}}},"schemas":{"EntityOffboarding":{"type":"object","properties":{"offboardingId":{"type":"string","format":"uuid","readOnly":true},"status":{"$ref":"#/components/schemas/OffboardingStatusEnum"},"entityType":{"$ref":"#/components/schemas/OffboardingEntityTypeEnum"},"entityId":{"type":"string","format":"uuid","description":"Identification number in UUID format of the entity"},"reason":{"$ref":"#/components/schemas/OffboardingReasonEnum"},"createdOn":{"type":"string","format":"date-time","readOnly":true},"modifiedOn":{"type":"string","format":"date-time","readOnly":true}},"required":["createdOn","entityId","entityType","modifiedOn","offboardingId","reason","status"],"title":"EntityOffboarding"},"OffboardingStatusEnum":{"title":"OffboardingStatusEnum","type":"string","enum":["RECEIVED","CREATED","PENDING","INVALID","REJECTED","CANCELED","APPROVED"],"readOnly":true},"OffboardingEntityTypeEnum":{"title":"OffboardingEntityTypeEnum","type":"string","enum":["BENEFICIAL_OWNER"]},"OffboardingReasonEnum":{"title":"OffboardingReasonEnum","type":"string","enum":["CUSTOMER_REQUEST_IMMEDIATE","CANCELLATION_BY_PARTNER_ORDINARY","CANCELLATION_BY_PARTNER_IMMEDIATE","DEATH_IMMEDIATE","DISSOLUTION_IMMEDIATE","INSOLVENCY_IMMEDIATE","COMPANY_STRUCTURE_CHANGES_IMMEDIATE"]},"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"parameters":{"offboardingEntityType":{"schema":{"$ref":"#/components/schemas/OffboardingEntityTypeEnum"},"name":"offboardingEntityType","in":"query","required":true,"description":"Type of entity for offboarding"},"mandatoryEntityId":{"schema":{"type":"string","format":"uuid"},"in":"query","name":"entityId","description":"Unique identification number of entity in UUID format","required":true}}},"paths":{"/entities/offboardings":{"get":{"summary":"Get Offboardings","operationId":"get-offboardings","description":"Get list of offboardings for a entity","tags":["Offboardings"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EntityOffboarding"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"parameters":[{"$ref":"#/components/parameters/offboardingEntityType"},{"$ref":"#/components/parameters/mandatoryEntityId"}]}}}}
```

## Get Offboarding

> Get offboarding information

```json
{"openapi":"3.0.1","info":{"title":"Entities","version":"1.0"},"tags":[{"name":"Offboardings","description":"Offboardings"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://tvdcustomauthdomain.auth.eu-central-1.amazoncognito.com/oauth2/token","scopes":{}}}}},"schemas":{"EntityOffboarding":{"type":"object","properties":{"offboardingId":{"type":"string","format":"uuid","readOnly":true},"status":{"$ref":"#/components/schemas/OffboardingStatusEnum"},"entityType":{"$ref":"#/components/schemas/OffboardingEntityTypeEnum"},"entityId":{"type":"string","format":"uuid","description":"Identification number in UUID format of the entity"},"reason":{"$ref":"#/components/schemas/OffboardingReasonEnum"},"createdOn":{"type":"string","format":"date-time","readOnly":true},"modifiedOn":{"type":"string","format":"date-time","readOnly":true}},"required":["createdOn","entityId","entityType","modifiedOn","offboardingId","reason","status"],"title":"EntityOffboarding"},"OffboardingStatusEnum":{"title":"OffboardingStatusEnum","type":"string","enum":["RECEIVED","CREATED","PENDING","INVALID","REJECTED","CANCELED","APPROVED"],"readOnly":true},"OffboardingEntityTypeEnum":{"title":"OffboardingEntityTypeEnum","type":"string","enum":["BENEFICIAL_OWNER"]},"OffboardingReasonEnum":{"title":"OffboardingReasonEnum","type":"string","enum":["CUSTOMER_REQUEST_IMMEDIATE","CANCELLATION_BY_PARTNER_ORDINARY","CANCELLATION_BY_PARTNER_IMMEDIATE","DEATH_IMMEDIATE","DISSOLUTION_IMMEDIATE","INSOLVENCY_IMMEDIATE","COMPANY_STRUCTURE_CHANGES_IMMEDIATE"]},"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"paths":{"/entities/offboardings/{offboardingId}":{"get":{"summary":"Get Offboarding","operationId":"get-offboarding","description":"Get offboarding information","tags":["Offboardings"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityOffboarding"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}}}}}
```

## Cancel Offboarding

> Cancel created offboarding if not started.

```json
{"openapi":"3.0.1","info":{"title":"Entities","version":"1.0"},"tags":[{"name":"Offboardings","description":"Offboardings"}],"servers":[{"url":"https://tvda-api.platform-test.tradevest.ai","description":"Test"},{"url":"https://tvda-api.platform-pretest.tradevest.ai","description":"Pretest"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://tvdcustomauthdomain.auth.eu-central-1.amazoncognito.com/oauth2/token","scopes":{}}}}},"parameters":{"requestorId":{"schema":{"type":"string","format":"uuid"},"name":"Requestor-ID","in":"header","required":true,"description":"Unique requestor identification in UUID format"}},"schemas":{"ErrorMessage":{"title":"ErrorMessage","type":"object","properties":{"message":{"type":"string"},"responseType":{"type":"string"},"validationString":{"minLength":1,"type":"string"},"requestId":{"type":"string"},"errorCode":{"type":"string","maxLength":255},"errorDetails":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetails"}}},"required":["message","responseType","requestId"]},"ErrorDetails":{"title":"ErrorDetails","type":"object","properties":{"field":{"type":"string","maxLength":255},"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetailsExplanation"}}},"required":["field"]},"ErrorDetailsExplanation":{"title":"ErrorDetailsExplanation","type":"object","properties":{"code":{"type":"string","maxLength":255},"parameter":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"paths":{"/entities/offboardings/{offboardingId}":{"delete":{"summary":"Cancel Offboarding","operationId":"cancel-offboarding","description":"Cancel created offboarding if not started.","tags":["Offboardings"],"parameters":[{"$ref":"#/components/parameters/requestorId"}],"responses":{"202":{"description":"Accepted"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tradevest.ai/api-reference/entities/offboarding.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
