SoftSDC

API reference

SoftSDC REST API reference for POS developers. Base URL, headers, PIN, invoice, status and environment endpoints, value lists and status codes.

The SoftSDC API lets your POS send receipts for fiscalization and check the system status. It uses REST with JSON over HTTP.

New to the API? Start with the integration guide. To learn what SoftSDC does with each receipt after it signs it, read how it works.

Base URL

http://localhost:8431/api/v3

The default port is 8431. You can change it in the app settings.

Headers

Required:

Accept: application/json
Content-Type: application/json

Optional:

HeaderPurpose
RequestIdYour ID for tracking the request, up to 32 characters
Accept-LanguagePreferred languages, for example en-US;sr-Cyrl-RS. See supportedLanguages in the status response.

Authentication

The API uses the smart card PIN. Verify the PIN with POST /api/v3/pin before you send invoices.

Endpoints

MethodPathPurpose
POST/api/v3/pinVerify the smart card PIN
POST/api/v3/invoicesSend a receipt for fiscalization
GET/api/v3/statusGet the operational status
GET/api/v3/environment-parametersGet the environment configuration
GET/api/v3/attentionCheck that the service is running

Verify PIN

POST /api/v3/pin unlocks the smart card so SoftSDC can sign invoices.

As JSON:

POST /api/v3/pin
Accept: application/json
Content-Type: application/json

{
  "pin": "1234"
}

Or as plain text:

POST /api/v3/pin
Content-Type: text/plain

1234

Create invoice

POST /api/v3/invoices sends a receipt for fiscalization.

POST /api/v3/invoices

{
  "dateAndTimeOfIssue": "2024-01-15T10:30:00.000Z",
  "cashier": "123456789",
  "buyerId": "RS34564565",
  "buyerCostCenterId": "567546",
  "invoiceType": "Normal",
  "transactionType": "Sale",
  "payment": [
    {
      "amount": 68.46,
      "paymentType": "Cash"
    }
  ],
  "invoiceNumber": "POS2024/001",
  "referentDocumentNumber": "",
  "options": {
    "omitQRCodeGen": "0",
    "omitTextualRepresentation": "0"
  },
  "items": [
    {
      "name": "Product Name",
      "quantity": 2,
      "unitPrice": 34.23,
      "labels": ["A"],
      "totalAmount": 68.46
    }
  ]
}

Get status

GET /api/v3/status returns the current state of SoftSDC, including tax rates and status codes.

GET /api/v3/status
Accept: application/json

Get environment parameters

GET /api/v3/environment-parameters returns the environment configuration.

{
  "organizationName": "Tax Authority",
  "serverTimeZone": "Europe/Belgrade",
  "street": "Main Street 1",
  "city": "Belgrade",
  "country": "RS",
  "endpoints": {
    "taxpayerAdminPortal": "https://portal.taxcore.com/",
    "taxCoreApi": "https://api.taxcore.com/",
    "vsdc": "https://vsdc.taxcore.com/",
    "root": "https://verify.taxcore.com/"
  },
  "environmentName": "PRODUCTION",
  "ntpServer": "http://time.nist.gov/",
  "supportedLanguages": ["en-US", "sr-Latn-RS"]
}

Health check

GET /api/v3/attention returns 200 OK when the service is running.

Test invoice

POST /api/v3/test-invoice creates a test invoice, if this endpoint is enabled.

Value lists

Invoice types

ValueMeaning
NormalStandard fiscal invoice
CopyCopy of an existing invoice
TrainingTraining mode, not fiscal
ProformaProforma invoice
AdvanceAdvance payment invoice

Transaction types

ValueMeaning
SaleNormal sale
RefundReturn or refund

Payment types

ValueMeaning
CashCash
CardCredit or debit card
CheckCheck
WireTransferBank transfer
VoucherVoucher or coupon
MobileMoneyMobile payment
OtherOther payment methods

Tax labels

Each item carries one or more tax labels that set its tax category. The valid labels and rates come from currentTaxRates in the status response. Common labels:

LabelTypical use
AStandard VAT rate
BReduced VAT rate
CVAT exempt
DSpecial tax category
EService tax
NNo tax

Use only labels that match the configured tax rates. Any other label returns error 2310.

Responses and errors

HTTP status codes

CodeMeaning
200 OKSuccess
201 CreatedInvoice created
400 Bad RequestInvalid request data
401 UnauthorizedPIN required
500 Internal Server ErrorServer error

SoftSDC status codes

Responses also carry 4-digit status codes in gsc (general) and mssc (manufacturer-specific). The glossary explains these and other terms.

{
  "gsc": ["2100"],
  "mssc": [],
  "messages": "PIN verification failed. 3 attempts remaining."
}
CodeTypeDescription
0000InfoAll OK
0100InfoPIN verified
1300WarningSmart card not present
1400WarningAudit required
1500WarningPIN required
2100ErrorIncorrect PIN
2110ErrorCard locked
2210ErrorSE locked
2310ErrorInvalid tax labels
2400ErrorNot configured
2800ErrorRequired field missing

The full list is in error codes. For fixes to common invoice errors, see troubleshooting.

On this page