{{domainAddress}}/promoCode/getMyPromo
This function will return the data required in order for the user to share the promotion on social media.
Revisions:
- On July 1, 2024, we altered the required headers for each post. Please see the updated documentation for authentication.
Headers
Header | Content |
Content Type | application/json |
Authorization | Bearer {{ID token}} |
App-Id | {{API key provided by Mosaic}} |
Device-Id | {{Advertising ID from the initial installation of this app}} |
Request-Date | {{ISO 8601 date and time format in UTC}} |
Body
Variable Contents
Parameter | Description |
{{clientId}} | Is provided by CWF for the app project and will be consistent throughout all API calls that require this ID. Type: String; Required |
{{campaignId}} | Provided within the campaign object data from campaigns/getOffers response.Type: String; Required |
{{userId}} | Available from getUser() response data.Type: String; Required |
{ "clientId":"{{clientId}}", "campaignId":"{{campaignId}}", "userId":"{{userId}}" }
Example
Headers
App-Id: 5***9-d**3-4**8-b**1-b3***dac
Device-Id: a4***cb-d***5-4***f-8***c-84***75
Request-Date: 2024-07-02T19:59:20.815Z
Content-Type: application/json
Authorization: Bearer eyJraWQiO...aLxlc6PCgQ
Body
{ "clientId":"1f6w1jh6ls3mb", "campaignId":"sl838fohse8", "userId":"03af191d-70d2-472e-9ac0-149cx2437f9d" }
Response
{ "errors": [], "warnings": [], "notices": [], "data": { "campaignId": "lsf83lslsdifel83", "promoCode": "98345KD8", "id": "alsifj8j3lss <- optional (may not be present) } }
Developer:
The promoCode
value will be used for social sharing campaign messages.