# Proxies

## Create Proxy

> Assign natural persons the role of authorized proxy.

```json
{"openapi":"3.0.1","info":{"title":"Roles","version":"1.0"},"tags":[{"name":"Proxies","description":"Proxies"}],"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":{"CreateProxyResult":{"title":"CreateProxyResult","type":"object","properties":{"proxyId":{"type":"string","format":"uuid","readOnly":true}},"required":["proxyId"]},"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"]},"ProxyCreateData":{"type":"object","required":["entityId","entityType","naturalPersonId","proxyType","validityType"],"properties":{"proxyType":{"$ref":"#/components/schemas/ProxyTypeAssignableEnum"},"naturalPersonId":{"type":"string","format":"uuid","description":"Identifier of the natural person, who will be assigned as proxy."},"entityId":{"type":"string","format":"uuid","description":"Identifier of the entity, natural person, joint person or legal entity, who will be managed by the proxy."},"entityType":{"$ref":"#/components/schemas/ProxyEntityTypeEnum"},"productIds":{"type":"array","description":"IDs of the customers products for which the proxy is allowed to take actions in behalf of the entity which is customer (multiple products possible).","items":{"type":"string","format":"uuid"}},"validityType":{"$ref":"#/components/schemas/ProxyValidityTypeEnum"},"scopeType":{"$ref":"#/components/schemas/ProxyScopeTypeEnum"},"custodyType":{"$ref":"#/components/schemas/ProxyCustodyTypeEnum"}},"title":"ProxyCreateData"},"ProxyTypeAssignableEnum":{"title":"ProxyTypeAssignableEnum","type":"string","enum":["GENERAL_POWER_OF_ATTORNEY","INFORMATION_PROXY","LIQUIDATOR","GUARDIAN","SIGNATORY"]},"ProxyEntityTypeEnum":{"title":"ProxyEntityTypeEnum","type":"string","description":"Defines the type of entity for which the proxy is assigned.The proxy can be assigned to a natural person, legal entity, or joint person.","enum":["NATURAL_PERSON","LEGAL_ENTITY","JOINT_PERSON"]},"ProxyValidityTypeEnum":{"title":"ProxyValidityTypeEnum","type":"string","description":"Defines the period of validity of the power of proxy.","enum":["UNTIL_CASE_OF_DEATH","IN_CASE_OF_DEATH","UNTIL_LEGAL_AGE","UNLIMITED"]},"ProxyScopeTypeEnum":{"title":"ProxyScopeTypeEnum","type":"string","enum":["INDIVIDUAL","JOINT"],"description":"Only mandatory for proxyType `SIGNATORY`\\\nDefines the scope of the power of representation, which is dependent on the underlying signature authorisation of the legal representative:\n- INDIVIDUAL: If soleSignatureAuthorized of the legal representative = YES\n- JOINT: If soleSignatureAuthorized of the legal representative = NO\n"},"ProxyCustodyTypeEnum":{"title":"ProxyCustodyTypeEnum","type":"string","enum":["SINGLE_CUSTODY","JOINT_CUSTODY"],"description":"Only mandatory for proxyType `GUARDIAN`.\nSpecifies the type of custody associated with the guardian. \n- `SINGLE_CUSTODY`: Indicates that only one guardian holds legal and physical custody of the child.\n- `JOINT_CUSTODY`: Indicates that the custody of the child is shared between two guardians, typically implying both have legal rights concerning the child's upbringing.\n"}}},"paths":{"/roles/proxies":{"post":{"summary":"Create Proxy","operationId":"create-proxy","description":"Assign natural persons the role of authorized proxy.","tags":["Proxies"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProxyResult"}}}},"400":{"description":"Bad Request","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/ProxyCreateData"}}}}}}}}
```

## Get Proxies

> Get a list of proxies.

