Read Merit Aktiva invoices, customers, vendors, items, payments and reports; create a customer.
Maintain this server? Claim it
Call this server's tools from your browser. Nothing to install.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
The balance sheet: one row per report line (assets, liabilities, equity) with balances for per_count months counting back from end_date. POST /api/v1/getbalancerep.
Balance date, yyyy-mm-dd.
Number of monthly periods, counting back from end_date (default 1).
The balance sheet: one row per report line (assets, liabilities, equity) with balances for per_count months counting back from end_date. POST /api/v1/getbalancerep.
| Argument | Type | Description |
|---|---|---|
| end_date* | string | Balance date, yyyy-mm-dd. |
| per_count | integer | Number of monthly periods, counting back from end_date (default 1). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"end_date"
],
"properties": {
"end_date": {
"type": "string",
"description": "Balance date, yyyy-mm-dd."
},
"per_count": {
"type": "integer",
"maximum": 36,
"minimum": 1,
"description": "Number of monthly periods, counting back from end_date (default 1)."
}
}
}WRITE: creates ONE new customer record in the Merit company (name must be unique; an existing customer is never overwritten, Merit answers with an error). Nothing is invoiced, sent or paid. In Estonia not_td_customer must be true for private persons and foreign companies; city is required in Estonia for a non-EE country. Returns the new customer id. POST /api/v2/sendcustomer.
| Argument | Type | Description |
|---|---|---|
| city | string | City. |
| name* | string | Customer name (unique in the company). |
| string | E-mail address (stored only; Merit sends nothing). | |
| county | string | County. |
| reg_no | string | Registry or personal id code. |
| address | string | Street address. |
| contact | string | Contact person. |
| phone_no | string | Phone number. |
| home_page | string | Web page. |
| vat_reg_no | string | VAT number. |
| postal_code | string | Postal code. |
| bank_account | string | Customer bank account (IBAN). |
| country_code* | string | 2-letter ISO country code, e.g. EE, PL. |
| currency_code |
Open customer receivables: for each unpaid document the customer, date, due date, total, paid and unpaid amount. Give a customer name (empty string = all customers) or a customer id; over_due_days keeps only documents overdue by at least that many days. POST /api/v1/getcustdebtrep.
| Argument | Type | Description |
|---|---|---|
| as_of | string | Debt as of this date (default today). |
| customer_id | string | Customer id. |
| max_results | integer | Show at most this many rows (default 100, max 1000); the reply says how many there are in total. |
| customer_name | string | Customer name; an empty string or omitting it with no customer_id selects ALL customers. |
| over_due_days | integer | Only documents overdue by at least this many days. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"as_of": {
"type": "string",
"description": "Debt as of this date (default today)."
},
"customer_id": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
"description": "Customer id."
},
"max_results": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"description": "Show at most this many rows (default 100, max 1000); the reply says how many there are in total."
},
"customer_name": {
"type": "string",
"maxLength": 150,
"description": "Customer name; an empty string or omitting it with no customer_id selects ALL customers."
},
"over_due_days": {
"type": "integer",
"maximum": 999,
"minimum": 0,
"description": "Only documents overdue by at least this many days."
}
}
}Customer invoices with their unpaid amount and overdue flag for a period, for one customer (name or id). Only the FIRST page is returned: if has_more is true, narrow the period or the customer (the continuation endpoint is not supported). POST /api/v2/getcustpaymrep.
| Argument | Type | Description |
|---|---|---|
| period_end* | string | Period end, yyyy-mm-dd. |
| customer_id | string | Customer id. |
| period_start* | string | Period start, yyyy-mm-dd. |
| currency_code | string | Currency, e.g. EUR. |
| customer_name | string | Customer name. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"period_start",
"period_end"
],
"properties": {
"period_end": {
"type": "string",
"description": "Period end, yyyy-mm-dd."
},
"customer_id": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
"description": "Customer id."
},
"period_start": {
"type": "string",
"description": "Period start, yyyy-mm-dd."
},
"currency_code": {
"type": "string",
"maxLength": 4,
"minLength": 3,
"description": "Currency, e.g. EUR."
},
"customer_name": {
"type": "string",
"maxLength": 150,
"minLength": 1,
"description": "Customer name."
}
}
}One general ledger batch with all its debit and credit lines (account, memo, department, tax, amounts). The attachment is never requested. POST /api/v1/getglbatch.
| Argument | Type | Description |
|---|---|---|
| id* | string | Batch id (GLBId from merit_list_gl_batches). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
"description": "Batch id (GLBId from merit_list_gl_batches)."
}
}
}One purchase invoice in full: header, lines, payments. The attachment is never requested. POST /api/v2/getpurchorder.
| Argument | Type | Description |
|---|---|---|
| id* | string | Purchase invoice id (PIHId from merit_list_purchase_invoices). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
"description": "Purchase invoice id (PIHId from merit_list_purchase_invoices)."
}
}
}One sales invoice in full: header, lines (items, quantities, VAT, accounts), payments and dimension allocations. The PDF attachment is never requested. POST /api/v2/getinvoice.
| Argument | Type | Description |
|---|---|---|
| id* | string | Invoice id (SIHId from merit_list_sales_invoices). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
"description": "Invoice id (SIHId from merit_list_sales_invoices)."
}
}
}The profit and loss report: one row per report line, with balances for per_count months counting back from end_date (newest first). Optional department filter. POST /api/v1/getprofitrep.
| Argument | Type | Description |
|---|---|---|
| end_date* | string | Last day of the newest month, yyyy-mm-dd. |
| per_count | integer | Number of monthly periods, counting back from end_date (default 1). |
| department_code | string | Only this department (code from merit_list_departments). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"end_date"
],
"properties": {
"end_date": {
"type": "string",
"description": "Last day of the newest month, yyyy-mm-dd."
},
"per_count": {
"type": "integer",
"maximum": 36,
"minimum": 1,
"description": "Number of monthly periods, counting back from end_date (default 1)."
},
"department_code": {
"type": "string",
"maxLength": 20,
"description": "Only this department (code from merit_list_departments)."
}
}
}The general ledger chart of accounts (code, names, VAT, parent flag, active flag). GET /api/v2/accounts.
| Argument | Type | Description |
|---|---|---|
| max_results | integer | Show at most this many rows (default 100, max 1000); the reply says how many there are in total. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"max_results": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"description": "Show at most this many rows (default 100, max 1000); the reply says how many there are in total."
}
}
}List the income payments (money received) or expense payments (money paid out) booked on one bank account for a document-date period, with the documents each paid. The period may span at most 3 months (Merit limit); for longer spans make several calls. GET /api/v2/Banks/{bankId}/IncomePayments or /ExpensePayments.
| Argument | Type | Description |
|---|---|---|
| bank_id* | string | BankId from merit_list_banks. |
| direction* | string | income = payments received, expense = payments made. |
| doc_date_to* | string | Document date to, yyyy-mm-dd (max 3 months after doc_date_from). |
| max_results | integer | Show at most this many rows (default 100, max 1000); the reply says how many there are in total. |
| doc_date_from* | string | Document date from, yyyy-mm-dd. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"bank_id",
"direction",
"doc_date_from",
"doc_date_to"
],
"properties": {
"bank_id": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
"description": "BankId from merit_list_banks."
},
"direction": {
"enum": [
"income",
"expense"
],
"type": "string",
"description": "income = payments received, expense = payments made."
},
"doc_date_to": {
"type": "string",
"description": "Document date to, yyyy-mm-dd (max 3 months after doc_date_from)."
},
"max_results": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"description": "Show at most this many rows (default 100, max 1000); the reply says how many there are in total."
},
"doc_date_from": {
"type": "string",
"description": "Document date from, yyyy-mm-dd."
}
}
}The company's bank and cash accounts (BankId, name, IBAN, currency, ledger account). BankId feeds the payment tools. GET /api/v2/banks.
| Argument | Type | Description |
|---|---|---|
| max_results | integer | Show at most this many rows (default 100, max 1000); the reply says how many there are in total. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"max_results": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"description": "Show at most this many rows (default 100, max 1000); the reply says how many there are in total."
}
}
}Search customers by name (partial match), registry number or VAT number (exact), id, or changed since a date. At least one filter is required: Merit cannot return the whole customer list in one reply. POST /api/v1/getcustomers.
| Argument | Type | Description |
|---|---|---|
| id | string | Customer id. |
| name | string | Part of the customer name. |
| reg_no | string | Registry number, exact. |
| vat_reg_no | string | VAT number, exact. |
| max_results | integer | Show at most this many rows (default 100, max 1000); the reply says how many there are in total. |
| changed_since | string | Only customers created or changed on or after this date. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
"description": "Customer id."
},
"name": {
"type": "string",
"maxLength": 150,
"minLength": 1,
"description": "Part of the customer name."
},
"reg_no": {
"type": "string",
"maxLength": 30,
"minLength": 1,
"description": "Registry number, exact."
},
"vat_reg_no": {
"type": "string",
"maxLength": 30,
"minLength": 1,
"description": "VAT number, exact."
},
"max_results": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"description": "Show at most this many rows (default 100, max 1000); the reply says how many there are in total."
},
"changed_since": {
"type": "string",
"description": "Only customers created or changed on or after this date."
}
}
}Departments (code, name, active flag). GET /api/v2/departments.
| Argument | Type | Description |
|---|---|---|
| max_results | integer | Show at most this many rows (default 100, max 1000); the reply says how many there are in total. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"max_results": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"description": "Show at most this many rows (default 100, max 1000); the reply says how many there are in total."
}
}
}Accounting dimensions and their values (DimId, name, value code, expiry). all_values = true also lists expired values. POST /api/v2/getdimensions.
| Argument | Type | Description |
|---|---|---|
| all_values | boolean | true = include expired dimension values (default false). |
| max_results | integer | Show at most this many rows (default 100, max 1000); the reply says how many there are in total. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"all_values": {
"type": "boolean",
"description": "true = include expired dimension values (default false)."
},
"max_results": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"description": "Show at most this many rows (default 100, max 1000); the reply says how many there are in total."
}
}
}Accounting periods (financial years) with start, end and active flag. POST /api/v2/getaccperiods.
No arguments.
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {}
}List general ledger batches (journal entries, also those created from invoices and payments) of a period: batch code, number, date, total. The period may span at most 3 months (Merit limit); for longer spans make several calls. POST /api/v1/getglbatches.
| Argument | Type | Description |
|---|---|---|
| date_type | any | Which date the period filters: 0 = document date (default), 1 = date of last change. |
| period_end* | string | Last day of the period, yyyy-mm-dd (max 3 months after the start). |
| max_results | integer | Show at most this many rows (default 100, max 1000); the reply says how many there are in total. |
| period_start* | string | First day of the period, yyyy-mm-dd. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"period_start",
"period_end"
],
"properties": {
"date_type": {
"anyOf": [
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 1
}
],
"description": "Which date the period filters: 0 = document date (default), 1 = date of last change."
},
"period_end": {
"type": "string",
"description": "Last day of the period, yyyy-mm-dd (max 3 months after the start)."
},
"max_results": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"description": "Show at most this many rows (default 100, max 1000); the reply says how many there are in total."
},
"period_start": {
"type": "string",
"description": "First day of the period, yyyy-mm-dd."
}
}
}List items, services and stock articles with price, unit, VAT and accounts. Optional filters: code or description (partial), type, id. With location_code the reply adds stock quantity and cost of that warehouse. POST /api/v1/getitems.
| Argument | Type | Description |
|---|---|---|
| id | string | Item id. |
| code | string | Part of the item code. |
| type | any | 1 = stock item, 2 = service, 3 = item. |
| description | string | Part of the item description. |
| max_results | integer | Show at most this many rows (default 100, max 1000); the reply says how many there are in total. |
| location_code | string | Warehouse code: adds goods on hand quantity and cost. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
"description": "Item id."
},
"code": {
"type": "string",
"maxLength": 20,
"minLength": 1,
"description": "Part of the item code."
},
"type": {
"anyOf": [
{
"type": "number",
"const": 1
},
{
"type": "number",
"const": 2
},
{
"type": "number",
"const": 3
}
],
"description": "1 = stock item, 2 = service, 3 = item."
},
"description": {
"type": "string",
"maxLength": 150,
"minLength": 1,
"description": "Part of the item description."
},
"max_results": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"description": "Show at most this many rows (default 100, max 1000); the reply says how many there are in total."
},
"location_code": {
"type": "string",
"maxLength": 20,
"minLength": 1,
"description": "Warehouse code: adds goods on hand quantity and cost."
}
}
}Payment methods and sources (cash, banks, reporting entities, ledger accounts) usable for purchases, expense reports or sales. POST /api/v2/getpaymenttypes.
| Argument | Type | Description |
|---|---|---|
| type | any | 1 = purchases, 2 = expense reports, 3 = sales. |
| max_results | integer | Show at most this many rows (default 100, max 1000); the reply says how many there are in total. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"type": {
"anyOf": [
{
"type": "number",
"const": 1
},
{
"type": "number",
"const": 2
},
{
"type": "number",
"const": 3
}
],
"description": "1 = purchases, 2 = expense reports, 3 = sales."
},
"max_results": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"description": "Show at most this many rows (default 100, max 1000); the reply says how many there are in total."
}
}
}List payments (customer and vendor receipts and payouts) of a period, with the documents they paid. The period may span at most 3 months (Merit limit); for longer spans make several calls. POST /api/v2/getpayments.
| Argument | Type | Description |
|---|---|---|
| bank_id | string | Only this bank account (BankId from merit_list_banks). |
| date_type | any | Which date the period filters: 0 = document date (default), 1 = date of last change. |
| period_end* | string | Last day of the period, yyyy-mm-dd (max 3 months after the start). |
| max_results | integer | Show at most this many rows (default 100, max 1000); the reply says how many there are in total. |
| payment_type | integer | Merit payment type filter (see merit_list_payment_types). |
| period_start* | string | First day of the period, yyyy-mm-dd. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"period_start",
"period_end"
],
"properties": {
"bank_id": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
"description": "Only this bank account (BankId from merit_list_banks)."
},
"date_type": {
"anyOf": [
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 1
}
],
"description": "Which date the period filters: 0 = document date (default), 1 = date of last change."
},
"period_end": {
"type": "string",
"description": "Last day of the period, yyyy-mm-dd (max 3 months after the start)."
},
"max_results": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"description": "Show at most this many rows (default 100, max 1000); the reply says how many there are in total."
},
"payment_type": {
"type": "integer",
"maximum": 20,
"minimum": 0,
"description": "Merit payment type filter (see merit_list_payment_types)."
},
"period_start": {
"type": "string",
"description": "First day of the period, yyyy-mm-dd."
}
}
}List purchase invoices (vendor bills) of a period: bill number, vendor, dates, totals, paid flag. The period may span at most 3 months (Merit limit); for longer spans make several calls. POST /api/v2/getpurchorders.
| Argument | Type | Description |
|---|---|---|
| date_type | any | Which date the period filters: 0 = document date (default), 1 = date of last change. |
| period_end* | string | Last day of the period, yyyy-mm-dd (max 3 months after the start). |
| max_results | integer | Show at most this many rows (default 100, max 1000); the reply says how many there are in total. |
| unpaid_only | boolean | true = only unpaid bills. |
| period_start* | string | First day of the period, yyyy-mm-dd. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"period_start",
"period_end"
],
"properties": {
"date_type": {
"anyOf": [
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 1
}
],
"description": "Which date the period filters: 0 = document date (default), 1 = date of last change."
},
"period_end": {
"type": "string",
"description": "Last day of the period, yyyy-mm-dd (max 3 months after the start)."
},
"max_results": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"description": "Show at most this many rows (default 100, max 1000); the reply says how many there are in total."
},
"unpaid_only": {
"type": "boolean",
"description": "true = only unpaid bills."
},
"period_start": {
"type": "string",
"description": "First day of the period, yyyy-mm-dd."
}
}
}List sales invoices (header level: number, customer, dates, totals, paid flag) of a period. The period may span at most 3 months (Merit limit); for longer spans make several calls. Use merit_get_sales_invoice for the lines. POST /api/v2/getinvoices.
| Argument | Type | Description |
|---|---|---|
| date_type | any | Which date the period filters: 0 = document date (default), 1 = date of last change. |
| period_end* | string | Last day of the period, yyyy-mm-dd (max 3 months after the start). |
| max_results | integer | Show at most this many rows (default 100, max 1000); the reply says how many there are in total. |
| unpaid_only | boolean | true = only unpaid invoices. |
| period_start* | string | First day of the period, yyyy-mm-dd. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"period_start",
"period_end"
],
"properties": {
"date_type": {
"anyOf": [
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 1
}
],
"description": "Which date the period filters: 0 = document date (default), 1 = date of last change."
},
"period_end": {
"type": "string",
"description": "Last day of the period, yyyy-mm-dd (max 3 months after the start)."
},
"max_results": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"description": "Show at most this many rows (default 100, max 1000); the reply says how many there are in total."
},
"unpaid_only": {
"type": "boolean",
"description": "true = only unpaid invoices."
},
"period_start": {
"type": "string",
"description": "First day of the period, yyyy-mm-dd."
}
}
}All VAT rates of the company (TaxId, code, name, percent, active flag). The TaxId is what invoice rows refer to. GET /api/v2/taxes.
| Argument | Type | Description |
|---|---|---|
| max_results | integer | Show at most this many rows (default 100, max 1000); the reply says how many there are in total. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"max_results": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"description": "Show at most this many rows (default 100, max 1000); the reply says how many there are in total."
}
}
}Search vendors (suppliers) by name (partial match), registry number or VAT number (exact), id, or changed since a date. At least one filter is required: Merit cannot return the whole vendor list in one reply. POST /api/v1/getvendors.
| Argument | Type | Description |
|---|---|---|
| id | string | Vendor id. |
| name | string | Part of the vendor name. |
| reg_no | string | Registry number, exact. |
| vat_reg_no | string | VAT number, exact. |
| max_results | integer | Show at most this many rows (default 100, max 1000); the reply says how many there are in total. |
| changed_since | string | Only vendors created or changed on or after this date. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
"description": "Vendor id."
},
"name": {
"type": "string",
"maxLength": 150,
"minLength": 1,
"description": "Part of the vendor name."
},
"reg_no": {
"type": "string",
"maxLength": 30,
"minLength": 1,
"description": "Registry number, exact."
},
"vat_reg_no": {
"type": "string",
"maxLength": 30,
"minLength": 1,
"description": "VAT number, exact."
},
"max_results": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"description": "Show at most this many rows (default 100, max 1000); the reply says how many there are in total."
},
"changed_since": {
"type": "string",
"description": "Only vendors created or changed on or after this date."
}
}
}Purchase totals for a period, grouped by invoice, vendor, item or fixed asset. POST /api/v2/getpurchrep.
| Argument | Type | Description |
|---|---|---|
| end_date* | string | Period end, yyyy-mm-dd. |
| start_date* | string | Period start, yyyy-mm-dd. |
| max_results | integer | Show at most this many rows (default 100, max 1000); the reply says how many there are in total. |
| report_type* | any | 1 = by invoices, 2 = by vendors, 3 = by items, 4 = by fixed assets. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"start_date",
"end_date",
"report_type"
],
"properties": {
"end_date": {
"type": "string",
"description": "Period end, yyyy-mm-dd."
},
"start_date": {
"type": "string",
"description": "Period start, yyyy-mm-dd."
},
"max_results": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"description": "Show at most this many rows (default 100, max 1000); the reply says how many there are in total."
},
"report_type": {
"anyOf": [
{
"type": "number",
"const": 1
},
{
"type": "number",
"const": 2
},
{
"type": "number",
"const": 3
},
{
"type": "number",
"const": 4
}
],
"description": "1 = by invoices, 2 = by vendors, 3 = by items, 4 = by fixed assets."
}
}
}Sales totals for a period, grouped by invoice, customer, item or country. POST /api/v2/getsalesrep.
| Argument | Type | Description |
|---|---|---|
| end_date* | string | Period end, yyyy-mm-dd. |
| start_date* | string | Period start, yyyy-mm-dd. |
| max_results | integer | Show at most this many rows (default 100, max 1000); the reply says how many there are in total. |
| report_type* | any | 1 = by invoices, 2 = by customers, 3 = by items, 4 = by countries, 5 = by countries (general). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"start_date",
"end_date",
"report_type"
],
"properties": {
"end_date": {
"type": "string",
"description": "Period end, yyyy-mm-dd."
},
"start_date": {
"type": "string",
"description": "Period start, yyyy-mm-dd."
},
"max_results": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"description": "Show at most this many rows (default 100, max 1000); the reply says how many there are in total."
},
"report_type": {
"anyOf": [
{
"type": "number",
"const": 1
},
{
"type": "number",
"const": 2
},
{
"type": "number",
"const": 3
},
{
"type": "number",
"const": 4
},
{
"type": "number",
"const": 5
}
],
"description": "1 = by invoices, 2 = by customers, 3 = by items, 4 = by countries, 5 = by countries (general)."
}
}
}Find sales invoices by invoice number, customer name or customer id (give at least one). POST /api/v2/getinvoices2.
| Argument | Type | Description |
|---|---|---|
| invoice_no | string | Invoice number. |
| customer_id | string | Customer id (from merit_list_customers). |
| max_results | integer | Show at most this many rows (default 100, max 1000); the reply says how many there are in total. |
| customer_name | string | Customer name. |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"invoice_no": {
"type": "string",
"maxLength": 35,
"minLength": 1,
"description": "Invoice number."
},
"customer_id": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
"description": "Customer id (from merit_list_customers)."
},
"max_results": {
"type": "integer",
"maximum": 1000,
"minimum": 1,
"description": "Show at most this many rows (default 100, max 1000); the reply says how many there are in total."
},
"customer_name": {
"type": "string",
"maxLength": 150,
"minLength": 1,
"description": "Customer name."
}
}
}| string |
| Default currency, e.g. EUR. |
| not_td_customer* | boolean | true for private persons and foreign companies (Estonia), true for private persons (Poland); false for a local company. |
| payment_deadline_days | integer | Payment term in days (default from company settings). |
| sales_invoice_language | string | Invoice language for this customer (Estonia: ET, EN, RU, FI; Poland: PL, EN, RU). |
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"name",
"country_code",
"not_td_customer"
],
"properties": {
"city": {
"type": "string",
"maxLength": 30,
"description": "City."
},
"name": {
"type": "string",
"maxLength": 150,
"minLength": 1,
"description": "Customer name (unique in the company)."
},
"email": {
"type": "string",
"format": "email",
"pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
"maxLength": 80,
"description": "E-mail address (stored only; Merit sends nothing)."
},
"county": {
"type": "string",
"maxLength": 100,
"description": "County."
},
"reg_no": {
"type": "string",
"maxLength": 30,
"description": "Registry or personal id code."
},
"address": {
"type": "string",
"maxLength": 100,
"description": "Street address."
},
"contact": {
"type": "string",
"maxLength": 35,
"description": "Contact person."
},
"phone_no": {
"type": "string",
"maxLength": 50,
"description": "Phone number."
},
"home_page": {
"type": "string",
"maxLength": 80,
"description": "Web page."
},
"vat_reg_no": {
"type": "string",
"maxLength": 30,
"description": "VAT number."
},
"postal_code": {
"type": "string",
"maxLength": 15,
"description": "Postal code."
},
"bank_account": {
"type": "string",
"maxLength": 50,
"description": "Customer bank account (IBAN)."
},
"country_code": {
"type": "string",
"pattern": "^[A-Za-z]{2}$",
"description": "2-letter ISO country code, e.g. EE, PL."
},
"currency_code": {
"type": "string",
"maxLength": 4,
"minLength": 3,
"description": "Default currency, e.g. EUR."
},
"not_td_customer": {
"type": "boolean",
"description": "true for private persons and foreign companies (Estonia), true for private persons (Poland); false for a local company."
},
"payment_deadline_days": {
"type": "integer",
"maximum": 365,
"minimum": 0,
"description": "Payment term in days (default from company settings)."
},
"sales_invoice_language": {
"enum": [
"ET",
"EN",
"RU",
"FI",
"PL"
],
"type": "string",
"description": "Invoice language for this customer (Estonia: ET, EN, RU, FI; Poland: PL, EN, RU)."
}
}
}