EMDI web API

2.0.1 · openapi.yaml · Swagger

Guide below. For Authorize / Try it out, open the interactive documentation (Swagger) in a new tab. JSON field catalogue: EMDI web API field analysis.

Start here (simple guide)

This API lets your program talk to EMDI web: contacts, items, calendar events, and purchase/sales documents.

There is one base path: /apps/api/. You choose the resource and action with the URL.

1. What you need before calling

  1. An EMDI web product with the API package enabled.
  2. Your EMDI web username (the same login you use in the browser).
  3. An HTTP key from EMDI web: Settings → Purchases/Sales → API (copy the key; keep it secret).
  4. After changing package or permissions, sign in again in EMDI web so the change applies.

If the package is off, or the key/user is wrong, the API answers with an error (not with data).

2. How every request works

Piece What to send
Auth Always ?user=YOUR_USER&key=YOUR_HTTPKEY (or header X-API-Key)
List GET /apps/api/list/{type}.json
Get GET /apps/api/{type}/{id}.json
Save POST /apps/api/save/{type}.json + JSON body
Delete DELETE /apps/api/{type}/{id}.json

{type} is the resource name (contacts, items, calendar, documents, or a lookup name).

Tiny example (list document types)

Tiny example (read one calendar event)

Tiny example (save a contact)

Success answer (always this shape)

Error answer

Common error.code values: auth, validation, not_found, duplicate, in_use, locked_mydata, package_disabled, rate_limited, server.

3. Resources

Lookups (lists of choices)

GET /apps/api/list/{type}.json only.

{type} one of: doc_types, vat_rates, users, contacts_relations, measurement_units, categories, subcategories, payment_methods, calendar_types, cashiers_positions

Main data (CRUD)

type Meaning
contacts Customers / suppliers / other contacts
items Products / services
calendar Appointments
documents Purchase / sales documents
Action Method + URL
list GET /apps/api/list/{type}.json (filters as query: limit, offset, …)
get GET /apps/api/{type}/{id}.json
save POST /apps/api/save/{type}.json (id: 0 create, or match: "code" upsert)
delete DELETE /apps/api/{type}/{id}.json

4. Useful details

  • Rate limit: max 60 calls per minute per user + IP.
  • List page size: limit defaults to 50, maximum 250 (use offset for the next page).
  • Contacts balance: like the Balances report (debit − credit). Optional date_from / date_to on get/list.
  • Contacts list search: ?name= on trimmed Onoma+' '+Epiueto; ?company= on trimmed Epvnymia — case- and accent-insensitive. Exact if you omit %; add % yourself (e.g. name=PETER MARKS, name=PETER%, company=%SBZ%). Also exact code, vat_number, plus active, modified_since.
  • On save: names like city, relation, unit can auto-create. Users and document types must already exist.
  • Documents: all pvlhseis columns plus grammes lines in lines. get always includes lines; on list use ?include_lines=1. List filters: ?series= (Seira, same trim/case/accent/% rules as contact name/company), ?number= exact (Ariumospar), ?related_docs= on trimmed Sxetika. Totals use Firebird CALC_LINE_*. No myDATA upload from this API.
  • myDATA lock / in_use: locked documents cannot change; contacts/items in use cannot delete.
  • Field analysis: EMDI web API field analysis — every JSON key per resource.

Open interactive documentation (Swagger)