Overview

Every request goes through the same three steps 1. Get a token POST /api/v1/account/ authenticate Valid for 30 days 2. Permission check Role · Distributor Slip type · Balance Unauthorized: 401 / 403 3. Call the method Authorization: Bearer <token> JSON request · JSON response When the token expires, /api/v1/account/check returns a new one, or call authenticate again.

IntegService is the REST service that exposes slip, customer, payment, product and stock data in SGO to external systems. All methods work with the same token and permission rules (sections 1 and 2); sections 3–6 describe the slip export method, and sections 7–11 describe the other methods.

The slip export service returns invoices, waybills and returns issued in SGO, together with their line items and discounts, as JSON. Usage takes two steps: first obtain a token with your username and password, then query slips with that token.

GroupAddress prefixSection
Getting a token{base_url}/api/v1/account/1
Slip export (getinv, getinvxml){base_url}/api/v1/integ/invoices/3–6
Invoices and orders{base_url}/api/v1/integ/invoices/7
Customers, reports, properties{base_url}/api/v1/integ/custs/, /reports/, /props/8
Payments{base_url}/api/v1/integ/payments/9
Products{base_url}/api/v1/integ/metas/10
Stocks and token check{base_url}/api/stocks/, /api/v1/account/check11

{base_url} is the service address provided to you (e.g. separate addresses for the test and production environments). All requests and responses are sent and received with Content-Type: application/json.

Test and production environments. The service has separate addresses and separate users for test and production. The database you connect to is determined by the user: a test user sees test data, a production user sees production data. Validate your integration in the test environment first.

Common response structure. Most methods return the same envelope:

FieldDescription
successWhether the operation succeeded (true / false)
messageResult message; warnings are appended to the end of this text
info.company, info.countryCompany and country code the token belongs to
dataThe actual data (object or list)
countNumber of records returned; some methods always return 0, so check the data list for the record count

Fields whose value is empty (null) are omitted from the response entirely. Dates in responses are in yyyy-MM-dd HH:mm:ss format. In requests, send dates as yyyy-MM-dd or yyyy-MM-ddTHH:mm:ss; the only exceptions are methods whose field description specifies a different format (gg-aa-yyyy, i.e. dd-MM-yyyy).