3.6. Set a New Partner Identifier
Method | URL |
---|---|
PUT | /oauth2/ctid/referral |
Creates a new partner by linking a partner identifier (defined in a string format) from a broker’s backend area to an existing user or an existing account on the cTrader backend.
Request Body
Key | Required? | Data Type | Description |
---|---|---|---|
brokerCrmName | Yes | string | Please, see Section 2.3. |
partnerId | Yes | string | The string assigned as a partner identifier to a specific user or an account. |
userId | No (if the chosen partner is an account) | integer | The unique ID of a specific user. |
ctidTraderAccountId | No (if the chosen partner is a user) | integer | The unique ID of the linkage between a specific user and one of their trading accounts. |
Note that the request body can include either a userId
or a ctidTraderAccountId
depending on the entity to which the partner identifier is assigned. To elaborate, userId
is a mandatory parameter if the identifier is assigned to a user; alternatively, ctidTraderAccountId
is a mandatory parameter if the identifier is assigned to an account.
Request Example
curl -X PUT ‘https://HOST:PORT/cid/oauth2/ctid/referral?token=04d95575-c9af-42fba72e-2f0ce93f01d4’ -H ‘Content-Type: application/json’ -H ‘Accept: application/json’ -d ‘{"brokerCrmName": "BESTBROKERCRM", "ctidTraderAccountId": 9017800, "partnerId": "somePartnerId", "userId": 10345533}’
Expected Response Status Code
200
Last update: February 6, 2023