Issuing Discount Cards to Customers with SMS Confirmation

Method Description

Invoked with a POST request. Operation name is 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}


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

<operation>
  <customer>
    <mobilePhone>{customer mobile phone}</mobilePhone>
  </customer>
  <discountCard>
    <ids>
      <number>{card number}</number>
    </ids>
  </discountCard>
  <authentificationCode>{confirmation code}</authentificationCode>
</operation>

Sample Operation

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

Accept: application/xml
Content-Type: application/xml
Authorization: SecretKey 2a4wVO


<operation>
  <customer>
    <mobilePhone>71234567890</mobilePhone>
  </customer>
  <discountCard>
    <ids>
      <number>231534554262</number>
    </ids>
  </discountCard>
  <authentificationCode>1234</authentificationCode>
</operation>

Response

<result>
  <status>Success</status>
  <customer>
  	<processingStatus>{Found/NotFound}</processingStatus>
  </customer>
  <discountCard>
  	<processingStatus>{card processing status}</processingStatus>
  </discountCard>
</result>

Card Processing Status

DescriptionOperation Status
Card successfully boundBound
Already bound to current customerAlreadyBoundToCurrentCustomer
Already bound to another customerAlreadyBoundToAnotherCustomer
Card number not foundNotFound
If customer can't be foundNotProcessed