
POST http://webapi.mymarketing.co.il/api/whatsappcampaign/SendOperationalMessage
Creates and sends a new WhatsApp operational message. Important: at a first time message to a contact you must send an approved template (should you have a template to approve - please contact support) and nothing else. Attachment and content are only allowed to be sent if the contact replied to a message within 24 hours from its' sending. Not following those instruction will result in a failed message.
Request Information
URI Parameters
Body Parameters
Name
Description
Type
Additional information
Request Formats
application/json, text/json
Sample:
{ "scheduling": { "is_sent": true, "scheduled_date_utc": "2016-12-24T14:12:12" }, "segment": { "mobiles": [ "sample string 1", "sample string 2" ] }, "details": { "whatsapp_profile_id": 1 }, "design": { "name": "sample string 1", "content": "sample string 2" }, "template": { "id": "sample string 1", "variables": { "sample string 1": "sample string 2", "sample string 3": "sample string 4" } } }
application/xml, text/xml
Sample:
<ApiWhatsAppCampaignSendOperationalMessageContainer xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ActiveTrail.BusinessLogic.Domain.WhatsApp.WhatsAppCampaignReport"> <design> <content>sample string 2</content> <name>sample string 1</name> </design> <details> <whatsapp_profile_id>1</whatsapp_profile_id> </details> <scheduling> <is_sent>true</is_sent> <scheduled_date_utc>2016-12-24T14:12:12</scheduled_date_utc> </scheduling> <segment> <mobiles xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:string>sample string 1</d3p1:string> <d3p1:string>sample string 2</d3p1:string> </mobiles> </segment> <template> <id>sample string 1</id> <variables xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringstring> <d3p1:Key>sample string 1</d3p1:Key> <d3p1:Value>sample string 2</d3p1:Value> </d3p1:KeyValueOfstringstring> <d3p1:KeyValueOfstringstring> <d3p1:Key>sample string 3</d3p1:Key> <d3p1:Value>sample string 4</d3p1:Value> </d3p1:KeyValueOfstringstring> </variables> </template> </ApiWhatsAppCampaignSendOperationalMessageContainer>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
Name
Description
Type
Additional information
send_type_name
string
status_name
string
status_date
date
handled_date
date
Response Formats
application/json, text/json
Sample:
{ "campaign": { "id": "31203993-a781-4163-95dd-ae3bfa386fc4", "parentuserid": 2, "fromname": "sample string 3", "fromnumber": "sample string 4", "name": "sample string 5", "content": "sample string 6", "isdeleted": true, "totalsent": 8, "totalsucceeded": 9, "totalopens": 10, "totalfailed": 11, "canunsubscribe": true, "totalunsubscribed": 13, "unsubscribetext": "sample string 14", "totalcredits": 15, "wizardmaxstep": 64, "wizardcurrentstep": 64, "statustype": 0, "sendingprofileid": 16, "totalclicks": 17, "totaluniqueclicks": 18, "islinktracking": true, "sendtype": 1, "groupids": [ 1, 2 ], "mobilenumbers": { "sample string 1": 2, "sample string 3": 4 }, "restricatedgroupids": [ 1, 2 ], "restricatedcampaignids": [ "6f4a09ad-440f-467a-b819-019554340a9e", "8c6936f9-8419-4d31-91b9-56014e157c3f" ], "isdistinctsending": true, "links": [ { "id": "1306962d-c574-476a-9d82-6609031523a3", "position": 2, "url": "sample string 3", "dateсreatedutc": "2016-12-24T14:12:12" }, { "id": "1306962d-c574-476a-9d82-6609031523a3", "position": 2, "url": "sample string 3", "dateсreatedutc": "2016-12-24T14:12:12" } ], "scheduledtimezoneid": 1, "scheduleddateutc": "2016-12-24T14:12:12", "datesentutc": "2016-12-24T14:12:12", "datecreatedutc": "2016-12-24T14:12:12", "dateupdatedutc": "2016-12-24T14:12:12", "datedeletedutc": "2016-12-24T14:12:12", "schemaid": 22, "templateid": "sample string 23", "type": 1, "attachments": [ { "Url": "sample string 1", "Type": 0 }, { "Url": "sample string 1", "Type": 0 } ], "removalword": "sample string 24", "eventinfo": { "orderinfo": { "parentuserid": 1, "schemaid": 2, "crmuserid": 3, "groupid": 4, "mailinglistid": 5, "newslettersubscription": true, "contactsapikey": "sample string 6", "Orderid": "sample string 7", "Id": "sample string 8", "ordername": "sample string 9", "externalid": "sample string 10", "externalname": "sample string 11", "firstname": "sample string 12", "lastname": "sample string 13", "email": "sample string 14", "mobile": "sample string 15", "netamount": 16.1, "tax": 17.1, "coupon": "sample string 18", "quantity": 19.1, "totalamount": 20.1, "address": "sample string 21", "city": "sample string 22", "products": [ { "id": "sample string 1", "productname": "sample string 2", "name": "sample string 2", "description": "sample string 3", "sku": "sample string 4", "type": "sample string 5", "category": "sample string 6", "brand": "sample string 7", "color": "sample string 8", "size": "sample string 9", "weight": 10.1, "quantity": 11.1, "totalamount": 12.1, "unitprice": 13.1, "shippingprice": 14.1, "discount": 15.1, "tax": 16.1, "eventdate": "2016-12-24T14:12:12", "scheduleddate": "2016-12-24T14:12:12", "pickupdate": "2016-12-24T14:12:12", "coupon": "sample string 17", "totalprice": 18.1, "image": "sample string 19" }, { "id": "sample string 1", "productname": "sample string 2", "name": "sample string 2", "description": "sample string 3", "sku": "sample string 4", "type": "sample string 5", "category": "sample string 6", "brand": "sample string 7", "color": "sample string 8", "size": "sample string 9", "weight": 10.1, "quantity": 11.1, "totalamount": 12.1, "unitprice": 13.1, "shippingprice": 14.1, "discount": 15.1, "tax": 16.1, "eventdate": "2016-12-24T14:12:12", "scheduleddate": "2016-12-24T14:12:12", "pickupdate": "2016-12-24T14:12:12", "coupon": "sample string 17", "totalprice": 18.1, "image": "sample string 19" } ], "ItemsRows": [ { "Products": [ {}, {} ] }, { "Products": [ {}, {} ] } ], "url": "sample string 23", "purchasedate": "2016-12-24T14:12:12", "lastupdate": "2016-12-24T14:12:12", "purchasetype": "sample string 24", "storeid": 25, "locationType": "Unknown", "ext1": "sample string 26", "ext2": "sample string 27", "ext3": "sample string 28", "ext4": "sample string 29", "ext5": "sample string 30", "ext6": "sample string 31", "ext7": "sample string 32", "ext8": "sample string 33", "ext9": "sample string 34", "ext10": "sample string 35", "num1": 1, "num2": 1, "num3": 1, "num4": 1, "num5": 1, "Date1": "2016-12-24T14:12:12", "Date2": "2016-12-24T14:12:12", "Date3": "2016-12-24T14:12:12" } } }, "send_type_name": "sample string 1", "status_name": "sample string 2", "status_date": "2016-12-24T14:12:12", "handled_date": "2016-12-24T14:12:12" }
application/xml, text/xml
Sample:
<ApiWhatsAppCampaignInfoCampaign xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ActiveTrail.BusinessLogic.Domain.WhatsApp.WhatsAppCampaignReport"> <campaign> <Attachments xmlns:d3p1="http://schemas.datacontract.org/2004/07/ActiveTrail.BusinessLogic.Domain.WhatsApp.Message"> <d3p1:WhatsAppAttachment> <d3p1:Type>IMAGE</d3p1:Type> <d3p1:Url>sample string 1</d3p1:Url> </d3p1:WhatsAppAttachment> <d3p1:WhatsAppAttachment> <d3p1:Type>IMAGE</d3p1:Type> <d3p1:Url>sample string 1</d3p1:Url> </d3p1:WhatsAppAttachment> </Attachments> <CanUnsubscribe>true</CanUnsubscribe> <Content>sample string 6</Content> <DateCreatedUtc>2016-12-24T14:12:12</DateCreatedUtc> <DateDeletedUtc>2016-12-24T14:12:12</DateDeletedUtc> <DateSentUtc>2016-12-24T14:12:12</DateSentUtc> <DateUpdatedUtc>2016-12-24T14:12:12</DateUpdatedUtc> <EventInfo xmlns:d3p1="http://schemas.datacontract.org/2004/07/ActiveTrail.BusinessLogic.Domain.WhatsApp.Campaign"> <d3p1:OrderInfo xmlns:d4p1="http://schemas.datacontract.org/2004/07/ActiveTrail.BusinessLogic.Domain.Commerce"> <d4p1:Date1>2016-12-24T14:12:12</d4p1:Date1> <d4p1:Date2>2016-12-24T14:12:12</d4p1:Date2> <d4p1:Date3>2016-12-24T14:12:12</d4p1:Date3> <d4p1:Id>sample string 8</d4p1:Id> <d4p1:OrderId>sample string 7</d4p1:OrderId> <d4p1:Ordername>sample string 9</d4p1:Ordername> <d4p1:address>sample string 21</d4p1:address> <d4p1:city>sample string 22</d4p1:city> <d4p1:coupon>sample string 18</d4p1:coupon> <d4p1:email>sample string 14</d4p1:email> <d4p1:ext1>sample string 26</d4p1:ext1> <d4p1:ext10>sample string 35</d4p1:ext10> <d4p1:ext2>sample string 27</d4p1:ext2> <d4p1:ext3>sample string 28</d4p1:ext3> <d4p1:ext4>sample string 29</d4p1:ext4> <d4p1:ext5>sample string 30</d4p1:ext5> <d4p1:ext6>sample string 31</d4p1:ext6> <d4p1:ext7>sample string 32</d4p1:ext7> <d4p1:ext8>sample string 33</d4p1:ext8> <d4p1:ext9>sample string 34</d4p1:ext9> <d4p1:externalid>sample string 10</d4p1:externalid> <d4p1:externalname>sample string 11</d4p1:externalname> <d4p1:firstname>sample string 12</d4p1:firstname> <d4p1:lastname>sample string 13</d4p1:lastname> <d4p1:lastupdate>2016-12-24T14:12:12</d4p1:lastupdate> <d4p1:locationType>Unknown</d4p1:locationType> <d4p1:mobile>sample string 15</d4p1:mobile> <d4p1:netamount>16.1</d4p1:netamount> <d4p1:num1>1</d4p1:num1> <d4p1:num2>1</d4p1:num2> <d4p1:num3>1</d4p1:num3> <d4p1:num4>1</d4p1:num4> <d4p1:num5>1</d4p1:num5> <d4p1:products> <d4p1:AT3OrderProduct> <d4p1:Brand>sample string 7</d4p1:Brand> <d4p1:Category>sample string 6</d4p1:Category> <d4p1:Color>sample string 8</d4p1:Color> <d4p1:Coupon>sample string 17</d4p1:Coupon> <d4p1:Description>sample string 3</d4p1:Description> <d4p1:Discount>15.1</d4p1:Discount> <d4p1:EventDate>2016-12-24T14:12:12</d4p1:EventDate> <d4p1:Id>sample string 1</d4p1:Id> <d4p1:Image>sample string 19</d4p1:Image> <d4p1:Name>sample string 2</d4p1:Name> <d4p1:PickupDate>2016-12-24T14:12:12</d4p1:PickupDate> <d4p1:Quantity>11.1</d4p1:Quantity> <d4p1:ScheduledDate>2016-12-24T14:12:12</d4p1:ScheduledDate> <d4p1:ShippingPrice>14.1</d4p1:ShippingPrice> <d4p1:Size>sample string 9</d4p1:Size> <d4p1:Sku>sample string 4</d4p1:Sku> <d4p1:Tax>16.1</d4p1:Tax> <d4p1:TotalAmount>12.1</d4p1:TotalAmount> <d4p1:TotalPrice>18.1</d4p1:TotalPrice> <d4p1:Type>sample string 5</d4p1:Type> <d4p1:UnitPrice>13.1</d4p1:UnitPrice> <d4p1:Weight>10.1</d4p1:Weight> </d4p1:AT3OrderProduct> <d4p1:AT3OrderProduct> <d4p1:Brand>sample string 7</d4p1:Brand> <d4p1:Category>sample string 6</d4p1:Category> <d4p1:Color>sample string 8</d4p1:Color> <d4p1:Coupon>sample string 17</d4p1:Coupon> <d4p1:Description>sample string 3</d4p1:Description> <d4p1:Discount>15.1</d4p1:Discount> <d4p1:EventDate>2016-12-24T14:12:12</d4p1:EventDate> <d4p1:Id>sample string 1</d4p1:Id> <d4p1:Image>sample string 19</d4p1:Image> <d4p1:Name>sample string 2</d4p1:Name> <d4p1:PickupDate>2016-12-24T14:12:12</d4p1:PickupDate> <d4p1:Quantity>11.1</d4p1:Quantity> <d4p1:ScheduledDate>2016-12-24T14:12:12</d4p1:ScheduledDate> <d4p1:ShippingPrice>14.1</d4p1:ShippingPrice> <d4p1:Size>sample string 9</d4p1:Size> <d4p1:Sku>sample string 4</d4p1:Sku> <d4p1:Tax>16.1</d4p1:Tax> <d4p1:TotalAmount>12.1</d4p1:TotalAmount> <d4p1:TotalPrice>18.1</d4p1:TotalPrice> <d4p1:Type>sample string 5</d4p1:Type> <d4p1:UnitPrice>13.1</d4p1:UnitPrice> <d4p1:Weight>10.1</d4p1:Weight> </d4p1:AT3OrderProduct> </d4p1:products> <d4p1:purchasedate>2016-12-24T14:12:12</d4p1:purchasedate> <d4p1:purchasetype>sample string 24</d4p1:purchasetype> <d4p1:quantity>19.1</d4p1:quantity> <d4p1:storeid>25</d4p1:storeid> <d4p1:tax>17.1</d4p1:tax> <d4p1:totalamount>20.1</d4p1:totalamount> <d4p1:url>sample string 23</d4p1:url> </d3p1:OrderInfo> </EventInfo> <FromName>sample string 3</FromName> <FromNumber>sample string 4</FromNumber> <GroupIds xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:long>1</d3p1:long> <d3p1:long>2</d3p1:long> </GroupIds> <Id>31203993-a781-4163-95dd-ae3bfa386fc4</Id> <IsDeleted>true</IsDeleted> <IsDistinctSending>true</IsDistinctSending> <IsLinkTracking>true</IsLinkTracking> <Links xmlns:d3p1="http://schemas.datacontract.org/2004/07/ActiveTrail.BusinessLogic.Domain.WhatsApp.Campaign"> <d3p1:WhatsAppCampaignLink> <d3p1:DateCreatedUtc>2016-12-24T14:12:12</d3p1:DateCreatedUtc> <d3p1:Id>1306962d-c574-476a-9d82-6609031523a3</d3p1:Id> <d3p1:Position>2</d3p1:Position> <d3p1:Url>sample string 3</d3p1:Url> </d3p1:WhatsAppCampaignLink> <d3p1:WhatsAppCampaignLink> <d3p1:DateCreatedUtc>2016-12-24T14:12:12</d3p1:DateCreatedUtc> <d3p1:Id>1306962d-c574-476a-9d82-6609031523a3</d3p1:Id> <d3p1:Position>2</d3p1:Position> <d3p1:Url>sample string 3</d3p1:Url> </d3p1:WhatsAppCampaignLink> </Links> <MobileNumbers xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:KeyValueOfstringlong> <d3p1:Key>sample string 1</d3p1:Key> <d3p1:Value>2</d3p1:Value> </d3p1:KeyValueOfstringlong> <d3p1:KeyValueOfstringlong> <d3p1:Key>sample string 3</d3p1:Key> <d3p1:Value>4</d3p1:Value> </d3p1:KeyValueOfstringlong> </MobileNumbers> <Name>sample string 5</Name> <ParentUserId>2</ParentUserId> <RemovalWord>sample string 24</RemovalWord> <RestricatedCampaignIds xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:guid>6f4a09ad-440f-467a-b819-019554340a9e</d3p1:guid> <d3p1:guid>8c6936f9-8419-4d31-91b9-56014e157c3f</d3p1:guid> </RestricatedCampaignIds> <RestricatedGroupIds xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d3p1:long>1</d3p1:long> <d3p1:long>2</d3p1:long> </RestricatedGroupIds> <ScheduledDateUtc>2016-12-24T14:12:12</ScheduledDateUtc> <ScheduledTimeZoneId>1</ScheduledTimeZoneId> <SchemaId>22</SchemaId> <SendType>Regular</SendType> <SendingProfileId>16</SendingProfileId> <StatusType>None</StatusType> <TemplateId>sample string 23</TemplateId> <TotalClicks>17</TotalClicks> <TotalCredits>15</TotalCredits> <TotalFailed>11</TotalFailed> <TotalOpens>10</TotalOpens> <TotalSent>8</TotalSent> <TotalSucceeded>9</TotalSucceeded> <TotalUniqueClicks>18</TotalUniqueClicks> <TotalUnsubscribed>13</TotalUnsubscribed> <Type>Template</Type> <UnsubscribeText>sample string 14</UnsubscribeText> <WizardCurrentStep>64</WizardCurrentStep> <WizardMaxStep>64</WizardMaxStep> </campaign> <handled_date>2016-12-24T14:12:12</handled_date> <send_type_name>sample string 1</send_type_name> <status_date>2016-12-24T14:12:12</status_date> <status_name>sample string 2</status_name> </ApiWhatsAppCampaignInfoCampaign>