```json
{"openapi":"3.0.1","info":{"title":"Roles","version":"1.0"},"tags":[{"name":"Proxies","description":"Proxies"}],"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":{"cursor":{"schema":{"type":"string"},"in":"query","name":"cursor","description":"String value used for pagination"},"limit":{"schema":{"type":"integer","default":20,"minimum":1},"in":"query","name":"limit","description":"Maximum number of items to return","required":true},"naturalPersonId":{"schema":{"type":"string","format":"uuid"},"name":"naturalPersonId","in":"query","description":"Natural Person ID"},"entityId":{"schema":{"type":"string","format":"uuid"},"name":"entityId","in":"query","description":"Entity ID"},"proxyStatus":{"schema":{"$ref":"#/components/schemas/ProxyStatusEnum"},"in":"query","name":"proxyStatus","description":"Proxy status"},"proxyType":{"schema":{"$ref":"#/components/schemas/ProxyTypeEnum"},"in":"query","name":"proxyType","description":"Proxy type"},"proxyValidityType":{"schema":{"$ref":"#/components/schemas/ProxyValidityTypeEnum"},"in":"query","name":"proxyValidityType","description":"Proxy validity type"},"customerProductIds":{"schema":{"type":"array","items":{"type":"string","format":"uuid"}},"in":"query","name":"customerProductIds","description":"IDs of the customers products for which the proxy is allowed to take actions in behalf of the customer (multiple products possible)."}},"schemas":{"ProxyStatusEnum":{"title":"ProxyStatusEnum","type":"string","enum":["CREATED","REVIEW","REJECTED","ACTIVE","INACTIVE","RECEIVED","INVALID","PENDING","SUSPENDED","SUSPENDED_COMPLIANCE"]},"ProxyTypeEnum":{"title":"ProxyTypeEnum","type":"string","enum":["GENERAL_POWER_OF_ATTORNEY","INFORMATION_PROXY","LIQUIDATOR","GUARDIAN","SIGNATORY","JOINT_ACCOUNT_HOLDER"]},"ProxyValidityTypeEnum":{"title":"ProxyValidityTypeEnum","type":"string","description":"Defines the period of validity of the power of proxy.","enum":["UNTIL_CASE_OF_DEATH","IN_CASE_OF_DEATH","UNTIL_LEGAL_AGE","UNLIMITED"]},"Proxies":{"title":"Proxies","type":"object","properties":{"data":{"type":"array","description":"Array of proxies","items":{"$ref":"#/components/schemas/Proxy"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"]},"Proxy":{"type":"object","required":["createdOn","entityId","entityType","modifiedOn","naturalPersonId","proxyId","proxyStatus","proxyType","validityType"],"properties":{"proxyId":{"type":"string","format":"uuid"},"proxyStatus":{"$ref":"#/components/schemas/ProxyStatusEnum"},"createdOn":{"type":"string","format":"date-time","description":"The date on which the proxy was created"},"modifiedOn":{"type":"string","format":"date-time","description":"The date on which the proxy was updated"},"proxyType":{"$ref":"#/components/schemas/ProxyTypeEnum"},"naturalPersonId":{"type":"string","format":"uuid","description":"Identifier of the natural person, who will be assigned as proxy."},"entityId":{"type":"string","format":"uuid","description":"Identifier of the entity, natural person, joint person or legal entity, who will be managed by the proxy."},"entityType":{"$ref":"#/components/schemas/ProxyEntityTypeEnum"},"productIds":{"type":"array","description":"IDs of the customers products for which the proxy is allowed to take actions in behalf of the entity which is customer (multiple products possible).","items":{"type":"string","format":"uuid"}},"validityType":{"$ref":"#/components/schemas/ProxyValidityTypeEnum"},"scopeType":{"$ref":"#/components/schemas/ProxyScopeTypeEnum"},"custodyType":{"$ref":"#/components/schemas/ProxyCustodyTypeEnum"}},"title":"Proxy"},"ProxyEntityTypeEnum":{"title":"ProxyEntityTypeEnum","type":"string","description":"Defines the type of entity for which the proxy is assigned.The proxy can be assigned to a natural person, legal entity, or joint person.","enum":["NATURAL_PERSON","LEGAL_ENTITY","JOINT_PERSON"]},"ProxyScopeTypeEnum":{"title":"ProxyScopeTypeEnum","type":"string","enum":["INDIVIDUAL","JOINT"],"description":"Only mandatory for proxyType `SIGNATORY`\\\nDefines the scope of the power of representation, which is dependent on the underlying signature authorisation of the legal representative:\n- INDIVIDUAL: If soleSignatureAuthorized of the legal representative = YES\n- JOINT: If soleSignatureAuthorized of the legal representative = NO\n"},"ProxyCustodyTypeEnum":{"title":"ProxyCustodyTypeEnum","type":"string","enum":["SINGLE_CUSTODY","JOINT_CUSTODY"],"description":"Only mandatory for proxyType `GUARDIAN`.\nSpecifies the type of custody associated with the guardian. \n- `SINGLE_CUSTODY`: Indicates that only one guardian holds legal and physical custody of the child.\n- `JOINT_CUSTODY`: Indicates that the custody of the child is shared between two guardians, typically implying both have legal rights concerning the child's upbringing.\n"},"Pagination":{"title":"Pagination","type":"object","properties":{"cursor":{"type":"string","description":"String value used for pagination, which should be set in next page request."},"limit":{"type":"integer","description":"Maximum number of returned items"}},"required":["cursor","limit"]},"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":{"/roles/proxies":{"get":{"summary":"Get Proxies","operationId":"get-proxies","description":"Get a list of proxies.","tags":["Proxies"],"parameters":[{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/naturalPersonId"},{"$ref":"#/components/parameters/entityId"},{"$ref":"#/components/parameters/proxyStatus"},{"$ref":"#/components/parameters/proxyType"},{"$ref":"#/components/parameters/proxyValidityType"},{"$ref":"#/components/parameters/customerProductIds"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proxies"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}}}}}
```

