merit-api
Python SDK for the Merit Aktiva API.
Installation
pip install merit-api
Usage
from merit_api import MeritAPI
client = MeritAPI(api_id="YOUR_API_ID", api_key="YOUR_API_KEY")
customers = client.customers.get_list()
invoices = client.sales.get_invoices(
PeriodStart="2024-01-01",
PeriodEnd="2024-01-31",
)
Features
- deterministic request-body serialization for signing
- configurable timeout and retry handling — retries apply only to idempotent requests;
mutating writes (create invoice, create payment, …) are never retried automatically,
because Merit does not deduplicate a POST that timed out after the server already
committed it, so a replay would create a duplicate. This holds even when an
Idempotency-Keyis supplied, since Merit does not honor the header. - request and response logging hooks with secret redaction
- optional idempotency header generation. Note: Merit's API does not deduplicate on this header, so it is not a duplicate-prevention guarantee — it only prepares for servers that honor it. Real protection comes from the duplicate guards below.
- duplicate-write guards for purchase invoices and payments: by default
purchases.send_invoicerefuses a second invoice with the same vendor +BillNo, andfinancial.create_paymentrefuses a second payment referencing the sameBillNoand amount. Passallow_duplicate=Trueto override. - API-level business error parsing from HTTP 200 responses
Testing and method coverage report
Run tests:
pytest -q
Regenerate the method-level read/write coverage report:
python scripts_report_method_test_coverage.py
The report is written to reports/method_test_coverage.md and CI checks that this file stays up to date.
Metadata
Release files for merit-api 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| merit_api-0.6.0.tar.gz | 33.3 kB | Without provenance | Details for merit_api-0.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| merit_api-0.6.0-py3-none-any.whl | Python 3 | none | any | Details for merit_api-0.6.0-py3-none-any.whl |
Total release size: 47.1 kB
Release files / merit_api-0.6.0.tar.gz
| Download URL | merit_api-0.6.0.tar.gz |
|---|---|
| Size | 33.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f067e5e67410ab1bf244724ff9d07f5e60603449c5f40ab22d7099a7c3d41c0
|
|
BLAKE2b-256 checksum How to use checksums |
9d40100febdd07a1555cad4276fb809388fa4f4b39918701650452dc2eb8b696
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / merit_api-0.6.0-py3-none-any.whl
| Download URL | merit_api-0.6.0-py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b471e075593cb7f18e5b38bf2e7ec6a93e99374b51287f1c00055f947aa8c49f
|
|
BLAKE2b-256 checksum How to use checksums |
cb4b9740c4ee5a61418ea68757face228e54d93da09b0d2e897941308e0fcfde
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for merit-api 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.