Introduction

If you’d like to use BioStar 2 New Local API as a RESTful API for your own customization or other purposes, you can simply reference this article. This article will guide you to register Suprema QR to your users in BioStar 2 via New Local API.

 

Basics & Procedures

For information About How to Issue BioStar 2 QR, please refer to the article below:

[BioStar 2] How to Use Suprema Mobile Access

 

BioStar 2 QR/Barcode is available to use as BioStar 2 User Credential from BioStar 2.8.11.

 

In order to use QR/Barcode, you must set ‘Email Setting’ in BioStar 2 and enable [QR] option.

  • BioStar 2 -> Settings -> Email Setting -> Email Content Setting

 

텍스트이(가) 표시된 사진

자동 생성된 설명

  • Enable [QR] option

 

텍스트이(가) 표시된 사진

자동 생성된 설명

There are 3 steps required to register Mobile Access to your Users:

  1. Check if the QR already exists by the Card ID(QR Number) you’d like to use
  2. Create a QR with the Card ID(QR Number) you’d like to use
  3. Register QR to a User

 

API Call & Parameters 

 

- Step 1. Check if the QR already exists by the Card ID you’d like to use

 

[GET]:  /api/v2/cards/registered/?card_id={cardID}

[Parameters] 

Name

Type

*M/O

Explanation

Value

 

 

 

 

 

   * M – Mandatory, O – Optional

 

[Response Body]: If the Card ID is not registered

{

       "Response": {

           "code": "0"

    }

}

 

[Response Body]: If the Card ID is already used(registered) 

{

       "Card": {

           "id": 19,

           "crdTypUid": 6,

           "crdCsn": "444444444"

    },

       "Response": {

           "code": "0"

    }

}

 

 

- Step 2. Create a QR with the Card ID you’d like to use

 

[POST]: /api/cards

[Parameters] 

Name

Type

*M/O

Explanation

Value

Card_type.id

String

M

desc: Card Type ID(0:CSN, 1:WIEGAND, 2:SECURE, 3:ACCESS, 4:CSN_MOBILE, 5:WIEGAND_MOBILE, 6:QR/Barcode, 7:BioStar 2 QR)

 

Card_type.name

String

M

Card Type Name

“SCQr”

Card_type.type

String

M

desc: Card Type(1:CSN, 2:SECURE, 3:ACCESS, 10:CSN_WIEGAND, 4:CSN_MOBILE, 5:WIEGAND_MOBILE, 6:QR/Barcode, 7:BioStar 2 QR)

 

Card_type.mode

String

M

 

“Q”

Display_card_id

String

O

Card Display ID

 

Card_id

String

M

Card ID

 

User_id.user_id

String

M

User ID

 

   * M – Mandatory, O – Optional

[Request Body]

{

     "CardCollection": {

       "rows": [

         {

           "card_type": {

             "id": "7",

             "name": "SCQr",

             "type": "7",

             "mode": "Q"

           },

           "display_card_id": "3333333333",

           "card_id": "3333333333",

           "user_id": {

             "user_id": "1"

           }

         }

    ]

  }

}

 

[Response Body]

{

       "CardCollection": {

           "total": "1",

           "rows": [

               {

                "id": "4",

                "card_id": "61489146906216257376629034005",

                "display_card_id": "3333333333",

                "card_type": {

                    "id": "7",

                    "name": "SCQr",

                    "type": "7"

                }

               }

           ]

    },

       "Response": {

           "code": "0",

           "link": "https://support.supremainc.com/en/support/home",

           "message": "Success"

    }

}

 

 

- Step 3. Register QR to your User

 

[POST]: /api/users/{user_id}

[Parameters] : Basic [POST] /api/User/{User_Id}

   * M – Mandatory, O – Optional

[Request Body]

{

     "User": {

       "cards": [

         {

           "id": "1",

           "card_id": "11111111",

           "display_card_id": "11111111",

           "status": "1",

           "is_blocked": "false",

           "is_assigned": "true",

           "card_type": {

             "id": "0",

             "name": "CSN",

             "type": "1"

           },

           "mobile_card": "false",

           "issue_count": "1",

           "card_slot": "0",

           "card_mask": "0",

           "wiegand_format_id": {

             "id": "0"

           }

         },

         {

           "id": "3",

        "card_id": "61489146906216257372334066075",

        "display_card_id": "3333333333",

        "card_type": {

          "id": "7",

          "name": "SCQr",

          "type": "7"

           }

         }

    ]

  }

}

 

[Response Body]

{

       "Response": {

           "code": "0",

           "link": "https://support.supremainc.com/en/support/home",

           "message": "Success"

    }

}