Grants
List grants
Lists the app's grants in the key's mode, newest first, revoked ones included.
此内容尚不支持你的语言。
https://api.maple.inc/v1/grantsAPI keyLists the app’s grants in the key’s mode, newest first, revoked ones included. A grant is the app’s access to one location: scopes are what the restaurant approved, pending_scopes what the app’s listing asks for that it has not. Filter by location_id and status. While has_more is true, repeat with starting_after set to the last grant id. Needs locations:read.
Authorization
Send your API key as Authorization: Bearer <key>: mpk_test_… for test mode, mpk_live_… for live mode. Both use https://api.maple.inc/v1. See Authentication. The samples read the key from MAPLE_KEY and the base URL from MAPLE_BASE, as set up in the Quickstart.
Parameters
-
location_idstring or null -
statusstring or null -
starting_afterstring or null -
limitstring or null
Responses
200 OK
-
objectstring requiredAlways
list. -
dataobject[] required -
data[].objectstring requiredAlways
grant. -
data[].idstring required -
data[].location_idstring required -
data[].livemodeboolean required -
data[].statusstring requiredOne of
active,revoked. -
data[].originstring requiredOne of
install,staff,test. -
data[].scopesstring[] required -
data[].pending_scopesstring[] required -
data[].creatednumber required -
data[].revoked_atnumber or null required -
has_moreboolean required
Errors
-
400Bad request -
401Unauthorized -
403Forbidden -
429Too many requests
Every error body is one error object: branch on its type and code; message is for people, param names the field at fault, and doc_url links the code on Errors.
A 429 also sends Retry-After: Seconds to wait before retrying; also returned as error.retry_after in the body.