Promocodes Bulk Import
Method Description
Invoked with a POST request. Request address is set up via Maestra framework.
POST https://api.maestra.io/v3/operations/bulk?endpointId={API endpoint ID}&operation=DirectCrm.PromoCodes.Import&csvCodePage=65001
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 character in CSV file.
- csvTextQualifier: Optional start/end character in column value, masking otherwise invalid characters.
- Authorization key: The value is obtained via Maestra.
- The service allows up to 60 imports per hour. If the limit is exceeded, you’ll receive 429 Too Many Requests until the ratio of tasks queued/hour drops below 60.
Field Descriptions
| Title | Description |
|---|---|
| Code | Promo code value |
| CodeType | Promo code type For example, a promo code for 'Happy Birthday' trigger |
| active-from | Can be added to email messages from specific time |
| expired-at | Can be added to email messages until specific time |
Sample Request
POST https://api.maestra.io/v3/operations/bulk?endpointId=Maestra&operation=DirectCrm.PromoCodes.Import&csvCodePage=65001
Authorization: SecretKey VRY294
Accept: application/xml
Content-Type: text/csv
Code;expired-at;active-from;CodeType
e55be6785;2016-08-08 17:34:00;2016-12-31 23:59:00;BirthPromoUpdated about 1 year ago

