Issuing Discount Cards to Customers
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>
<ids>
<webSiteId>{website customer ID}</webSiteId>
</ids>
</customer>
<discountCard>
<ids>
<number>{card number}</number>
</ids>
</discountCard>
</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>
<ids>
<webSiteId>52367</webSiteId>
</ids>
</customer>
<discountCard>
<ids>
<number>231534554262</number>
</ids>
</discountCard>
</operation>
Response
<result>
<status>Success</status>
<customer>
<processingStatus>{Found/NotFound}</processingStatus>
</customer>
<discountCard>
<processingStatus>{card processing status}</processingStatus>
</discountCard>
</result>
Card Processing Status
Description | Operation Status |
---|---|
Card successfully bound | Bound |
Already bound to current customer | AlreadyBoundToCurrentCustomer |
Already bound to another customer | AlreadyBoundToAnotherCustomer |
Card number not found | NotFound |
If customer can't be found | NotProcessed |
Updated about 2 months ago