POST reportShare

{{domainAddress}}/promoCode/report

This function will return the data required in order for the user to share the promotion on social media.

Developer:
We are particularly interested in collecting information pertaining to the recipient of the shared campaign, if a particular recipient can be identified.

Revisions:

Headers

HeaderContent
Content Typeapplication/json
AuthorizationBearer {{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

report(userId, campaignID, platform, data)

ParameterDescription
{{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
{{platform}}The social media platform that was used to share the campaign promotion.
Type: String; Optional
{{data}}As much data as can be collected from the share process
Type: Object; Optional
{
    "clientId":"{{clientId}}",
    "campaignId":"{{campaignId}}",
    "platform":"{{platform name}}",
    "userId":"{{userId}}"
    "data":{
        ??
    }
}

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":"{{clientId}}",
    "campaignId":"{{campaignId}}",
    "platform":"{{userId}}",
    "userId":"03af191d-70d2-472e-9ac0-149cx2437f9d",
    "data":{
        //whatever information can be collected from the native sharing process
    }
}

Response

{
    "errors": [],
    "warnings": [],
    "notices": [],
    "data": {
         "success": true
     }
}

Developer:
There is no need to consider response data. If there is an error in the query, ignore it and move on. There are no responses that need to be displayed to the user.