Scanning Encoded Cards
Learn how to scan an encoded card to retrieve useful information about the card.
Last updated
Was this helpful?
Learn how to scan an encoded card to retrieve useful information about the card.
Last updated
Was this helpful?
You can use an encoder to scan a plastic key card to read its encoded parameters. The scan result includes the card's properties, such as its card number, serial number, and other useful details. The returned payload can also reveal whether the card is up to date with the server. If discrepancies are detected, Seam also provides warnings to indicate that the card is out of date and needs re-encoding.
The scanning process consists of the following basic steps:
Initiate the scanning process.
Use the /acs/encoders/scan_credential
endpoint. Specify the acs_encoder_id
of the encoder that you want to use to scan the card.
This request returns an action attempt that tracks the status of the scan.
See .
Poll the returned action attempt, until its status
becomes success
.
See .
View the scanned card payload.
Once the status
of the action attempt is success
, view the card payload within the action attempt. Note any action_attempt.result.warnings
. Warning messages show which properties are out of sync.
See . Also, see a list of .
To scan a card, first, identify the acs_encoder_id
of the encoder that you want to use to scan the card. Then, initiate the scan using the /acs/encoders/scan_credential
endpoint.
Code:
Output:
Code:
Output:
Once the action attempt's status
is success
, view the action attempt payload to view information about the scanned card. Pay special attention to the following parts of the returned payload:
action_attempt.result.warnings
list any properties that Seam has detected are out-of-sync between the card and the encoder.
action_attempt.result.acs_credential_on_seam
lists the properties of the credential as stored on the ACS server.
action_attempt.result.acs_credential_on_encoder
lists the properties of the credential as stored on the card.
no_card_on_encoder
No card was placed on the encoder.
uncategorized_error
Any other encoding error.
When you make an /acs/encoders/scan_credential
request, Seam returns an . To identify when the scan has completed and to confirm that the scan was successful, poll this action attempt, until its status
becomes success
.