General Overview



The CRM API is the programming interface to the Fintech platform. The API can be used to integrate your app or website with Backpack Fintech platform. This enables partners to maximize the features within your application.

The API follows a REST API design, meaning that you use standard HTTP methods to retrieve and manipulate resources



 Admin end-point API URL URLs :

 https://admin-api.backpack.io (Main zone)

 https://admin-eu.backpack.io (Euro zone)

 https://admin-api.hk-a.backpack.com  (Hong Kong zone)

 https://admin-api.ap-b.backpack.io  (Asia Pacific zone)


[admin URL]/crm/rest/leads/from/2017-01-01/to/2017-05-22/page/1 (from, to, page are optional)

[admin URL]/crm/rest/registrations/from/2017-01-01/to/2017-05-22/page/1 (from, to, page are optional)

[admin URL]/crm/rest/transactions/ids/1,2,3/from/2017-01-01/to/2014-05-22/page/1 (ids, type, from, to, page are optional)

[admin URL]/crm/rest/stats/ids/1,2,3/page/1 (ids)

[admin URL]/user/search/banking/id/1(id)



API response is provided in JSON format. The response’s general structure is:

 {

  “total”: number of entries that satisfy the search criteria

  “data”: [...up to 1000 entries...]

 }

The structure of an entry in the data is according to the request type (see below).


Filters

Pagination. Our API provides a maximum of 1000 entries in one request. If there are more than 1000 entries satisfying the criteria, you can reach them using page numbers. Add page=2 to your request to receive entries 1001-2000, etc.

If the filter isn’t added to the request, first 1000 entries (first page) are sent in the response.


Date. There are multiple date filters, one for every request type. The format is: from=YYYY-MM-DD HH:MM:SS&to= YYYY-MM-DD HH:MM:SS. The time part (HH:MM:SS) is optional.


User ID. Some request types can be filtered by end user ID (or multiple IDs). This filter’s format is:

ids=12345 for single user, or ids=12345,23456,34567 for multiple users.



Request types:


1.Leads


 Entry structure:

  • leadID
  • status
  • lastModifiedDate
  • affiliateID
  • landingParams
  • p1
  • location


  Filters:

  • page
  • date (applied to ladtModifiedDate)
  • ids

      Example:

https://admin-api.backpack.io/crm/rest/leads/from/2017-05-01/to/2017-06-01/page/1