## Get Proxy

> Get proxy

```json
{"openapi":"3.0.1","info":{"title":"Roles","version":"1.0"},"tags":[{"name":"Proxies","description":"Proxies"}],"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":{"Proxy":{"type":"object","required":["createdOn","entityId","entityType","modifiedOn","naturalPersonId","proxyId","proxyStatus","proxyType","validityType"],"properties":{"proxyId":{"type":"string","format":"uuid"},"proxyStatus":{"$ref":"#/components/schemas/ProxyStatusEnum"},"createdOn":{"type":"string","format":"date-time","description":"The date on which the proxy was created"},"modifiedOn":{"type":"string","format":"date-time","description":"The date on which the proxy was updated"},"proxyType":{"$ref":"#/components/schemas/ProxyTypeEnum"},"naturalPersonId":{"type":"string","format":"uuid","description":"Identifier of the natural person, who will be assigned as proxy."},"entityId":{"type":"string","format":"uuid","description":"Identifier of the entity, natural person, joint person or legal entity, who will be managed by the proxy."},"entityType":{"$ref":"#/components/schemas/ProxyEntityTypeEnum"},"productIds":{"type":"array","description":"IDs of the customers products for which the proxy is allowed to take actions in behalf of the entity which is customer (multiple products possible).","items":{"type":"string","format":"uuid"}},"validityType":{"$ref":"#/components/schemas/ProxyValidityTypeEnum"},"scopeType":{"$ref":"#/components/schemas/ProxyScopeTypeEnum"},"custodyType":{"$ref":"#/components/schemas/ProxyCustodyTypeEnum"}},"title":"Proxy"},"ProxyStatusEnum":{"title":"ProxyStatusEnum","type":"string","enum":["CREATED","REVIEW","REJECTED","ACTIVE","INACTIVE","RECEIVED","INVALID","PENDING","SUSPENDED","SUSPENDED_COMPLIANCE"]},"ProxyTypeEnum":{"title":"ProxyTypeEnum","type":"string","enum":["GENERAL_POWER_OF_ATTORNEY","INFORMATION_PROXY","LIQUIDATOR","GUARDIAN","SIGNATORY","JOINT_ACCOUNT_HOLDER"]},"ProxyEntityTypeEnum":{"title":"ProxyEntityTypeEnum","type":"string","description":"Defines the type of entity for which the proxy is assigned.The proxy can be assigned to a natural person, legal entity, or joint person.","enum":["NATURAL_PERSON","LEGAL_ENTITY","JOINT_PERSON"]},"ProxyValidityTypeEnum":{"title":"ProxyValidityTypeEnum","type":"string","description":"Defines the period of validity of the power of proxy.","enum":["UNTIL_CASE_OF_DEATH","IN_CASE_OF_DEATH","UNTIL_LEGAL_AGE","UNLIMITED"]},"ProxyScopeTypeEnum":{"title":"ProxyScopeTypeEnum","type":"string","enum":["INDIVIDUAL","JOINT"],"description":"Only mandatory for proxyType `SIGNATORY`\\\nDefines the scope of the power of representation, which is dependent on the underlying signature authorisation of the legal representative:\n- INDIVIDUAL: If soleSignatureAuthorized of the legal representative = YES\n- JOINT: If soleSignatureAuthorized of the legal representative = NO\n"},"ProxyCustodyTypeEnum":{"title":"ProxyCustodyTypeEnum","type":"string","enum":["SINGLE_CUSTODY","JOINT_CUSTODY"],"description":"Only mandatory for proxyType `GUARDIAN`.\nSpecifies the type of custody associated with the guardian. \n- `SINGLE_CUSTODY`: Indicates that only one guardian holds legal and physical custody of the child.\n- `JOINT_CUSTODY`: Indicates that the custody of the child is shared between two guardians, typically implying both have legal rights concerning the child's upbringing.\n"},"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":{"/roles/proxies/{proxyId}":{"get":{"summary":"Get Proxy","operationId":"get-proxy","description":"Get proxy","tags":["Proxies"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proxy"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}}}}}}
```

