Me
GET /me. Confirm a key works and see what it can do right now.
Retrieve the current key
GEThttps://apps.apiswop.co/api/v5/merchant/me
Scope: any valid key
The first call to make with a new key. It tells you which merchant the key belongs to, which scopes are effective right now, and whether card payments are available.
curl https://apps.apiswop.co/api/v5/merchant/me \
-H "Authorization: Bearer $SWOP_MERCHANT_KEY"Response
{
"state": "success",
"data": {
"merchant": { "id": "65f0c1a2b3c4d5e6f7a8b9c0", "name": "Acme", "ens": "acme.swop.id" },
"keyId": "mk_Q3xY7…",
"effectiveScopes": ["commerce.read", "commerce.checkout"],
"cardEnabled": false
}
}| Field | Type | Meaning |
|---|---|---|
merchant.id | string | Your Swop account ID |
merchant.name | string | Your display name |
merchant.ens | string | Your swop.id, if set |
keyId | string | The key's public ID (mk_…) |
effectiveScopes | string[] | What this key may do right now |
cardEnabled | boolean | true when commerce.card is effective, so card can be offered |