{"leadID":"5d41402abc4b2a76b9719d911017c592","status":"new","lastModifiedDate":"201309-18

10:48:19","affiliateID":"a1b2c3","landingParams":null,"p1":"7d793037a0760186574b0282f2f4 35e7","location":"es"}


2. Registrations.


 Entry structure:

  • leadID
  • status
  • userID
  • lastModifiedDate
  • affiliateID
  • landingParams
  • p1
  • location

 Filters:

  • page
  • date (applied to ladtModifiedDate)


Example:

https://admin-api.backpack.io/crm/rest/registrations/from/2017-05-01/to/2017-06-01

{"leadID":null,"status":"new","userID":"472067","lastModifiedDate":"2014-10-13

10:08:54","affiliateID":"4959c049","landingParams":"{\"a_aid\":\"4959c049\",\"mtool\":\"1\",\" numberOfRows\":\"6\",\"preview\":\"1\",\"referer\":\"http:\/\/mysite.backpack.io\/\",\"tool\ ":\"2586\",\"url\":\"http%3A%2F%2Fmysite.backpack.io%3FshowLogin%3D1\"}","locati on":"il"}


3. Transactions.
 Entry structure: 

  • userID
  • recordID
  • amount
  • type
  • currency


Filters:


  • page
  • date (transaction date)
  • ids
  • type (deposit, withdrawal)


 Example:

https://admin-api.backpack.io/crm/rest/transactions/from/2015-05-01/to/2015-06-01/page/1


{"total":"7","data":[{"userID":"666553","recordID":"10297014","amount":"1000.00","type":"d eposit","currency":"none","date":"2015-05-06

11:15:54"},{"userID":"666553","recordID":"10350576","amount":"-

100.00","type":"withdrawal","currency":"none","date":"2015-05-11

13:57:09"},{"userID":"666553","recordID":"10391193","amount":"100.00","type":"withdrawal","currency":"none","date":"2015-05-14

06:43:35"},{"userID":"677707","recordID":"10451403","amount":"100.00","type":"deposit","c urrency":"none","date":"2015-05-19

11:56:22"},{"userID":"677707","recordID":"10451411","amount":"100.00","type":"deposit","c urrency":"none","date":"2015-05-19

11:56:41"},{"userID":"677707","recordID":"10451412","amount":"100.00","type":"deposit","c urrency":"none","date":"2015-05-19

11:56:46"},{"userID":"677707","recordID":"10451414","amount":"100.00","type":"deposit","c urrency":"none","date":"2015-05-19 11:56:49"}]}



4. Transactions-fx.
 Entry structure: 

  • userID
  • recordID
  • amount
  • type
  • date
  • adminID
  • crmUser
  • currency


Filters:


  • page
  • date (transaction date)
  • ids
  • type (deposit, withdrawal)


 Example:

https://admin-api.backpack.io/crm/rest/transactions-fx/from/2017-10-12/to/2018-10-13/page/1


{"total":"4","data":[{"userID":"213003","recordID":"1844","amount":"1000.00","type":"deposit","date":"2017-10-31 13:38:20","adminID":"0","crmUser":null,"currency":"eur"},{"userID":"245476","recordID":"1858","amount":"43432432.00","type":"deposit","date":"2017-11-05 09:42:40","adminID":"0","crmUser":null,"currency":"eur"},{"userID":"244463","recordID":"2089","amount":"10000.00","type":"deposit","date":"2017-12-26 09:49:21","adminID":"0","crmUser":null,"currency":"usd"},{"userID":"253444","recordID":"2116","amount":"10000.00","type":"deposit","date":"2018-01-22 17:59:41","adminID":"0","crmUser":null,"currency":"usd"}]}



5. Affiliate-Deposit - FTD.
 Entry structure: 

  • userID
  • token
  • tester
  • country
  • language
  • landingParams
  • firstDepositDate
  • firstDepositAmount


Filters:

  • page
  • ids
  • affiliate
  • type (deposit, withdrawal)


 Example:

https://admin-api.backpack.io/crm/rest/affiliate-deposits/affiliate/888888


{"total":"3","data":[{"userID":"1903745","token":"888888","tester":"1","country":"gb","language":"es","registrationDate":"2017-06-04 10:23:41","landingParams":"{\"a_aid\":\"888888\"}","firstDepositDate":"2018-01-17 17:38:17","firstDepositAmount":"5000.00"},{"userID":"1903762","token":"888888","tester":"1","country":"gb","language":"es","registrationDate":"2017-06-04 10:23:41","landingParams":"{\"a_aid\":\"888888\"}","firstDepositDate":"2018-01-18 13:34:57","firstDepositAmount":"800000.00"},{"userID":"1903812","token":"888888","tester":"1","country":"gb","language":"es","registrationDate":"2017-06-04 11:19:19","landingParams":"{\"a_aid\":\"888888\"}","firstDepositDate":"2018-01-17 17:29:38","firstDepositAmount":"10000.00"}]}



6. trades-fx.
 Entry structure:

  • tradeID
  • userID
  • walletID
  • platformID
  • currency
  • gameType
  • instrumentID
  • tradeTime
  • expiryTime
  • closed_time
  • referencePrice
  • expiryPrice
  • stake
  • leverage
  • Trade_volume
  • stopLoss
  • takeProfit
  • stopLossPrice
  • takeProfitPrice
  • closeTime
  • direction
  • spread
  • deltaSpread
  • status (1= active , 3= processed)
  • result
  • reason
  • pnl


Filters:

  • page
  • ids
  • date (applied to Trade)


Example:

https://admin-api.backpack.io/crm/rest/trades-fx


 {"total":"1","data":[{"tradeID":"145","userID":"2045521","walletID":"254","platformID":"3","currency":"2","gameType":"20","instrumentID":"1","tradeTime":"2017-11-06 15:02:41","expiryTime":"2017-11-13 15:02:00","closed_time":"2017-11-13 15:02:02","referencePrice":"1.15873","expiryPrice":"1.16619","stake":"2000.00","leverage":"50","Trade_volume":"100000.00","stopLoss":"2000.00","takeProfit":"10000.00","stopLossPrice":"1.13556","takeProfitPrice":"1.27461","closeTime":"2017-11-13 15:02:00","direction":"1","spread":"0.00000","deltaSpread":"0.00025","status":"3","result":"1","reason":"1","pnl":"642.94"}]}




7. Stats.
 Entry structure:

  • userID
  • deposits
  • withdrawals
  • wins
  • losses
  • pnl
  • volumeTraded


Filters:

  • page
  • ids


Example:

https://admin-api.backpack.io/crm/rest/stats/ids/666553,709743


 {"total":2,"data":[{"userID":"666553","deposits":"1000.00","withdrawals":"200.00","wins":170 ,"losses":"200.00","pnl":"-

30.00","volumeTraded":"400"},{"userID":"709743","deposits":"4000.00","withdrawals":0,"wins":30," losses":"700.00","pnl":"-670.00","volumeTraded":"750"}]}



8. Banking.

 Entry structure:

  • userID

Filters:

  • id


Example:

https://admin-api.backpack.io/user/search/banking/id/222222


{"success":true,"data":{"credit":"21721.55","reserved":"0.00","availableCash":21362.549999999999,"availableBonus":359,"firstDepositDate":"2016-06-06 07:27:19","firstDepositAmount":"20000.00","lastDepositAmount":"777.00","currency":"1","siteID":"1","depositCount":"18","depositVolume":"193550.00","withdrawalCount":"1","withdrawalVolume":"2500.00","volumeTotal":"1153325","volumeBonus":"60185.00","volumeCash":"1093140.00","pnlTotal":"-173678.45","pnlBonus":"-9641.00","pnlCash":"-164037.45","bonusPending":0,"bonusVolumeTraded":0,"volumeMissing":0,"bonusPromotional":0,"promotionalBonusRecommendedVolumeForWithdrawal":0,"promotionalBonusVolumeTraded":0,"promotionalBonusStatus":"","lastDepositDate":"2017-11-05 13:39:25","lastTradeDate":"2018-01-14 08:56:50","freeRelatedDeposit":170750,"hasPracticeWallet":true,"hasMt4Wallet":false}}



9. Deposit.
 Entry structure:

  • userID
  • deposits
  • withdrawals
  • wins
  • losses
  • pnl
  • volumeTraded


Filters:

  • page
  • ids


Example:

https://admin-api.backpack.io/crm/rest/stats/ids/666553,709743


 {"total":2,"data":[{"userID":"666553","deposits":"1000.00","withdrawals":"200.00","wins":170 ,"losses":"200.00","pnl":"-

30.00","volumeTraded":"400"},{"userID":"709743","deposits":"4000.00","withdrawals":0,"wins":30," losses":"700.00","pnl":"-670.00","volumeTraded":"750"}]}



Special CRM Features :


1. ADD / Remove Tag : set-tag

 

Entry structure: 

  • ids (User ID's)
  • removeTag (true : removing tag / false : adding tag)
  • tags (existing or new Tag)


Example:

https://admin-api.backpack.io/crm/rest/set-tag?ids=2134007,200460&tags=testtag&removeTag=false


Response: {"success":true}