Pređi na sadržaj
API dokumentacija

Get applicable tax rates

GET
/receipt/tax-rates
curl -X GET https://api.fiscomm.rs/receipt/tax-rates \
-H "Authorization: Bearer $FISCOMM_API_KEY"

Returns the VAT tax rate groups configured for the authenticated shop. Use the currentTaxRates field for the active group when populating receipt line items. For API key authentication the shop is resolved automatically — shopId is not required. When using Bearer token pass shopId to scope the result to a specific shop.

shopId
number

Shop ID. Not required for API key authentication — resolved from the key automatically.

Media typeapplication/json
object
currentTaxRates
required

The currently active tax rate group

object
validFrom
required

Date from which this tax group is valid

string format: date-time
groupId
required

Tax group identifier

number
taxCategories
required

List of tax categories in this group

Array<object>
object
name
required

Tax category name

string
categoryType
required

Tax category type identifier

number
orderId
required

Display order

number
taxRates
required

List of tax rates in this category

Array<object>
object
rate
required

Tax rate percentage

number
label
required

Tax rate label (e.g. A, E, G)

string
allTaxRates
required

All tax rate groups including historical ones

Array<object>
object
validFrom
required

Date from which this tax group is valid

string format: date-time
groupId
required

Tax group identifier

number
taxCategories
required

List of tax categories in this group

Array<object>
object
name
required

Tax category name

string
categoryType
required

Tax category type identifier

number
orderId
required

Display order

number
taxRates
required

List of tax rates in this category

Array<object>
object
rate
required

Tax rate percentage

number
label
required

Tax rate label (e.g. A, E, G)

string

Example

{
"currentTaxRates": {
"validFrom": "2021-11-01T01:00:00Z",
"groupId": 1,
"taxCategories": [
{
"name": "VAT",
"categoryType": 0,
"taxRates": [
{
"rate": 20,
"label": "A"
}
],
"orderId": 1
},
{
"name": "VAT",
"categoryType": 0,
"taxRates": [
{
"rate": 10,
"label": "Е"
}
],
"orderId": 2
}
]
},
"allTaxRates": []
}

Validation or business-rule error. Branch on code: ERR_00202 (input validation), ERR_00701 (items total ≠ payments total), ERR_01010 (rejected by the Tax Administration).

Media typeapplication/json
object
status
required

HTTP status code.

number
code
required

Machine-readable Fiscomm error code. Examples: ERR_00202 (validation), ERR_00701 (item total does not match payment total), ERR_00002 (internal error).

string
message
required

Technical message describing the error.

string
userMessage

Human-friendly message safe to surface to an end user.

string
details

Additional structured detail. For validation errors this includes validationErrors: [{ field, message }].

object
key
additional properties
any
path

Request path.

string
correlationId

Correlation id of the request, for support/log lookups.

string

Example

{
"status": 400,
"code": "ERR_00202",
"message": "Validation failed",
"details": {
"validationErrors": [
{
"field": "orderNumber",
"message": "should not be empty"
}
]
},
"path": "/receipt/normal/sale",
"correlationId": "5cbf3d9f-bd38-4375-89ab-34ed6be68d97"
}

Missing or invalid API key.

Media typeapplication/json
object
status
required

HTTP status code.

number
code
required

Machine-readable Fiscomm error code. Examples: ERR_00202 (validation), ERR_00701 (item total does not match payment total), ERR_00002 (internal error).

string
message
required

Technical message describing the error.

string
userMessage

Human-friendly message safe to surface to an end user.

string
details

Additional structured detail. For validation errors this includes validationErrors: [{ field, message }].

object
key
additional properties
any
path

Request path.

string
correlationId

Correlation id of the request, for support/log lookups.

string

Example

{
"status": 401,
"code": "ERR_00101",
"message": "Failed to validate API token",
"correlationId": "5cbf3d9f-bd38-4375-89ab-34ed6be68d97"
}

The API key is valid but has no access to this shop or resource.

Media typeapplication/json
object
status
required

HTTP status code.

number
code
required

Machine-readable Fiscomm error code. Examples: ERR_00202 (validation), ERR_00701 (item total does not match payment total), ERR_00002 (internal error).

string
message
required

Technical message describing the error.

string
userMessage

Human-friendly message safe to surface to an end user.

string
details

Additional structured detail. For validation errors this includes validationErrors: [{ field, message }].

object
key
additional properties
any
path

Request path.

string
correlationId

Correlation id of the request, for support/log lookups.

string

Example

{
"status": 403,
"message": "Forbidden — API key has no access to this shop",
"correlationId": "5cbf3d9f-bd38-4375-89ab-34ed6be68d97"
}

The requested resource does not exist.

Media typeapplication/json
object
status
required

HTTP status code.

number
code
required

Machine-readable Fiscomm error code. Examples: ERR_00202 (validation), ERR_00701 (item total does not match payment total), ERR_00002 (internal error).

string
message
required

Technical message describing the error.

string
userMessage

Human-friendly message safe to surface to an end user.

string
details

Additional structured detail. For validation errors this includes validationErrors: [{ field, message }].

object
key
additional properties
any
path

Request path.

string
correlationId

Correlation id of the request, for support/log lookups.

string

Example

{
"status": 404,
"code": "NOT_FOUND",
"message": "Resource not found",
"correlationId": "5cbf3d9f-bd38-4375-89ab-34ed6be68d97"
}

Internal error. Safe to retry later.

Media typeapplication/json
object
status
required

HTTP status code.

number
code
required

Machine-readable Fiscomm error code. Examples: ERR_00202 (validation), ERR_00701 (item total does not match payment total), ERR_00002 (internal error).

string
message
required

Technical message describing the error.

string
userMessage

Human-friendly message safe to surface to an end user.

string
details

Additional structured detail. For validation errors this includes validationErrors: [{ field, message }].

object
key
additional properties
any
path

Request path.

string
correlationId

Correlation id of the request, for support/log lookups.

string

Example

{
"status": 500,
"code": "ERR_00002",
"userMessage": "Server error. Please try again later.",
"correlationId": "5cbf3d9f-bd38-4375-89ab-34ed6be68d97"
}