API reference
This key
Who the key belongs to and what it may do — the first call to make with a new key.
OpenAPI document
The reference is generated from the API’s own OpenAPI 3.0 document. Point your client generator at it:
https://app.kwn.tax/api/v1/openapi.jsonDescribe this key
GET/me
The key's merchant, the key itself with its scopes, the capabilities those scopes carry under the merchant's plan, the apps the key reaches, and the e-invoicing provider mode of this server (MOCK is a sandbox).
Code samples
curl -sS -X GET "https://app.kwn.tax/api/v1/me" \
-H "X-Api-Key: $KWN_API_KEY"Responses
200OK
Field Type Description merchantobjectkeyobjectcapabilitiesstring[]appsstring[]eInvoicingobject400Refused: the request or a business rule. The code says which (REQUEST_INVALID, RULE_REFUSED, …).
{ "error": "Lines: at least one line is required.", "code": "REQUEST_INVALID" }401No key, a key that is not ours, or one revoked (API_KEY_INVALID); a merchant not active (MERCHANT_INACTIVE).
{ "error": "That API key is not valid, or it was revoked.", "code": "API_KEY_INVALID" }403The key's scopes do not carry the capability (APP_NOT_GRANTED, ROLE_TOO_LOW), or the plan lacks the app (APP_LOCKED).
{ "error": "This key's scopes do not include sales.approve.", "code": "ROLE_TOO_LOW" }404Not found: another type under this route, or another company's (NOT_FOUND).
{ "error": "Not found.", "code": "NOT_FOUND" }409A conflict: an externalId taken, or a change that could not be saved (EXTERNAL_ID_TAKEN, CONFLICT).
{ "error": "That externalId is already used by another record of this company.", "code": "EXTERNAL_ID_TAKEN" }429Too many requests: wait retryAfter seconds (RATE_LIMITED).
{ "error": "Too many requests. Wait a little and try again.", "code": "RATE_LIMITED" }