Skip to main content

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.

Introduction

Welcome to the Buddy API documentation. You can use the Buddy API to access resources on the platform and for fiscalization of receipts.

Environments

Two environments are available:

API Service Version

The currently active version of the API service is v2

Local API Server

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

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=.

Stores

Stores

List of stores

List of all stores associated with the account

⚠️ This method returns all stores without pagination

Authorizations:
BasicAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add store

Adding a store

⚠️ Using the Buddy application is charged per store, so make sure you want to add a new store.

Authorizations:
BasicAuth
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

Content type
application/json
{
  • "name": "string",
  • "address": "string",
  • "city": "string",
  • "zip": "string",
  • "gln": "string",
  • "phone": "string",
  • "language": "sr-Cyrl-RS",
  • "printMethod": {
    },
  • "printBankAccounts": true,
  • "printDiscounts": true,
  • "paymentMethodsOrder": [ ],
  • "productPickerType": "list",
  • "isSoundEnabled": true,
  • "defaultUnknownAmountAdvance": true
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "address": "string",
  • "city": "string",
  • "zip": "string",
  • "gln": "string",
  • "phone": "string",
  • "language": "sr-Cyrl-RS",
  • "printMethod": {
    },
  • "printBankAccounts": true,
  • "printDiscounts": true,
  • "paymentMethodsOrder": [ ],
  • "productPickerType": "list",
  • "isSoundEnabled": true,
  • "defaultUnknownAmountAdvance": true
}

Update store

Update store

Authorizations:
BasicAuth
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

Content type
application/json
{
  • "name": "string",
  • "address": "string",
  • "city": "string",
  • "zip": "string",
  • "gln": "string",
  • "phone": "string",
  • "language": "sr-Cyrl-RS",
  • "printMethod": {
    },
  • "printBankAccounts": true,
  • "printDiscounts": true,
  • "paymentMethodsOrder": [ ],
  • "productPickerType": "list",
  • "isSoundEnabled": true,
  • "defaultUnknownAmountAdvance": true
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "address": "string",
  • "city": "string",
  • "zip": "string",
  • "gln": "string",
  • "phone": "string",
  • "language": "sr-Cyrl-RS",
  • "printMethod": {
    },
  • "printBankAccounts": true,
  • "printDiscounts": true,
  • "paymentMethodsOrder": [ ],
  • "productPickerType": "list",
  • "isSoundEnabled": true,
  • "defaultUnknownAmountAdvance": true
}

Delete store

Delete store

Authorizations:
BasicAuth
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

Content type
application/json
{
  • "name": "string",
  • "address": "string",
  • "city": "string",
  • "zip": "string",
  • "gln": "string",
  • "phone": "string",
  • "language": "sr-Cyrl-RS",
  • "printMethod": {
    },
  • "printBankAccounts": true,
  • "printDiscounts": true,
  • "paymentMethodsOrder": [ ],
  • "productPickerType": "list",
  • "isSoundEnabled": true,
  • "defaultUnknownAmountAdvance": true
}

Response samples

Content type
application/json
{ }

Products

Products

List of products

List of all products

⚠️ This method returns all products without pagination

Authorizations:
BasicAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add product

Adding a product

Authorizations:
BasicAuth
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

Content type
application/json
{
  • "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",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "deletedAt": "2019-08-24T14:15:22Z",
  • "images": [
    ]
}

Response samples

