Skip to content

FINA Premises

The FINA Premise object

object

Attributes

idstring
Other attributes
entity_idstring
business_premise_namestring
typestring
real_estateobjectnullable
movable_premiseobjectnullable
is_activeboolean
starting_numberintegernullable
can_update_starting_numberboolean
registered_atstring<date-time>nullable
closed_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
Devicesarray of objects
Examplejson
{
  "id": "fina_premise_507f1f77bcf86cd799439011",
  "entity_id": "ent_507f1f77bcf86cd799439011",
  "business_premise_name": "PP1",
  "type": "premise",
  "real_estate": null,
  "movable_premise": null,
  "is_active": true,
  "registered_at": "2025-01-01T00:00:00.000Z",
  "closed_at": null,
  "created_at": "2025-01-01T00:00:00.000Z",
  "updated_at": "2025-01-01T00:00:00.000Z"
}

Create business premise

POST/fiscalization/fina/premises

Add a business premise for FINA fiscalization. The premise must be registered on ePorezna first. Only the premise ID label is stored.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Body parameters

business_premise_namestringrequired

Business premise name (OznPosPr), alphanumeric, 1-20 chars. Must match the name registered on ePorezna.

Other parameters
starting_numberintegeroptionalnullable
import SpaceInvoices from '@spaceinvoices/js-sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.finaPremises.create({
  business_premise_name: "PP1",
  starting_number: 100
});

console.log(response);
Example:

Returns

business_premise_namestring

Business premise name

Other parameters
successboolean
messagestring
json
{
  "success": true,
  "message": "Business premise created successfully",
  "business_premise_name": "PP1"
}

List business premises

GET/fiscalization/fina/premises

List all business premises for the entity

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

import SpaceInvoices from '@spaceinvoices/js-sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.finaPremises.listFinaPremises();

console.log(response);
json
[]

Get business premise

GET/fiscalization/fina/premises/{id}

Get a single business premise by ID

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstringrequired

Premise ID

import SpaceInvoices from '@spaceinvoices/js-sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.finaPremises.getFinaPremise('FINAPREMISES_ID');

console.log(response);

Returns

idstring
business_premise_namestring
typestring
is_activeboolean
Other parameters
entity_idstring
real_estateobjectnullable
movable_premiseobjectnullable
starting_numberintegernullable
can_update_starting_numberboolean
registered_atstring<date-time>nullable
closed_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
Devicesarray of objects
json
{
  "id": "fina_premise_507f1f77bcf86cd799439011",
  "entity_id": "ent_507f1f77bcf86cd799439011",
  "business_premise_name": "PP1",
  "type": "premise",
  "real_estate": null,
  "movable_premise": null,
  "is_active": true,
  "registered_at": "2025-01-01T00:00:00.000Z",
  "closed_at": null,
  "created_at": "2025-01-01T00:00:00.000Z",
  "updated_at": "2025-01-01T00:00:00.000Z"
}

Update business premise

PATCH/fiscalization/fina/premises/{id}

Update mutable FINA premise settings. The starting number can only be changed before invoices have been issued for the premise-level sequence.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstringrequired

Premise ID

Body parameters

starting_numberintegeroptionalnullable
import SpaceInvoices from '@spaceinvoices/js-sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

const response = await sdk.finaPremises.update('FINAPREMISES_ID', {
  starting_number: 250
});

console.log(response);
Example:

Returns

idstring
business_premise_namestring
typestring
is_activeboolean
Other parameters
entity_idstring
real_estateobjectnullable
movable_premiseobjectnullable
starting_numberintegernullable
can_update_starting_numberboolean
registered_atstring<date-time>nullable
closed_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
Devicesarray of objects
json
{
  "id": "fina_premise_507f1f77bcf86cd799439011",
  "entity_id": "ent_507f1f77bcf86cd799439011",
  "business_premise_name": "PP1",
  "type": "premise",
  "real_estate": null,
  "movable_premise": null,
  "is_active": true,
  "starting_number": 250,
  "registered_at": "2025-01-01T00:00:00.000Z",
  "closed_at": null,
  "created_at": "2025-01-01T00:00:00.000Z",
  "updated_at": "2025-01-02T00:00:00.000Z"
}

Delete business premise

DELETE/fiscalization/fina/premises/{id}

Deactivate a business premise and all its devices.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstringrequired

Premise ID

import SpaceInvoices from '@spaceinvoices/js-sdk';

const sdk = new SpaceInvoices('YOUR_API_KEY');

await sdk.finaPremises.delete("fina_premise_abc123");

console.log('Deleted successfully');

Returns

business_premise_namestring

Business premise name

Other parameters
successboolean
messagestring
json
{
  "success": true,
  "message": "Business premise deactivated successfully",
  "business_premise_name": "PP1"
}