IntegService API Guide
IntegService is the REST service that shares data from SGO, DBHSOFT's sales and distribution software, with external systems. Your ERP, accounting or e-commerce system uses it to pull slips and invoices, create orders, and read or write customer, payment, product, price and stock data.
Every method works the same way: first get a token with your user name and password, then send that token in the Authorization header of every request. What you can see depends on the permissions set up for your account (method role, distributor, slip type, balance). Requests and responses are JSON.
If you are new, read Overview, Authentication and Permissions in that order, then go to the page of the method you need. Each method page lists the address, the request fields (required ones are marked), a sample request and a sample response.
Contents
Overview
What the service does, address prefixes, test/live environments and the common response envelope.
1. Authentication (getting a token)
Getting a 30-day token with user name and password, and sending it with requests.
2. Permissions
Method role, distributor, slip type and balance permissions, which decide what data you see.
3. Slip export request
Exporting slips by date range and filters with getinv: request fields and what is required.
4. Example requests
Ready-to-use curl and JSON samples for getting a token and exporting slips.
5. Response structure
Field-by-field description of slips, customers, items and discounts in the export response.
6. Error codes and common situations
HTTP status codes, error messages and fixes for common problems.
7. Invoices and orders
Reading, creating, revising, cancelling slips and orders, and checking their status.
- 7.1 getall — Pulls new slips and orders and marks them as taken.
- 7.2 bill (creating a slip) — Creates a new slip (invoice, order, return) with items and discounts.
- 7.3 Revise (updating an existing slip) — Closes an existing slip and creates the updated slip in its place.
- 7.4 Cancellation and approval — Cancels or approves a slip.
- 7.5 getInvStatus — Returns the current status of slips without marking them.
8. Customers, reports and properties
Customer cards, adding/updating customers, account statement report and property lists.
- 8.1 GetOutletList and getOutletListFull — Returns the customer list; the Full version also includes balance and detail fields.
- 8.2 GetSaleOutletWise — Returns a sales summary per customer.
- 8.3 customer (adding and updating customers) — Finds a customer by code; adds it if missing, otherwise updates the fields sent.
- 8.4 getCustomerAccountCumulativeReport — Returns a customer's debit, credit and balance movements for a period.
- 8.5 props/list — Returns the defined property (prop) lists.
9. Payments
Reading and writing collections, payments, service invoices and balance adjustments.
- 9.1 getPay — Pulls new collections and payments.
- 9.2 GetPayment, GetServiceInvoice, BalanceEqualizing — Queries payments, service invoices and balance adjustments with filters.
- 9.3 add and Update (writing collections/payments) — Adds a new collection/payment or updates an existing one.
- 9.4 Cancel — Cancels a collection/payment record.
- 9.5 AddServiceInvoice and UpdateServiceInvoice — Adds or updates a service invoice.
10. Products
Product card, unit, price, property, translation and suggested order methods.
- 10.1 Reading products (getmetalist, single product, metaunits) — Returns the product list, a single product and a product's units.
- 10.2 Saving products — Adds or updates products; send all fields when updating.
- 10.3 Deleting and deactivating — Deletes a product permanently or removes it from sale (delist).
- 10.4 Prices — Reads product prices and adds/updates them in bulk.
- 10.5 Properties and translations — Reads and writes product properties and name translations.
- 10.6 Suggested order (suggestedOrder) — Writes a customer-specific suggested order list.
11. Stocks and token check
Warehouse and distributor stock, past stock report and token validity check.
- 11.1 PastStockMonitoringReportByProduct — Stock report per product based on movements before a given day.
- 11.2 GetWarehouseStock — Returns current stock quantities in a warehouse.
- 11.3 GetDistSales and GetDistStock — Returns distributor sales and stock data.
- 11.4 account/check — Checks whether the token is valid and returns a new one if needed.
DBHSOFT · IntegService API Guide · Version 1.0