Get credit usage

GEThttps://api.checkslip.com/api/usage

API key

Returns how many lookups were made, how many took a credit and how many did not, with a count per reason such as free_not_found or free_too_old, per day or per month in Thailand time (interval=DAY or MONTH). A day or month with no lookups is returned as zero, not skipped. One request covers at most 92 days or 24 months. A lookup counts on the day its credit was settled (settled_at), not the day it was sent. The two are usually seconds apart, so a lookup near midnight can land on the next day. The counts trail real time by about 1 minute (see as_of); for each lookup as it happens, use the lookup history (it needs slip:read). Reading usage uses no credit. Needs an API key with usage:read.

Parameters

FieldInTypeRequired
X-Request-Idheaderstringno
intervalqueryDAY | MONTHno
fromquerystring (date)yes
toquerystring (date)yes

Responses

200 application/json

FieldTypeRequired
intervalDAY | MONTHyes
as_ofstring (date-time)yes
fromstring (date)yes
tostring (date)yes
timezonestring = Asia/Bangkokyes
bucketsobject[]yes
totalsUsageCountsyes
totals.checksintegeryes
totals.chargedintegeryes
totals.free_not_foundintegeryes
totals.free_duplicateintegeryes
totals.free_unavailableintegeryes
totals.free_invalid_qrintegeryes
totals.free_invalid_fileintegeryes
totals.free_qr_tamperedintegeryes
totals.free_too_oldintegeryes
totals.free_system_errorintegeryes
totals.free_otherintegeryes

Possible errors

400401default

An error as Problem Details. All codes are listed at Error codes