You can get an opt-in or opt-out status for a mobile number for your opt-in lists.
- Opt-in status - Will return all of your opt-in list IDs and keywords that the mobile number is opted-in to.
- Opt-out status - Will return all of your opt-in list ids and keywords that the mobile number is opted-out from.
- Url: https://mcpn.us/limeApi
- Parameters (all are mandatory):
Parameter Name (Case Sensitive)
|
Value |
Description |
Default Value |
ev |
optinStatus |
Must be this value (optinStatus) |
|
user |
Advertiser username |
The advertiser’s username that matches the api_id |
None |
api_id |
Advertiser Api Id |
The advertiser’s api_id that matches the username |
Generated from edit profile |
type |
optin/optout |
optin - if you want to get opt-in status optout - if you want to get opt-out status |
|
mobile |
Mobile Number |
Mobile Number to get status for |
|
format (optional) |
xml |
Optional for sending the parameters as xml file. If present then only values from XML will be used. |
|
Return Code
If the API succeeds then it will return with status code 200 with the following xml in the message body:
For opt-in status
<?xml version="1.0" ?>
<lists type="optin">
<list>
<listId>693</listId>
<keywords>
<keyword>Trick</keyword>
</keywords>
</list>
<list>
<listId>774</listId>
<keywords>
<keyword>apple</keyword>
<keyword>webinar</keyword>
</keywords>
</list>
</lists>
For opt-out status
<?xml version="1.0" ?>
<lists type="optout">
<list>
<listId>492</listId>
<keywords>
<keyword>Snack</keyword>
<keyword>Bread</keyword>
</keywords>
</list>
<list>
<listId>232</listId>
<keywords>
<keyword>orange</keyword>
</keywords>
</list>
</lists>
If an error occurs or there is an invalid parameter, then it will return with a status code of either 400 or 500, along with an error message in the response body.
Example:
https://mcpn.us/limeApi?ev=optinStatus&user=adv&api_id=a4gI73gyLVj5822C&type=optin&mobile=15555555555
Example for XML:
https://mcpn.us/limeApi?ev=optinStatus&format=xml
XML File:
<?xml version="1.0" ?>
<Data>
<User>user</User>
<ApiId>api key</ApiId>
<Type>type</Type>
<Mobile>mobile</Mobile>
</Data>
Comments
0 comments
Article is closed for comments.