Bulk Import of Discount Cards Status

Method Description

Invoked with a POST request. Request address and parameters are set up via Maestra framework.

POST https://api.maestra.io/v3/operations/bulk?endpointId={API endpoint ID}&operation=DirectCrm.Customers.ImportCards&csvCodePage=65001&newCardCreationAllowed=true
HTTP/1.1

Authorization: SecretKey {Secret Key}
Accept: application/xml
Content-Type: text/csv
  • csvCodePage: Windows codepage ID for CSV file. 65001 (UTF-8) is preferred.
  • csvColumnDelimiter: Column delimiter symbol in CSV file.
  • csvTextQualifier: Optional start/end character in column value, masking otherwise invalid characters.
  • Authorization key: The value is obtained via Maestra.
  • newCardCreationAllowed: Is card creation allowed during import jobs. By default, new cards can’t be created.
  • The service allows up to 60 imports per hour. When this limit is exceeded, you’ll receive 429 Too Many Requests until the ratio of tasks queued/hour drops below 60.

Field Descriptions

TitleDescription
CardNumberCard Number
StatusCurrent card status
Inactive — not activated
Activated — activated
* Blocked — blocked
StatusChangeDateTimeUtcDiscount card status update date in UTC as "yyyy-MM-dd hh:mm:ss"
CardTypeCard type, applicable to new cards only. Ignored for existing cards.
ExternalIdentityCustomer ID
PointOfContactPoint of contact where the card was issued/blocked, for example "Site" or "Tverskaya Store"

Sample Request

POST https://api.maestra.io/v3/operations/bulk?endpointId=Maestra&operation=DirectCrm.Customers.ImportCards&csvCodePage=65001&newCardCreationAllowed=true

Authorization: SecretKey mDdO
Accept: application/xml
Content-Type: text/csv

CardNumber;Status;StatusChangeDateTimeUtc;PointOfContact
4359487117524;Activated;2014-9-17 12:35:21.31;MagazinVMoskve