_linkedin_partner_id = "503794"; window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || []; window._linkedin_data_partner_ids.push(_linkedin_partner_id);

Create Card API V2

Create Card API V2 Introduction

This API will generate a new card for a given card template. When you call this API, you have to call it with a unique “card-id” field and it will generate a new card data record. The “card-id” must be unique per Card Template.  If you try to call this API again with the same “card-id” field, it will return an error message and fail to generate a new card record. There is an optional parameter ‘upsert-record’, if it passed as true and the card already exists then it will update the existing record. To call this API again successfully without ‘upsert-record’, you will need to use a different “card-id’. If you want to retrieve the data from this “card-id”, use the API – Get Card Data. If you want to update the data in this “card-id” use the API – Update Card Data.

Request Format

POST /api/v2/ HTTP/1.1
Host: secure.id123.io
X-API-KEY: API_KEY
Content-Type: application/json
Content-Length: 993

{  
   "action": "create-card",
   "upsert-record":"true/false", // optional
   "card-template-id": "CARD_TEMPLATE_ID", 
   "card-id": "CARD_ID",
   "unique-identifier": "UNIQUE IDENTIFIER",
   "security-question-1": "SECURITY QUESTION 1",
   "security-question-2": "SECURITY QUESTION 2",
   "card-expiration": "yyyy-mm-ddThh:mm:ss+00:00 (UTC)",
   "recipient-email": "RECIPIENT EMAIL",
   "card-data": {
    "barcode": [
      {
        "key": "barcode",
        "value": "VALUE"
      }
    ],
    "image": [
      {
        "key": "id-photo",
        "value": "PHOTO_URL"
      }
    ],
    "name-fields": [
      {
        "key": "name",
        "value": "NAME"
      }
    ],
    "front-fields": [// 3 front fields
      {
        "key": "front-1",
        "value": "VALUE"
      },
      {
        "key": "front-2", 
        "value": "VALUE"
      }
    ],
    "secondary-fields": [// 4 secondary fields
      {
        "key": "secondary-1",
        "value": "VALUE"
      },
      {
        "key": "secondary-2",
        "value": "VALUE"
      }
    ],
    "back-fields": [ // 4 back fields
      {
        "key": "back-1",
        "value": "VALUE"
      },
      {
        "key": "back-2",
        "value": "VALUE"
      }
    ]
  }

Success Response

{  
   "status": "success",
   "code": "SUCCESS CODE",
   "message": "SUCCESS MESSAGE",
   "card-id": "CARD_ID",
   "card-template-id": "CARD_TEMPLATE_ID"
}

Failure Response

{
    "status": "failure",
    "code": "ERROR CODE",
    "message": "ERROR MESSAGE",
    "card-id": CARD_ID,
    "card-template-id": "CARD_TEMPLATE_ID"
}

.

.

.

Go to Top