{ "openapi": "3.0.3", "x-enable-proxy": true, "info": { "title": "Invoice4U API", "description": "The Invoice4U API lets you create tax-compliant documents (invoices, receipts, credit invoices and more), manage customers and branches, and charge credit cards through the Invoice4U clearing service.\n\nAll endpoints are POST with a JSON body that wraps the operation parameters by name (WCF wrapped-request style). Responses wrap the result in a `Result` property. Most endpoints require a `token` obtained from a login endpoint.", "version": "1.0.0", "contact": { "name": "Invoice4U Support", "url": "https://invoice4u.co.il" } }, "servers": [ { "url": "https://api.invoice4u.co.il/Services/ApiService.svc", "description": "Production" }, { "url": "https://apiqa.invoice4u.co.il/Services/ApiService.svc", "description": "QA (staging)" } ], "security": [], "tags": [ { "name": "Authentication", "description": "Obtain and manage authentication tokens." }, { "name": "Customers", "description": "Create, update and retrieve customers." }, { "name": "Branches", "description": "Organization branches." }, { "name": "Documents", "description": "Create and retrieve documents (invoices, receipts, etc.)." }, { "name": "Inventory", "description": "Manage inventory items, categories, suppliers, warehouses, and pricing." }, { "name": "Clearing", "description": "Credit-card charges, tokens, standing orders and clearing logs." }, { "name": "Registration", "description": "Partner-only account registration." } ], "paths": { "/GetExpDateByApiKey": { "post": { "tags": ["Authentication"], "operationId": "GetExpDateByApiKey", "summary": "Get account expiration date", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["token"], "properties": { "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "Expiration date string or \"UnauthorizedUser\".", "content": { "application/json": { "schema": { "type": "object", "properties": { "GetExpDateByApiKeyResult": { "type": "string" } } } } } } } } }, "/IsAuthenticated": { "post": { "tags": ["Authentication"], "operationId": "IsAuthenticated", "summary": "Verify a token or API key", "description": "Validates an organization API key (GUID) or token and returns the resolved user. An account expired more than 4 days ago adds an `ExpiredAccount` error.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["token"], "properties": { "token": { "type": "string", "description": "Your organization API key (GUID).", "example": "d2f1a6b3-1234-4c9a-9f00-1a2b3c4d5e6f" } } } } } }, "responses": { "200": { "description": "Resolved user, or a user object whose Errors array is populated when the token/key is invalid or the account is expired.", "content": { "application/json": { "schema": { "type": "object", "properties": { "IsAuthenticatedResult": { "type": "object", "description": "Authenticated user details.", "properties": { "ID": { "type": "integer" }, "Email": { "type": "string" }, "OrgID": { "type": "integer" }, "ExpirationDate": { "type": "string", "nullable": true }, "Errors": { "type": "array", "items": { "$ref": "#/components/schemas/CommonError" } } } } } } } } } } } }, "/CreateCustomer": { "post": { "tags": ["Customers"], "operationId": "CreateCustomer", "summary": "Create a customer", "description": "Creates a customer in the authenticated organization. If `cu.ID` exists, behaves like an update. Negative returned ID = conflict: -1 name, -2 external number, -3 unique ID, -4 GUID.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["cu", "token"], "properties": { "cu": { "$ref": "#/components/schemas/Customer" }, "token": { "type": "string" } } }, "example": { "cu": { "Name": "Acme Ltd", "UniqueID": "512345678", "Email": "billing@acme.example", "Phone": "03-1234567", "Active": true, "PayTerms": 30 }, "token": "" } } } }, "responses": { "200": { "description": "The created customer.", "content": { "application/json": { "schema": { "type": "object", "properties": { "CreateCustomerResult": { "$ref": "#/components/schemas/Customer" } } } } } } } } }, "/UpdateCustomer": { "post": { "tags": ["Customers"], "operationId": "UpdateCustomer", "summary": "Update a customer", "description": "Updates an existing customer. `cu.ID` must be a valid existing customer ID.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["cu", "token"], "properties": { "cu": { "$ref": "#/components/schemas/Customer" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "The updated customer.", "content": { "application/json": { "schema": { "type": "object", "properties": { "UpdateCustomerResult": { "$ref": "#/components/schemas/Customer" } } } } } } } } }, "/GetCustomerById": { "post": { "tags": ["Customers"], "operationId": "GetCustomerById", "summary": "Get customer by ID", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["custId", "token"], "properties": { "custId": { "type": "integer", "example": 88231 }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "The customer.", "content": { "application/json": { "schema": { "type": "object", "properties": { "GetCustomerByIdResult": { "$ref": "#/components/schemas/Customer" } } } } } } } } }, "/GetCustomersByOrgId": { "post": { "tags": ["Customers"], "operationId": "GetCustomersByOrgId", "summary": "List all customers", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["token"], "properties": { "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "All customers in the organization.", "content": { "application/json": { "schema": { "type": "object", "properties": { "GetCustomersByOrgIdResult": { "$ref": "#/components/schemas/CustomerCollection" } } } } } } } } }, "/GetCustomers": { "post": { "tags": ["Customers"], "operationId": "GetCustomers", "summary": "Search customers", "description": "Filtered search. Populate any subset of Customer fields as the filter.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["cust", "token"], "properties": { "cust": { "$ref": "#/components/schemas/Customer" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "Matching customers.", "content": { "application/json": { "schema": { "type": "object", "properties": { "GetCustomersResult": { "$ref": "#/components/schemas/CustomerCollection" } } } } } } } } }, "/GetBranches": { "post": { "tags": ["Branches"], "operationId": "GetBranches", "summary": "Get branches", "description": "Returns all branches for the authenticated organization. Returns null on auth/server error.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["token"], "properties": { "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "Branch list.", "content": { "application/json": { "schema": { "type": "object", "properties": { "GetBranchesResult": { "type": "array", "nullable": true, "items": { "$ref": "#/components/schemas/Branch" } } } } } } } } } }, "/CreateInventoryCategory": { "post": { "tags": ["Inventory"], "operationId": "CreateInventoryCategory", "summary": "Create an inventory category", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["itemCategory", "token"], "properties": { "itemCategory": { "$ref": "#/components/schemas/ItemCategory" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "The created category.", "content": { "application/json": { "schema": { "type": "object", "properties": { "CreateInventoryCategoryResult": { "$ref": "#/components/schemas/ItemCategory" } } } } } } } } }, "/UpdateInventoryCategory": { "post": { "tags": ["Inventory"], "operationId": "UpdateInventoryCategory", "summary": "Update an inventory category", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["itemCategory", "token"], "properties": { "itemCategory": { "$ref": "#/components/schemas/ItemCategory" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "The updated category.", "content": { "application/json": { "schema": { "type": "object", "properties": { "UpdateInventoryCategoryResult": { "$ref": "#/components/schemas/ItemCategory" } } } } } } } } }, "/GetInventoryCategoryById": { "post": { "tags": ["Inventory"], "operationId": "GetInventoryCategoryById", "summary": "Get inventory category by ID", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["id", "token"], "properties": { "id": { "type": "integer" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "The category.", "content": { "application/json": { "schema": { "type": "object", "properties": { "GetInventoryCategoryByIdResult": { "$ref": "#/components/schemas/ItemCategory" } } } } } } } } }, "/GetInventoryCategories": { "post": { "tags": ["Inventory"], "operationId": "GetInventoryCategories", "summary": "Get all inventory categories", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["token"], "properties": { "isActive": { "type": "boolean", "nullable": true }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "List of categories.", "content": { "application/json": { "schema": { "type": "object", "properties": { "GetInventoryCategoriesResult": { "type": "array", "items": { "$ref": "#/components/schemas/ItemCategory" } } } } } } } } } }, "/CreateSupplier": { "post": { "tags": ["Inventory"], "operationId": "CreateSupplier", "summary": "Create a supplier", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["supplier", "token"], "properties": { "supplier": { "$ref": "#/components/schemas/Supplier" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "The created supplier.", "content": { "application/json": { "schema": { "type": "object", "properties": { "CreateSupplierResult": { "$ref": "#/components/schemas/Supplier" } } } } } } } } }, "/UpdateSupplier": { "post": { "tags": ["Inventory"], "operationId": "UpdateSupplier", "summary": "Update a supplier", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["supplier", "token"], "properties": { "supplier": { "$ref": "#/components/schemas/Supplier" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "The updated supplier.", "content": { "application/json": { "schema": { "type": "object", "properties": { "UpdateSupplierResult": { "$ref": "#/components/schemas/Supplier" } } } } } } } } }, "/GetSupplier": { "post": { "tags": ["Inventory"], "operationId": "GetSupplier", "summary": "Get supplier by ID", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["id", "token"], "properties": { "id": { "type": "integer" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "The supplier.", "content": { "application/json": { "schema": { "type": "object", "properties": { "GetSupplierResult": { "$ref": "#/components/schemas/Supplier" } } } } } } } } }, "/GetSuppliers": { "post": { "tags": ["Inventory"], "operationId": "GetSuppliers", "summary": "Get all suppliers", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["token"], "properties": { "isActive": { "type": "boolean", "nullable": true }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "List of suppliers.", "content": { "application/json": { "schema": { "type": "object", "properties": { "GetSuppliersResult": { "type": "array", "items": { "$ref": "#/components/schemas/Supplier" } } } } } } } } } }, "/CreateWarehouse": { "post": { "tags": ["Inventory"], "operationId": "CreateWarehouse", "summary": "Create a warehouse", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["warehouse", "token"], "properties": { "warehouse": { "$ref": "#/components/schemas/Warehouse" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "The created warehouse.", "content": { "application/json": { "schema": { "type": "object", "properties": { "CreateWarehouseResult": { "$ref": "#/components/schemas/Warehouse" } } } } } } } } }, "/UpdateWarehouse": { "post": { "tags": ["Inventory"], "operationId": "UpdateWarehouse", "summary": "Update a warehouse", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["warehouse", "token"], "properties": { "warehouse": { "$ref": "#/components/schemas/Warehouse" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "The updated warehouse.", "content": { "application/json": { "schema": { "type": "object", "properties": { "UpdateWarehouseResult": { "$ref": "#/components/schemas/Warehouse" } } } } } } } } }, "/GetWarehouses": { "post": { "tags": ["Inventory"], "operationId": "GetWarehouses", "summary": "Get all warehouses", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["token"], "properties": { "isActive": { "type": "boolean", "nullable": true }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "List of warehouses.", "content": { "application/json": { "schema": { "type": "object", "properties": { "GetWarehousesResult": { "type": "array", "items": { "$ref": "#/components/schemas/Warehouse" } } } } } } } } } }, "/GetInventoryItems": { "post": { "tags": ["Inventory"], "operationId": "GetInventoryItems", "summary": "Get inventory items with filtering", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["token"], "properties": { "itemId": { "type": "integer", "nullable": true }, "fromSellingDate": { "type": "string", "format": "date-time", "nullable": true }, "toSellingDate": { "type": "string", "format": "date-time", "nullable": true }, "fromPurchasingDate": { "type": "string", "format": "date-time", "nullable": true }, "toPurchasingDate": { "type": "string", "format": "date-time", "nullable": true }, "isActive": { "type": "boolean", "nullable": true }, "serialNumber": { "type": "integer", "nullable": true }, "batchNumber": { "type": "integer", "nullable": true }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "List of inventory items.", "content": { "application/json": { "schema": { "type": "object", "properties": { "GetInventoryItemsResult": { "type": "array", "items": { "$ref": "#/components/schemas/Item" } } } } } } } } } }, "/GetActiveInventoryItems": { "post": { "tags": ["Inventory"], "operationId": "GetActiveInventoryItems", "summary": "Get active inventory items", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["token"], "properties": { "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "List of active inventory items.", "content": { "application/json": { "schema": { "type": "object", "properties": { "GetActiveInventoryItemsResult": { "type": "array", "items": { "$ref": "#/components/schemas/Item" } } } } } } } } } }, "/GetInventoryItem": { "post": { "tags": ["Inventory"], "operationId": "GetInventoryItem", "summary": "Get inventory item by ID", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["id", "token"], "properties": { "id": { "type": "integer" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "The inventory item.", "content": { "application/json": { "schema": { "type": "object", "properties": { "GetInventoryItemResult": { "$ref": "#/components/schemas/Item" } } } } } } } } }, "/CreateInventoryItem": { "post": { "tags": ["Inventory"], "operationId": "CreateInventoryItem", "summary": "Create an inventory item", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["item", "token"], "properties": { "item": { "$ref": "#/components/schemas/Item" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "The created inventory item.", "content": { "application/json": { "schema": { "type": "object", "properties": { "CreateInventoryItemResult": { "$ref": "#/components/schemas/Item" } } } } } } } } }, "/UpdateInventoryItem": { "post": { "tags": ["Inventory"], "operationId": "UpdateInventoryItem", "summary": "Update an inventory item", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["item", "token"], "properties": { "item": { "$ref": "#/components/schemas/Item" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "The updated inventory item.", "content": { "application/json": { "schema": { "type": "object", "properties": { "UpdateInventoryItemResult": { "$ref": "#/components/schemas/Item" } } } } } } } } }, "/ReceiveToStock": { "post": { "tags": ["Inventory"], "operationId": "ReceiveToStock", "summary": "Receive items to stock", "description": "Records a receipt document for items received into inventory.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["doc", "token"], "properties": { "doc": { "$ref": "#/components/schemas/Document" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "The created receipt document.", "content": { "application/json": { "schema": { "type": "object", "properties": { "ReceiveToStockResult": { "$ref": "#/components/schemas/Document" } } } } } } } } }, "/CreateDocument": { "post": { "tags": ["Documents"], "operationId": "CreateDocument", "summary": "Create a document", "description": "Creates a signed, numbered document. Totals are computed server-side from Items/Payments. Check the returned Errors list before using the result.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["doc", "token"], "properties": { "doc": { "$ref": "#/components/schemas/Document" }, "token": { "type": "string" } } }, "example": { "doc": { "DocumentType": 3, "Subject": "Monthly subscription", "ClientID": 88231, "TaxIncluded": true, "Currency": "ILS", "ApiIdentifier": "my-system-order-10045", "Items": [ { "Name": "Pro plan - June", "Quantity": 1, "Price": 117.0 } ], "Payments": [ { "PaymentType": 1, "Amount": 117.0, "Date": "2026-07-05T00:00:00", "NumberOfPayments": 1 } ], "AssociatedEmails": [ { "Mail": "billing@acme.example", "IsUserMail": false } ] }, "token": "" } } } }, "responses": { "200": { "description": "The created document (or a document carrying Errors).", "content": { "application/json": { "schema": { "type": "object", "properties": { "CreateDocumentResult": { "$ref": "#/components/schemas/Document" } } } } } } } } }, "/CreateDocumentWithIdentifierValidation": { "post": { "tags": ["Documents"], "operationId": "CreateDocumentWithIdentifierValidation", "summary": "Create a document with idempotency by ApiIdentifier", "description": "Same as CreateDocument, but if a document with the same ApiIdentifier and type already exists, the existing document is returned with error DocumentAlreadyCreated (134) instead of creating a duplicate.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["doc", "token"], "properties": { "doc": { "$ref": "#/components/schemas/Document" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "New or existing document.", "content": { "application/json": { "schema": { "type": "object", "properties": { "CreateDocumentWithIdentifierValidationResult": { "$ref": "#/components/schemas/Document" } } } } } } } } }, "/GetDocument": { "post": { "tags": ["Documents"], "operationId": "GetDocument", "summary": "Get document by GUID", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["docId", "token"], "properties": { "docId": { "type": "string", "format": "uuid" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "The document.", "content": { "application/json": { "schema": { "type": "object", "properties": { "GetDocumentResult": { "$ref": "#/components/schemas/Document" } } } } } } } } }, "/GetDocumentByNumber": { "post": { "tags": ["Documents"], "operationId": "GetDocumentByNumber", "summary": "Get document by number and type", "description": "Document numbers are sequential per type, so documentType is required.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["docNumber", "documentType", "token"], "properties": { "docNumber": { "type": "integer", "example": 20260123 }, "documentType": { "type": "integer", "example": 3 }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "The document.", "content": { "application/json": { "schema": { "type": "object", "properties": { "GetDocumentByNumberResult": { "$ref": "#/components/schemas/Document" } } } } } } } } }, "/GetDocumentByApiIdentifier": { "post": { "tags": ["Documents"], "operationId": "GetDocumentByApiIdentifier", "summary": "Get document by your ApiIdentifier", "description": "Recommended recovery path after a timed-out create call.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["apiIdentifier", "docType", "token"], "properties": { "apiIdentifier": { "type": "string", "example": "order-10045-invoice" }, "docType": { "type": "integer", "example": 1 }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "The document.", "content": { "application/json": { "schema": { "type": "object", "properties": { "GetDocumentByApiIdentifierResult": { "$ref": "#/components/schemas/Document" } } } } } } } } }, "/GetDocuments": { "post": { "tags": ["Documents"], "operationId": "GetDocuments", "summary": "Search documents", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["dr", "token"], "properties": { "dr": { "$ref": "#/components/schemas/DocumentsRequest" }, "token": { "type": "string" } } }, "example": { "dr": { "DocumentType": 3, "From": "2026-06-01T00:00:00", "To": "2026-06-30T23:59:59", "ItemsIncluded": true }, "token": "" } } } }, "responses": { "200": { "description": "Matching documents.", "content": { "application/json": { "schema": { "type": "object", "properties": { "GetDocumentsResult": { "$ref": "#/components/schemas/DocumentCollection" } } } } } } } } }, "/CreateOrUpdateDraftDocument": { "post": { "tags": ["Documents"], "operationId": "CreateOrUpdateDraftDocument", "summary": "Create or update a draft document", "description": "Saves an editable draft: no legal number, no quota usage, relaxed validation. Sending an existing draft ID updates it. IsPreviewDocument targets the organization's single preview slot.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["doc", "token"], "properties": { "doc": { "$ref": "#/components/schemas/Document" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "The saved draft.", "content": { "application/json": { "schema": { "type": "object", "properties": { "CreateOrUpdateDraftDocumentResult": { "$ref": "#/components/schemas/Document" } } } } } } } } }, "/GetDraftDocument": { "post": { "tags": ["Documents"], "operationId": "GetDraftDocument", "summary": "Get a draft document by GUID", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["docId", "token"], "properties": { "docId": { "type": "string", "format": "uuid" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "The draft document.", "content": { "application/json": { "schema": { "type": "object", "properties": { "GetDraftDocumentResult": { "$ref": "#/components/schemas/Document" } } } } } } } } }, "/GetDraftDocuments": { "post": { "tags": ["Documents"], "operationId": "GetDraftDocuments", "summary": "Search draft documents", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["dr", "token"], "properties": { "dr": { "$ref": "#/components/schemas/DocumentsRequest" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "Matching drafts.", "content": { "application/json": { "schema": { "type": "object", "properties": { "GetDraftDocumentsResult": { "$ref": "#/components/schemas/DocumentCollection" } } } } } } } } }, "/CheckIfDraftExistsByDocumentType": { "post": { "tags": ["Documents"], "operationId": "CheckIfDraftExistsByDocumentType", "summary": "Check whether a draft exists for a document type", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["docType", "token"], "properties": { "docType": { "type": "integer" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "True/false; null when the token is invalid.", "content": { "application/json": { "schema": { "type": "object", "properties": { "CheckIfDraftExistsByDocumentTypeResult": { "type": "boolean", "nullable": true } } } } } } } } }, "/DeleteDraftDocument": { "post": { "tags": ["Documents"], "operationId": "DeleteDraftDocument", "summary": "Delete a draft document", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["docId", "token"], "properties": { "docId": { "type": "string", "format": "uuid" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "Result envelope; DraftDocumentDeleteError (135) on failure.", "content": { "application/json": { "schema": { "type": "object", "properties": { "DeleteDraftDocumentResult": { "$ref": "#/components/schemas/Document" } } } } } } } } }, "/DeleteDraftDocuments": { "post": { "tags": ["Documents"], "operationId": "DeleteDraftDocuments", "summary": "Delete multiple draft documents", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["docIds", "token"], "properties": { "docIds": { "type": "array", "items": { "type": "string", "format": "uuid" } }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "Result envelope; DraftDocumentDeleteError (135) per failed id.", "content": { "application/json": { "schema": { "type": "object", "properties": { "DeleteDraftDocumentsResult": { "$ref": "#/components/schemas/Document" } } } } } } } } }, "/GetPreviewDocumentByToken": { "post": { "tags": ["Documents"], "operationId": "GetPreviewDocumentByToken", "summary": "Get the organization's preview document", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["token"], "properties": { "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "The preview document (saved with IsPreviewDocument: true).", "content": { "application/json": { "schema": { "type": "object", "properties": { "GetPreviewDocumentByTokenResult": { "$ref": "#/components/schemas/Document" } } } } } } } } }, "/FetchAllocationNumber": { "post": { "tags": ["Documents"], "operationId": "FetchAllocationNumber", "summary": "Fetch an Israel Tax allocation number for a document", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["docId", "token"], "properties": { "docId": { "type": "string", "format": "uuid" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "Document with AllocationNumber populated.", "content": { "application/json": { "schema": { "type": "object", "properties": { "FetchAllocationNumberResult": { "$ref": "#/components/schemas/Document" } } } } } } } } }, "/UpdateAllocationNumber": { "post": { "tags": ["Documents"], "operationId": "UpdateAllocationNumber", "summary": "Set an allocation number manually", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["docId", "allocationNumber", "token"], "properties": { "docId": { "type": "string", "format": "uuid" }, "allocationNumber": { "type": "string", "minLength": 9 }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "Result; check Errors (AllocationNumberInvalid=162).", "content": { "application/json": { "schema": { "type": "object", "properties": { "UpdateAllocationNumberResult": { "$ref": "#/components/schemas/Document" } } } } } } } } }, "/ProcessApiRequestV2": { "post": { "tags": ["Clearing"], "operationId": "ProcessApiRequestV2", "summary": "Process a clearing request", "description": "Creates a hosted payment page, charges a saved token, or refunds a previous charge — and optionally creates the matching document. The response is the same object enriched with results (ClearingRedirectUrl, PaymentId, DocumentNumber...).", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["request"], "properties": { "request": { "$ref": "#/components/schemas/ApiClearingRequest" } } }, "examples": { "hosted-page-charge": { "summary": "Hosted page charge + auto document", "value": { "request": { "Invoice4UUserApiKey": "d2f1a6b3-1234-4c9a-9f00-1a2b3c4d5e6f", "Sum": 117.0, "CreditCardCompanyType": 7, "Currency": "NIS", "Type": 1, "FullName": "Israel Israeli", "Phone": "0501234567", "Email": "israel@example.com", "Description": "Order #10045", "IsDocCreate": true, "ReturnUrl": "https://shop.example/thanks", "CallBackUrl": "https://shop.example/api/i4u-callback", "IsQaMode": true } } }, "refund": { "summary": "Refund a previous charge by PaymentId", "description": "Server-to-server, no redirect. PaymentId locates the original charge in the clearing log (PaymentIDDoesntExists 60 when not found). On success, an InvoiceCredit is created automatically when the original document is traceable via the clearing log.", "value": { "request": { "Invoice4UUserApiKey": "d2f1a6b3-1234-4c9a-9f00-1a2b3c4d5e6f", "Refund": true, "Sum": 117.0, "PaymentId": "100200300", "CreditCardCompanyType": 7, "Currency": "NIS", "FullName": "Israel Israeli", "Phone": "0501234567", "Email": "israel@example.com", "Description": "Refund for order #10045", "IsQaMode": true } } } } } } }, "responses": { "200": { "description": "The enriched clearing request.", "content": { "application/json": { "schema": { "type": "object", "properties": { "ProcessApiRequestV2Result": { "$ref": "#/components/schemas/ApiClearingRequest" } } } } } } } } }, "/GetClearingLogById": { "post": { "tags": ["Clearing"], "operationId": "GetClearingLogById", "summary": "Get a clearing log row", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["clearingLogId", "token"], "properties": { "clearingLogId": { "type": "integer" }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "The clearing log.", "content": { "application/json": { "schema": { "type": "object", "properties": { "GetClearingLogByIdResult": { "$ref": "#/components/schemas/ClearingLog" } } } } } } } } }, "/GetClearingLogByParams": { "post": { "tags": ["Clearing"], "operationId": "GetClearingLogByParams", "summary": "Search clearing logs", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["searchParams", "token"], "properties": { "searchParams": { "type": "object", "description": "Filter object (date range, success flag, etc.).", "properties": { "FromDate": { "type": "string", "format": "date-time" }, "ToDate": { "type": "string", "format": "date-time" }, "IsSuccess": { "type": "boolean" } } }, "token": { "type": "string" } } } } } }, "responses": { "200": { "description": "Matching clearing logs.", "content": { "application/json": { "schema": { "type": "object", "properties": { "GetClearingLogByParamsResult": { "type": "array", "items": { "$ref": "#/components/schemas/ClearingLog" } } } } } } } } } }, "/UserRegistrationApi": { "post": { "tags": ["Registration"], "operationId": "UserRegistrationApi", "summary": "Register a new Invoice4U account (partners only)", "description": "Restricted endpoint: requires a partner-specific unique token issued by Invoice4U and a whitelisted server IP. Contact Invoice4U business development for onboarding.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["user", "token", "uniqueToken"], "properties": { "user": { "$ref": "#/components/schemas/UserRegApiObject" }, "token": { "type": "string", "description": "Authentication token." }, "uniqueToken": { "type": "string", "description": "Partner token issued by Invoice4U." } } } } } }, "responses": { "200": { "description": "The registered account; check Errors (ApiInvalidUniqueToken=308, ApiUnauthorizedAccessInvalidIPAddress=306).", "content": { "application/json": { "schema": { "type": "object", "properties": { "UserRegistrationApiResult": { "$ref": "#/components/schemas/UserRegApiObject" } } } } } } } } } }, "components": { "schemas": { "CommonError": { "type": "object", "properties": { "ID": { "type": "integer", "description": "Numeric error code, e.g. 80 = UnauthorizedUser, 134 = DocumentAlreadyCreated." }, "Error": { "type": "string", "description": "Error name." }, "Paramters": { "type": "string", "nullable": true, "description": "Optional context, e.g. \"Row Number - 0\"." } } }, "CommonInfo": { "type": "object", "properties": { "ID": { "type": "integer" }, "Info": { "type": "string" }, "Paramters": { "type": "string", "nullable": true } } }, "CommonObject": { "type": "object", "description": "Response envelope inherited by most objects. Server-generated — never send these fields in requests. Always check Errors before using the payload.", "properties": { "Errors": { "type": "array", "readOnly": true, "items": { "$ref": "#/components/schemas/CommonError" } }, "Info": { "type": "array", "readOnly": true, "items": { "$ref": "#/components/schemas/CommonInfo" } }, "OpenInfo": { "type": "object", "readOnly": true, "additionalProperties": { "type": "string" }, "nullable": true } } }, "AssociatedEmail": { "type": "object", "required": ["Mail"], "properties": { "Mail": { "type": "string", "format": "email" }, "IsUserMail": { "type": "boolean", "description": "true marks the copy sent to the account owner." }, "ClientId": { "type": "integer", "nullable": true }, "IsSendDoc": { "type": "boolean", "nullable": true } } }, "GenerelCustomer": { "type": "object", "required": ["Name"], "description": "One-off (general) customer for documents without a stored customer record.", "properties": { "ID": { "type": "integer" }, "Name": { "type": "string" }, "Identifier": { "type": "string", "description": "VAT/ID number." } } }, "Discount": { "type": "object", "required": ["Value"], "properties": { "Value": { "type": "number", "format": "double" }, "IsNominal": { "type": "boolean", "description": "true = fixed amount, false = percent." }, "BeforeTax": { "type": "boolean" } } }, "DocumentItem": { "type": "object", "required": ["Name", "Quantity", "Price"], "properties": { "Name": { "type": "string" }, "Description": { "type": "string", "nullable": true }, "Price": { "type": "number", "format": "double", "description": "Unit price." }, "PriceIncludeTax": { "type": "number", "format": "double", "description": "Price including VAT (when TaxIncluded)." }, "Quantity": { "type": "number", "format": "double" }, "TaxPercentage": { "type": "number", "format": "double", "nullable": true, "description": "Per-item VAT override." }, "Discount": { "$ref": "#/components/schemas/Discount" }, "Code": { "type": "string", "nullable": true, "description": "Catalog code." }, "LawyerIdentifier": { "type": "string", "nullable": true, "description": "Lawyer accounts: \"1\" deposits, \"2\" expenses." }, "InventoryId": { "type": "integer", "nullable": true }, "WarehouseId": { "type": "integer", "nullable": true }, "Total": { "type": "number", "format": "double", "readOnly": true }, "TotalWithoutTax": { "type": "number", "format": "double", "readOnly": true }, "TotalTax": { "type": "number", "format": "double", "readOnly": true } } }, "Payment": { "type": "object", "required": ["PaymentType", "Amount"], "properties": { "ID": { "type": "integer", "description": "Existing payment ID — used for Deposits documents." }, "PaymentType": { "type": "integer", "description": "1 CreditCard, 2 Check, 3 MoneyTransfer, 4 Cash, 5 Credit, 6 WithholdingTax, 7 Other, 8 Bit, 9 PayBox.", "enum": [1, 2, 3, 4, 5, 6, 7, 8, 9] }, "Amount": { "type": "number", "format": "double" }, "Date": { "type": "string", "format": "date-time", "nullable": true }, "DateStr": { "type": "string", "nullable": true, "description": "Alternative string date when Date is not set." }, "NumberOfPayments": { "type": "integer", "description": "Credit-card installments." }, "CreditCardName": { "type": "string", "nullable": true, "description": "Card brand name; resolved against configured credit companies." }, "CreditCardType": { "type": "integer", "nullable": true }, "PaymentNumber": { "type": "string", "nullable": true, "description": "Check number / last 4 card digits." }, "BankName": { "type": "string", "nullable": true }, "BranchName": { "type": "string", "nullable": true }, "AccountNumber": { "type": "string", "nullable": true }, "PayerID": { "type": "string", "nullable": true }, "ExpirationDate": { "type": "string", "nullable": true }, "PaymentTypeOtherId": { "type": "integer", "description": "Sub-type when PaymentType=7 (Other)." }, "PaymentTypeLiteral": { "type": "string", "nullable": true } } }, "Document": { "allOf": [ { "$ref": "#/components/schemas/CommonObject" }, { "type": "object", "required": ["DocumentType"], "properties": { "ID": { "type": "string", "format": "uuid", "readOnly": true }, "DocumentNumber": { "type": "integer", "format": "int64", "readOnly": true, "description": "Legal sequential number, per type." }, "DocumentType": { "type": "integer", "description": "1 Invoice, 2 Receipt, 3 InvoiceReceipt, 4 InvoiceCredit, 5 ProformaInvoice, 6 InvoiceOrder, 7 InvoiceQuote, 8 InvoiceShip, 9 Deposits, 10 SupplierInvoiceToInventory, 13 PurchaseOrder.", "enum": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13] }, "Subject": { "type": "string", "nullable": true }, "ClientID": { "type": "integer", "nullable": true, "description": "Existing customer ID. Required unless GeneralCustomer is supplied or the type doesn't need a customer." }, "GeneralCustomer": { "$ref": "#/components/schemas/GenerelCustomer" }, "Items": { "type": "array", "nullable": true, "items": { "$ref": "#/components/schemas/DocumentItem" } }, "Payments": { "type": "array", "nullable": true, "items": { "$ref": "#/components/schemas/Payment" } }, "Invoices": { "type": "array", "nullable": true, "description": "Referenced documents (each with ID and ReceiptAmount). Requires DocumentReffType.", "items": { "type": "object", "properties": { "ID": { "type": "string", "format": "uuid" }, "ReceiptAmount": { "type": "number", "format": "double" } } } }, "DocumentReffType": { "type": "integer", "description": "Type of the referenced documents." }, "IssueDate": { "type": "string", "format": "date-time", "nullable": true, "description": "Defaults to today. Not in the future; not before your latest document of the type." }, "Currency": { "type": "string", "nullable": true, "example": "ILS" }, "ConversionRate": { "type": "number", "format": "double", "description": "Auto-resolved when 0." }, "TaxPercentage": { "type": "number", "format": "double", "nullable": true }, "TaxIncluded": { "type": "boolean", "description": "Whether item prices include VAT." }, "Discount": { "$ref": "#/components/schemas/Discount" }, "BranchID": { "type": "integer", "nullable": true, "description": "Defaults to the organization's default branch." }, "Language": { "type": "integer", "description": "1 Hebrew, 2 English." }, "AssociatedEmails": { "type": "array", "nullable": true, "items": { "$ref": "#/components/schemas/AssociatedEmail" } }, "ExternalComments": { "type": "string", "nullable": true, "maxLength": 5000 }, "InternalComments": { "type": "string", "nullable": true }, "EmailCustomComment": { "type": "string", "nullable": true }, "ApiIdentifier": { "type": "string", "nullable": true, "description": "Idempotency key. Auto-generated if missing." }, "ApiDuplicityTimeValidation": { "type": "integer", "description": "Duplicate-detection window in seconds. Default 60." }, "PaymentDueDate": { "type": "string", "format": "date-time", "nullable": true }, "Deduction": { "type": "number", "format": "double", "description": "Withholding-tax deduction (receipts)." }, "CloseReceipt": { "type": "boolean" }, "IsSelfInvoice": { "type": "boolean" }, "SupplierId": { "type": "integer", "nullable": true }, "SupplierName": { "type": "string", "nullable": true }, "UseDecimalValues": { "type": "boolean" }, "AutoFixPaymentsMismatchItems": { "type": "boolean", "description": "Auto-fix ±0.01 rounding gaps between payments and items." }, "AutoFixMismatchItemName": { "type": "string", "nullable": true }, "Total": { "type": "number", "format": "double", "readOnly": true }, "TotalWithoutTax": { "type": "number", "format": "double", "readOnly": true }, "TotalTaxAmount": { "type": "number", "format": "double", "readOnly": true }, "StatusID": { "type": "integer", "readOnly": true, "description": "1 Open, 2 Closed, 3 FullyCredited, 4 PartiallyCredited, 5 Cancelled." }, "PrintOriginalPDFLink": { "type": "string", "readOnly": true, "description": "Direct link to view/print the original PDF: {baseViewUrl}/Views/PDF.aspx?cipher={CipherTextOriginal}. Base view URL is https://newview.invoice4u.co.il on production, https://newviewqa.invoice4u.co.il on QA. No separate Base64/raw-PDF-bytes field exists." }, "PrintCertifiedCopyPDFLink": { "type": "string", "readOnly": true, "description": "Direct link to view/print a certified copy: {baseViewUrl}/Views/PDF.aspx?cipher={CipherText}. Same base view URL as PrintOriginalPDFLink." }, "CipherText": { "type": "string", "readOnly": true, "description": "Encrypted token identifying this document; used as the cipher query param in PrintCertifiedCopyPDFLink." }, "CipherTextOriginal": { "type": "string", "readOnly": true, "description": "Encrypted token identifying this document as the original; used as the cipher query param in PrintOriginalPDFLink." }, "AllocationNumber": { "type": "string", "nullable": true, "readOnly": true }, "Paid": { "type": "number", "format": "double", "readOnly": true }, "CreditAmount": { "type": "number", "format": "double", "readOnly": true }, "Balance": { "type": "number", "format": "double", "readOnly": true } } } ] }, "Customer": { "allOf": [ { "$ref": "#/components/schemas/CommonObject" }, { "type": "object", "required": ["Name"], "properties": { "ID": { "type": "integer", "description": "0/omitted on create; required on update. Negative values are conflict codes: -1 name, -2 external number, -3 unique ID, -4 GUID." }, "Name": { "type": "string" }, "UniqueID": { "type": "string", "nullable": true, "description": "VAT/company/ID number. Digits only." }, "Email": { "type": "string", "nullable": true }, "Phone": { "type": "string", "nullable": true }, "Cell": { "type": "string", "nullable": true }, "Fax": { "type": "string", "nullable": true }, "Address": { "type": "string", "nullable": true }, "City": { "type": "string", "nullable": true }, "Zip": { "type": "string", "nullable": true }, "Country": { "type": "string", "nullable": true }, "CountryId": { "type": "integer", "nullable": true }, "ExtNumber": { "type": "integer", "format": "int64", "nullable": true, "description": "Your external customer number. Unique per organization." }, "Active": { "type": "boolean" }, "PayTerms": { "type": "integer", "description": "Payment terms in days (0 = due now, 30 = EOM+30, ...)." }, "IsNonUniqueNameCreation": { "type": "boolean", "nullable": true, "description": "Allow duplicate names. Default false." }, "Guid": { "type": "string", "nullable": true, "description": "Your external GUID. Unique per organization." }, "ClientCode": { "type": "integer" }, "ContactFirstName": { "type": "string", "nullable": true }, "ContactLastName": { "type": "string", "nullable": true }, "ContactName": { "type": "string", "nullable": true }, "ContactEmail": { "type": "string", "nullable": true }, "CustomerEmails": { "type": "array", "nullable": true, "items": { "$ref": "#/components/schemas/AssociatedEmail" } }, "AccountNumber": { "type": "string", "nullable": true }, "BankName": { "type": "string", "nullable": true }, "BranchName": { "type": "string", "nullable": true }, "Website": { "type": "string", "nullable": true }, "InternalNote": { "type": "string", "nullable": true }, "OrgID": { "type": "integer", "readOnly": true } } } ] }, "CustomerCollection": { "allOf": [ { "$ref": "#/components/schemas/CommonObject" }, { "type": "object", "properties": { "Response": { "type": "array", "nullable": true, "items": { "$ref": "#/components/schemas/Customer" } } } } ] }, "DocumentCollection": { "allOf": [ { "$ref": "#/components/schemas/CommonObject" }, { "type": "object", "properties": { "Response": { "type": "array", "nullable": true, "items": { "$ref": "#/components/schemas/Document" } } } } ] }, "Branch": { "type": "object", "properties": { "ID": { "type": "integer" }, "Name": { "type": "string" }, "Description": { "type": "string", "nullable": true }, "Enabled": { "type": "boolean" }, "IsDefault": { "type": "boolean" }, "IsMain": { "type": "boolean" }, "Email": { "type": "string", "nullable": true } } }, "DocumentsRequest": { "type": "object", "required": ["DocumentType"], "properties": { "DocumentType": { "type": "integer", "description": "Single document type filter." }, "DocumentTypes": { "type": "string", "nullable": true, "description": "Comma-separated list of types." }, "From": { "type": "string", "format": "date-time", "nullable": true }, "To": { "type": "string", "format": "date-time", "nullable": true }, "FromActualCreationDate": { "type": "string", "format": "date-time", "nullable": true }, "ToActualCreationDate": { "type": "string", "format": "date-time", "nullable": true }, "FromPaymentDueDate": { "type": "string", "format": "date-time", "nullable": true }, "ToPaymentDueDate": { "type": "string", "format": "date-time", "nullable": true }, "Status": { "type": "integer", "description": "Document status filter." }, "CustomerID": { "type": "integer", "nullable": true }, "CustomerName": { "type": "string", "nullable": true }, "BranchID": { "type": "integer" }, "DocumentNumber": { "type": "integer" }, "ExectDocumentNumber": { "type": "integer", "description": "Exact document number." }, "FromNumber": { "type": "integer", "nullable": true }, "ToNumber": { "type": "integer", "nullable": true }, "FromAmount": { "type": "number", "format": "float", "nullable": true }, "ToAmount": { "type": "number", "format": "float", "nullable": true }, "Currency": { "type": "string", "nullable": true }, "PaymentType": { "type": "integer" }, "ItemCode": { "type": "string", "nullable": true }, "ItemDescription": { "type": "string", "nullable": true }, "ItemsIncluded": { "type": "boolean", "nullable": true, "description": "Include full Items in results." }, "PaymentsIncluded": { "type": "boolean", "nullable": true, "description": "Include full Payments in results." }, "OnlyGeneralClient": { "type": "boolean", "nullable": true }, "GeneralClientName": { "type": "string", "nullable": true } } }, "ApiClearingRequest": { "allOf": [ { "$ref": "#/components/schemas/CommonObject" }, { "type": "object", "required": ["Sum", "CreditCardCompanyType"], "properties": { "Invoice4UUserApiKey": { "type": "string", "format": "uuid", "nullable": true, "description": "Your organization API key — the only supported authentication for clearing. Malformed GUID = ApiKeyNotInCorrectFormat (303); unknown key = UnauthorizedUser (80)." }, "Sum": { "type": "number", "format": "double", "description": "Amount to charge/refund." }, "CreditCardCompanyType": { "type": "integer", "description": "Clearing company type (ClearingCompanies): 6 UPay, 7 Meshulam, 12 YaadSarig, 15 Cardcom — must match the provider configured on your terminal.", "enum": [6, 7, 12, 15] }, "Currency": { "type": "string", "description": "NIS (default), USD, EUR.", "example": "NIS" }, "Type": { "type": "integer", "description": "1 Regular (default), 2 Payments, 3 CreditPayments, 4 Refund.", "enum": [1, 2, 3, 4] }, "PaymentsNum": { "type": "integer", "description": "Installments when Type is 2/3." }, "Description": { "type": "string", "nullable": true }, "IsQaMode": { "type": "boolean", "description": "true when testing against QA." }, "OrderIdClientUsage": { "type": "string", "nullable": true, "description": "Your order reference, echoed in callbacks." }, "Platform": { "type": "string", "nullable": true, "description": "Free-text identifier of the originating platform/system." }, "FullName": { "type": "string", "nullable": true, "description": "Customer name (required without CustomerId)." }, "Phone": { "type": "string", "nullable": true }, "Email": { "type": "string", "nullable": true }, "CustomerId": { "type": "integer", "nullable": true, "description": "Existing customer ID." }, "IsAutoCreateCustomer": { "type": "boolean", "description": "Find-or-create a customer record by phone/email." }, "IsGeneralClient": { "type": "boolean", "description": "Issue the document to a general customer. Default true." }, "ReturnUrl": { "type": "string", "nullable": true, "description": "Customer redirect after payment." }, "CallBackUrl": { "type": "string", "nullable": true, "description": "Server-to-server notification URL." }, "IsDocCreate": { "type": "boolean", "description": "Create a document after a successful charge." }, "DocHeadline": { "type": "string", "nullable": true }, "IsManualDocCreationsWithParams": { "type": "boolean", "description": "Provide explicit items via pipe-separated DocItem* fields." }, "DocItemName": { "type": "string", "nullable": true, "description": "Pipe-separated item names, e.g. \"Item A|Item B\"." }, "DocItemQuantity": { "type": "string", "nullable": true }, "DocItemPrice": { "type": "string", "nullable": true }, "DocItemCode": { "type": "string", "nullable": true }, "DocItemTaxRate": { "type": "string", "nullable": true }, "IsItemsBase64Encoded": { "type": "boolean", "nullable": true }, "DocBranchId": { "type": "string", "nullable": true }, "DocComments": { "type": "string", "nullable": true }, "Language": { "type": "string", "nullable": true, "description": "Page language: he / en." }, "DocLanguage": { "type": "string", "nullable": true, "description": "Document language: he / en." }, "TaxPercentage": { "type": "number", "format": "double", "nullable": true }, "AddToken": { "type": "boolean", "description": "Save a card token without charging." }, "AddTokenAndCharge": { "type": "boolean", "description": "Save a token and charge Sum." }, "ChargeWithToken": { "type": "boolean", "description": "Charge the customer's stored token (server-to-server)." }, "Refund": { "type": "boolean", "description": "Refund a previous charge (with PaymentId)." }, "PaymentId": { "type": "string", "nullable": true, "description": "Provider payment reference; response field for hosted pages, request field for refunds." }, "IsStandingOrderClearance": { "type": "boolean", "description": "Set up a recurring monthly charge." }, "StandingOrderDuration": { "type": "integer", "nullable": true, "description": "Number of monthly charges. Required for standing orders." }, "StandingOrderFirstChargeAmount": { "type": "number", "format": "double", "nullable": true }, "StandingOrderCallBackUrl": { "type": "string", "nullable": true }, "IsBitPayment": { "type": "boolean", "nullable": true }, "IsGooglePay": { "type": "boolean", "nullable": true }, "IsApplePay": { "type": "boolean", "nullable": true }, "ClearingRedirectUrl": { "type": "string", "nullable": true, "readOnly": true, "description": "Hosted payment page URL — redirect the customer here." }, "DocumentId": { "type": "string", "format": "uuid", "nullable": true, "readOnly": true }, "DocumentNumber": { "type": "integer", "format": "int64", "readOnly": true }, "CipherText": { "type": "string", "nullable": true, "readOnly": true } } } ] }, "ClearingLog": { "allOf": [ { "$ref": "#/components/schemas/CommonObject" }, { "type": "object", "properties": { "Id": { "type": "integer" }, "Date": { "type": "string", "format": "date-time" }, "LogType": { "type": "integer", "nullable": true, "description": "1 Request, 2 Response." }, "ClientName": { "type": "string", "nullable": true }, "Amount": { "type": "number", "format": "double" }, "PaymentNumber": { "type": "integer", "description": "Installments." }, "Currency": { "type": "integer", "description": "1 NIS, 2 USD, 3 EUR." }, "CreditNumber": { "type": "string", "nullable": true, "description": "Last 4 card digits." }, "ClearingCompany": { "type": "integer", "description": "ClearingCompanies enum: 6 UPay, 7 Meshulam, 12 YaadSarig, 15 Cardcom." }, "ClearingCompanyName": { "type": "string", "nullable": true }, "IsSuccess": { "type": "boolean" }, "ErrorMessage": { "type": "string", "nullable": true }, "ClearingConfirmationNumber": { "type": "string", "nullable": true }, "ClearingTraceId": { "type": "string", "nullable": true }, "PaymentId": { "type": "string", "nullable": true, "description": "Provider payment reference — use for refunds." }, "IsCredit": { "type": "boolean", "description": "true for refund rows." }, "CreditedTransaction": { "type": "boolean", "nullable": true }, "CreditAmount": { "type": "number", "format": "double", "nullable": true }, "IsToken": { "type": "boolean", "nullable": true }, "IsBitPayment": { "type": "boolean", "nullable": true }, "IsGooglePay": { "type": "boolean", "nullable": true }, "IsApplePay": { "type": "boolean", "nullable": true }, "IsDocumentCreated": { "type": "boolean", "nullable": true }, "DocId": { "type": "string", "format": "uuid", "nullable": true }, "TransactionType": { "type": "integer", "nullable": true, "description": "0 Charge, 1 TokenCreation, 2 TokenAndCharge, 3 ChargeByToken, 4 PaymentInNumbers, 5 PaymentWithFees, 6 Credit, 7 MobileAppPersonalPayment, 8 TokenPaymentInNumbers." } } } ] }, "UserRegApiObject": { "allOf": [ { "$ref": "#/components/schemas/CommonObject" }, { "type": "object", "required": ["Email", "UserPassword", "FirstName", "LastName", "CompanyName", "OrganizationUniqueId"], "properties": { "ID": { "type": "integer", "readOnly": true }, "OrganizationID": { "type": "integer", "readOnly": true }, "Email": { "type": "string", "format": "email" }, "UserPassword": { "type": "string", "format": "password" }, "FirstName": { "type": "string" }, "LastName": { "type": "string" }, "CompanyName": { "type": "string" }, "OrganizationUniqueId": { "type": "string", "description": "Business VAT/company number. Must be unique." }, "Phone": { "type": "string", "nullable": true }, "Mobile": { "type": "string", "nullable": true }, "TaxRate": { "type": "integer", "description": "Legal VAT rate or 0 (tax-exempt)." }, "BusinessType": { "type": "integer", "nullable": true, "default": 1 }, "BundleID": { "type": "integer" }, "ApiKey": { "type": "string", "format": "uuid", "nullable": true, "description": "Pre-provisioned API key for the new account." } } } ] }, "ItemCategory": { "allOf": [ { "$ref": "#/components/schemas/CommonObject" }, { "type": "object", "required": ["Name"], "properties": { "Id": { "type": "integer" }, "Name": { "type": "string" }, "Description": { "type": "string", "nullable": true }, "IsActive": { "type": "boolean" } } } ] }, "Supplier": { "allOf": [ { "$ref": "#/components/schemas/CommonObject" }, { "type": "object", "required": ["Name"], "properties": { "Id": { "type": "integer" }, "Name": { "type": "string" }, "Email": { "type": "string", "nullable": true }, "Phone": { "type": "string", "nullable": true }, "Address": { "type": "string", "nullable": true }, "City": { "type": "string", "nullable": true }, "Country": { "type": "string", "nullable": true }, "IsActive": { "type": "boolean" } } } ] }, "Warehouse": { "allOf": [ { "$ref": "#/components/schemas/CommonObject" }, { "type": "object", "required": ["Name"], "properties": { "Id": { "type": "integer" }, "Name": { "type": "string" }, "Address": { "type": "string", "nullable": true }, "City": { "type": "string", "nullable": true }, "Phone": { "type": "string", "nullable": true }, "IsActive": { "type": "boolean" } } } ] }, "ItemInstance": { "allOf": [ { "$ref": "#/components/schemas/CommonObject" }, { "type": "object", "properties": { "Id": { "type": "integer" }, "SerialNumber": { "type": "string", "nullable": true }, "BatchNumber": { "type": "string", "nullable": true } } } ] }, "Item": { "allOf": [ { "$ref": "#/components/schemas/CommonObject" }, { "type": "object", "required": ["Name"], "properties": { "Id": { "type": "integer" }, "Name": { "type": "string" }, "CategoryId": { "type": "integer", "nullable": true }, "SKU": { "type": "string", "nullable": true }, "Description": { "type": "string", "nullable": true }, "Price": { "type": "number", "format": "double" }, "Cost": { "type": "number", "format": "double", "nullable": true }, "ImageUrl": { "type": "string", "nullable": true }, "IsActive": { "type": "boolean" }, "ItemInstances": { "type": "array", "nullable": true, "items": { "$ref": "#/components/schemas/ItemInstance" } } } } ] }, "Pricelist": { "allOf": [ { "$ref": "#/components/schemas/CommonObject" }, { "type": "object", "required": ["Name"], "properties": { "Id": { "type": "integer" }, "Name": { "type": "string" }, "Description": { "type": "string", "nullable": true }, "IsActive": { "type": "boolean" } } } ] }, "PricelistWithCustomer": { "allOf": [ { "$ref": "#/components/schemas/Pricelist" }, { "type": "object", "properties": { "CustomerId": { "type": "integer" } } } ] }, "ItemBalance": { "allOf": [ { "$ref": "#/components/schemas/CommonObject" }, { "type": "object", "properties": { "ItemId": { "type": "integer" }, "ItemName": { "type": "string", "nullable": true }, "Quantity": { "type": "number", "format": "double" }, "Cost": { "type": "number", "format": "double" }, "TotalValue": { "type": "number", "format": "double" } } } ] } } } }