Buddy API Documentation (3.0.0)
Download OpenAPI specification:Download
Documentation for accessing the Buddy platform via the API service.
⚠️ Note: The API documentation is still incomplete.
Welcome to the Buddy API documentation. You can use the Buddy API to access resources on the platform and for fiscalization of receipts.
Two environments are available:
- Sandbox, used for testing and development purposes. The API service address is https://api.sandbox.badi.rs/v2 and the application access address is https://sandbox.badi.rs
- Production, production environment. The API service address is https://api.production.badi.rs/v2 and the application access address is https://app.badi.rs
From version 3.2.0, it is possible to enable a local API server on the application. Through this server, it is possible to access only fiscalization resources. Resources are accessed via the HTTP protocol at the address and port configured in the application, without the API service version, for example: http://127.0.0.1:9999/fiscalization/receipts.
The local API server is accessed without authentication, and clientId
or storeId
is not sent during the request.
Authentication does not apply to the local API
To use the API, you need to create an API key and API secret in the Buddy application settings. More information can be found at https://badi.rs/docs/koriscenje/moduli-aplikacije/podesavanja/aplikacije/za-programere/api-kljucevi/.
Note: The API secret will be displayed only once when creating the API key. If you lose the API secret, you will need to recreate it.
The API key and secret must be sent with each request through the Authorization header. The content of this field is sent as a base64 encoded API key and secret in the format API_KEY:API_SECRET
.
For example, if your API key is production.6BO7smrNTMCpugLBzPSVdX
and the API secret is 6cuiEePSXps0xdHjm4SeQp
, combine them as production.6BO7smrNTMCpugLBzPSVdX:6cuiEePSXps0xdHjm4SeQp
and encode them as base64. You will get the value cHJvZHVjdGlvbi42Qk83c21yTlRNQ3B1Z0xCelBTVmRYOjZjdWlFZVBTWHBzMHhkSGptNFNlUXA=
.
Set this value in the Authorization header in the format
Basic cHJvZHVjdGlvbi42Qk83c21yTlRNQ3B1Z0xCelBTVmRYOjZjdWlFZVBTWHBzMHhkSGptNFNlUXA=
.
List of stores
List of all stores associated with the account
⚠️ This method returns all stores without pagination
Authorizations:
Responses
Response samples
- 200
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "address": "string",
- "city": "string",
- "zip": "string",
- "gln": "string",
- "phone": "string",
- "language": "sr-Cyrl-RS",
- "printMethod": {
- "thermal": true,
- "a4": true,
- "email": true
}, - "printBankAccounts": true,
- "printDiscounts": true,
- "paymentMethodsOrder": [ ],
- "productPickerType": "list",
- "isSoundEnabled": true,
- "defaultUnknownAmountAdvance": true
}
]
Add store
Adding a store
⚠️ Using the Buddy application is charged per store, so make sure you want to add a new store.
Authorizations:
Request Body schema: application/json
name required | string non-empty Name |
address | string Address |
city | string City |
zip | string Zip code |
gln | string GLN |
phone | string Phone number |
language | any Default: "sr-Cyrl-RS" Enum: "sr-Cyrl-RS" "sr-Latn-RS" Language in which the fiscal receipt is issued |
object Available methods for issuing a fiscal receipt | |
printBankAccounts | boolean Print bank accounts if the payment method is bank transfer |
printDiscounts | boolean Print achieved discounts |
paymentMethodsOrder | Array of arrays Order of payment methods on the payment window |
productPickerType | string Enum: "list" "grid" Product display method at the cash register |
isSoundEnabled | boolean Play sound signals when entering items |
defaultUnknownAmountAdvance | boolean Is the option for advance without a known final amount enabled by default |
Responses
Request samples
- Payload
{- "name": "string",
- "address": "string",
- "city": "string",
- "zip": "string",
- "gln": "string",
- "phone": "string",
- "language": "sr-Cyrl-RS",
- "printMethod": {
- "thermal": true,
- "a4": true,
- "email": true
}, - "printBankAccounts": true,
- "printDiscounts": true,
- "paymentMethodsOrder": [ ],
- "productPickerType": "list",
- "isSoundEnabled": true,
- "defaultUnknownAmountAdvance": true
}
Response samples
- 201
- 400
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "address": "string",
- "city": "string",
- "zip": "string",
- "gln": "string",
- "phone": "string",
- "language": "sr-Cyrl-RS",
- "printMethod": {
- "thermal": true,
- "a4": true,
- "email": true
}, - "printBankAccounts": true,
- "printDiscounts": true,
- "paymentMethodsOrder": [ ],
- "productPickerType": "list",
- "isSoundEnabled": true,
- "defaultUnknownAmountAdvance": true
}
Update store
Update store
Authorizations:
path Parameters
required | Id (string) Store ID |
Request Body schema: application/json
name required | string non-empty Name |
address | string Address |
city | string City |
zip | string Zip code |
gln | string GLN |
phone | string Phone number |
language | any Default: "sr-Cyrl-RS" Enum: "sr-Cyrl-RS" "sr-Latn-RS" Language in which the fiscal receipt is issued |
object Available methods for issuing a fiscal receipt | |
printBankAccounts | boolean Print bank accounts if the payment method is bank transfer |
printDiscounts | boolean Print achieved discounts |
paymentMethodsOrder | Array of arrays Order of payment methods on the payment window |
productPickerType | string Enum: "list" "grid" Product display method at the cash register |
isSoundEnabled | boolean Play sound signals when entering items |
defaultUnknownAmountAdvance | boolean Is the option for advance without a known final amount enabled by default |
Responses
Request samples
- Payload
{- "name": "string",
- "address": "string",
- "city": "string",
- "zip": "string",
- "gln": "string",
- "phone": "string",
- "language": "sr-Cyrl-RS",
- "printMethod": {
- "thermal": true,
- "a4": true,
- "email": true
}, - "printBankAccounts": true,
- "printDiscounts": true,
- "paymentMethodsOrder": [ ],
- "productPickerType": "list",
- "isSoundEnabled": true,
- "defaultUnknownAmountAdvance": true
}
Response samples
- 200
- 400
- 404
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "address": "string",
- "city": "string",
- "zip": "string",
- "gln": "string",
- "phone": "string",
- "language": "sr-Cyrl-RS",
- "printMethod": {
- "thermal": true,
- "a4": true,
- "email": true
}, - "printBankAccounts": true,
- "printDiscounts": true,
- "paymentMethodsOrder": [ ],
- "productPickerType": "list",
- "isSoundEnabled": true,
- "defaultUnknownAmountAdvance": true
}
Delete store
Delete store
Authorizations:
path Parameters
required | Id (string) Store ID |
Request Body schema: application/json
name required | string non-empty Name |
address | string Address |
city | string City |
zip | string Zip code |
gln | string GLN |
phone | string Phone number |
language | any Default: "sr-Cyrl-RS" Enum: "sr-Cyrl-RS" "sr-Latn-RS" Language in which the fiscal receipt is issued |
object Available methods for issuing a fiscal receipt | |
printBankAccounts | boolean Print bank accounts if the payment method is bank transfer |
printDiscounts | boolean Print achieved discounts |
paymentMethodsOrder | Array of arrays Order of payment methods on the payment window |
productPickerType | string Enum: "list" "grid" Product display method at the cash register |
isSoundEnabled | boolean Play sound signals when entering items |
defaultUnknownAmountAdvance | boolean Is the option for advance without a known final amount enabled by default |
Responses
Request samples
- Payload
{- "name": "string",
- "address": "string",
- "city": "string",
- "zip": "string",
- "gln": "string",
- "phone": "string",
- "language": "sr-Cyrl-RS",
- "printMethod": {
- "thermal": true,
- "a4": true,
- "email": true
}, - "printBankAccounts": true,
- "printDiscounts": true,
- "paymentMethodsOrder": [ ],
- "productPickerType": "list",
- "isSoundEnabled": true,
- "defaultUnknownAmountAdvance": true
}
Response samples
- 200
- 400
- 404
{ }
List of products
List of all products
⚠️ This method returns all products without pagination
Authorizations:
Responses
Response samples
- 200
[- {
- "variants": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "sku": 0,
- "manufacturerSku": "string",
- "description": "string",
- "descriptionPlain": "string",
- "saleUnitId": "7973feb3-94e3-4aff-aff4-9ed6e37a0d5e",
- "baseUnitId": "60f3a59f-633d-415d-9234-0526f6d44591",
- "quantityPerBaseUnit": 0,
- "price": 0,
- "taxRateLabel": "Ђ",
- "subtitle": "string",
- "productType": "product",
- "weight": 0,
- "dimensions": "string",
- "hasVariants": true,
- "variantName": "string",
- "ean": "string",
- "coverImage": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "filename": "string",
- "originalFilename": "string",
- "mimetypeFilename": "string",
- "size": 0,
- "reference": "string",
- "referenceId": "8502eb05-558d-4480-8511-c1011710b340",
- "private": true,
- "urls": {
- "original": "string",
- "64x64": "string",
- "128x128": "string",
- "256x256": "string",
- "512x512": "string",
- "1024x1024": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}, - "categories": "2348245e-0ab0-4c35-9962-d6bf519a79a3"
}
], - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "sku": 0,
- "manufacturerSku": "string",
- "description": "string",
- "descriptionPlain": "string",
- "saleUnitId": "7973feb3-94e3-4aff-aff4-9ed6e37a0d5e",
- "baseUnitId": "60f3a59f-633d-415d-9234-0526f6d44591",
- "quantityPerBaseUnit": 0,
- "price": 0,
- "taxRateLabel": "Ђ",
- "subtitle": "string",
- "productType": "product",
- "weight": 0,
- "dimensions": "string",
- "hasVariants": true,
- "variantName": "string",
- "ean": "string",
- "coverImage": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "filename": "string",
- "originalFilename": "string",
- "mimetypeFilename": "string",
- "size": 0,
- "reference": "string",
- "referenceId": "8502eb05-558d-4480-8511-c1011710b340",
- "private": true,
- "urls": {
- "original": "string",
- "64x64": "string",
- "128x128": "string",
- "256x256": "string",
- "512x512": "string",
- "1024x1024": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}, - "categories": "2348245e-0ab0-4c35-9962-d6bf519a79a3",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}
]
Add product
Adding a product
Authorizations:
Request Body schema: application/json
Array of objects | |
name required | string non-empty Name |
sku | number SKU |
manufacturerSku | string Manufacturer SKU |
description | string Description in HTML format |
saleUnitId | string <uuid> Sales unit of measure |
baseUnitId | string <uuid> Unit of measure in which the product quantity is expressed |
quantityPerBaseUnit | number Quantity in unit of measure |
price | number Price with VAT |
taxRateLabel required | string Enum: "Ђ" "Е" "Г" "А" Tax label |
subtitle | string Short description |
productType | string Enum: "product" "service" "digital" Type of product |
weight | number Weight |
dimensions | string Dimensions in centimeters, in the format WIDTHxDEPTHxHEIGHT |
hasVariants | boolean Product has variants |
variantName | string Variant name, only if the product is a variant |
ean | string Product GTIN |
categories | string <uuid> IDs of categories in which the product is located |
createdAt | string <date-time> Creation date and time |
updatedAt | string <date-time> Modification date and time |
deletedAt | string <date-time> Deletion date and time |
images | Array of strings <uuid> (Id) [ items <uuid > ] File IDs |
Responses
Request samples
- Payload
{- "variants": [
- {
- "name": "string",
- "sku": 0,
- "manufacturerSku": "string",
- "description": "string",
- "saleUnitId": "7973feb3-94e3-4aff-aff4-9ed6e37a0d5e",
- "baseUnitId": "60f3a59f-633d-415d-9234-0526f6d44591",
- "quantityPerBaseUnit": 0,
- "price": 0,
- "taxRateLabel": "Ђ",
- "subtitle": "string",
- "productType": "product",
- "weight": 0,
- "dimensions": "string",
- "hasVariants": true,
- "variantName": "string",
- "ean": "string",
- "categories": "2348245e-0ab0-4c35-9962-d6bf519a79a3"
}
], - "name": "string",
- "sku": 0,
- "manufacturerSku": "string",
- "description": "string",
- "saleUnitId": "7973feb3-94e3-4aff-aff4-9ed6e37a0d5e",
- "baseUnitId": "60f3a59f-633d-415d-9234-0526f6d44591",
- "quantityPerBaseUnit": 0,
- "price": 0,
- "taxRateLabel": "Ђ",
- "subtitle": "string",
- "productType": "product",
- "weight": 0,
- "dimensions": "string",
- "hasVariants": true,
- "variantName": "string",
- "ean": "string",
- "categories": "2348245e-0ab0-4c35-9962-d6bf519a79a3",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "images": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
}
Response samples
- 201
- 400
{- "variants": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "sku": 0,
- "manufacturerSku": "string",
- "description": "string",
- "descriptionPlain": "string",
- "saleUnitId": "7973feb3-94e3-4aff-aff4-9ed6e37a0d5e",
- "baseUnitId": "60f3a59f-633d-415d-9234-0526f6d44591",
- "quantityPerBaseUnit": 0,
- "price": 0,
- "taxRateLabel": "Ђ",
- "subtitle": "string",
- "productType": "product",
- "weight": 0,
- "dimensions": "string",
- "hasVariants": true,
- "variantName": "string",
- "ean": "string",
- "coverImage": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "filename": "string",
- "originalFilename": "string",
- "mimetypeFilename": "string",
- "size": 0,
- "reference": "string",
- "referenceId": "8502eb05-558d-4480-8511-c1011710b340",
- "private": true,
- "urls": {
- "original": "string",
- "64x64": "string",
- "128x128": "string",
- "256x256": "string",
- "512x512": "string",
- "1024x1024": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}, - "categories": "2348245e-0ab0-4c35-9962-d6bf519a79a3"
}
], - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "sku": 0,
- "manufacturerSku": "string",
- "description": "string",
- "descriptionPlain": "string",
- "saleUnitId": "7973feb3-94e3-4aff-aff4-9ed6e37a0d5e",
- "baseUnitId": "60f3a59f-633d-415d-9234-0526f6d44591",
- "quantityPerBaseUnit": 0,
- "price": 0,
- "taxRateLabel": "Ђ",
- "subtitle": "string",
- "productType": "product",
- "weight": 0,
- "dimensions": "string",
- "hasVariants": true,
- "variantName": "string",
- "ean": "string",
- "coverImage": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "filename": "string",
- "originalFilename": "string",
- "mimetypeFilename": "string",
- "size": 0,
- "reference": "string",
- "referenceId": "8502eb05-558d-4480-8511-c1011710b340",
- "private": true,
- "urls": {
- "original": "string",
- "64x64": "string",
- "128x128": "string",
- "256x256": "string",
- "512x512": "string",
- "1024x1024": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}, - "categories": "2348245e-0ab0-4c35-9962-d6bf519a79a3",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}
Update product
Update product
Authorizations:
path Parameters
required | Id (string) Product ID |
Request Body schema: application/json
Array of objects | |
name required | string non-empty Name |
sku | number SKU |
manufacturerSku | string Manufacturer SKU |
description | string Description in HTML format |
saleUnitId | string <uuid> Sales unit of measure |
baseUnitId | string <uuid> Unit of measure in which the product quantity is expressed |
quantityPerBaseUnit | number Quantity in unit of measure |
price | number Price with VAT |
taxRateLabel required | string Enum: "Ђ" "Е" "Г" "А" Tax label |
subtitle | string Short description |
productType | string Enum: "product" "service" "digital" Type of product |
weight | number Weight |
dimensions | string Dimensions in centimeters, in the format WIDTHxDEPTHxHEIGHT |
hasVariants | boolean Product has variants |
variantName | string Variant name, only if the product is a variant |
ean | string Product GTIN |
categories | string <uuid> IDs of categories in which the product is located |
createdAt | string <date-time> Creation date and time |
updatedAt | string <date-time> Modification date and time |
deletedAt | string <date-time> Deletion date and time |
images | Array of strings <uuid> (Id) [ items <uuid > ] File IDs |
Responses
Request samples
- Payload
{- "variants": [
- {
- "name": "string",
- "sku": 0,
- "manufacturerSku": "string",
- "description": "string",
- "saleUnitId": "7973feb3-94e3-4aff-aff4-9ed6e37a0d5e",
- "baseUnitId": "60f3a59f-633d-415d-9234-0526f6d44591",
- "quantityPerBaseUnit": 0,
- "price": 0,
- "taxRateLabel": "Ђ",
- "subtitle": "string",
- "productType": "product",
- "weight": 0,
- "dimensions": "string",
- "hasVariants": true,
- "variantName": "string",
- "ean": "string",
- "categories": "2348245e-0ab0-4c35-9962-d6bf519a79a3"
}
], - "name": "string",
- "sku": 0,
- "manufacturerSku": "string",
- "description": "string",
- "saleUnitId": "7973feb3-94e3-4aff-aff4-9ed6e37a0d5e",
- "baseUnitId": "60f3a59f-633d-415d-9234-0526f6d44591",
- "quantityPerBaseUnit": 0,
- "price": 0,
- "taxRateLabel": "Ђ",
- "subtitle": "string",
- "productType": "product",
- "weight": 0,
- "dimensions": "string",
- "hasVariants": true,
- "variantName": "string",
- "ean": "string",
- "categories": "2348245e-0ab0-4c35-9962-d6bf519a79a3",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z",
- "images": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
}
Response samples
- 200
- 400
- 404
{- "variants": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "sku": 0,
- "manufacturerSku": "string",
- "description": "string",
- "descriptionPlain": "string",
- "saleUnitId": "7973feb3-94e3-4aff-aff4-9ed6e37a0d5e",
- "baseUnitId": "60f3a59f-633d-415d-9234-0526f6d44591",
- "quantityPerBaseUnit": 0,
- "price": 0,
- "taxRateLabel": "Ђ",
- "subtitle": "string",
- "productType": "product",
- "weight": 0,
- "dimensions": "string",
- "hasVariants": true,
- "variantName": "string",
- "ean": "string",
- "coverImage": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "filename": "string",
- "originalFilename": "string",
- "mimetypeFilename": "string",
- "size": 0,
- "reference": "string",
- "referenceId": "8502eb05-558d-4480-8511-c1011710b340",
- "private": true,
- "urls": {
- "original": "string",
- "64x64": "string",
- "128x128": "string",
- "256x256": "string",
- "512x512": "string",
- "1024x1024": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}, - "categories": "2348245e-0ab0-4c35-9962-d6bf519a79a3"
}
], - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "sku": 0,
- "manufacturerSku": "string",
- "description": "string",
- "descriptionPlain": "string",
- "saleUnitId": "7973feb3-94e3-4aff-aff4-9ed6e37a0d5e",
- "baseUnitId": "60f3a59f-633d-415d-9234-0526f6d44591",
- "quantityPerBaseUnit": 0,
- "price": 0,
- "taxRateLabel": "Ђ",
- "subtitle": "string",
- "productType": "product",
- "weight": 0,
- "dimensions": "string",
- "hasVariants": true,
- "variantName": "string",
- "ean": "string",
- "coverImage": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "filename": "string",
- "originalFilename": "string",
- "mimetypeFilename": "string",
- "size": 0,
- "reference": "string",
- "referenceId": "8502eb05-558d-4480-8511-c1011710b340",
- "private": true,
- "urls": {
- "original": "string",
- "64x64": "string",
- "128x128": "string",
- "256x256": "string",
- "512x512": "string",
- "1024x1024": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}, - "categories": "2348245e-0ab0-4c35-9962-d6bf519a79a3",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}
Delete product
Delete product
Authorizations:
path Parameters
required | Id (string) Product ID |
Request Body schema: application/json
Array of objects | |
name required | string non-empty Name |
sku | number SKU |
manufacturerSku | string Manufacturer SKU |
description | string Description in HTML format |
saleUnitId | string <uuid> Sales unit of measure |
baseUnitId | string <uuid> Unit of measure in which the product quantity is expressed |
quantityPerBaseUnit | number Quantity in unit of measure |
price | number Price with VAT |
taxRateLabel required | string Enum: "Ђ" "Е" "Г" "А" Tax label |
subtitle | string Short description |
productType | string Enum: "product" "service" "digital" Type of product |
weight | number Weight |
dimensions | string Dimensions in centimeters, in the format WIDTHxDEPTHxHEIGHT |
hasVariants | boolean Product has variants |
variantName | string Variant name, only if the product is a variant |
ean | string Product GTIN |
categories | string <uuid> IDs of categories in which the product is located |
createdAt | string <date-time> Creation date and time |
updatedAt | string <date-time> Modification date and time |
deletedAt | string <date-time> Deletion date and time |
Responses
Request samples
- Payload
{- "variants": [
- {
- "name": "string",
- "sku": 0,
- "manufacturerSku": "string",
- "description": "string",
- "saleUnitId": "7973feb3-94e3-4aff-aff4-9ed6e37a0d5e",
- "baseUnitId": "60f3a59f-633d-415d-9234-0526f6d44591",
- "quantityPerBaseUnit": 0,
- "price": 0,
- "taxRateLabel": "Ђ",
- "subtitle": "string",
- "productType": "product",
- "weight": 0,
- "dimensions": "string",
- "hasVariants": true,
- "variantName": "string",
- "ean": "string",
- "categories": "2348245e-0ab0-4c35-9962-d6bf519a79a3"
}
], - "name": "string",
- "sku": 0,
- "manufacturerSku": "string",
- "description": "string",
- "saleUnitId": "7973feb3-94e3-4aff-aff4-9ed6e37a0d5e",
- "baseUnitId": "60f3a59f-633d-415d-9234-0526f6d44591",
- "quantityPerBaseUnit": 0,
- "price": 0,
- "taxRateLabel": "Ђ",
- "subtitle": "string",
- "productType": "product",
- "weight": 0,
- "dimensions": "string",
- "hasVariants": true,
- "variantName": "string",
- "ean": "string",
- "categories": "2348245e-0ab0-4c35-9962-d6bf519a79a3",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}
Response samples
- 200
- 400
- 404
{ }
Fiscalization of receipts is possible in the following modes:
- Using LPFR or VPFR via the public API with an application running on your computer, requires a constant internet connection
- Using LPFR or VPFR via the local API with an application running on your computer, internet connection is not necessary
- Using VPFR with a certificate (in development)
Issuing a fiscal receipt
Issuing a fiscal receipt
Authorizations:
Request Body schema: application/json
storeId | string <uuid> Deprecated Sales location used for issuing the fiscal receipt. Only one application can be open per sales location to issue the receipt. For this reason, we recommend using |
clientId | string <uuid> Client used for issuing the receipt. |
invoiceType required | any <string> Enum: "normal" "advance" "proforma" "training" Invoice type |
transactionType required | any <string> Enum: "sale" "refund" Transaction type |
buyerId | string Buyer ID, must comply with the codebook |
buyerCostCenterId | string Optional buyer field, must comply with the codebook |
required | object non-empty Fiscal receipt payment methods |
referentDocumentNumber | string^a-zA-Z-0-9{8}\-a-zA-Z-0-9{8}\-\d+$ Reference document number. Use only when manual referencing of the receipt is needed, in all other cases use API methods for performing actions on fiscal receipts. |
referentDocumentDT | string <date-time> Reference document date. Use only when sending |
posTime | string <date-time> ESIR time, use when the advance payment occurred on an earlier date |
required | Array of objects non-empty Fiscal receipt items |
unknownAmountAdvance | boolean Issuing an advance without a known final amount. Adding advance payments will not be limited. It is necessary to enter the specification of payments by tax labels if there is more than one tax label on the receipt. |
object Specification of payments by tax labels. Mandatory only when there is more than one tax label on the fiscal receipt and the final amount is not known. | |
discount | any Discount on the entire receipt.
|
additionalText | string Additional text that will be printed after the fiscal receipt |
required | object non-empty Fiscal receipt delivery method |
Responses
Request samples
- Payload
{- "storeId": "b8adcdc8-9238-4168-90f8-77b2d14c211c",
- "clientId": "5e505642-9024-474d-9434-e5a44f505cc5",
- "invoiceType": "normal",
- "transactionType": "sale",
- "buyerId": "string",
- "buyerCostCenterId": "string",
- "payments": {
- "cash": 0,
- "card": 0,
- "check": 0,
- "mobilemoney": 0,
- "wiretransfer": 0,
- "voucher": 0,
- "other": 0
}, - "referentDocumentNumber": "string",
- "referentDocumentDT": "2019-08-24T14:15:22Z",
- "posTime": "2019-08-24T14:15:22Z",
- "items": [
- {
- "sku": 1,
- "quantity": 0.01,
- "unitPrice": 0
}
], - "unknownAmountAdvance": true,
- "advanceSpecification": {
- "Ђ": 0,
- "Е": 0,
- "Г": 0,
- "А": 0
}, - "discount": null,
- "additionalText": "string",
- "receiptDelivery": {
- "thermalPrinter": true,
- "a4Printer": true,
- "email": "user@example.com",
- "pdf": true,
- "base64pdf": true
}
}
Response samples
- 200
- 400
- 500
{- "requestedBy": "string",
- "sdcDateTime": "2019-08-24T14:15:22Z",
- "invoiceCounter": "string",
- "invoiceCounterExtension": "string",
- "invoiceNumber": "string",
- "taxItems": [
- {
- "categoryType": 0,
- "categoryName": "string",
- "label": "s",
- "rate": 100,
- "amount": 0
}
], - "verificationUrl": "string",
- "verificationQRCode": "string",
- "journal": "string",
- "messages": "string",
- "signedBy": "string",
- "encryptedInternalData": "string",
- "signature": "string",
- "totalCounter": 0,
- "transactionTypeCounter": 0,
- "totalAmount": 0,
- "taxGroupRevision": 0,
- "businessName": "string",
- "tin": "string",
- "locationName": "string",
- "address": "string",
- "district": "string",
- "mrc": "string",
- "pdf": "string",
- "base64pdf": "string"
}
Adding an advance payment
Adding an advance payment
Authorizations:
path Parameters
required | Id (string) or string ID or fiscal receipt number |
Request Body schema: application/json
storeId | string <uuid> Deprecated Sales location used for issuing the fiscal receipt. Only one application can be open per sales location to issue the receipt. For this reason, we recommend using |
clientId | string <uuid> Client used for issuing the receipt. |
buyerId | string Buyer ID, must comply with the codebook |
buyerCostCenterId | string Optional buyer field, must comply with the codebook |
required | object non-empty Fiscal receipt payment methods |
posTime | string <date-time> ESIR time, use when the advance payment occurred on an earlier date |
object Specification of payments by tax labels. Mandatory only when there is more than one tax label on the fiscal receipt and the final amount is not known. | |
additionalText | string Additional text that will be printed after the fiscal receipt |
required | object non-empty Fiscal receipt delivery method |
Responses
Request samples
- Payload
{- "storeId": "b8adcdc8-9238-4168-90f8-77b2d14c211c",
- "clientId": "5e505642-9024-474d-9434-e5a44f505cc5",
- "buyerId": "string",
- "buyerCostCenterId": "string",
- "payments": {
- "cash": 0,
- "card": 0,
- "check": 0,
- "mobilemoney": 0,
- "wiretransfer": 0,
- "voucher": 0,
- "other": 0
}, - "posTime": "2019-08-24T14:15:22Z",
- "advanceSpecification": {
- "Ђ": 0,
- "Е": 0,
- "Г": 0,
- "А": 0
}, - "additionalText": "string",
- "receiptDelivery": {
- "thermalPrinter": true,
- "a4Printer": true,
- "email": "user@example.com",
- "pdf": true,
- "base64pdf": true
}
}
Response samples
- 200
- 400
- 404
- 500
{- "requestedBy": "string",
- "sdcDateTime": "2019-08-24T14:15:22Z",
- "invoiceCounter": "string",
- "invoiceCounterExtension": "string",
- "invoiceNumber": "string",
- "taxItems": [
- {
- "categoryType": 0,
- "categoryName": "string",
- "label": "s",
- "rate": 100,
- "amount": 0
}
], - "verificationUrl": "string",
- "verificationQRCode": "string",
- "journal": "string",
- "messages": "string",
- "signedBy": "string",
- "encryptedInternalData": "string",
- "signature": "string",
- "totalCounter": 0,
- "transactionTypeCounter": 0,
- "totalAmount": 0,
- "taxGroupRevision": 0,
- "businessName": "string",
- "tin": "string",
- "locationName": "string",
- "address": "string",
- "district": "string",
- "mrc": "string",
- "pdf": "string",
- "base64pdf": "string"
}
Closing advance
Closing advance
Authorizations:
path Parameters
required | Id (string) or string ID or fiscal receipt number |
Request Body schema: application/json
storeId | string <uuid> Deprecated Sales location used for issuing the fiscal receipt. Only one application can be open per sales location to issue the receipt. For this reason, we recommend using |
clientId | string <uuid> Client used for issuing the receipt. |
buyerId | string Buyer ID, must comply with the codebook |
buyerCostCenterId | string Optional buyer field, must comply with the codebook |
required | object Fiscal receipt payment methods |
Array of objects non-empty Invoice items, sent if the final amount of the advance invoice is unknown and there are multiple items on the invoice. | |
additionalText | string Additional text that will be printed after the fiscal receipt |
required | object non-empty Fiscal receipt delivery method |
Responses
Request samples
- Payload
{- "storeId": "b8adcdc8-9238-4168-90f8-77b2d14c211c",
- "clientId": "5e505642-9024-474d-9434-e5a44f505cc5",
- "buyerId": "string",
- "buyerCostCenterId": "string",
- "payments": {
- "cash": 0,
- "card": 0,
- "check": 0,
- "mobilemoney": 0,
- "wiretransfer": 0,
- "voucher": 0,
- "other": 0
}, - "items": [
- {
- "sku": 1,
- "quantity": 0.01,
- "unitPrice": 0
}
], - "additionalText": "string",
- "receiptDelivery": {
- "thermalPrinter": true,
- "a4Printer": true,
- "email": "user@example.com",
- "pdf": true,
- "base64pdf": true
}
}
Response samples
- 200
- 400
- 404
- 500
[- {
- "requestedBy": "string",
- "sdcDateTime": "2019-08-24T14:15:22Z",
- "invoiceCounter": "string",
- "invoiceCounterExtension": "string",
- "invoiceNumber": "string",
- "taxItems": [
- {
- "categoryType": 0,
- "categoryName": "string",
- "label": "s",
- "rate": 100,
- "amount": 0
}
], - "verificationUrl": "string",
- "verificationQRCode": "string",
- "journal": "string",
- "messages": "string",
- "signedBy": "string",
- "encryptedInternalData": "string",
- "signature": "string",
- "totalCounter": 0,
- "transactionTypeCounter": 0,
- "totalAmount": 0,
- "taxGroupRevision": 0,
- "businessName": "string",
- "tin": "string",
- "locationName": "string",
- "address": "string",
- "district": "string",
- "mrc": "string",
- "pdf": "string",
- "base64pdf": "string"
}
]
Issuing a copy of the fiscal receipt
Issuing a copy of the fiscal receipt
Authorizations:
path Parameters
required | Id (string) or string ID or fiscal receipt number |
Request Body schema: application/json
storeId | string <uuid> Deprecated Sales location used for issuing the fiscal receipt. Only one application can be open per sales location to issue the receipt. For this reason, we recommend using |
clientId | string <uuid> Client used for issuing the receipt. |
required | object non-empty Fiscal receipt delivery method |
Responses
Request samples
- Payload
{- "storeId": "b8adcdc8-9238-4168-90f8-77b2d14c211c",
- "clientId": "5e505642-9024-474d-9434-e5a44f505cc5",
- "receiptDelivery": {
- "thermalPrinter": true,
- "a4Printer": true,
- "email": "user@example.com",
- "pdf": true,
- "base64pdf": true
}
}
Response samples
- 200
- 400
- 404
- 500
{- "requestedBy": "string",
- "sdcDateTime": "2019-08-24T14:15:22Z",
- "invoiceCounter": "string",
- "invoiceCounterExtension": "string",
- "invoiceNumber": "string",
- "taxItems": [
- {
- "categoryType": 0,
- "categoryName": "string",
- "label": "s",
- "rate": 100,
- "amount": 0
}
], - "verificationUrl": "string",
- "verificationQRCode": "string",
- "journal": "string",
- "messages": "string",
- "signedBy": "string",
- "encryptedInternalData": "string",
- "signature": "string",
- "totalCounter": 0,
- "transactionTypeCounter": 0,
- "totalAmount": 0,
- "taxGroupRevision": 0,
- "businessName": "string",
- "tin": "string",
- "locationName": "string",
- "address": "string",
- "district": "string",
- "mrc": "string",
- "pdf": "string",
- "base64pdf": "string"
}
Refund
Refund
Authorizations:
path Parameters
required | Id (string) or string ID or fiscal receipt number |
Request Body schema: application/json
storeId | string <uuid> Deprecated Sales location used for issuing the fiscal receipt. Only one application can be open per sales location to issue the receipt. For this reason, we recommend using |
clientId | string <uuid> Client used for issuing the receipt. |
buyerId required | string Buyer ID, must comply with the codebook |
buyerCostCenterId | string Optional buyer field, must comply with the codebook |
required | object Fiscal receipt payment methods |
Array of objects non-empty Invoice items being refunded | |
additionalText | string Additional text that will be printed after the fiscal receipt |
required | object non-empty Fiscal receipt delivery method |
object Specification of refunds by tax labels. Mandatory only when there is more than one tax label on the fiscal receipt and the final amount is not known. |
Responses
Request samples
- Payload
{- "storeId": "b8adcdc8-9238-4168-90f8-77b2d14c211c",
- "clientId": "5e505642-9024-474d-9434-e5a44f505cc5",
- "buyerId": "string",
- "buyerCostCenterId": "string",
- "payments": {
- "cash": 0,
- "card": 0,
- "check": 0,
- "mobilemoney": 0,
- "wiretransfer": 0,
- "voucher": 0,
- "other": 0
}, - "items": [
- {
- "sku": 1,
- "quantity": 0.01
}
], - "additionalText": "string",
- "receiptDelivery": {
- "thermalPrinter": true,
- "a4Printer": true,
- "email": "user@example.com",
- "pdf": true,
- "base64pdf": true
}, - "advanceSpecification": {
- "Ђ": 0,
- "Е": 0,
- "Г": 0,
- "А": 0
}
}
Response samples
- 200
- 400
- 404
- 500
[- {
- "requestedBy": "string",
- "sdcDateTime": "2019-08-24T14:15:22Z",
- "invoiceCounter": "string",
- "invoiceCounterExtension": "string",
- "invoiceNumber": "string",
- "taxItems": [
- {
- "categoryType": 0,
- "categoryName": "string",
- "label": "s",
- "rate": 100,
- "amount": 0
}
], - "verificationUrl": "string",
- "verificationQRCode": "string",
- "journal": "string",
- "messages": "string",
- "signedBy": "string",
- "encryptedInternalData": "string",
- "signature": "string",
- "totalCounter": 0,
- "transactionTypeCounter": 0,
- "totalAmount": 0,
- "taxGroupRevision": 0,
- "businessName": "string",
- "tin": "string",
- "locationName": "string",
- "address": "string",
- "district": "string",
- "mrc": "string",
- "pdf": "string",
- "base64pdf": "string"
}
]
Array of objects | |
id | string <uuid> ID |
name required | string non-empty Name |
sku | number SKU |
manufacturerSku | string Manufacturer SKU |
description | string Description in HTML format |
descriptionPlain | string Description in plain text format |
saleUnitId | string <uuid> Sales unit of measure |
baseUnitId | string <uuid> Unit of measure in which the product quantity is expressed |
quantityPerBaseUnit | number Quantity in unit of measure |
price | number Price with VAT |
taxRateLabel required | string Enum: "Ђ" "Е" "Г" "А" Tax label |
subtitle | string Short description |
productType | string Enum: "product" "service" "digital" Type of product |
weight | number Weight |
dimensions | string Dimensions in centimeters, in the format WIDTHxDEPTHxHEIGHT |
hasVariants | boolean Product has variants |
variantName | string Variant name, only if the product is a variant |
ean | string Product GTIN |
object (File) Main photo | |
categories | string <uuid> IDs of categories in which the product is located |
createdAt | string <date-time> Creation date and time |
updatedAt | string <date-time> Modification date and time |
deletedAt | string <date-time> Deletion date and time |
{- "variants": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "sku": 0,
- "manufacturerSku": "string",
- "description": "string",
- "descriptionPlain": "string",
- "saleUnitId": "7973feb3-94e3-4aff-aff4-9ed6e37a0d5e",
- "baseUnitId": "60f3a59f-633d-415d-9234-0526f6d44591",
- "quantityPerBaseUnit": 0,
- "price": 0,
- "taxRateLabel": "Ђ",
- "subtitle": "string",
- "productType": "product",
- "weight": 0,
- "dimensions": "string",
- "hasVariants": true,
- "variantName": "string",
- "ean": "string",
- "coverImage": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "filename": "string",
- "originalFilename": "string",
- "mimetypeFilename": "string",
- "size": 0,
- "reference": "string",
- "referenceId": "8502eb05-558d-4480-8511-c1011710b340",
- "private": true,
- "urls": {
- "original": "string",
- "64x64": "string",
- "128x128": "string",
- "256x256": "string",
- "512x512": "string",
- "1024x1024": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}, - "categories": "2348245e-0ab0-4c35-9962-d6bf519a79a3"
}
], - "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "sku": 0,
- "manufacturerSku": "string",
- "description": "string",
- "descriptionPlain": "string",
- "saleUnitId": "7973feb3-94e3-4aff-aff4-9ed6e37a0d5e",
- "baseUnitId": "60f3a59f-633d-415d-9234-0526f6d44591",
- "quantityPerBaseUnit": 0,
- "price": 0,
- "taxRateLabel": "Ђ",
- "subtitle": "string",
- "productType": "product",
- "weight": 0,
- "dimensions": "string",
- "hasVariants": true,
- "variantName": "string",
- "ean": "string",
- "coverImage": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "filename": "string",
- "originalFilename": "string",
- "mimetypeFilename": "string",
- "size": 0,
- "reference": "string",
- "referenceId": "8502eb05-558d-4480-8511-c1011710b340",
- "private": true,
- "urls": {
- "original": "string",
- "64x64": "string",
- "128x128": "string",
- "256x256": "string",
- "512x512": "string",
- "1024x1024": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}, - "categories": "2348245e-0ab0-4c35-9962-d6bf519a79a3",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletedAt": "2019-08-24T14:15:22Z"
}
id | string <uuid> ID |
name required | string non-empty Name |
address | string Address |
city | string City |
zip | string Zip code |
gln | string GLN |
phone | string Phone number |
language | any Default: "sr-Cyrl-RS" Enum: "sr-Cyrl-RS" "sr-Latn-RS" Language in which the fiscal receipt is issued |
object Available methods for issuing a fiscal receipt | |
printBankAccounts | boolean Print bank accounts if the payment method is bank transfer |
printDiscounts | boolean Print achieved discounts |
paymentMethodsOrder | Array of arrays Order of payment methods on the payment window |
productPickerType | string Enum: "list" "grid" Product display method at the cash register |
isSoundEnabled | boolean Play sound signals when entering items |
defaultUnknownAmountAdvance | boolean Is the option for advance without a known final amount enabled by default |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "address": "string",
- "city": "string",
- "zip": "string",
- "gln": "string",
- "phone": "string",
- "language": "sr-Cyrl-RS",
- "printMethod": {
- "thermal": true,
- "a4": true,
- "email": true
}, - "printBankAccounts": true,
- "printDiscounts": true,
- "paymentMethodsOrder": [ ],
- "productPickerType": "list",
- "isSoundEnabled": true,
- "defaultUnknownAmountAdvance": true
}
requestedBy | string JID of the security element that requested the signing of the fiscal receipt |
sdcDateTime | string <date-time> Date and time of issuing the fiscal receipt |
invoiceCounter | string Invoice counter |
invoiceCounterExtension | string Type of invoice counter |
invoiceNumber | string Fiscal receipt number |
Array of objects Tax items | |
verificationUrl | string <url> Verification URL |
verificationQRCode | string Verification QR code in GIF format |
journal | string Fiscal receipt in text format.
|
messages | string Messages from the fiscal receipt processor |
signedBy | string JID of the security element that signed the fiscal receipt |
encryptedInternalData | string Encrypted internal data |
signature | string Digital signature |
totalCounter | number Total number of issued receipts |
transactionTypeCounter | number Total number of issued receipts for the current transaction type |
totalAmount | number Total receipt amount |
taxGroupRevision | number Tax group revision |
businessName | string Business name |
tin | string Tax identification number (TIN) |
locationName | string Business location name |
address | string Address |
district | string District |
mrc | string Manufacturer's PFR registration number |
string URL to PDF file
| |
base64pdf | string PDF file in base64 format |
{- "requestedBy": "string",
- "sdcDateTime": "2019-08-24T14:15:22Z",
- "invoiceCounter": "string",
- "invoiceCounterExtension": "string",
- "invoiceNumber": "string",
- "taxItems": [
- {
- "categoryType": 0,
- "categoryName": "string",
- "label": "s",
- "rate": 100,
- "amount": 0
}
], - "verificationUrl": "string",
- "verificationQRCode": "string",
- "journal": "string",
- "messages": "string",
- "signedBy": "string",
- "encryptedInternalData": "string",
- "signature": "string",
- "totalCounter": 0,
- "transactionTypeCounter": 0,
- "totalAmount": 0,
- "taxGroupRevision": 0,
- "businessName": "string",
- "tin": "string",
- "locationName": "string",
- "address": "string",
- "district": "string",
- "mrc": "string",
- "pdf": "string",
- "base64pdf": "string"
}