Ask our Product-Support about necessary information. #

Before you will take any actions, ask our Product-Support on skype group about necessary information like:
– website URL,
– account credentials (username, password),
– offer UUID,
– partner ID.
Every Lead Provider get his own personal data. All the values that are “Bold” you should put your own special parameters.

Generating token OAuth #

To make available creating leads and getting list of already created, you need to have Authorization Token. This token is active for a one hour, after that time if the requests are not working, you should generate a new one. You will need it for requests down below. What you need to generate token? website URL, username and password.

curl –request POST \
–url https://{websiteURL}/proxy/auth/oauth/token \
–header ‘Authorization: Basic bGl2ZU10cjFDbGllbnQ6TU9USUI2ckRxbjNDenlNdDV2N2VHVmNhcWZqeDNlNWN1ZmlObG5uVFZHWVkzak5uRDJiWXJQS0JPTGRKMXVCRHpPWURTa1NVa1BObkxJdHd5bXRMZzlDUklLTmdIVW54MVlmdQ==’ \
–header ‘Content-Type: application/x-www-form-urlencoded’ \
–header ‘Cookie: JSESSIONID=7029AE0C9AB3F5F730CDEA186A4A920A; JSESSIONID=CD912EF93AD198D9B12410F1CF09C886’ \
–cookie JSESSIONID=430AA1648A1146D88531E00217CEB7A1 \
–data grant_type=password \
–data ‘username={username}‘ \
–data ‘password={passowrd}

Possible responses:

200 OK
{
“access_token”: “iOiJIUzI1CI6IkpXVCJ9.eyJhY2NvdW50X3V1aWQIyMC1hMDUtYTgyMy0wNDVhNGRiZjZkOTMiLCJtYW5hZ2VyX3Njb3BlIjoiODA1M2QyMjAtYTA2YS00MGU1LWE4MjMtMDQ1YTRkYmY2ZDkzIiwidXNlcl9uYW1lIjoibGVhZHRlc3QxMjNAbWF0Y2gtdHJhZGUuY29tOjAiLCJmbCI6bnVsbCwic2NvcGUiOltdLCJwYXJ0bmVySWQiOjAsImV4cCI6MTY5ODY2NDY2MCwiYXV0aG9yaXRpZXMiOlsiUEhPTkVfUkVBRCIsIkVNQUlMX1JFQUQiLCJST0xFX0xFQURfUFJPVklERVIiLCJMRUFEX1BST1ZJREVSIl0sImp0aSI6IjUwOTA0YWJiLTI2NjctNGY2Ny04MWI2LTAzNjg3YjQ0MjEzOSIsImVtYWlsIjoibGVhZHRlc3QxMjNAbWF0Y2gtdHJhZGUuY29tIiwiY2xpZW50X2lkIjoibGl2ZU10cjFDbGllbnQifQ.Eme9UvYG6pXnuxbgh8L02xUn7_F1w-SBl6tnrEWOhDE”,
“token_type”: “bearer”,
“refresh_token”: “iOiJIUzI1NiIsInR5cCI6IkpX0X3V1aWQiOiI4MDUzZDIyMC1hMDZhLTQwZTUtYwNDVhNGRiZjZkOTMiLCJtYW5hZ2VyX3Njb3BlIjoiODA1M2QyMjAtYTA2YS00MGU1LWE4MjMtMDQ1YTRkYmY2ZDkzIiwidXNlcl9uYW1lIjoibGVhZHRlc3QxMjNAbWF0Y2gtdHJhZGUuY29tOjAiLCJmbCI6bnVsbCwic2NvcGUiOltdLCJhdGkiOiI1MDkwNGFiYi0yNjY3LTRmNjctODFiNi0wMzY4N2I0NDIxMzkiLCJwYXJ0bmVySWQiOjAsImV4cCI6MTcwMTM0MjE2MCwiYXV0aG9yaXRpZXMiOlsiUEhPTkVfUkVBRCIsIkVNQUlMX1JFQUQiLCJST0xFX0xFQURfUFJPVklERVIiLCJMRUFEX1BST1ZJREVSIl0sImp0aSI6IjkwZmVkMTA2LTE5MTEtNDAzZS1hZTE1LTk2MGM4NGI5MzVjYiIsImVtYWlsIjoibGVhZHRlc3QxMjNAbWF0Y2gtdHJhZGUuY29tIiwiY2xpZW50X2lkIjoibGl2ZU10cjFDbGllbnQifQ.EMczdUbCzNLZdcirJcHNiezfAfZ7vyEQA7K5LrqoScM”,
“expires_in”: 899,
“account_uuid”: “8053d220-a06a-40e5-a823-045a4dbf6d93”,
“manager_scope”: “8053d220-a06a-40e5-a823-045a4dbf6d93”,
“fl”: null,
“partnerId”: 0,
“email”: “leadtest123@match-trade.com”,
“jti”: “50904abb-2667-4f67-81b6-03687b442139”
}

