API for Cards import

COURSE DESCRIPTION

This course describes the way how the API for Cards Import can be used. The API is an alternative to simple excel file import and big External Card Issuers, such as universities, can profit from it.

You will learn basic specification of the API for Cards Import

You will learn which users can access the API

You will se an example request

 

 


 

SPECIFICATION OF THE API FOR CARDS IMPORT

 

For importing cards it’s possible to utilize the web service „saveCard“ which is based on the standard SOAP protocol that secures transfer of messages between the client and NCDB in XML format. Successful processing of requests to the saveCard service requires the client to be authenticated. The authentication is carried out by a simple HTTP Basic mechanism on HTTP protocol level. For entering or updating large number of cards the process should be automated by connecting an appropriate data source from an external database. A script is used for this purpose to insert individual records gradually, always waiting for the server response to ensure the entering or update of data was successful.

 

USAGE OF THE API

 

API for Cards import was developed for Card Issuers that issue cards in „External issuing“ mode. Using this mode, Card Issuers issue cards completely on their own (including taking care of used and available licenses from their assigned serial ranges) and into NCDB, they only report which cards have been issued. In NCDB GUI, this can be done using „Import cards“ button, where is the possibility to import an excel file. Basically, the API for Cards import is a quicker alternative to excel file import and it of course can be implemented into any external information system, through which the issued cards are reported.

 

WHO CAN ACCESS THE API FOR CARDS IMPORT?

 

Creating Card Issuer The API can be accessed by any user of an External Card Issuer. Let’s create new External Issuer within NCDB.

 

 

Creating new User Add new user for this Card Issuer.

 

Checking serial numbers To be possible to use the API for Cards Import for the specified Card Issuer, you need to make sure this Card Issuer has assigned some serial numbers of „External Issuing“ type. Within the API request, External Card Issuer reports which serial numbers from this pool have been used for issued cards.

 

 

EXAMPLE REQUEST

 

For following example, the open source client SoapUI was used. However, for your testing, you can use any other SOAP API client. REQUEST For sending the request, you have to access the endpoint https://ncdb.test.aliveplatform.com/soap/1.0/cardService (for testing environment). For the authorization, we are going to use the test user that was created in previous steps of this tutorial.

Voluntarily, you can also send photo of Card Holder through the API. The photos should be sent as base64Binary type. RESPONSE Within the request, the serial number of the card is defined. If card with this serial number doesn’t exist within NCDB, it is created through the request. In this case, the response of the API is:

<ns2:status>CREATED</ns2:status> <ns2:cardId>77228</ns2:cardId>

 

In case the card already exists in NCDB and through the request, you only updated its data, the response would be:

<ns2:status>UPDATED</ns2:status> <ns2:cardId>77228</ns2:cardId>

 

When the card is created, it is displayed in NCDB among other cards.

Full documentation of this API (latest version) can be downloaded here.