If you want to create new card via BioStar 2 API, you should use one of API in the below list.
Example 1 - Create New CSN Card
[POST] /cards/csn_card
“card_id” means the card number displayed on the screen of BioStar 2.
Example 2 - Create New Wiegand Card
[POST] /cards/wiegand_card
“card_id” means the card number displayed on the screen of BioStar 2.
“wiegand_format_id” means the unique id for wiegand format. You can check the wiegand format options by calling [GET] /cards/wiegand_cards/formats API.
Step 2: Assign the card to certain user
To assign the card to certain user you should call below API.
“card_id” means the card number displayed on the screen of BioStar 2.
“id” means the unique number allocated when the card is stored in BioStar 2 DB. It is not displayed on the screen so that you can check it by calling [GET] /cards/unassigned API.