One can create a loyalty cards together with a payment (Smart Transaction), what is especially useful to already collect bonus with that very purchase. Or one can create the card alone.
The API endpoint to create a card alone is POST /api/v2/Loyalty/MerchantCards/{merchant-id}/CreateMerchantcards/{card-group-id}:
POST /api/v2/Loyalty/MerchantCards/MRC_GQBZSHFLXSOLI4A4OVP7Z22RELXSJY/CreateMerchantcards/CRG_IT1FQXHQ88O0YWZCZYPVE2N4FWP32CHost: connect-testing.secuconnect.comAuthenticate: Bearer qb56tjj1bcvo9n2nj4u38k84loContent-Type: application/jsonAccept: application/json{ "cards_amount": 1, "customer": { "merchant_contact": { "salutation": null, "title": "Herr", "forename": "Max", "surname": "Mustermann", "companyname": "Musterfirma GmbH", "address": { "street": "Musterstr.", "street_number": "1a", "postal_code": "09999", "city": "Musterstadt" }, "email": "max@example.com", "phone": "0555/5555555-1", "mobile": "0155/5555555", "fax": "0555/5555555-55" }, "customernumber": "123", "note": "", "consent_for_communication": "accepted", "additional_data": { // ... } }}This are the URL path parameters:
Parameter | Meaning |
|---|---|
| Merchant ID (MRC_xxx) |
| Card Group ID (CRG_xxx) |
You receive both these IDs from our help desk.
The request parameters are:
Parameter | Type | Meaning |
|---|---|---|
|
| Number of cards to create |
|
| Customer details (s. details below) |
The customer details are:
Parameter | Type | Meaning |
|---|---|---|
|
| Contact details of the your card holder (s. details below) |
|
| Your customer ID |
|
| Optional note |
|
| Whether the customer has given consent for communication:
Consent is needed for secuaction in order to send SMS or email. |
|
| Project specific data. |
The merchant_contact details are:
Parameter | Type | Meaning |
|---|---|---|
|
| Salution |
|
| Academic degree or name title |
|
| First name |
|
| Last name |
|
| Company name |
|
| Postal address (s. details below) |
|
| Email address |
|
| Landline phone number |
|
| Mobile phone number |
|
| Fax number |
The address details inside merchant_contact are:
Parameter | Type | Meaning |
|---|---|---|
|
| Street, or street and house number. |
|
| Optional; separate house number. |
|
| ZIP code |
|
| City |
|
| Optional; ISO 3166 two letter country code |
If everything is fine, the API responds with 200 OK, and the created Merchant Card object:
HTTP/1.1 200 OKContent-Type: application/json... { "object": "loyalty.merchantcards", "id": "MCD_3W4U7T804H2Q2648UVKZRMS9704ZO5", "merchant": { "object": "general.merchants", "id": "MRC_WZV7ETCK8VDT2R0MJQX2VZHGNB0ZP9" }, "created_for_merchant": { "object": "general.merchants", "id": "MRC_WZV7ETCK8VDT2R0MJQX2VZHGNB0ZP9" }, "card": { "object": "loyalty.cards", "id": "CRD_7TQ6YBBRGGFPPK7Z54TZMU88H2T2OW", "cardnumber": "9276004423077556", "created": "2022-04-27T09:47:31+02:00" }, "cardgroup": { "object": "loyalty.cardgroups", "id": "CRG_W88XMU3DAH7XW463JY7ACQ85RJKASM", "display_name": "vorläufige Karte Werdenfelser Radlstub´n", "display_name_raw": "vorläufige Karte Werdenfelser Radlstub´n", "stock_warn_limit": 0, "picture": "https://connect.secucard.com/ds_g/8e79737df1e2513db48908b342c3cc436edf501a" }, "created_for_store": { "object": "general.stores", "id": "STO_RSNTSEYKWMU78EFE3Q6MGGSNNB0ZPG" }, "is_base_card": true, "points": 0, "cash_balance": 0, "bonus_balance": 0, "balance": 0, "last_usage": null, "last_charge": null, "stock_status": "stored", "lock_status": "unlocked", "passcode": 1, "expiry_date": null }...