Promotions APIs
POSTCreate Promotion - Incentive
- Description
- Creates new promotions.
- Request Endpoint
- POST https://<Example api server address>/admin/promotion
- Parameters
- None.
- cURL syntax
curl --include \ --request POST \ --header "Content-Type: application/json" \ --data-binary "{ \"name\": \"FREEMONEY2\", \"promotionType\": \"PROMOTION\", \"promotionCode\" : \"PROMO123\", \"qualifyingItemType\": \"PM\", \"qualifyingItem\": \"VISA-CARD\", \"paidBy\": \"CASINO\", \"paidByItem\" : \"vb835f0c-f4b4-4472-aaef-c85f0d5b26a2\", \"currencies\": [ \"USD\" ], \"description\": \"desc\", \"finePrint\": \"fine print1\", \"minDeposit\": 200.5, \"promoAmountType\": \"AMOUNT\", \"promoAmount\": 40, \"usageLimit\": 100, \"userLimit\": 1, \"validityStartDate\": \"2017-10-21\", \"validityEndDate\": \"2017-10-22\" }" \ 'https://core.dev.Example.net/api/admin/promotion'- POST body attributes (JSON)
Attribute Type Use Description nameString Required The promotion name. promotionTypeString Required PROMOTION / INCENTIVE. qualifyingItemTypeString Required PM / CASINO / APPLICATION. qualifyingItemString Required Visa Card / Master Card / Casino id / Application id. promotionCodeString Conditional The PromoCode. Mandatory when promoType is "promotion". paidByString Required Can be either Example, CASINO, OTHER, etc. paidByItemString Conditional Can be casnioId, etc. Mandatory when paidBy is other than Example. currenciesArray Required Enables the ability to select specific currencies.
- The Player must be using the currency type defined by the promo
- Ties in with the CLIENT.
descriptionString Required A description of the promo or incentive. finePrintString Optional The fine print description. minDepositNumber Required Promotion min deposit. maxDepositNumber Conditional The maximum deposit amount of the promotion can be applied.
- It is mandatory when promoAmountType is PERCENTAGE.
- 0 indicates no maximum limit to use the promotion.
promoAmountTypeString Required AMOUNT or PERCENTAGE. promoAmountString Required The promotion promo amount. usageLimitNumber Required The usage limit. userLimitNumber Required The user limit. validityStartDateString Required The validity Start Date in UTC format: yyyy-mm-dd. validityEndDateString Required The validity end Date in UTC format: yyyy-mm-dd. - POST body
Headers: Content-Type: application/json{ "name": "FREEMONEY2", "promotionType": "PROMOTION", "promotionCode": "PROMO123", "qualifyingItemType": "PM", "qualifyingItem": "VISA-CARD", "paidBy": "CASINO", "paidByItem": "vb835f0c-f4b4-4472-aaef-c85f0d5b26a2", "currencies": [ "USD" ], "description": "desc", "finePrint": "fine print1", "minDeposit": 200.5, "promoAmountType": "AMOUNT", "promoAmount": 40, "usageLimit": 100, "userLimit": 1, "validityStartDate": "2017-10-21", "validityEndDate": "2017-10-22" }- Response body
Headers: Content-Type: application/json | HTTPS Status Code: 200{ "data": { "id": "18835f0c-f4b4-4472-aaef-c85f0d5b26a2", "createdOn": 1480672577278, "lastModifiedOn": 1480672577278, "updatedBy": "", "deleted": false, "name": "FREEMONEY2", "promotionType": "PROMOTION", "qualifyingItemType": "PM", "promotionCode": null, "description": "desc", "finePrint": "fine print1", "paidBy": "CASINO", "paidByCasino": { "id": "53bb2a0b-25fe-4674-a1e5-b65d050a55f8", "createdOn": 1472021963085, "lastModifiedOn": 1472021963085, "updatedBy": "", "deleted": false, "name": "Poker 26", "videoUrl": "https://www.google.com/betting-video.mov", "imageUrl": "http://www.google.com/betting.png", "description": "This casino has lot of game apps1", "website": "http://www.casino1.com", "icon": "https://s3-us-west-2.amazonaws.com/btc.inf.apdx.assets/icon1234", "banner": "banner2345", "deletedBy": null, "deletedOn": null, "operatorStatus": "NEW", "email": null, "userRole": "OPERATOR", "firstName": null, "lastName": null, "address": null, "externalId": null, "featuredAppId": null, "latestAppId": null }, "currencies": [ "USD" ], "qualifyingItem": "VISA-CARD", "casino": null, "application": null, "minDeposit": 200.5, "promoAmountType": "AMOUNT", "promoAmount": 40, "usageLimit": 100, "userLimit": 1, "validityStartDate": 1508544000000, "validityEndDate": 1508630400000, "promotionStatus": "SCHEDULED", "usageLimitUsed": 0 }, "detail": null, "error": false, "message": "Creating promotion successful.", "code": "1000" }
GETFetch All Promotions
- Description
- Fetches all Promotions and Incentives.
- Request Endpoint
- GET https://<Example api server address>admin/promotion
- Parameters
- None.
- cURL syntax
curl --include \ 'https://core.dev.Example.net/api/admin/promotion'- Response body
Headers: Content-Type: application/json | HTTPS Status Code: 200{ "data": [ { "id": "18835f0c-f4b4-4472-aaef-c85f0d5b26a2", "createdOn": 1480672577278, "lastModifiedOn": 1480672577278, "updatedBy": "", "deleted": false, "name": "FREEMONEY2", "promotionType": "PROMOTION", "qualifyingItemType": "PM", "promotionCode": null, "description": "desc", "finePrint": "fine print1", "paidBy": "Example", "currencies": [ "USD" ], "qualifyingItem": "VISA-CARD", "casino": null, "application": null, "minDeposit": 200.5, "promoAmountType": "AMOUNT", "promoAmount": 40, "usageLimit": 100, "userLimit": 1, "validityStartDate": 1508544000000, "validityEndDate": 1508630400000, "promotionStatus": "SCHEDULED", "usageLimitUsed": 0 }, { "id": "28835f0c-f4b4-4472-aaef-c85f0d5b26a2", "createdOn": 1480672577278, "lastModifiedOn": 1480672577278, "updatedBy": "", "deleted": false, "name": "FREEMONEY3", "promotionType": "PROMOTION", "qualifyingItemType": "PM", "promotionCode": null, "description": "desc", "finePrint": "fine print1", "paidBy": "Example", "currencies": [ "USD" ], "qualifyingItem": "VISA-CARD", "casino": null, "application": null, "minDeposit": 200.5, "promoAmountType": "AMOUNT", "promoAmount": 40, "usageLimit": 100, "userLimit": 1, "validityStartDate": 1508544000000, "validityEndDate": 1508630400000, "promotionStatus": "SCHEDULED", "usageLimitUsed": 0 } ], "detail": null, "error": false, "message": "Fetching all promotions successful." }
PUTUpdate Promotion
- Description
- Updates an existing promotion. For null attributes, the value will not be updated.
- Request Endpoint
- PUT https://<Example api server address>/admin/promotion/{id}
- Parameters
Parameter Type Use Description id String Required UUID of a Promotion. - cURL syntax
curl --include \ --request PUT \ --header "Content-Type: application/json" \ --data-binary "{ \"name\": \"FREEMONEY2\", \"qualifyingItemType\": \"PM\", \"qualifyingItem\": \"VISA-CARD\", \"paidBy\": \"Example\", \"currencies\": [ \"USD\" ], \"description\": \"desc\", \"finePrint\": \"fine print1\", \"minDeposit\": 200.5, \"promoAmountType\": \"AMOUNT\", \"promoAmount\": 40, \"usageLimit\": 100, \"userLimit\": 1, \"validityStartDate\": \"2017-10-21\", \"validityEndDate\": \"2017-10-22\" }" \ 'https://core.dev.Example.net/api/admin/promotion/{id}'- PUT body attributes (JSON)
Attribute Type Use Description nameString Required The promotion name. qualifyingItemTypeString Required PM / CASINO / APPLICATION. qualifyingItemString Required Visa Card / Master Card / Casino id / Application id. paidByString Required Can be either Example, CASINO, OTHER, etc. paidByItemString Conditional Can be casnioId, etc. Mandatory when paidBy is other than Example. currenciesArray Required Enables the ability to select specific currencies.
- The Player must be using the currency type defined by the promo
- Ties in with the CLIENT.
descriptionString Required A description of the promo or incentive. finePrintString Optional The fine print description. minDepositNumber Required Promotion min deposit. maxDepositNumber Conditional The maximum deposit amount of the promotion can be applied.
- It is mandatory when promoAmountType is PERCENTAGE.
- 0 indicates no maximum limit to use the promotion.
promoAmountTypeString Required AMOUNT or PERCENTAGE. promoAmountString Required The promotion promo amount. usageLimitNumber Required The usage limit. userLimitNumber Required The user limit. validityStartDateString Required The validity Start Date in UTC format: yyyy-mm-dd. validityEndDateString Required The validity end Date in UTC format: yyyy-mm-dd. - PUT body
Headers: Content-Type: application/json{ "name": "FREEMONEY2", "qualifyingItemType": "PM", "qualifyingItem": "VISA-CARD", "paidBy": "Example", "currencies": [ "USD" ], "description": "desc", "finePrint": "fine print1", "minDeposit": 200.5, "promoAmountType": "AMOUNT", "promoAmount": 40, "usageLimit": 100, "userLimit": 1, "validityStartDate": "2017-10-21", "validityEndDate": "2017-10-22" }- Response body
Headers: Content-Type: application/json | HTTPS Status Code: 200{ "data": { "id": "18835f0c-f4b4-4472-aaef-c85f0d5b26a2", "createdOn": 1480672577278, "lastModifiedOn": 1480672577278, "updatedBy": "", "deleted": false, "name": "FREEMONEY2", "promotionType": "PROMOTION", "qualifyingItemType": "PM", "promotionCode": null, "description": "desc", "finePrint": "fine print1", "paidBy": "Example", "currencies": [ "USD" ], "qualifyingItem": "VISA-CARD", "casino": null, "application": null, "minDeposit": 200.5, "promoAmountType": "AMOUNT", "promoAmount": 40, "usageLimit": 100, "userLimit": 1, "validityStartDate": 1508544000000, "validityEndDate": 1508630400000, "promotionStatus": "SCHEDULED", "usageLimitUsed": 0 }, "detail": null, "error": false, "message": "Updating promotion successful.", "code": "1000" }
DELETEDelete Promotion
- Description
- Deletes a Promotion - Incentive.
- Request Endpoint
- DELETE https://<Example api server address>/admin/promotion/{id}
- Parameters
Parameter Type Use Description id String Required UUID of a promotion. - cURL syntax
curl --include \ --request DELETE \ 'https://core.dev.Example.net/api/admin/promotion/{id}'- Response body
Headers: Content-Type: application/json | HTTPS Status Code: 200{ "data": true, "detail": null, "error": false, "message": "Deleting promotion successful" }
GETFetch Promotion Details
- Description
- Fetches details of a particular promotion.
- Request Endpoint
- GET https://<Example api server address>/admin/promotion/{id}
- Parameters
Parameter Type Use Description id String Required UUID of a Promotion. - cURL syntax
curl --include \ 'https://private-5f8be-betcadesdkapi.apiary-mock.com/api/admin/promotion/{id}'- Response body
Headers: Content-Type: application/json | HTTPS Status Code: 200{ "data": { "id": "1ca4a947-5cd1-46f9-b518-0cf56b655112", "createdOn": 1481715798781, "lastModifiedOn": 1481715798782, "updatedBy": "", "deleted": false, "name": "FREEMONEY2", "promotionType": "PROMOTION", "qualifyingItemType": "PM", "promotionCode": null, "description": "desc", "finePrint": "fine print1", "paidBy": "Example", "currencies": [ "USD" ], "qualifyingItem": "VISA-CARD", "casino": null, "application": null, "minDeposit": 200.5, "promoAmountType": "AMOUNT", "promoAmount": 40, "usageLimit": 100, "userLimit": 1, "validityStartDate": 1508544000000, "validityEndDate": 1508630400000, "promotionStatus": "SCHEDULED", "usageLimitUsed": 0 }, "detail": null, "error": false, "message": "Fetching promotion detail successful.", "code": "1000" }
POSTSearch Promotion
- Description
- Searches for a Promotion by either id or name.
- Request Endpoint
- POST https://<Example api server address>/admin/promotion/search
- Parameters
- None.
- cURL syntax
curl --include \ --request POST \ --header "Content-Type: application/json" \ --data-binary "{ \"promotionId\": \"993d7157-d7a0-4ba7-8225-d9936aa1566d\" }" \ 'https://private-5f8be-betcadesdkapi.apiary-mock.com/api/admin/promotion/search'- POST body attributes (JSON)
Attribute Type Use Description promotionIdString Optional UUID of the promotion. nameString Optional Name of the promotion. - POST body
Headers: Content-Type: application/json{ "promotionId": "993d7157-d7a0-4ba7-8225-d9936aa1566d" }- Response body
Headers: Content-Type: application/json | HTTPS Status Code: 200{ "data": [ { "id": "18835f0c-f4b4-4472-aaef-c85f0d5b26a2", "createdOn": 1480672577278, "lastModifiedOn": 1480672577278, "updatedBy": "", "deleted": false, "name": "FREEMONEY2", "promotionType": "PROMOTION", "qualifyingItemType": "PM", "promotionCode": null, "description": "desc", "finePrint": "fine print1", "paidBy": "Example", "currencies": [ "USD" ], "qualifyingItem": "VISA-CARD", "casino": null, "application": null, "minDeposit": 200.5, "promoAmountType": "AMOUNT", "promoAmount": 40, "usageLimit": 100, "userLimit": 1, "validityStartDate": 1508544000000, "validityEndDate": 1508630400000, "promotionStatus": "SCHEDULED", "usageLimitUsed": 0 } ], "detail": null, "error": false, "message": "Searching promotion successful" }
GETFetch Promotion By Promotion Code
- Description
- Fetches promotion details by promotion code.
- Request Endpoint
- GET https://<Example api server address>/admin/promotion/by/code/{code}
- Parameters
Parameter Type Use Description code String Required Promotion code of the promotion. - cURL syntax
curl --include \ 'https://core.dev.Example.net/api/admin/promotion/by/code/{code}'- Response body
Headers: Content-Type: application/json | HTTPS Status Code: 200{ "data": { "id": "0e4378f6-9c23-4656-bbfa-0479cc722076", "createdOn": 1481971928555, "lastModifiedOn": 1481971928555, "updatedBy": "", "deleted": false, "name": "FREEMONEYnz", "promotionType": "PROMOTION", "qualifyingItemType": "PM", "promotionCode": "segwegn", "description": "desc", "finePrint": "fine print1", "paidBy": "CASINO", "paidByCasino": { "id": "53bb2a0b-25fe-4674-a1e5-b65d050a55f8", "createdOn": 1472021963085, "lastModifiedOn": 1472021963085, "updatedBy": "", "deleted": false, "name": "Poker 26", "videoUrl": "https://www.google.com/betting-video.mov", "imageUrl": "http://www.google.com/betting.png", "description": "This casino has lot of game apps1", "website": "http://www.casino1.com", "icon": "https://s3-us-west-2.amazonaws.com/btc.inf.apdx.assets/icon1234", "banner": "banner2345", "deletedBy": null, "deletedOn": null, "operatorStatus": "NEW", "email": null, "userRole": "OPERATOR", "firstName": null, "lastName": null, "address": null, "externalId": null, "featuredAppId": null, "latestAppId": null }, "paidByItem": null, "currencies": [ "USD" ], "qualifyingItem": "VISA-CARD", "casino": null, "application": null, "minDeposit": 200.5, "promoAmountType": "AMOUNT", "promoAmount": 40, "usageLimit": 100, "userLimit": 1, "validityStartDate": 1508544000000, "validityEndDate": 1508630400000, "promotionStatus": "SCHEDULED", "usageLimitUsed": 0, "maxDeposit": null, "deletedOn": null, "deletedBy": null }, "detail": null, "error": false, "message": "Fetching promotion detail successful.", "code": "1000" }
GETFetch Promotion By Promotion Name
- Description
- Fetches promotion details by promotion name.
- Request Endpoint
- GET https://<Example api server address>/admin/promotion/by/name/{name}
- Parameters
Parameter Type Use Description name String Required Promotion name of the promotion. - cURL syntax
curl --include \ 'https://core.dev.Example.net/api/admin/promotion/by/name/{name}'- Response body
Headers: Content-Type: application/json | HTTPS Status Code: 200{ "data": { "id": "8b72480f-f5d2-4d92-89af-8e12dd61d424", "createdOn": 1481968543885, "lastModifiedOn": 1481968543885, "updatedBy": "", "deleted": false, "name": "FREEMONEY", "promotionType": "INCENTIVE", "qualifyingItemType": "CASINO", "promotionCode": null, "description": "desc", "finePrint": "fine print1", "paidBy": "CASINO", "paidByCasino": { "id": "53bb2a0b-25fe-4674-a1e5-b65d050a55f8", "createdOn": 1472021963085, "lastModifiedOn": 1472021963085, "updatedBy": "", "deleted": false, "name": "Poker 26", "videoUrl": "https://www.google.com/betting-video.mov", "imageUrl": "http://www.google.com/betting.png", "description": "This casino has lot of game apps1", "website": "http://www.casino1.com", "icon": "https://s3-us-west-2.amazonaws.com/btc.inf.apdx.assets/icon1234", "banner": "banner2345", "deletedBy": null, "deletedOn": null, "operatorStatus": "NEW", "email": null, "userRole": "OPERATOR", "firstName": null, "lastName": null, "address": null, "externalId": null, "featuredAppId": null, "latestAppId": null }, "paidByItem": null, "currencies": [ "USD" ], "qualifyingItem": "53bb2a0b-25fe-4674-a1e5-b65d050a55f8", "casino": { "id": "53bb2a0b-25fe-4674-a1e5-b65d050a55f8", "createdOn": 1472021963085, "lastModifiedOn": 1472021963085, "updatedBy": "", "deleted": false, "name": "Poker 26", "videoUrl": "https://www.google.com/betting-video.mov", "imageUrl": "http://www.google.com/betting.png", "description": "This casino has lot of game apps1", "website": "http://www.casino1.com", "icon": "https://s3-us-west-2.amazonaws.com/btc.inf.apdx.assets/icon1234", "banner": "banner2345", "deletedBy": null, "deletedOn": null, "operatorStatus": "NEW", "email": null, "userRole": "OPERATOR", "firstName": null, "lastName": null, "address": null, "externalId": null, "featuredAppId": null, "latestAppId": null }, "application": null, "minDeposit": 200.5, "promoAmountType": "AMOUNT", "promoAmount": 40, "usageLimit": 100, "userLimit": 1, "validityStartDate": 1508544000000, "validityEndDate": 1508630400000, "promotionStatus": "SCHEDULED", "usageLimitUsed": 0, "maxDeposit": null, "deletedOn": null, "deletedBy": null }, "detail": null, "error": false, "message": "Fetching promotion detail successful.", "code": "1000" }
POSTFetch Promotion By Promotion Type
- Description
- Fetches promotion details by promotion type.
- Request Endpoint
- POST https://<Example api server address>/admin/promotions/by/type
- Parameters
- None.
- cURL syntax
curl --include \ --request POST \ --header "Content-Type: application/json" \ --data-binary "{ \"promotionType\" : \"PROMOTION\" }" \ 'https://core.dev.Example.net/api/admin/promotions/by/type'- POST body attributes (JSON)
Attribute Type Use Description promotionTypeString Required The promotion type. Can be PROMOTION / INCENTIVE. - POST body
Headers: Content-Type: application/json{ "promotionType": "PROMOTION" }- Response body
Headers: Content-Type: application/json | HTTPS Status Code: 200{ "data": { "content": [ { "id": "0e4378f6-9c23-4656-bbfa-0479cc722076", "createdOn": 1481971928555, "lastModifiedOn": 1481971928555, "updatedBy": "", "deleted": false, "name": "FREEMONEYnz", "promotionType": "PROMOTION", "qualifyingItemType": "PM", "promotionCode": "segwegn", "description": "desc", "finePrint": "fine print1", "paidBy": "CASINO", "paidByCasino": { "id": "53bb2a0b-25fe-4674-a1e5-b65d050a55f8", "createdOn": 1472021963085, "lastModifiedOn": 1472021963085, "updatedBy": "", "deleted": false, "name": "Poker 26", "videoUrl": "https://www.google.com/betting-video.mov", "imageUrl": "http://www.google.com/betting.png", "description": "This casino has lot of game apps1", "website": "http://www.casino1.com", "icon": "https://s3-us-west-2.amazonaws.com/btc.inf.apdx.assets/icon1234", "banner": "banner2345", "deletedBy": null, "deletedOn": null, "operatorStatus": "NEW", "email": null, "userRole": "OPERATOR", "firstName": null, "lastName": null, "address": null, "externalId": null, "featuredAppId": null, "latestAppId": null }, "paidByItem": null, "currencies": [ "USD" ], "qualifyingItem": "VISA-CARD", "casino": null, "application": null, "minDeposit": 200.5, "promoAmountType": "AMOUNT", "promoAmount": 40, "usageLimit": 100, "userLimit": 1, "validityStartDate": 1508544000000, "validityEndDate": 1508630400000, "promotionStatus": "SCHEDULED", "usageLimitUsed": 0, "maxDeposit": null, "deletedOn": null, "deletedBy": null } ], "last": true, "totalElements": 1, "totalPages": 1, "numberOfElements": 1, "sort": null, "first": true, "size": 70, "number": 0 }, "detail": null, "error": false, "message": "Fetching promotions successful.", "code": "1000" }