Skip to content

Interacting with CampCard dispensers

A CampCard dispenser represents a device which can issue new cards to customers as well as collect cards, for example on departure or if an update is required. A dispenser is typically used by applications for check-in terminals.

Querying CampCard dispensers

Use the campCardDispensers connection to get all dispensers:

query campCardReaders {
campCardDispensers {
edges {
node {
id
label
latestReport {
id cardId cardPresence cardData {
credits language privileges validityEnd validityStart
}
}
}
}
}
}

You can provide the filters parameter to filter the dispensers by campsite or request a specific device using the external ID.

The latestReport property provides the latest data reported by the device, such as the card presence and other status information. You can use Webhooks or GraphQL Subscriptions to get notified about when this changes.

Note: This type of device is normally dedicated to a specific location or use case. It can be assumed, that the unique external ID does not change, even if a physical device needs to be replaced at some point. The IDs related to the location and intended use case of the devices can be provided by Cynox upon request. For convenience, API users could provide means to allow configuration by manually assigning devices from a list of available device instead.

Controlling the dispenser

The dispenser offers the following mutations to create commands:

  • campCardDispenserSetConfig: Configure the dispenser’s behavior. This can be used, for example, to enable automatic card acceptance when the guest is asked to insert a card.
  • campCardDispenserRequestStatus: Instruct the dispenser to report its current status. The dispenser will usually report any changes automatically without having to use this command.
  • campCardDispenserMoveCard: Instruct the dispenser to move the card (if present) as follows:
    • CAPTURE: Move the card to the return pile permanently.
    • PRESENT: Present the card to the user, moving it to the “mouthpiece”.
    • HOLD: Move the card to the reader position inside the dispenser (see 1).
  • campCardDispenserFormatCard: Format the card (if present in HOLD position), i.e. completely erase it.
  • campCardDispenserWriteCard: Write new data to the card currently at the reader
  • campCardDispenserNewCard: Take a new card from the stack, write data to it and then present it to the user.

Footnotes

  1. While a card is located in the HOLD position, the dispenser utilizes an internal timeout, after which the card will be returned to the user (the PRESENT position) automatically. This prevents the card from getting stuck in case of communication issues, or if the application discontinues the interaction with the dispenser for some other reason.
    To hold the card in position, the timeout can be reset by issuing the campCardDispenserMoveCard command with the HOLD option.
    A typical use case would be to wait for user interaction like payment, after a card has been inserted.