The cTrader backend sends this request to the broker CRM, which then provides the response.
Method | URL |
---|---|
POST |
provided by the broker |
Headers
Header | Description | Required? |
---|---|---|
Authorisation header | Authorisation header containing API token provided by the broker. E.g. Basic ab45da2g34hdb6 |
Yes |
Parameters
No parameters.
Request Body
Key | Required? | Data Type | Description |
---|---|---|---|
invitedUserId |
Yes | integer | Unique user ID of the invited trader. |
partnerUserId |
Yes | integer | Unique user ID of the partner. |
brokerPartnerId |
No | string | Unique ID of the IB in the broker CRM or partner programme. |
brokerName |
Yes | string | Unique name denoting a specific broker or white label with whom the user registered. |
Output
Key | Required? | Data Type | Description |
---|---|---|---|
brokerPartnerId |
No | string | Unique ID of the IB in the broker CRM or partner programme. |
brokerResult |
No | enum | Status of the attribution process. Possible values and their meanings: - ATTRIBUTED_NEW The broker successfully attributed a new user to a partner receiving their first attribution with them. A new brokerPartnerId has been generated. - ATTRIBUTED The broker successfully attributed a new user to a partner known to them. An existing brokerPartnerId has been returned. - PENDING_ATTRIBUTION The attribution process has started but is not yet finished. - REATTRIBUTED The broker successfully reattributed a user already attributed to one partner to a different partner. |
Request Example
curl -X POST 'attributionWebhookUrl' -H 'Authorization: Basic ab45da2g34hdb6' -H 'Content-Type: application/json' -d '{"invitedUserId ": 4216, "partnerUserId ": 28042, "brokerPartnerId ": "I2333PIOIII", "brokerName ": "BESTBROKER"}'
Expected Response Status Code
200
Response Example
{
"brokerPartnerId ": "I2333PIOIII",
"brokerResult": "ATTRIBUTED_NEW"
}
The broker CRM sends this request to the cTrader backend, which then provides the response.
Method | URL |
---|---|
GET |
/v1/social/invitedUsers |
Generates the one-time code required for the SSO.
Headers
Header | Description | Required? |
---|---|---|
Authorisation Bearer | Authorisation header containing the authentication token of the manager. E.g. Bearer 2f68dbbf-519d-4f01-9636-e2421b68f379 |
Yes |
Parameters
Parameter | Parameter Type | Required? | Data Type | Description |
---|---|---|---|---|
createdFrom |
path | No | integer | Unix epoch timestamp (inclusive) in UTC milliseconds for the start of the search interval. |
limit |
path | No | integer | Number of records to return. 100 is the default value. |
skip |
path | No | integer | Number of records to skip. 0 is the default value. |
Request Body
No request body.
Output
Key | Required? | Data Type | Description |
---|---|---|---|
invitedUsers |
Yes | array | List containing invited users and their details as JSON objects. |
invitedUsers.invitedUserId |
Yes | integer | Unique user ID of the invited trader. |
invitedUsers.partnerUserId |
Yes | integer | Unique user ID of the partner. |
invitedUsers.brokerPartnerId |
No | string | Unique ID of the IB in the broker CRM or partner programme. Filled if it was previously received from the broker. |
invitedUsers.brokerName |
No | string | Unique name denoting a specific broker or white label for the invitation. |
invitedUsers.createTimestamp |
Yes | integer | Unix epoch timestamp in UTC milliseconds of the attribution event. |
Request Example
curl -X GET 'https://HOST:PORT/v1/social/invitedUsers?createdFrom =1735560962458&limit=100&skip=0' -H 'Authorization: Bearer 2f68dbbf-519d-4f01-9636-e2421b68f379'
Expected Response Status Code
200
Response Example
{
"invitedUsers": [
{
"invitedUserId ": 53324216,
"partnerUserId ": 27951042,
"brokerPartnerId ": "I2333PIOIII",
"brokerName ": "BESTBROKER",
"createTimestamp": 1735560962458
},
{
"invitedUserId ": 42213105,
"partnerUserId ": 38062153,
"brokerPartnerId ": "J122QJ1JJJ",
"brokerName ": "TOPBROKER",
"createTimestamp": 1735560963562
}
]
}
The cTrader backend sends this request to the broker CRM.
Method | URL |
---|---|
POST |
provided by the broker |
Headers
Header | Description | Required? |
---|---|---|
Authorisation header | Authorisation header containing API token provided by the broker. | Yes |
Request Body
Key | Required? | Data Type | Description |
---|---|---|---|
userId |
Yes | integer | Unique user ID of the registered trader in cTrader. |
brokerName |
Yes | string | Unique name denoting a specific broker or white label with whom the user registered. |
email |
Yes | string | Email address of the registered user. |
partnerUserId |
Yes | integer | Unique user ID of the partner. |
Request Example
curl -X POST 'userRegistrationWebhookBrokerUrl' -H 'Authorization: Basic ab45da2g34hdb6' -H 'Content-Type: application/json' -d '{"userId": 123, "brokerName": "bestbroker", "email": "test@test.com", "partnerUserId": 345}'
The broker CRM sends this request to the cTrader backend, which then provides the response.
Method | URL |
---|---|
POST |
/v1/users |
Headers
Header | Description | Required? | Notes |
---|---|---|---|
Authorisation bearer | Authorisation header containing the authentication token of the manager. E.g. Bearer 2f68dbbf-519d-4f01-9636-e2421b68f379 |
Yes | The manager whose token is used to send the request must have permission to authenticate users. |
Parameters
Parameter | Parameter Type | Required? | Data Type | Description |
---|---|---|---|---|
createdFrom |
path | No | integer | Unix epoch timestamp (inclusive) in UTC milliseconds for the start of the search interval. |
limit |
path | No | integer | Number of records to return. 100 is the default value. |
skip |
path | No | integer | Number of records to skip. 0 is the default value. |
Request Body
No request body.
Output
Key | Required? | Data Type | Description |
---|---|---|---|
users |
Yes | array | List containing registered users and their details as JSON objects. |
users.userId |
Yes | integer | Unique user ID of the registered trader in cTrader. |
users.email |
Yes | string | Email of the registered user in cTrader. |
users.brokerName |
Yes | string | Unique name denoting a specific broker or white label with whom the user registered. |
users.utcCreateTimestamp |
Yes | integer | Unix epoch timestamp in UTC milliseconds for the user registration event. |
Request Example
curl -X GET 'https://HOST:PORT/v1/users?createdFrom=1735560962458&limit=1000&skip=0' -H 'Authorization: Bearer 2f68dbbf-519d-4f01-9636-e2421b68f379'
Expected Response Status Code
200
Response Example
{
"users": [
{
"userId": 27424389,
"email": "test@test.com",
"brokerName": "BESTBROKER",
"utcCreateTimestamp": 1735560962458
},
{
"userId": 16875243,
"email": "user@email.com",
"brokerName": "TOPBROKER",
"utcCreateTimestamp": 1735560981692
}
]
}