Content type
application/json
{
  • "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": {
    },
  • "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:
BasicAuth
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

Content type
application/json
{
  • "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",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "deletedAt": "2019-08-24T14:15:22Z",
  • "images": [
    ]
}

Response samples

Content type
application/json
{
  • "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": {
    },
  • "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:
BasicAuth
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

Content type
application/json
{
  • "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",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "deletedAt": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{ }

Fiscalization

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:
BasicAuth
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 instead of storeId.

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 referentDocumentNumber.

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.

Note: The discount is applied to each item individually, so there may be discrepancies compared to the amount obtained when the discount is applied to the final receipt amount. type: number

additionalText
string

Additional text that will be printed after the fiscal receipt

required
object non-empty

Fiscal receipt delivery method

Responses

Request samples

Content type
application/json
{
  • "storeId": "b8adcdc8-9238-4168-90f8-77b2d14c211c",
  • "clientId": "5e505642-9024-474d-9434-e5a44f505cc5",
  • "invoiceType": "normal",
  • "transactionType": "sale",
  • "buyerId": "string",
  • "buyerCostCenterId": "string",
  • "payments": {
    },
  • "referentDocumentNumber": "string",
  • "referentDocumentDT": "2019-08-24T14:15:22Z",
  • "posTime": "2019-08-24T14:15:22Z",
  • "items": [
    ],
  • "unknownAmountAdvance": true,
  • "advanceSpecification": {
    },
  • "discount": null,
  • "additionalText": "string",
  • "receiptDelivery": {
    }
}

Response samples

Content type
application/json
{
  • "requestedBy": "string",
  • "sdcDateTime": "2019-08-24T14:15:22Z",
  • "invoiceCounter": "string",
  • "invoiceCounterExtension": "string",
  • "invoiceNumber": "string",
  • "taxItems": [
    ],
  • "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:
BasicAuth
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 instead of storeId.

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

Content type
application/json
{
  • "storeId": "b8adcdc8-9238-4168-90f8-77b2d14c211c",
  • "clientId": "5e505642-9024-474d-9434-e5a44f505cc5",
  • "buyerId": "string",
  • "buyerCostCenterId": "string",
  • "payments": {
    },
  • "posTime": "2019-08-24T14:15:22Z",
  • "advanceSpecification": {
    },
  • "additionalText": "string",
  • "receiptDelivery": {
    }
}

Response samples

Content type
application/json
{
  • "requestedBy": "string",
  • "sdcDateTime": "2019-08-24T14:15:22Z",
  • "invoiceCounter": "string",
  • "invoiceCounterExtension": "string",
  • "invoiceNumber": "string",
  • "taxItems": [
    ],
  • "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:
BasicAuth
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 instead of storeId.

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

Content type
application/json
{
  • "storeId": "b8adcdc8-9238-4168-90f8-77b2d14c211c",
  • "clientId": "5e505642-9024-474d-9434-e5a44f505cc5",
  • "buyerId": "string",
  • "buyerCostCenterId": "string",
  • "payments": {
    },
  • "items": [
    ],
  • "additionalText": "string",
  • "receiptDelivery": {
    }
}

Response samples

Content type
application/json
[
  • {
    }
]

Issuing a copy of the fiscal receipt

Issuing a copy of the fiscal receipt

Authorizations:
BasicAuth
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 instead of storeId.

clientId
string <uuid>

Client used for issuing the receipt.

required
object non-empty

Fiscal receipt delivery method

Responses

Request samples

Content type
application/json
{
  • "storeId": "b8adcdc8-9238-4168-90f8-77b2d14c211c",
  • "clientId": "5e505642-9024-474d-9434-e5a44f505cc5",
  • "receiptDelivery": {
    }
}

Response samples

Content type
application/json
{
  • "requestedBy": "string",
  • "sdcDateTime": "2019-08-24T14:15:22Z",
  • "invoiceCounter": "string",
  • "invoiceCounterExtension": "string",
  • "invoiceNumber": "string",
  • "taxItems": [
    ],
  • "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:
BasicAuth
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 instead of storeId.

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

Content type
application/json
{
  • "storeId": "b8adcdc8-9238-4168-90f8-77b2d14c211c",
  • "clientId": "5e505642-9024-474d-9434-e5a44f505cc5",
  • "buyerId": "string",
  • "buyerCostCenterId": "string",
  • "payments": {
    },
  • "items": [
    ],
  • "additionalText": "string",
  • "receiptDelivery": {
    },
  • "advanceSpecification": {
    }
}

Response samples

Content type
application/json
[
  • {
    }
]

Product

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": {
    },
  • "categories": "2348245e-0ab0-4c35-9962-d6bf519a79a3",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "deletedAt": "2019-08-24T14:15:22Z"
}

Store

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": {
    },
  • "printBankAccounts": true,
  • "printDiscounts": true,
  • "paymentMethodsOrder": [ ],
  • "productPickerType": "list",
  • "isSoundEnabled": true,
  • "defaultUnknownAmountAdvance": true
}

TaxCore Receipt

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.

Note: This field contains the receipt text as returned by the fiscal receipt processor, and it does not contain all additional information added by the ESIR.

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

pdf
string

URL to PDF file

Note: The URL will be valid for 10 minutes from the issuance of the fiscal receipt.

base64pdf
string

PDF file in base64 format

{
  • "requestedBy": "string",
  • "sdcDateTime": "2019-08-24T14:15:22Z",
  • "invoiceCounter": "string",
  • "invoiceCounterExtension": "string",
  • "invoiceNumber": "string",
  • "taxItems": [
    ],
  • "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"
}