api.nisa.digital
2025-08-28

Comprehensive guide to our Pohoda/Pamica endpoints

/v1/invoice/numbering/:uid

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

{
   type: 'pohoda_sk'|'pohoda_cz'
   available: (
      'issued_invoice'|
      'issued_credit_note'|
      'issued_advance_invoice'|
      'issued_receivables'|
      'received_invoice'|
      'received_credit_note'|
      'received_advance_invoice'|
      'received_payables'
   )[]
   numbering: {
      ID: number, database id
      Rok: number, numbering year
      IDS: string, numbering prefix
      Cislo: string, next number
      SText: string, naming
      type: one of 'available' values
   }[]
}

Usually, number is IDS + Cislo, e.g. "PF2300001"
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/invoice/export/pdf/:uid/:invoice_number

Export invoice PDF by number.
Params
:uid - accounting unit identifier
:invoice_number - invoice number
Request
GET
Response
200application/pdf
Buffer PDF
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/invoice/companies/:uid

List companies referenced by unit invoices.
Params
:uid - accounting unit identifier
Request
GET
Response
200text/json

{
   Firma: string, company name
   Jmeno: string|null, contact person
   Ulice: string|null, street
   PSC: string|null, postal code
   Obec: string|null, city
   Email: string|null, email
   Tel: string|null, phone
   ICO: string|null, company id
   DIC: string|null, tax id
   ICDPH: string|null, vat id
}[]
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/invoice/list/:uid

List invoices 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/invoice/by-number/:uid/:invoice_number

Get invoice detail by number.
Params
:uid - accounting unit identifier
:invoice_number - invoice number
Request
GET
Response
200text/json

// TInvoice shape (key fields)
{
   ID: number, internal id
   Cislo: string, invoice number
   RelTpFak: number, invoice type
   Firma: string, partner name
   ICO?: string|null, partner id
   Datum: string, issue date YYYY-MM-DD
   DatSplat?: string|null, due date YYYY-MM-DD
   KcCelkem: number, total amount
   KcLikv: number, paid amount
   items: TInvoiceItem[], line items
}
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/invoice/import/xml/:uid

Import invoice XML and return vendor response.
Params
:uid - accounting unit identifier
Request
POSTtext/xml
text/xml
// body: XML conforming to Stormware invoice.xsd (SK/CZ)
// either a single <inv:invoice> or a <dat:dataPack> wrapper
Schema: SK, CZ
<dat:dataPack version="2.0" id="import" ico="12345678" application="API" note="optional">
  <dat:dataPackItem id="1" version="2.0">
    <inv:invoice version="2.0">...</inv:invoice>
  </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

/v1/invoice/file/add/:uid

Attach a file to an invoice.
Params
:uid - accounting unit identifier
Request
POSTtext/json
{
  invoice: string, // invoice number
  name: string,    // file name including extension
  content: string  // base64-encoded file content
}
Response
200text/plain
internal directory path for invoice
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/invoice/import/isdoc/:uid

Import ISDOC/ISDOCX from PDF and return vendor response.
Params
:uid - accounting unit identifier
Request
POSTtext/json
{
  name: string,    // original file name (e.g., my.pdf)
  content: string  // base64-encoded PDF content
}
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

/v1/invoice/facility/:uid

Update invoice or line facility (centre, activity, order).
Params
:uid - accounting unit identifier
Request
POSTtext/json
{
  invoice_id: number,       // required invoice ID
  invoice_item_id?: number, // optional: update single line if provided
  refStr?: number,          // optional: centre ID (stredisko)
  refCin?: number,          // optional: activity ID (cinnost)
  cisloZAK?: string         // optional: order number
}
Response
200text/plain
OK
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