openapi: 3.0.3 info: title: EMDI web API description: 'REST JSON API for **EMDI web** (contacts, items, calendar, documents, lookups). **Auth:** `?user=` + `?key=` (Settings → Purchases/Sales → API) or header `X-API-Key`. **Help:** [EMDI web API](https://www.sbzsystems.com/software-en/emdi-web/support-emdi-web/emdi-web-api/) ' version: 2.0.1 contact: name: SBZ Systems url: https://www.sbzsystems.com servers: - url: https://web.sbzsystems.com description: Production EMDI web tags: - name: lookups description: Ready-made lists (full lookup table fields). - name: contacts description: Customers / suppliers / contacts (`pelates`, all columns). - name: items description: Products / services (`apouhkh`, all columns). - name: calendar description: Appointments (`rantevou`, all columns). - name: documents description: Purchase / sales documents (`pvlhseis` + `grammes` lines, all columns). components: securitySchemes: UserQuery: type: apiKey in: query name: user description: EMDI web username KeyQuery: type: apiKey in: query name: key description: HTTP key from Settings → Purchases/Sales → API schemas: Error: type: object required: - success - error properties: success: type: boolean enum: - false error: type: object required: - code - message properties: code: type: string message: type: string field: type: string Success: type: object required: - success properties: success: type: boolean enum: - true id: type: integer nullable: true data: {} DocumentLine: type: object description: Document lines (`grammes`) inside documents.lines. properties: id: type: integer description: Line id document_id: type: integer description: Document id product_id: type: integer description: Product id unit_id: type: integer description: Unit id description: type: string description: Description code: type: string description: Item code unit: type: string description: Unit label stored qty: type: number description: Quantity price: type: number description: Unit value / price discount: type: number description: Discount percent vat_rate: type: number description: VAT rate order: type: integer description: Line order action: type: integer description: Movement [0,1,2] (orders) type: type: integer description: Type [1,2] parent/combo related_line_id: type: integer description: Related line id Document: type: object description: 'Documents (`pvlhseis`, all columns). Lines in `lines` (`grammes`). On list: `include_lines=1`.' properties: id: type: integer description: Document id series: type: string description: Series number: type: integer description: Document number date: type: string format: date-time description: Date/time time_from: type: string description: Time from time_to: type: string description: Time to delivery_date: type: string format: date description: Delivery date doc_type_id: type: integer description: Document type id doc_type: type: string description: Document type label contact_id: type: integer description: Contact id delivery_contact_id: type: integer description: Delivery contact id assignor_id: type: integer description: Assignor contact id payment_method_id: type: integer description: Payment method id payment_method: type: string description: Payment method label payment_method2_id: type: integer description: Payment method 2 id payment_method2: type: string description: Payment method 2 label shipping_method_id: type: integer description: Shipping method id shipping_method: type: string description: Shipping method label purpose_id: type: integer description: Purpose id purpose: type: string description: Purpose label user_id: type: integer description: User id user: type: string description: User label comment: type: string description: Comment shipping_place: type: string description: Shipping place loading_place: type: string description: Loading place plate: type: string description: Vehicle number / plate related_docs: type: string description: Related documents text related_document_id: type: integer description: Related document id schedule_id: type: integer description: Calendar / schedule id devices_sent: type: string description: Devices sent list custom: type: string description: Custom field voucher: type: string description: Voucher b2g: type: string description: B2G fields (; separated) net_before_discount: type: number description: Total before discount vat_total: type: number description: VAT total total: type: number description: Grand total with VAT other_charges: type: number description: Other charges qty_total: type: number description: Quantity total volume_total: type: number description: Volume total area_total: type: number description: Area total weight_total: type: number description: Weight total extra_value_total: type: number description: Extra value total proportional_percent: type: number description: Proportional percent payment: type: number description: Payment amount 1 payment2: type: number description: Payment amount 2 mydata_locked: type: boolean description: Locked (mark or signature). Cannot delete/edit. invoice_mark: type: integer description: myDATA invoice mark signature: type: string description: Provider signature modified: type: string format: date-time description: Modified lines: type: array description: Document lines (`grammes`). Always on get; on list use include_lines=1. items: $ref: '#/components/schemas/DocumentLine' custom1: type: string description: Custom field 1 custom2: type: string description: Custom field 2 custom3: type: string description: Custom field 3 custom4: type: string description: Custom field 4 custom5: type: string description: Custom field 5 Contact: type: object description: Contacts, customers and suppliers (`pelates`). properties: id: type: integer description: Row id (primary key) code: type: string description: Code name: type: string description: First name surname: type: string description: Surname company: type: string description: Company name phone: type: string description: Phone mobile: type: string description: Mobile fax: type: string description: Fax email: type: string description: Email url: type: string description: URL address: type: string description: Address area: type: string description: Area / district postal_code: type: string description: Postal code floor: type: string description: PO box / floor vat_number: type: string description: VAT number. Cannot change if the contact is used on a document. notes: type: string description: Notes department: type: string description: Police department (ID issue) installation_number: type: string description: Installation number id_issue_date: type: string format: date description: ID issue date city_id: type: integer description: City id (FK poleis) city: type: string description: City label tax_office_id: type: integer description: Tax office id tax_office: type: string description: Tax office label occupation_id: type: integer description: Occupation id occupation: type: string description: Occupation label relation_id: type: integer description: Relation id relation: type: string description: Relation label payment_method_id: type: integer description: Payment method id payment_method: type: string description: Payment method label user_id: type: integer description: Related user id user: type: string description: User label price_list_id: type: integer description: Price list id price_list: type: string description: Price list label parent_contact_id: type: integer description: Parent contact id active: type: integer description: Active flag [1,0] vat_obligation: type: integer description: VAT obligation [0,1,2] tax_list: type: integer description: MYF obligation [1,0] no_loyalties: type: integer description: Exclude from loyalty [1,0] credit_limit: type: number description: Credit limit purchases_value: type: number description: Purchases value sales_value: type: number description: Sales value stored_balance: type: number description: Stored balance field balance: type: number description: Computed balance (debit − credit); optional date_from/date_to accounting_number: type: string description: Accounting account accounting_code: type: integer description: Accounting code company_number: type: string description: Company number latitude: type: number description: Latitude longitude: type: number description: Longitude last_move: type: string format: date description: Last document date created: type: string format: date description: Created date modified: type: string format: date-time description: Modified custom1: type: string description: Custom field 1 custom2: type: string description: Custom field 2 custom3: type: string description: Custom field 3 custom4: type: string description: Custom field 4 custom5: type: string description: Custom field 5 custom6: type: string description: Custom field 6 custom7: type: string description: Custom field 7 custom8: type: string description: Custom field 8 custom9: type: string description: Custom field 9 custom10: type: string description: Custom field 10 custom11: type: string description: Custom field 11 custom12: type: string description: Custom field 12 custom13: type: string description: Custom field 13 custom14: type: string description: Custom field 14 custom15: type: string description: Custom field 15 custom16: type: string description: Custom field 16 custom17: type: string description: Custom field 17 custom18: type: string description: Custom field 18 custom19: type: string description: Custom field 19 custom20: type: string description: Custom field 20 Item: type: object description: Products and services (`apouhkh`). properties: id: type: integer description: Row id code: type: string description: Item code / barcode secondary_code: type: string description: Purchase / secondary code description: type: string description: Description retail_price: type: number description: Net / retail price wholesale_price: type: number description: Purchase / wholesale value unit_id: type: integer description: Unit id unit: type: string description: Unit label unit2_id: type: integer description: Unit 2 id unit2: type: string description: Unit 2 label unit3_id: type: integer description: Unit 3 id unit3: type: string description: Unit 3 label quantity2: type: number description: Quantity for unit 2 quantity3: type: number description: Quantity for unit 3 subcategory_id: type: integer description: Subcategory id category: type: string description: Subcategory label main_category_id: type: integer description: Main category id main_category: type: string description: Main category label vat_rate: type: number description: VAT rate % supplier_id: type: integer description: Supplier contact id user_id: type: integer description: User id user: type: string description: User label length: type: number description: Width (P) height: type: number description: Height (Y) width: type: number description: Depth (B) area: type: number description: Area weight: type: number description: Weight volume: type: number description: Volume order: type: integer description: Sort order color: type: integer description: Color min_quantity: type: number description: Minimum quantity profit_percent: type: number description: Profit percent profit_amount: type: number description: Profit amount sales_qty: type: number description: Sales quantity income: type: number description: Income expense: type: number description: Expense internet: type: integer description: E-shop flag [1,0] scale: type: integer description: Scale flag [1,0] sync: type: integer description: Sync flag photo: type: string description: Photo path/URL url: type: string description: URL notes: type: string description: Detailed description taric: type: string description: Taric code active: type: integer description: Active [1,0] stock_qty: type: number description: Availability / stock price_changed: type: string format: date description: Price changed date created: type: string format: date description: Created barcodes: type: array items: type: string description: Item barcodes modified: type: string format: date-time description: Modified custom1: type: string description: Custom field 1 custom2: type: string description: Custom field 2 custom3: type: string description: Custom field 3 custom4: type: string description: Custom field 4 custom5: type: string description: Custom field 5 custom6: type: string description: Custom field 6 custom7: type: string description: Custom field 7 custom8: type: string description: Custom field 8 custom9: type: string description: Custom field 9 custom10: type: string description: Custom field 10 custom11: type: string description: Custom field 11 custom12: type: string description: Custom field 12 custom13: type: string description: Custom field 13 custom14: type: string description: Custom field 14 custom15: type: string description: Custom field 15 custom16: type: string description: Custom field 16 custom17: type: string description: Custom field 17 custom18: type: string description: Custom field 18 custom19: type: string description: Custom field 19 custom20: type: string description: Custom field 20 custom21: type: string description: Custom field 21 custom22: type: string description: Custom field 22 custom23: type: string description: Custom field 23 custom24: type: string description: Custom field 24 custom25: type: string description: Custom field 25 custom26: type: string description: Custom field 26 custom27: type: string description: Custom field 27 custom28: type: string description: Custom field 28 custom29: type: string description: Custom field 29 custom30: type: string description: Custom field 30 custom31: type: string description: Custom field 31 custom32: type: string description: Custom field 32 custom33: type: string description: Custom field 33 custom34: type: string description: Custom field 34 custom35: type: string description: Custom field 35 custom36: type: string description: Custom field 36 custom37: type: string description: Custom field 37 custom38: type: string description: Custom field 38 custom39: type: string description: Custom field 39 custom40: type: string description: Custom field 40 custom41: type: string description: Custom field 41 custom42: type: string description: Custom field 42 custom43: type: string description: Custom field 43 custom44: type: string description: Custom field 44 custom45: type: string description: Custom field 45 custom46: type: string description: Custom field 46 custom47: type: string description: Custom field 47 custom48: type: string description: Custom field 48 custom49: type: string description: Custom field 49 custom50: type: string description: Custom field 50 Calendar: type: object description: Reminders and appointments (`rantevou`). properties: id: type: integer description: Row id contact_id: type: integer description: Primary contact id event_type_id: type: integer description: Event type id event_type: type: string description: Event type label user_id: type: integer description: User id user: type: string description: User label assigned_to_id: type: integer description: Assigned-to user id assigned_to: type: string description: Assigned-to label start: type: string format: date-time description: Start end: type: string format: date-time description: End alarm: type: string format: date-time description: Reminder / alarm created: type: string format: date-time description: Registered / created min_time: type: string format: date-time description: Computed range start max_time: type: string format: date-time description: Computed range end comment: type: string description: Note / comment repeat: type: string description: Repeat rule modified: type: string format: date-time description: Modified contact1_id: type: integer nullable: true description: Extra contact 1 contact2_id: type: integer nullable: true description: Extra contact 2 contact3_id: type: integer nullable: true description: Extra contact 3 contact4_id: type: integer nullable: true description: Extra contact 4 contact5_id: type: integer nullable: true description: Extra contact 5 contact6_id: type: integer nullable: true description: Extra contact 6 contact7_id: type: integer nullable: true description: Extra contact 7 contact8_id: type: integer nullable: true description: Extra contact 8 contact9_id: type: integer nullable: true description: Extra contact 9 contact10_id: type: integer nullable: true description: Extra contact 10 DocumentSaveBody: type: object required: - data properties: id: type: integer description: Record id (0 = create) data: $ref: '#/components/schemas/Document' ContactSaveBody: type: object required: - data properties: id: type: integer description: Record id (0 = create) data: $ref: '#/components/schemas/Contact' match: type: string enum: - code description: Upsert by code ItemSaveBody: type: object required: - data properties: id: type: integer description: Record id (0 = create) data: $ref: '#/components/schemas/Item' match: type: string enum: - code description: Upsert by code CalendarSaveBody: type: object required: - data properties: id: type: integer description: Record id (0 = create) data: $ref: '#/components/schemas/Calendar' DocumentSuccess: type: object required: - success properties: success: type: boolean enum: - true id: type: integer nullable: true data: $ref: '#/components/schemas/Document' ContactSuccess: type: object required: - success properties: success: type: boolean enum: - true id: type: integer nullable: true data: $ref: '#/components/schemas/Contact' ItemSuccess: type: object required: - success properties: success: type: boolean enum: - true id: type: integer nullable: true data: $ref: '#/components/schemas/Item' CalendarSuccess: type: object required: - success properties: success: type: boolean enum: - true id: type: integer nullable: true data: $ref: '#/components/schemas/Calendar' DocumentListSuccess: type: object required: - success properties: success: type: boolean enum: - true id: type: integer nullable: true data: type: object properties: items: type: array items: $ref: '#/components/schemas/Document' limit: type: integer offset: type: integer ContactListSuccess: type: object required: - success properties: success: type: boolean enum: - true id: type: integer nullable: true data: type: object properties: items: type: array items: $ref: '#/components/schemas/Contact' limit: type: integer offset: type: integer ItemListSuccess: type: object required: - success properties: success: type: boolean enum: - true id: type: integer nullable: true data: type: object properties: items: type: array items: $ref: '#/components/schemas/Item' limit: type: integer offset: type: integer CalendarListSuccess: type: object required: - success properties: success: type: boolean enum: - true id: type: integer nullable: true data: type: object properties: items: type: array items: $ref: '#/components/schemas/Calendar' limit: type: integer offset: type: integer parameters: Limit: name: limit in: query description: Page size (default 50, maximum 250). schema: type: integer default: 50 minimum: 1 maximum: 250 Offset: name: offset in: query description: Zero-based row offset for list paging. schema: type: integer default: 0 minimum: 0 IdPath: name: id in: path required: true schema: type: integer responses: Error: description: Error content: application/json: schema: $ref: '#/components/schemas/Error' paths: /apps/api/list/doc_types.json: get: tags: - lookups summary: List doc_types operationId: list_doc_types responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Success' default: $ref: '#/components/responses/Error' /apps/api/list/vat_rates.json: get: tags: - lookups summary: List vat_rates operationId: list_vat_rates responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Success' default: $ref: '#/components/responses/Error' /apps/api/list/users.json: get: tags: - lookups summary: List users operationId: list_users responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Success' default: $ref: '#/components/responses/Error' /apps/api/list/contacts_relations.json: get: tags: - lookups summary: List contacts_relations operationId: list_contacts_relations responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Success' default: $ref: '#/components/responses/Error' /apps/api/list/measurement_units.json: get: tags: - lookups summary: List measurement_units operationId: list_measurement_units responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Success' default: $ref: '#/components/responses/Error' /apps/api/list/categories.json: get: tags: - lookups summary: List categories operationId: list_categories responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Success' default: $ref: '#/components/responses/Error' /apps/api/list/subcategories.json: get: tags: - lookups summary: List subcategories operationId: list_subcategories responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Success' default: $ref: '#/components/responses/Error' /apps/api/list/payment_methods.json: get: tags: - lookups summary: List payment_methods operationId: list_payment_methods responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Success' default: $ref: '#/components/responses/Error' /apps/api/list/calendar_types.json: get: tags: - lookups summary: List calendar_types operationId: list_calendar_types responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Success' default: $ref: '#/components/responses/Error' /apps/api/list/cashiers_positions.json: get: tags: - lookups summary: List cashiers_positions operationId: list_cashiers_positions responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Success' default: $ref: '#/components/responses/Error' /apps/api/list/contacts.json: get: tags: - contacts summary: List contacts operationId: list_contacts parameters: - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Offset' - name: name in: query description: >- Search trimmed `Onoma||' '||Epiueto` (case- and accent-insensitive). Exact unless you include `%` (e.g. `PETER MARKS`, `PETER%`, `%TER%MARKS`). schema: type: string example: '%MARKS%' - name: company in: query description: >- Search trimmed `Epvnymia` (case- and accent-insensitive). Exact unless you include `%` (e.g. `SBZ IKE`, `SBZ%`). schema: type: string example: '%SBZ%' - name: code in: query description: Exact contact code (case-insensitive) schema: type: string - name: vat_number in: query description: Exact VAT / AFM (case-insensitive) schema: type: string - name: active in: query schema: type: boolean - name: modified_since in: query schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ContactListSuccess' default: $ref: '#/components/responses/Error' /apps/api/contacts/{id}.json: get: tags: - contacts summary: Get one contacts operationId: get_contacts parameters: - $ref: '#/components/parameters/IdPath' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ContactSuccess' default: $ref: '#/components/responses/Error' delete: tags: - contacts summary: Delete one contacts operationId: delete_contacts parameters: - $ref: '#/components/parameters/IdPath' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Success' default: $ref: '#/components/responses/Error' /apps/api/save/contacts.json: post: tags: - contacts summary: Create or update contacts operationId: save_contacts requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ContactSaveBody' example: id: 0 data: code: C001 name: John surname: Doe city: Athens relation: Customer active: 1 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ContactSuccess' default: $ref: '#/components/responses/Error' /apps/api/list/items.json: get: tags: - items summary: List items operationId: list_items parameters: - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Offset' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ItemListSuccess' default: $ref: '#/components/responses/Error' /apps/api/items/{id}.json: get: tags: - items summary: Get one items operationId: get_items parameters: - $ref: '#/components/parameters/IdPath' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ItemSuccess' default: $ref: '#/components/responses/Error' delete: tags: - items summary: Delete one items operationId: delete_items parameters: - $ref: '#/components/parameters/IdPath' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Success' default: $ref: '#/components/responses/Error' /apps/api/save/items.json: post: tags: - items summary: Create or update items operationId: save_items requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ItemSaveBody' example: match: code data: code: P001 description: Sample retail_price: 10.5 unit: τεμ vat_rate: 24 active: 1 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ItemSuccess' default: $ref: '#/components/responses/Error' /apps/api/list/calendar.json: get: tags: - calendar summary: List calendar operationId: list_calendar parameters: - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Offset' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CalendarListSuccess' default: $ref: '#/components/responses/Error' /apps/api/calendar/{id}.json: get: tags: - calendar summary: Get one calendar operationId: get_calendar parameters: - $ref: '#/components/parameters/IdPath' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CalendarSuccess' default: $ref: '#/components/responses/Error' delete: tags: - calendar summary: Delete one calendar operationId: delete_calendar parameters: - $ref: '#/components/parameters/IdPath' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Success' default: $ref: '#/components/responses/Error' /apps/api/save/calendar.json: post: tags: - calendar summary: Create or update calendar operationId: save_calendar requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CalendarSaveBody' example: id: 0 data: start: '2026-09-20 10:00:00' end: '2026-09-20 11:00:00' comment: Meeting contact_id: 123 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/CalendarSuccess' default: $ref: '#/components/responses/Error' /apps/api/list/documents.json: get: tags: - documents summary: List documents operationId: list_documents parameters: - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Offset' - name: include_lines in: query schema: type: boolean description: Include lines - name: contact_id in: query schema: type: integer - name: doc_type_id in: query schema: type: integer - name: date_from in: query schema: type: string - name: date_to in: query schema: type: string - name: modified_since in: query schema: type: string - name: series in: query description: >- Filter `Seira` / `series` (trimmed, case- and accent-insensitive). Exact unless you include `%` (same rules as contacts `name` / `company`). schema: type: string - name: number in: query description: Exact document number (`Ariumospar` / `number`) schema: type: integer - name: related_docs in: query description: >- Search trimmed `Sxetika` / `related_docs` (case- and accent-insensitive). Exact unless you include `%` (same rules as contacts `name` / `company`). schema: type: string example: '%INV-2026%' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/DocumentListSuccess' default: $ref: '#/components/responses/Error' /apps/api/documents/{id}.json: get: tags: - documents summary: Get one documents operationId: get_documents parameters: - $ref: '#/components/parameters/IdPath' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/DocumentSuccess' default: $ref: '#/components/responses/Error' delete: tags: - documents summary: Delete one documents operationId: delete_documents parameters: - $ref: '#/components/parameters/IdPath' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Success' default: $ref: '#/components/responses/Error' /apps/api/save/documents.json: post: tags: - documents summary: Create or update documents operationId: save_documents requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DocumentSaveBody' example: id: 0 data: series: A number: 0 date: '2026-10-29 12:00:00' doc_type_id: 12 contact_id: 45 payment_method: Cash comment: API test lines: - product_id: 10 qty: 2 price: 10.5 discount: 0 vat_rate: 24 order: 10 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/DocumentSuccess' default: $ref: '#/components/responses/Error' security: - UserQuery: [] KeyQuery: []