Transmit: exchange an APDU with the card

Role

This method gives access to the SCardTransmit function.

The reader must be connected befoire using this command.

The timer associated to the reader will be reseted each time this command will be called.

Request

URL : /pcsc/reader/{$id}/transmit

Method : POST

URL Params : {$id} : the ReaderId of the device. Use GET /pcsc/readers to enumerate the available readers.

Content : see below

Request content

Field name Type Status Description
Token string mandatory Token provided by the Connect method
Command string mandatory The command (or C-APDU) to send to the card (hexadecimal string)

Example

{
	"Token": "0AAZZevyX99hu1Py0Suib6",
	"Command": "FFCA000000"
}

Success Response

Code : 200 OK

Content : see below

Response content

Field name Type Status Description
Result string always success if the PC/SC subsystem has returned SCARD_S_SUCCESS
Response string always The response (or R-APDU) that has been received from the card (hexadecimal string)

Example

{
	"Result": "success",
	"Response": "047C7B02C840809000"
}

Error Response

See Error Responses. An ERROR object is returned in case of a PC/SC-specific error, with the Error field present and populated.

Example

When the card has been removed

{
	"Result": "error",
	"Error": "SCARD_W_REMOVED_CARD",
	"Message": "The smart card has been removed, so further communication is not possible."
}