xml

Method Description

Invoked with a POST request. Email-triggering event is chosen by the client. Operation name and input fields can be set up via Maestra framework. Details of method invocation can be found here.

POST https://api.maestra.io/v3/operations/{synch/asynch operation}?endpointId={unique ID of site/mobile app/etc.}&operation={operation name}&deviceUUID={unique device ID}&{transactiondId}={your transaction ID}

Accept: application/xml
Content-Type: application/xml
Authorization: SecretKey {Secret Key, check with the manager it it’s mandatory}

<operation>
  <customer>
    <ids>
      <webSiteUserId>{customer ID}</webSiteUserId>
    </ids>
    <email>{customer email}</email>
    <mobilePhone>{customer mobile}</mobilePhone>
  </customer>
	  <{emailMailing/smsMailing/viberMailing}>
      <customParameters>
        <{parameterName}>{parameter value}</{parameterName}>
      </customParameters>
    </emailMailing/smsMailing/viberMailing}>
  </emailMailing>
</operation>

transactiondId: Unique transaction ID in your systems. You can use it to check emailing status: delivered, opened, etc. If a transaction with the same ID is registered at Maestra, the emailing won’t be repeated, and the response will carry the TransactionAlreadyProcessed status. If you retry the operation upon an error, sending the transactiondId is mandatory. Otherwise, emailing can be sent to a customer multiple times.

If you maintain several separate systems that use different transaction ID mechanisms, make sure to create separate IDs at Maestra as well. For example: offlineTransactiondId and onlineTransactiondId. IDs can be retrieved via Maestra framework.

Sample Operations

POST https://api.maestra.io/v3/operations/async?endpointId=Maestra&operation=sendWelcome

Accept: application/xml
Content-Type: application/xml

<operation>
  <customer>
    <email>[email protected]</email>
  </customer>
</operation>
POST https://api.maestra.io/v3/operations/async?endpointId=Maestra&operation=sendRestore&transactiondId=1

Accept: application/xml
Content-Type: application/xml

<operation>
  <customer>
    <email>[email protected]</email>
  </customer>
  <emailMailing>
    <customParameters>
      <restore_link>
        http://maestra.io/lk/restore?hash=7DCEE600A554B6CD373DC4ABABFBC3BF5B79154E
      </restore_link>
      <date>2023-09-25</date>
    </customParameters>
  </emailMailing>
</operation>
POST https://api.maestra.io/v3/operations/async?endpointId=Maestra&operation=sendBuy&transactionId=2

Accept: application/xml
Content-Type: application/xml

<operation>
  <customer>
    <email>[email protected]</email>
  </customer>
  <emailMailing>
    <customParameters>
      <ProductsBlock>
        ![CDATA[
          <table>
   <tr>
      <td width="30%"> <img width="150px" src="http://images.directcrm.ru/campaigns/86709/170354img/mixit.png"></td>
      <td style="padding: 10px 0px 20px 0" width="70%"><strong>Client:</strong>Online Natural Beauty Lab
         <br><br><strong>Result:</strong> Net income growth: <b>3 times</b><br><br>
         <a style="color:green" href="http://maestra.io/case-mixit/">Read our case study</a>
      </td>
   </tr>
   <tr>
      <td width="30%"> <img width="150px" src="http://images.directcrm.ru/campaigns/86709/170354img/sm.png"></td>
      <td style="padding: 10px 0px 10px 0" width="70%"><strong>Client:</strong>Outdoor Gear Store
         <br><br><strong>Result:</strong> Email-based income to total income ratio grew by almost 3 times<br><br>
         <a style="color:green" href="http://maestra.io/sport-marafon-case/">Read our case study</a>
      </td>
   </tr>
   <tr>
      <td width="30%"> <img width="150px" src="http://images.directcrm.ru/campaigns/86709/170354img/zzz.png"></td>
      <td style="padding: 10px 0px 10px 0" width="70%"><strong>Client:</strong>Food/Household Goods Delivery Service
         <br><br><strong>Result:</strong> Email income grew from 0% to 30%<br><br>
         <a style="color:green" href="http://maestra.io/case-zzz24/">Read our case study</a>
      </td>
   </tr>
   <tr>
      <td width="30%"> <img width="150px" src="http://images.directcrm.ru/campaigns/86709/170354img/lm.png"></td>
      <td style="padding: 10px 0px 10px 0" width="70%"><strong>Client:</strong> Household Goods Store
         <br><br><strong>Result:</strong> Email marketing automated, email-based income increased by 6%<br><br>
         <a style="color:green" href="http://maestra.io/legkomarket-case/">Read our case study</a>
      </td>
   </tr>
   <tr>
      <td width="50%"> <img width="150px" src="http://images.directcrm.ru/campaigns/86709/170354img/logo.png"></td>
      <td width="50%"><strong>Client:</strong> Brewing Company
         <br><br><strong>Result:</strong> Increased promotion conversion by 16 times<br><br>
         <a style="color:green" href="http://maestra.io/baltika/">Read our case study</a>
      </td>
   </tr>
</table>
          ]]>
      </ProductsBlock>
    </customParameters>
  </emailMailing>
</operation>
POST https://api.maestra.io/v3/operations/async?endpointId=Maestra&operation=SendSms&transactiondId=3

Accept: application/xml
Content-Type: application/xml

<operation>
  <customer>
    <mobilePhone>79001234567</mobilePhone>
  </customer>
  <smsMailing>
    <customParameters>
      <PromoEndDate>2023-09-25</PromoEndDate>
    </customParameters>
  </smsMailing>
</operation>
POST https://api.maestra.io/v3/operations/async?endpointId=Maestra&operation=SendViberMessage&transactiondId=4

Accept: application/xml
Content-Type: application/xml

<operation>
  <customer>
    <mobilePhone>5552368</mobilePhone>
  </customer>
  <viberMailing>
    <customParameters>
      <PromoEndDate>2023-09-25</PromoEndDate>
    </customParameters>
  </viberMailing>
</operation>