401 UNAUTHORIZED
{
“error”: “unauthorized”,
“error_description”: “Authentication error”
}
It can happen while credentials for the account are wrong.

Creating lead #

To create lead, you should use request written down below, required variables are website URL, offer UUID, partner ID and token which you have from Generating token OAuth request.

curl –request POST \
–url https://{websiteURL}/proxy/processing/api/accounts \
–header ‘Accept: application/json’ \
–header ‘Authorization: Bearer {token}’ \
–header ‘Content-Type: application/json’ \
–header ‘Cookie: JSESSIONID=93AD5858240894B517A4B1A2ADC27617’ \
–cookie JSESSIONID=430AA1648A1146D88531E00217CEB7A1 \
–data ‘{
“offerUuid”: “{offerUuidHere}“,
“account”: {
“partnerId”: {partnerID},
“email”: “email@here”,
“name”: “firstname”,
“surname”: “lastname”,
“phone”: “123456789”,
“leadInfo”: {
“leadSource”: “Test Offer|testoffer.com|Test Description |a12dd0a66a”
}
}
}’
400 BAD REQUEST
{
“status”: “BAD_REQUEST”,
“timestamp”: “2023-10-30T13:01:04.489Z”,
“message”: “could not execute batch; SQL [insert into account (created, partner_id, updated, account_name, address, bank_account, bank_address, bank_name, bank_swift_code, branch_uuid, campaign_id, citizenship, city, client_type, country, date_of_birth, email, fax_number, lead_provider_uuid, locale, marital_status, name, parent_trading_account_id, parent_trading_account_system, parent_trading_account_uuid, passport_id_country, passport_id_number, phone, post_code, role, role_updated, role_uuid, source, state, status, surname, tax_identification_number, account_manager_uuid, comment, contact, last_ip_address, last_online, become_active_client_time, lead_source, lead_status, is_already_contacted, to_contact_date, lead_status_uuid, view_settings_uuid, uuid) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; nested exception is org.hibernate.exception.DataException: could not execute batch”,
“printableMessage”: false
}
The leadSource is too long, maximum amount of signs is 255.
401 UNAUTHORIZED
{
“status”: “UNAUTHORIZED”,
“timestamp”: “2023-10-30T13:34:09.773Z”,
“message”: “java.nio.charset.MalformedInputException: Input length = 1”,
“printableMessage”: false
}
Wrong/Expired token OAuth.
404 NOT FOUND
{
“status”: “NOT_FOUND”,
“timestamp”: “2023-10-30T13:06:20.769Z”,
“message”: “Entity not found: [status 404 reading OfferClient#findOne(UUID)]”,
“printableMessage”: false
}
Offer UUID is wrong.
409 CONFLICT
{
“status”: “CONFLICT”,
“timestamp”: “2023-10-30T13:03:43.091Z”,
“message”: “Account [test@abc12.com:0] already exists”,
“printableMessage”: false
}
It means account of this email already exist.
500 INTERNAL SERVER ERROR
{
“status”: “INTERNAL_SERVER_ERROR”,
“timestamp”: “2023-10-30T13:10:40.621Z”,
“message”: “Register Account Model is not valid”,
“printableMessage”: false
}
Partner ID is wrong.

Getting all leads #

To get list of all your leads, you should use this request, which require partner ID, website URL, token which you have from Generating token OAuth request.

curl –request GET \
–url ‘https://{websiteURL}/proxy/statistic/api/partner/{partnerID}/accounts/view/for-lead-provider?query=&from=2019-12-11T00%3A00%3A00Z&to=2023-12-11T23%3A59%3A59Z&size=1000&page=0′ \
–header ‘Authorization: Bearer {token}’ \
–header ‘Content-Type: application/x-www-form-urlencoded’ \
–header ‘Cookie: JSESSIONID=CD912EF93AD198D9B12410F1CF09C886; JSESSIONID=CD912EF93AD198D9B12410F1CF09C886’ \
–cookie JSESSIONID=430AA1648A1146D88531E00217CEB7A1 \
–data =

Match-Trade Technologies is a global company with offices all around the world

0
Years in the Forex Industry
0
Languages We Speak
0
Offices in USA, Europe and Asia
0
Highly skilled experts working with us