Updating Discount Card Status in Personal Profile

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=ChangeStatus

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


<operation>
  <customer>
 		<ids>
			<webSiteId>412434</webSiteId>
    </ids>
  </customer>
  <discountCard>
    <ids>
      <number>231534554262</number>
    </ids>
  </discountCard>
</operation>

Response

<result>
  <status>Success</status>
  <discountCard>
    <processingStatus>{operation status}</processingStatus>
    <ids>
			<number>{card number}</number>
    </ids>
    <status>
      <ids>
        <systemName>{internal card status name}</systemName>
      </ids>
    </status>
    <type>
      <ids>
        <externalId>{external card type ID}</externalId>
      </ids>
      <name>{card type name}</name>
    </type>
    <customFields>
      <custom field>{custom field value}</custom field>
    </customFields>
  </discountCard>
</result>
</result>

Operation Status

DescriptionOperation Status
Status updatedChanged
Card already has this status setNotChanged
Card not bound to customer. Status can't be updatedNotBoundToCustomer
Card bound to another customer. Current customer can’t update its status.BoundToAnotherCustomer
Card number not foundNotFound