# Company Profile API Integration

The Company Profile API endpoints can be used to create and manage end user Company Profiles without the end user needing to interact with the Open Trade Platform and UI.&#x20;

## Documentation&#x20;

Full documentation for all endpoints can be found in [swagger](https://app.swaggerhub.com/apis/OpenTrade/open-trade_5_0_api/6.5.2).

## Authentication

Please contact a member of the Open Trade Sales team for further details on Authentication.&#x20;

## Endpoints

There are 2 core Company Profile endpoints ***GET/companyProfiles, POST/companyProfileAction.***

### GET /companyProfiles

Use this endpoint to retrieve information about a Company Profile.&#x20;

#### **Use Cases**&#x20;

* Check whether the email and wallet(s) are associated with a Company Profile.&#x20;
* Check the vault(s) that a Company Profile has been whitelisted for.&#x20;

#### **Input Parameters**

Query (all optional):

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top"><strong>Name</strong></td><td valign="top"><strong>Type</strong></td><td valign="top"><strong>Pattern</strong></td><td valign="top"><strong>Description</strong></td></tr><tr><td valign="top">uuid</td><td valign="top">string</td><td valign="top">UUID v4</td><td valign="top">UUID of the company profile, this will return all company profiles owned by this companies uuid.</td></tr><tr><td valign="top">walletAddr</td><td valign="top">string</td><td valign="top">0x[a-fA-F0-9]{40}$</td><td valign="top">Wallet address belonging to the profile</td></tr></tbody></table>

#### **Response**&#x20;

<table data-header-hidden><thead><tr><th width="291.90625" valign="top"></th><th valign="top"></th><th width="211.3515625" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top"><strong>Field</strong></td><td valign="top"><strong>Type</strong></td><td valign="top"><strong>Format</strong></td><td valign="top"><strong>Description</strong></td></tr><tr><td valign="top">uuid</td><td valign="top">string</td><td valign="top">ID</td><td valign="top">Company Profile Id</td></tr><tr><td valign="top">isOriginator</td><td valign="top">boolean</td><td valign="top">STRING</td><td valign="top">Whether the company is an originator (provider of a lead to a Referrer) </td></tr><tr><td valign="top">originatorUuid</td><td valign="top">string</td><td valign="top">ID</td><td valign="top">Id of the originator </td></tr><tr><td valign="top">issuerVaultAddr</td><td valign="top">string</td><td valign="top">STRING</td><td valign="top">Address of the issuer vault</td></tr><tr><td valign="top">companyName</td><td valign="top">string</td><td valign="top">STRING</td><td valign="top">Name of the company</td></tr><tr><td valign="top">wallets</td><td valign="top">array</td><td valign="top">STRING</td><td valign="top">Wallet address(es) of the Company Profile</td></tr><tr><td valign="top">emails</td><td valign="top">array</td><td valign="top">STRING</td><td valign="top">Email address(es) associated with the Company Profile </td></tr><tr><td valign="top">status</td><td valign="top">mixed</td><td valign="top">STRING</td><td valign="top">HTTP response status </td></tr><tr><td valign="top">referralCreationAccessCode</td><td valign="top">string</td><td valign="top">Comma Separated String</td><td valign="top">Referral Code used to create the account - links the Company Profile to a specific Referrer. This is a comma separated list of potential access codes, the code used will be set in the originatorAccessCodeUsed field to track origination sources</td></tr><tr><td valign="top">instructions</td><td valign="top">string</td><td valign="top">STRING</td><td valign="top">Client specific instructions </td></tr><tr><td valign="top">poolAccessControls</td><td valign="top">array</td><td valign="top">STRING</td><td valign="top">Vaults that the Company Profile has access to</td></tr><tr><td valign="top">originatorAccessCodeUsed</td><td valign="top">string</td><td valign="top">STRING</td><td valign="top">the accessCode. used to create this profile</td></tr></tbody></table>

### POST /companyProfileAction

Use this endpoint to perform an action on a company profile. The action field enables the client to instruct Open Trade to perform a variety of actions to the Company Profile (see Supported Actions section).&#x20;

**Use Cases**&#x20;

* Amend information about a Company Profile (add/remove emails and wallets)&#x20;
* Manage access to vaults for a Company Profile (request/revoke whitelisting)&#x20;
* Delete a Company Profile&#x20;

**Request body**

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Field</td><td valign="top">Type</td><td valign="top">Format</td><td valign="top">Description</td></tr><tr><td valign="top">uuid</td><td valign="top">string</td><td valign="top">ID</td><td valign="top">Company Profile Id / Action Id</td></tr><tr><td valign="top">action</td><td valign="top">mixed</td><td valign="top">STRING</td><td valign="top">Action of the company profile (see Supported Actions section)</td></tr><tr><td valign="top">originatorUuid</td><td valign="top">string</td><td valign="top">ID</td><td valign="top">Id of the originator</td></tr><tr><td valign="top">companyName</td><td valign="top">string</td><td valign="top">STRING</td><td valign="top">Name of the company</td></tr><tr><td valign="top">wallets</td><td valign="top">array</td><td valign="top">STRING</td><td valign="top">Wallet address(es) of the Company Profile</td></tr><tr><td valign="top">emails</td><td valign="top">array</td><td valign="top">STRING</td><td valign="top">Email address(es) associated with the Company Profile </td></tr><tr><td valign="top">instructions</td><td valign="top">string</td><td valign="top">STRING</td><td valign="top">Client specific instructions </td></tr><tr><td valign="top">requestedPoolsAccess</td><td valign="top">array</td><td valign="top">STRING</td><td valign="top">Requested Pools Access</td></tr></tbody></table>

#### Supported Actions

The Action field within the API Request body is used to prompt an action to be performed on the Company Profile, a list of the available actions is available below:&#x20;

<table><thead><tr><th width="192.9453125">Action</th><th width="178.23046875">Description</th><th>Example</th></tr></thead><tbody><tr><td>SELF_REGISTRATION</td><td>Self register a new company profile</td><td><p>{<br>  "uuid": "12345678-1234-4234-a234-123456789012",<br>  "action": "'SELF_REGISTRATION",<br>  "originatorUuid": "ReferralCode or your UUID",<br>  "companyName": "NewCo",<br>  "emails": ["bob@newco.com"],<br>  "wallets: ["0x123...."],</p><p>  "requestedPoolsAccess": ["0x123...."],<br>}</p></td></tr><tr><td>ADD_EMAIL</td><td>Add an email address to the company profile</td><td>{<br>  "uuid": "12345678-1234-4234-a234-123456789012",<br> "action": "ADD_EMAIL",<br> "emails": ["bob@newco.com"],<br>}</td></tr><tr><td>REMOVE_EMAIL</td><td>Remove an email address from the company profile</td><td><p>{<br>  "uuid": "12345678-1234-4234-a234-123456789012",</p><p>  "action": "REMOVE_EMAIL",<br>  "emails": ["bob@newco.com"],<br>}</p></td></tr><tr><td>DELETE_PROFILE</td><td>Delete the entire company profile</td><td><p>{<br>  "uuid": "12345678-1234-4234-a234-123456789012",</p><p> "action": "DELETE_PROFILE'",<br>}</p></td></tr><tr><td>REQUEST_ACCESS</td><td>Request access to a pool</td><td><p>{<br>  "uuid": "12345678-1234-4234-a234-123456789012",</p><p> "action": "REQUEST_ACCESS",</p><p>  "requestedPoolsAccess": ["0x123...."],<br>}</p></td></tr><tr><td>REMOVE_ACCESS</td><td>Remove access to a pool</td><td><p>{<br>  "uuid": "12345678-1234-4234-a234-123456789012",</p><p> "action": "REMOVE_ACCESS",</p><p>  "requestedPoolsAccess": ["0x123...."],<br>}</p></td></tr><tr><td>ADD_REFERRAL_CODE</td><td>Add a referral code to the company profile</td><td><p>{ <br>  "uuid": "12345678-1234-4234-a234-123456789012",</p><p> "action": "ADD_REFERRAL_CODE",<br>  "referralCreationAccessCode": "ABCD1234", </p><p>}</p></td></tr><tr><td>REMOVE_REFERRAL_CODE</td><td>Remove a referral code from the company profile</td><td><p> { <br>  "uuid": "12345678-1234-4234-a234-123456789012",</p><p> "action": "REMOVE_REFERRAL_CODE",<br>  "referralCreationAccessCode": "ABCD1234", </p><p>}</p></td></tr><tr><td>ADD_WALLET</td><td>Add a wallet address to the company profile</td><td><p> {<br>  "uuid": "12345678-1234-4234-a234-123456789012",</p><p> "action": "ADD_WALLET",<br>  "wallets: ["0x123...."],<br>}</p></td></tr><tr><td>REMOVE_WALLET</td><td>Remove a wallet address from the company profile</td><td><p> {<br>  "uuid": "12345678-1234-4234-a234-123456789012",</p><p> "action": "REMOVE_WALLET",<br>  "wallets: ["0x123...."],<br>}</p></td></tr></tbody></table>

### Error Handling&#x20;

The API returns a status 500 on any error, Check the message field of the reposnse for more information


---

# 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://sandboxdocs.opentrade.io/opentrade-sandbox/company-profile-api-integration.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.
