Keep
Keep APIs for PayMe's accounting product: partners manage sellers, income documents, expenses, and tax and VAT balances with OAuth 2.0 client credentials.
Getting Started
- Keep API overview: Keep is PayMe accounting product. Partner API (scope partner-api; /api/public, /partner/api): sellers, plans, expenses, income documents, statistics. Seller API (scope seller-api; /seller/api): seller income documents. Both use OAuth 2.0 client-credentials tokens from POST /oauth2/token. Base URL https://<partner_domain>.keep.co.il, HTTPS only; credentials from your Account Manager. Read Authentication and environments, then Errors.
- Authentication and environments: Keep uses OAuth 2.0 client credentials from your Account Manager. POST /oauth2/token (form-encoded) with grant_type=client_credentials, client_id, client_secret and the scope of the API you call (partner-api or seller-api). Send Authorization: Bearer <access_token>. Refresh with grant_type=refresh_token: works once and ends the previous access token; on 400 invalid_request get a new token with client credentials. Use expires_in. Base URL https://<partner_domain>.keep.co.il, HTTPS only.
- Errors: Token endpoint errors (error, error_description, correlationId, category): 401 unauthorized_client, 401 unauthorized_scope, 403 access_denied, 400 invalid_request (refresh token unknown or used). Other errors: statusCode, message, error, correlationId, usually category; 500 has no message. Not safe to retry: Upload expense document, Seller API Create income document; safe: client-credentials token, Update seller, Update expense. 429 counted per partner domain; wait for Retry-After. Quote X-Request-Id and X-Correlation-Id to support.
Authentication
- Obtain access token: POST /oauth2/token
Sellers — Partner API
- Create seller: POST /api/public/sellers/create
- Get seller: GET /api/public/sellers/{sellerId}
- Update seller: PUT /api/public/sellers/{sellerId}/update
Plans — Partner API
- Get available plans: GET /api/public/plans
- Set seller billing plan: POST /api/public/plans/activate
Expenses — Partner API
- Upload expense document: POST /api/public/expenses
- List expenses: GET /api/public/expenses
- Update expense: PATCH /api/public/expenses/{expenseId}
Income Documents — Partner API
- Create manual income document: POST /partner/api/documents/income/manual
- List income documents: GET /partner/api/documents/income
Statistics — Partner API
- Get financial checkpoints: GET /partner/api/statistic/checkpoints
- Get tax predictions: GET /partner/api/statistic/tax-predictions
Income Documents — Seller API
- Create income document: POST /seller/api/documents/income
- Get income document: GET /seller/api/documents/income/{id}
- List income documents: GET /seller/api/documents/income