Additional API Calls
This section highlights some of the additional API calls that can be made with GraphQL to perform things like reader health/status checks, or querying a list of readers or transaction history, etc...
Ping Reader
It is possible to ping a specific reader in order to extract certain information from it, such as whether the reader is offline or online, or what firmware version is running on the reader. To perform this function you would need to ping the reader using the API call shown below:
query PingInStoreReader($readerId: ID!) {
pingInStoreReader(readerId: $readerId) {
id
name
status
pairedAt
lastSeenAt
offlineSince
softwareVersion
location {
id
name
internalName
address {
streetAddress
extendedAddress
locality
region
postalCode
countryCode
}
}
}
}Offline Ping
This API mutation can be used if you would like to validate that you can ping a reader while offline without actually sending a charge request. The result is a simple response that will indicate you can ping the reader using the offline endpoint, example below:
https://readerIPaddress:3030/graphql
Query a list of Locations
You may want to query a list of locations to retrieve things like locationId or location address info or other info linked to a location. See below example of how you may do this:
Query a list of Readers
It is possible to query a list of readers that are associated with a specific location or specific merchant account. To do this you can use a query as shown below in the example:
If you want to query a list of readers that are paired to a specific locationId you may also pass in filters as variables in your request using the below example which uses the "is" filter based on the locationId:
Query a list of Transactions
If you would like to automate/streamline your reconciliation process, one way of doing so is by utilizing a transaction query. There are a few ways of querying transactions, try modifying the variables in your request to alter the results of your search:
Last updated
Was this helpful?