## Update Proxy

> Update proxy

```json
{"openapi":"3.0.1","info":{"title":"Roles","version":"1.0"},"tags":[{"name":"Proxies","description":"Proxies"}],"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"]},"ProxyUpdate":{"title":"ProxyUpdate","type":"object","properties":{"proxyUpdateData":{"$ref":"#/components/schemas/ProxyUpdateData"},"documentId":{"type":"string","format":"uuid","description":"Document ID in UUID format for those params where a document upload is required (scopeType, custodyType)"}},"required":["proxyUpdateData"]},"ProxyUpdateData":{"title":"ProxyUpdateData","type":"object","properties":{"customerProductIds":{"type":"array","description":"Update only possible for proxyType `POWER_OF_ATTORNEY` and `INFORMATION_PROXY`.\\\nIDs of the customers products for which the proxy is allowed to take actions in behalf of the customer (multiple products possible).\n","items":{"type":"string","format":"uuid"}},"validityType":{"$ref":"#/components/schemas/ProxyUpdateValidityTypeEnum"},"proxyType":{"$ref":"#/components/schemas/ProxyUpdateTypeEnum"},"scopeType":{"title":"ProxyScopeTypeEnum","type":"string","enum":["INDIVIDUAL","JOINT"],"description":"Update only possible for for proxyType `SIGNATORY`\nDefines the scope of the power of representation, which is dependent on the underlying signature authorisation of the legal representative:\n- INDIVIDUAL: If soleSignatureAuthorized of the legal representative = YES\n- JOINT: If soleSignatureAuthorized of the legal representative = NO\nA corresponding document (registry extract) must be submitted to update the scope type. When uploading the document via respecting endpoint, the exact document name must be specified under ‘name’ and ‘CURRENT_REGISTRY_EXTRACT’ must be selected as the type.\n"},"custodyType":{"title":"ProxyCustodyTypeEnum","type":"string","enum":["SINGLE_CUSTODY","JOINT_CUSTODY"],"description":"Update only possible for proxyType `GUARDIAN`.\nSpecifies the type of custody associated with the guardian.\n- `SINGLE_CUSTODY`: Indicates that only one guardian holds legal and physical custody of the child.\n- `JOINT_CUSTODY`: Indicates that the custody of the child is shared between two guardians, typically implying both have legal rights concerning the child's upbringing.\nA corresponding document (proof of single custody) must be submitted to update the custody type. When uploading the document via respecting endpoint, the exact document name must be specified under ‘name’ and ‘PROOF_OF_SINGLE_CUSTODY’ must be selected as the type.\n"}}},"ProxyUpdateValidityTypeEnum":{"title":"ProxyUpdateValidityTypeEnum","type":"string","description":"Update only possible for proxyType `POWER_OF_ATTORNEY` and `INFORMATION_PROXY`. Defines the period of validity of the power of proxy.","enum":["UNTIL_CASE_OF_DEATH","UNLIMITED"]},"ProxyUpdateTypeEnum":{"title":"ProxyUpdateTypeEnum","type":"string","enum":["GENERAL_POWER_OF_ATTORNEY","INFORMATION_PROXY","LIQUIDATOR","GUARDIAN","SIGNATORY"]}}},"paths":{"/roles/proxies/{proxyId}":{"patch":{"summary":"Update Proxy","operationId":"update-proxy","description":"Update proxy","tags":["Proxies"],"parameters":[{"$ref":"#/components/parameters/requestorId"}],"responses":{"202":{"description":"Accepted"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessage"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyUpdate"}}}}}}}}
```
