api.nisa.digital
2025-08-28

Comprehensive guide to our Pohoda/Pamica endpoints

/v1/cash/accounts/:uid

List cash accounts for a unit.
Params
:uid - accounting unit identifier
Request
GET
Response
200text/json

{
   ID: number, database id
   IDS: string, account identifiers
   SText: string, account name
   Zrusen: date, cancelation date
}[]
Error Codes
400 Bad Request
Your request doesn't meet the required input format
401 Not Authorized
Your request doesn't meet authorization requirements
404 Not Found
The entity you're looking for is missing
460 Request Error
Requested operation wasn't performed, or XML import failed
500 Internal Error
We encountered an internal server error
503 Not Available
Requested entity is offline and cannot be reached, try again later

/v1/cash/list/:uid

List cash movements with server-side filtering and pagination.
Params
:uid - accounting unit identifier
Request
POSTtext/json
{
  from?: number,  // default 0
  size?: number,  // default 30
  ids?: number[], // optional restrict to IDs
  asc?: string,   // optional sort asc e.g. "Datum;ID"
  desc?: string,  // optional sort desc e.g. "Datum;ID"
  on?: string[]   // optional filters: tokens "Field;search;from;to"
}
Response
200text/json
{
  total: number,
  filtered: number,
  fields: DField[],
  data: any[],
  summary: { [key: string]: number },
  query: DQuery
}

DField = {
  name: string,
  text?: string,
  sort?: 'asc'|'desc'|'',
  // simple values (one of these may be present)
  string?: string|null,
  number?: number|null,
  numbers?: number[],
  date?: string|null,          // ISO YYYY-MM-DD
  checkbox?: boolean|null,
  select?: { // select-like inputs
    type: 'number'|'date'|'string',
    value?: any|null,
    options: { value: any, text: string }[]
  },
  checkbuttons?: { // select-like inputs
    type: 'number'|'string',
    value?: any|null,
    options: { value: any, text: string }[]
  },
  checkboxes?: { // select-like inputs
    type: 'number'|'date'|'string'|'number[]'|'string[]',
    values?: any[],
    options: { value: any, text: string }[],
    classInput?: string
  },
  range?: { // ranges and validity
    type: 'number'|'date',
    nullable?: boolean,
    from?: number|string|Date|null,
    to?: number|string|Date|null
  },
  valid_until?: {
    type: 'date',
    nullable?: boolean,
    value?: string|Date|null
  }
}

DQuery = {
  from: number,
  size: number,
  init?: number,
  fields: DField[]
}
Error Codes
400 Bad Request
Your request doesn't meet the required input format
401 Not Authorized
Your request doesn't meet authorization requirements
404 Not Found
The entity you're looking for is missing
460 Request Error
Requested operation wasn't performed, or XML import failed
500 Internal Error
We encountered an internal server error
503 Not Available
Requested entity is offline and cannot be reached, try again later

/v1/cash/balance/:uid/:id

Get cash register balance as of date.
Params
:uid - accounting unit identifier
:id - cash register ID
Request
GET
date (query param) optional
Response
200text/json
{ balance: number }
Error Codes
400 Bad Request
Your request doesn't meet the required input format
401 Not Authorized
Your request doesn't meet authorization requirements
404 Not Found
The entity you're looking for is missing
460 Request Error
Requested operation wasn't performed, or XML import failed
500 Internal Error
We encountered an internal server error
503 Not Available
Requested entity is offline and cannot be reached, try again later

/v1/cash/balances/:uid

List cash register balances as of date.
Params
:uid - accounting unit identifier
Request
GET
date (query param) optional
Response
200text/json
{ id, IDS, SText, balance }[]
Error Codes
400 Bad Request
Your request doesn't meet the required input format
401 Not Authorized
Your request doesn't meet authorization requirements
404 Not Found
The entity you're looking for is missing
460 Request Error
Requested operation wasn't performed, or XML import failed
500 Internal Error
We encountered an internal server error
503 Not Available
Requested entity is offline and cannot be reached, try again later

/v1/cash/list/:uid

List cash movements with server-side filtering and pagination.
Params
:uid - accounting unit identifier
Request
GET
Response
200text/json
{
  total: number,
  filtered: number,
  fields: DField[],
  data: any[],
  summary: { [key: string]: number },
  query: DQuery
}

DField = {
  name: string,
  text?: string,
  sort?: 'asc'|'desc'|'',
  // simple values (one of these may be present)
  string?: string|null,
  number?: number|null,
  numbers?: number[],
  date?: string|null,          // ISO YYYY-MM-DD
  checkbox?: boolean|null,
  select?: { // select-like inputs
    type: 'number'|'date'|'string',
    value?: any|null,
    options: { value: any, text: string }[]
  },
  checkbuttons?: { // select-like inputs
    type: 'number'|'string',
    value?: any|null,
    options: { value: any, text: string }[]
  },
  checkboxes?: { // select-like inputs
    type: 'number'|'date'|'string'|'number[]'|'string[]',
    values?: any[],
    options: { value: any, text: string }[],
    classInput?: string
  },
  range?: { // ranges and validity
    type: 'number'|'date',
    nullable?: boolean,
    from?: number|string|Date|null,
    to?: number|string|Date|null
  },
  valid_until?: {
    type: 'date',
    nullable?: boolean,
    value?: string|Date|null
  }
}

DQuery = {
  from: number,
  size: number,
  init?: number,
  fields: DField[]
}
Error Codes
400 Bad Request
Your request doesn't meet the required input format
401 Not Authorized
Your request doesn't meet authorization requirements
404 Not Found
The entity you're looking for is missing
460 Request Error
Requested operation wasn't performed, or XML import failed
500 Internal Error
We encountered an internal server error
503 Not Available
Requested entity is offline and cannot be reached, try again later

/v1/cash/numbering/:uid

List cash numberings for a unit.
Params
:uid - accounting unit identifier
Request
GET
Response
200text/json

{
   type: string, // pohoda_sk, pohoda_cz
   available: string[], // incoming, outgoing
   numbering: {
      ID: number, database id
      Rok: number, numbering year
      IDS: string, numbering prefix
      Cislo: string, next number
      SText: string, naming
      type: string, numbering type, see types above
   }[]
}

Ussualy, number is combination of IDS an Cislo, like "HP2300001"
Error Codes
400 Bad Request
Your request doesn't meet the required input format
401 Not Authorized
Your request doesn't meet authorization requirements
404 Not Found
The entity you're looking for is missing
460 Request Error
Requested operation wasn't performed, or XML import failed
500 Internal Error
We encountered an internal server error
503 Not Available
Requested entity is offline and cannot be reached, try again later

/v1/cash/import/xml/:uid

Import cash voucher XML and return vendor response.
Params
:uid - accounting unit identifier
Request
POSTtext/xml
text/xml
// body: XML conforming to Stormware voucher.xsd (SK/CZ)
// either a single <vch:voucher> or a <dat:dataPack> wrapper
Schema: SK, CZ
<dat:dataPack version="2.0" id="import" application="API">
  <dat:dataPackItem id="1" version="2.0">
    <vch:voucher version="2.0">...</vch:voucher>
  </dat:dataPackItem>
</dat:dataPack>
Response
200text/xml
XML response according to SK or CZ xml schema.
Error Codes
400 Bad Request
Your request doesn't meet the required input format
401 Not Authorized
Your request doesn't meet authorization requirements
404 Not Found
The entity you're looking for is missing
460 Request Error
Requested operation wasn't performed, or XML import failed
500 Internal Error
We encountered an internal server error
503 Not Available
Requested entity is offline and cannot be reached, try again later