Vai alla documentazione

Copiato

API Cloud di Fiscalizzazione

01 · Prima richiesta

Dal token alla fattura fiscale

Usa prima l’ambiente di sviluppo. Azienda e dispositivo fiscale derivano dal token; il body contiene solo i dati del documento.

  1. 01

    Ottieni le credenziali

    Richiedi un token registrato per ambiente, azienda e dispositivo.

  2. 02

    Crea un docId

    Genera e salva un identificatore stabile prima della prima richiesta.

  3. 03

    Registra e verifica

    Invia la fattura e controlla gli identificatori, non solo HTTP 200.

Fattura ordinaria minima
curl --request POST \
  --url 'https://api.dev.easypos.al/fiscalisation-service/v1/invoice/register' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Content-Type: application/json' \
  --header 'integration-app: your-client-name' \
  --data '{
  "docId": "SHOP-2026-000123",
  "articles": [
    {
      "articleId": "ART-1",
      "name": "Kafe",
      "vatCode": "B",
      "price": 120,
      "units": 2,
      "soldIn": "XPP"
    }
  ],
  "payment": [
    {
      "type": "CASH",
      "amount": 240
    }
  ]
}'
Risposta completata
{
  "orderId": "SHOP-2026-000123",
  "fic": "52ca073b-536e-48e9-8678-cc0bf2202046",
  "iic": "D21EBF3F7B7C502D6AAF2321A7CE2CE8",
  "invoiceNumber": "12/2026/xx123xx123",
  "invoiceType": "CASH",
  "totalPrice": 240
}

02 · Accesso

Autenticazione e header

Ogni endpoint richiede un bearer token. Sostituisci il valore di esempio di integration-app con l’identificatore stabile assegnato alla tua integrazione e mantienilo invariato in ogni richiesta.

HeaderRequisitoScopo
AuthorizationObbligatorioBearer token dell’ambiente selezionato.
Content-TypeObbligatorioUsa application/json per ogni richiesta.
integration-appConsigliatoSostituisci your-client-name o erp-x con l’identificatore assegnato alla tua integrazione.

03 · Protocollo di recupero

docId è la chiave anti-duplicazione

Scegli docId nel tuo sistema prima dell’invio. Riutilizzarlo continua la stessa operazione fiscale e non deve creare una seconda fattura.

Genera una volta
5–200 caratteri, univoco per documento.
Salva prima del POST
Salva atomicamente docId, body immutabile e ID locale.
Riusa nel recupero
Timeout, perdita connessione, 502/503 e fattura incompleta mantengono lo stesso docId.
Single flight
Non eseguire register e status in parallelo sullo stesso docId.

Sequenza di recupero sicura

same docId · same body
  1. 01

    POST register

  2. 02

    Ambiguo / incompleto

  3. 03

    Attesa + jitter

  4. 04

    POST status

  5. 05

    Completo?

  6. 06

    Reinvia lo stesso body

  1. 1Verifica: fattura normale richiede fic; elettronica richiede fic ed eic.
  2. 2Per timeout, rete, 502/503 o risultato incompleto usa backoff esponenziale con jitter, massimo 30 secondi.
  3. 3Chiama /invoice/status con lo stesso docId. Se non esiste, ripeti /invoice/register con body e docId identici.
  4. 4Non riprovare errori di validazione o env:CLIENT prima di correggere la richiesta.

L’annullamento è un nuovo documento fiscale: usa un nuovo docId. Ogni retry dell’annullamento riusa quel docId.

Schema decisionale del client
const docId = await persistOperation(payload)

const result = await register({ ...payload, docId })
if (result.fic && (!payload.isEinvoice || result.eic)) return complete(result)

await backoffWithJitter()
const recovered = await status({ docId })

if (recovered.notFound) {
  return register({ ...payload, docId }) // exact same body
}

return evaluate(recovered)

04 · Modello documento

Esempi delle richieste fattura

Apri un tipo di documento per vedere richiesta, risposta e identificatori di completamento.

POST NORMALArticoli, pagamenti combinati e buyer opzionale. documentType può mancare.
/invoice/registerCompletamento: fic #invoice-type-normal
Body richiesta
curl --request POST \
  --url 'https://api.dev.easypos.al/fiscalisation-service/v1/invoice/register' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Content-Type: application/json' \
  --header 'integration-app: your-client-name' \
  --data '{
  "docId": "SHOP-2026-000123",
  "articles": [
    {
      "articleId": "ART-COFFEE",
      "name": "Kafe ekspres",
      "vatCode": "B",
      "price": 120,
      "units": 2,
      "soldIn": "XPP"
    },
    {
      "articleId": "ART-WATER",
      "name": "Ujë natyral",
      "vatCode": "B",
      "price": 100,
      "units": 1,
      "soldIn": "XPP"
    }
  ],
  "payment": [
    {
      "type": "CASH",
      "amount": 200
    },
    {
      "type": "CARD",
      "amount": 140
    }
  ]
}'
Risposta di esempio
{
  "orderId": "SHOP-2026-000123",
  "fic": "52ca073b-536e-48e9-8678-cc0bf2202046",
  "iic": "D21EBF3F7B7C502D6AAF2321A7CE2CE8",
  "invoiceNumber": "12/2026/xx123xx123",
  "invoiceType": "CASH",
  "totalPrice": 340
}

Campi richiesta

CampoTipo
docIdstring
articlesobject[]
articles[].articleIdstring
articles[].namestring
articles[].vatCodestring
articles[].pricenumber
articles[].unitsnumber
articles[].soldInstring
paymentobject[]
payment[].typestring
payment[].amountnumber

Campi risposta

CampoTipo
orderIdstring
ficstring
iicstring
invoiceNumberstring
invoiceTypestring
totalPricenumber
POST ORDERSolo articoli; payment è omesso e generato come ORDER.
/invoice/registerCompletamento: fic #invoice-type-order
Body richiesta
curl --request POST \
  --url 'https://api.dev.easypos.al/fiscalisation-service/v1/invoice/register' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Content-Type: application/json' \
  --header 'integration-app: your-client-name' \
  --data '{
  "docId": "ORDER-2026-000124",
  "documentType": "ORDER",
  "articles": [
    {
      "articleId": "ORD-1",
      "name": "Drekë biznesi",
      "vatCode": "B",
      "price": 1200,
      "units": 1,
      "soldIn": "XPP"
    }
  ]
}'
Risposta di esempio
{
  "orderId": "ORDER-2026-000124",
  "fic": "52ca073b-536e-48e9-8678-cc0bf2202046",
  "iic": "D21EBF3F7B7C502D6AAF2321A7CE2CE8",
  "invoiceNumber": "13/2026/xx123xx123",
  "invoiceType": "CASH",
  "totalPrice": 1200
}

Campi richiesta

CampoTipo
docIdstring
documentTypestring
articlesobject[]
articles[].articleIdstring
articles[].namestring
articles[].vatCodestring
articles[].pricenumber
articles[].unitsnumber
articles[].soldInstring

Campi risposta

CampoTipo
orderIdstring
ficstring
iicstring
invoiceNumberstring
invoiceTypestring
totalPricenumber
POST SUMMARYConsuma gli iic ORDER inutilizzati; articles è omesso.
/invoice/registerCompletamento: fic #invoice-type-summary
Body richiesta
curl --request POST \
  --url 'https://api.dev.easypos.al/fiscalisation-service/v1/invoice/register' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Content-Type: application/json' \
  --header 'integration-app: your-client-name' \
  --data '{
  "docId": "SUMMARY-2026-000125",
  "documentType": "SUMMARY",
  "summaryInvoices": [
    "D21EBF3F7B7C502D6AAF2321A7CE2CE8",
    "A11EBF3F7B7C502D6AAF2321A7CE2CE9"
  ],
  "total": 1800,
  "payment": [
    {
      "type": "CASH",
      "amount": 1800
    }
  ]
}'
Risposta di esempio
{
  "orderId": "SUMMARY-2026-000125",
  "fic": "52ca073b-536e-48e9-8678-cc0bf2202046",
  "iic": "D21EBF3F7B7C502D6AAF2321A7CE2CE8",
  "invoiceNumber": "14/2026/xx123xx123",
  "invoiceType": "CASH",
  "totalPrice": 1800
}

Campi richiesta

CampoTipo
docIdstring
documentTypestring
summaryInvoicesstring[]
totalnumber
paymentobject[]
payment[].typestring
payment[].amountnumber

Campi risposta

CampoTipo
orderIdstring
ficstring
iicstring
invoiceNumberstring
invoiceTypestring
totalPricenumber
POST SELFISSUERichiede selfIssueType e dati del fornitore in buyer.
/invoice/registerCompletamento: fic #invoice-type-selfissue
Body richiesta
curl --request POST \
  --url 'https://api.dev.easypos.al/fiscalisation-service/v1/invoice/register' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Content-Type: application/json' \
  --header 'integration-app: your-client-name' \
  --data '{
  "docId": "SELFISSUE-2026-000126",
  "documentType": "SELFISSUE",
  "selfIssueType": "DOMESTIC",
  "reverseCharge": true,
  "buyer": {
    "buyerIDType": "NUIS",
    "buyerIDNum": "{{supplierNipt}}",
    "buyerName": "Furnitor SHPK",
    "buyerAddress": "Tiranë",
    "buyerTown": "Tiranë",
    "buyerCountry": "ALB"
  },
  "articles": [
    {
      "articleId": "SVC-1",
      "name": "Shërbim profesional",
      "vatCode": "B",
      "price": 10000,
      "units": 1,
      "soldIn": "HUR"
    }
  ],
  "payment": [
    {
      "type": "CASH",
      "amount": 10000
    }
  ]
}'
Risposta di esempio
{
  "orderId": "SELFISSUE-2026-000126",
  "fic": "52ca073b-536e-48e9-8678-cc0bf2202046",
  "iic": "D21EBF3F7B7C502D6AAF2321A7CE2CE8",
  "invoiceNumber": "15/2026/xx123xx123",
  "invoiceType": "CASH",
  "totalPrice": 10000
}

Campi richiesta

CampoTipo
docIdstring
documentTypestring
selfIssueTypestring
reverseChargeboolean
buyerobject
buyer.buyerIDTypestring
buyer.buyerIDNumstring
buyer.buyerNamestring
buyer.buyerAddressstring
buyer.buyerTownstring
buyer.buyerCountrystring
articlesobject[]
articles[].articleIdstring
articles[].namestring
articles[].vatCodestring
articles[].pricenumber
articles[].unitsnumber
articles[].soldInstring
paymentobject[]
payment[].typestring
payment[].amountnumber

Campi risposta

CampoTipo
orderIdstring
ficstring
iicstring
invoiceNumberstring
invoiceTypestring
totalPricenumber
POST EXPORTBuyer estero obbligatorio e codice IVA export configurato.
/invoice/registerCompletamento: fic #invoice-type-export
Body richiesta
curl --request POST \
  --url 'https://api.dev.easypos.al/fiscalisation-service/v1/invoice/register' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Content-Type: application/json' \
  --header 'integration-app: your-client-name' \
  --data '{
  "docId": "EXPORT-2026-000127",
  "documentType": "EXPORT",
  "supplyPeriod": {
    "start": "2026-08-01",
    "end": "2026-08-28"
  },
  "buyer": {
    "buyerIDType": "VAT",
    "buyerIDNum": "IT12345678901",
    "buyerName": "Acquirente Demo SRL",
    "buyerAddress": "Via Roma 1",
    "buyerTown": "Bari",
    "buyerCountry": "ITA",
    "buyerCountryCode": "IT"
  },
  "articles": [
    {
      "articleId": "EXP-1",
      "name": "Mall për eksport",
      "vatCode": "J",
      "price": 25000,
      "units": 4,
      "soldIn": "XPP"
    }
  ],
  "payment": [
    {
      "type": "TRANSFER",
      "amount": 100000
    }
  ]
}'
Risposta di esempio
{
  "orderId": "EXPORT-2026-000127",
  "fic": "52ca073b-536e-48e9-8678-cc0bf2202046",
  "iic": "D21EBF3F7B7C502D6AAF2321A7CE2CE8",
  "invoiceNumber": "16/2026/xx123xx123",
  "invoiceType": "CASH",
  "totalPrice": 100000
}

Campi richiesta

CampoTipo
docIdstring
documentTypestring
supplyPeriodobject
supplyPeriod.startstring
supplyPeriod.endstring
buyerobject
buyer.buyerIDTypestring
buyer.buyerIDNumstring
buyer.buyerNamestring
buyer.buyerAddressstring
buyer.buyerTownstring
buyer.buyerCountrystring
buyer.buyerCountryCodestring
articlesobject[]
articles[].articleIdstring
articles[].namestring
articles[].vatCodestring
articles[].pricenumber
articles[].unitsnumber
articles[].soldInstring
paymentobject[]
payment[].typestring
payment[].amountnumber

Campi risposta

CampoTipo
orderIdstring
ficstring
iicstring
invoiceNumberstring
invoiceTypestring
totalPricenumber
POST ELETTRONICA · P1Fattura elettronica standard con buyer NUIS e pagamento non contante.
/invoice/registerCompletamento: fic + eic #invoice-type-electronic-p1
Body richiesta
curl --request POST \
  --url 'https://api.dev.easypos.al/fiscalisation-service/v1/invoice/register' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Content-Type: application/json' \
  --header 'integration-app: your-client-name' \
  --data '{
  "docId": "EINVOICE-P1-2026-000128",
  "isEinvoice": true,
  "selectedProcess": "P1",
  "payDeadline": "2026-09-30",
  "buyer": {
    "buyerIDType": "NUIS",
    "buyerIDNum": "{{buyerNipt}}",
    "buyerName": "Blerës SHPK",
    "buyerAddress": "Tiranë",
    "buyerTown": "Tiranë",
    "buyerCountry": "ALB",
    "buyerCountryCode": "AL"
  },
  "articles": [
    {
      "articleId": "SVC-CLOUD",
      "name": "Shërbim cloud",
      "vatCode": "B",
      "price": 10000,
      "units": 1,
      "soldIn": "HUR"
    }
  ],
  "payment": [
    {
      "type": "ACCOUNT",
      "amount": 10000,
      "details": [
        {
          "idNumber": "{{sellerIban}}",
          "name": "Shitësi SHPK",
          "bankName": "Banka",
          "swift_code": "ABCDEFGH",
          "country": "Shqipëri",
          "countryCode": "AL",
          "currency": "ALL"
        }
      ]
    }
  ]
}'
Risposta di esempio
{
  "orderId": "EINVOICE-P1-2026-000128",
  "fic": "52ca073b-536e-48e9-8678-cc0bf2202046",
  "iic": "D21EBF3F7B7C502D6AAF2321A7CE2CE8",
  "invoiceNumber": "17/2026/xx123xx123",
  "invoiceType": "NONCASH",
  "totalPrice": 10000,
  "eic": "2a8d91cf-8fea-4d86-b79d-4bcb0b153e78"
}

Campi richiesta

CampoTipo
docIdstring
isEinvoiceboolean
selectedProcessstring
payDeadlinestring
buyerobject
buyer.buyerIDTypestring
buyer.buyerIDNumstring
buyer.buyerNamestring
buyer.buyerAddressstring
buyer.buyerTownstring
buyer.buyerCountrystring
buyer.buyerCountryCodestring
articlesobject[]
articles[].articleIdstring
articles[].namestring
articles[].vatCodestring
articles[].pricenumber
articles[].unitsnumber
articles[].soldInstring
paymentobject[]
payment[].typestring
payment[].amountnumber
payment[].detailsobject[]
payment[].details[].idNumberstring
payment[].details[].namestring
payment[].details[].bankNamestring
payment[].details[].swift_codestring
payment[].details[].countrystring
payment[].details[].countryCodestring
payment[].details[].currencystring

Campi risposta

CampoTipo
orderIdstring
ficstring
iicstring
invoiceNumberstring
invoiceTypestring
totalPricenumber
eicstring
POST ELETTRONICA · P4Fattura anticipata; prepaidAmount non supera il totale.
/invoice/registerCompletamento: fic + eic #invoice-type-electronic-p4
Body richiesta
curl --request POST \
  --url 'https://api.dev.easypos.al/fiscalisation-service/v1/invoice/register' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Content-Type: application/json' \
  --header 'integration-app: your-client-name' \
  --data '{
  "docId": "EINVOICE-P4-2026-000129",
  "isEinvoice": true,
  "selectedProcess": "P4",
  "prepaidAmount": 5000,
  "buyer": {
    "buyerIDType": "NUIS",
    "buyerIDNum": "{{buyerNipt}}",
    "buyerName": "Blerës SHPK",
    "buyerAddress": "Tiranë",
    "buyerTown": "Tiranë",
    "buyerCountry": "ALB"
  },
  "articles": [
    {
      "articleId": "ADV-1",
      "name": "Parapagim shërbimi",
      "vatCode": "B",
      "price": 10000,
      "units": 1,
      "soldIn": "XPP"
    }
  ],
  "payment": [
    {
      "type": "TRANSFER",
      "amount": 10000
    }
  ]
}'
Risposta di esempio
{
  "orderId": "EINVOICE-P4-2026-000129",
  "fic": "52ca073b-536e-48e9-8678-cc0bf2202046",
  "iic": "D21EBF3F7B7C502D6AAF2321A7CE2CE8",
  "invoiceNumber": "18/2026/xx123xx123",
  "invoiceType": "NONCASH",
  "totalPrice": 10000,
  "eic": "0543e84b-6108-48b2-a2af-5db66bb80616"
}

Campi richiesta

CampoTipo
docIdstring
isEinvoiceboolean
selectedProcessstring
prepaidAmountnumber
buyerobject
buyer.buyerIDTypestring
buyer.buyerIDNumstring
buyer.buyerNamestring
buyer.buyerAddressstring
buyer.buyerTownstring
buyer.buyerCountrystring
articlesobject[]
articles[].articleIdstring
articles[].namestring
articles[].vatCodestring
articles[].pricenumber
articles[].unitsnumber
articles[].soldInstring
paymentobject[]
payment[].typestring
payment[].amountnumber

Campi risposta

CampoTipo
orderIdstring
ficstring
iicstring
invoiceNumberstring
invoiceTypestring
totalPricenumber
eicstring
POST ELETTRONICA · P9/P10Nota di credito o rettifica riferita a un iic elettronico.
/invoice/registerCompletamento: fic + eic #invoice-type-electronic-p9-p10
Body richiesta
curl --request POST \
  --url 'https://api.dev.easypos.al/fiscalisation-service/v1/invoice/register' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Content-Type: application/json' \
  --header 'integration-app: your-client-name' \
  --data '{
  "docId": "EINVOICE-P9-2026-000130",
  "isEinvoice": true,
  "selectedProcess": "P9",
  "correctiveInvoice": {
    "iicRef": "{{electronicIic}}"
  },
  "buyer": {
    "buyerIDType": "NUIS",
    "buyerIDNum": "{{buyerNipt}}",
    "buyerName": "Blerës SHPK",
    "buyerAddress": "Tiranë",
    "buyerTown": "Tiranë",
    "buyerCountry": "ALB"
  },
  "articles": [
    {
      "articleId": "CORR-1",
      "name": "Korrigjim shërbimi",
      "vatCode": "B",
      "price": -1000,
      "units": 1,
      "soldIn": "XPP"
    }
  ],
  "payment": [
    {
      "type": "TRANSFER",
      "amount": -1000
    }
  ]
}'
Risposta di esempio
{
  "orderId": "EINVOICE-P9-2026-000130",
  "fic": "52ca073b-536e-48e9-8678-cc0bf2202046",
  "iic": "D21EBF3F7B7C502D6AAF2321A7CE2CE8",
  "invoiceNumber": "19/2026/xx123xx123",
  "invoiceType": "NONCASH",
  "totalPrice": -1000,
  "eic": "6df80aec-f690-43ce-a2f2-45ee0cb948ce"
}

Campi richiesta

CampoTipo
docIdstring
isEinvoiceboolean
selectedProcessstring
correctiveInvoiceobject
correctiveInvoice.iicRefstring
buyerobject
buyer.buyerIDTypestring
buyer.buyerIDNumstring
buyer.buyerNamestring
buyer.buyerAddressstring
buyer.buyerTownstring
buyer.buyerCountrystring
articlesobject[]
articles[].articleIdstring
articles[].namestring
articles[].vatCodestring
articles[].pricenumber
articles[].unitsnumber
articles[].soldInstring
paymentobject[]
payment[].typestring
payment[].amountnumber

Campi risposta

CampoTipo
orderIdstring
ficstring
iicstring
invoiceNumberstring
invoiceTypestring
totalPricenumber
eicstring
POST ELETTRONICA · P11Flusso di fatturazione elettronica parziale.
/invoice/registerCompletamento: fic + eic #invoice-type-electronic-p11
Body richiesta
curl --request POST \
  --url 'https://api.dev.easypos.al/fiscalisation-service/v1/invoice/register' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Content-Type: application/json' \
  --header 'integration-app: your-client-name' \
  --data '{
  "docId": "EINVOICE-P11-2026-000131",
  "isEinvoice": true,
  "selectedProcess": "P11",
  "buyer": {
    "buyerIDType": "NUIS",
    "buyerIDNum": "{{buyerNipt}}",
    "buyerName": "Blerës SHPK",
    "buyerAddress": "Tiranë",
    "buyerTown": "Tiranë",
    "buyerCountry": "ALB"
  },
  "articles": [
    {
      "articleId": "PART-1",
      "name": "Faturim i pjesshëm",
      "vatCode": "B",
      "price": 25000,
      "units": 1,
      "soldIn": "XPP"
    }
  ],
  "payment": [
    {
      "type": "TRANSFER",
      "amount": 25000
    }
  ]
}'
Risposta di esempio
{
  "orderId": "EINVOICE-P11-2026-000131",
  "fic": "52ca073b-536e-48e9-8678-cc0bf2202046",
  "iic": "D21EBF3F7B7C502D6AAF2321A7CE2CE8",
  "invoiceNumber": "20/2026/xx123xx123",
  "invoiceType": "NONCASH",
  "totalPrice": 25000,
  "eic": "55df7eaf-126f-41b7-8270-6fa57080703e"
}

Campi richiesta

CampoTipo
docIdstring
isEinvoiceboolean
selectedProcessstring
buyerobject
buyer.buyerIDTypestring
buyer.buyerIDNumstring
buyer.buyerNamestring
buyer.buyerAddressstring
buyer.buyerTownstring
buyer.buyerCountrystring
articlesobject[]
articles[].articleIdstring
articles[].namestring
articles[].vatCodestring
articles[].pricenumber
articles[].unitsnumber
articles[].soldInstring
paymentobject[]
payment[].typestring
payment[].amountnumber

Campi risposta

CampoTipo
orderIdstring
ficstring
iicstring
invoiceNumberstring
invoiceTypestring
totalPricenumber
eicstring
POST ANNULLAMENTO · NORMALENuovo docId di annullamento riferito all’iic originale.
/invoice/cancelCompletamento: fic #invoice-type-cancellation
Body richiesta
curl --request POST \
  --url 'https://api.dev.easypos.al/fiscalisation-service/v1/invoice/cancel' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Content-Type: application/json' \
  --header 'integration-app: your-client-name' \
  --data '{
  "docId": "CANCEL-2026-000132",
  "correctiveInvoice": {
    "iicRef": "D21EBF3F7B7C502D6AAF2321A7CE2CE8"
  },
  "invoiceNotes": "Anulim me kërkesë të klientit"
}'
Risposta di esempio
{
  "orderId": "CANCEL-2026-000132",
  "fic": "52ca073b-536e-48e9-8678-cc0bf2202046",
  "iic": "D21EBF3F7B7C502D6AAF2321A7CE2CE8",
  "invoiceNumber": "21/2026/xx123xx123",
  "invoiceType": "CASH",
  "totalPrice": -340
}

Campi richiesta

CampoTipo
docIdstring
correctiveInvoiceobject
correctiveInvoice.iicRefstring
invoiceNotesstring

Campi risposta

CampoTipo
orderIdstring
ficstring
iicstring
invoiceNumberstring
invoiceTypestring
totalPricenumber
POST ANNULLAMENTO · ELETTRONICOAnnullamento correttivo P10 di una fattura che dispone già di eic.
/invoice/cancelCompletamento: fic + eic #invoice-type-electronic-cancellation
Body richiesta
curl --request POST \
  --url 'https://api.dev.easypos.al/fiscalisation-service/v1/invoice/cancel' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Content-Type: application/json' \
  --header 'integration-app: your-client-name' \
  --data '{
  "docId": "CANCEL-EINVOICE-2026-000133",
  "isEinvoice": true,
  "selectedProcess": "P10",
  "correctiveInvoice": {
    "iicRef": "{{electronicIic}}"
  },
  "invoiceNotes": "Anulim i faturës elektronike"
}'
Risposta di esempio
{
  "orderId": "CANCEL-EINVOICE-2026-000133",
  "fic": "52ca073b-536e-48e9-8678-cc0bf2202046",
  "iic": "D21EBF3F7B7C502D6AAF2321A7CE2CE8",
  "invoiceNumber": "22/2026",
  "invoiceType": "NONCASH",
  "totalPrice": -10000,
  "eic": "d59ef857-47df-4a80-a7d8-22ce70577df3"
}

Campi richiesta

CampoTipo
docIdstring
isEinvoiceboolean
selectedProcessstring
correctiveInvoiceobject
correctiveInvoice.iicRefstring
invoiceNotesstring

Campi risposta

CampoTipo
orderIdstring
ficstring
iicstring
invoiceNumberstring
invoiceTypestring
totalPricenumber
eicstring

Mappa dei processi elettronici

Fiscalizzazione e consegna eInvoice sono fasi separate. La fattura è completa solo con entrambi gli identificatori.

ProcessoTipo predefinitoRegola aggiuntiva
P1380Consegne contro ordini di acquisto basati su un contratto.
P2380Consegne di beni o servizi basate su un contratto.
P3380Consegna contro un ordine di acquisto occasionale.
P4386Pagamento anticipato; prepaidAmount deve essere positivo e non superare il totale.
P5380Pagamento sul posto.
P6380Pagamento prima della consegna.
P7380Fattura con riferimento al documento di spedizione.
P8380Fattura con riferimenti ai documenti di spedizione e ricezione.
P9384Nota di credito o fattura negativa; correctiveInvoice.iicRef deve riferire una fattura con eic.
P10384Correzione o annullamento; correctiveInvoice.iicRef deve riferire una fattura con eic.
P11326Fatturazione parziale e finale.
Codici UNTDID del tipo di fattura

Usa selectedInvoiceType solo quando serve una classificazione specifica. Se omesso, selectedProcess sceglie il codice predefinito indicato sopra.

CodiceSignificato
82Fattura per servizi misurati
84Nota di debito per rettifiche finanziarie
325Fattura pro forma
326Fattura parziale
380Fattura commerciale
383Nota di debito
386Fattura di pagamento anticipato
393Fattura ceduta a factoring
394Fattura di leasing
395Fattura di consegna
575Fattura dell’assicuratore
623Fattura dello spedizioniere
780Fattura di trasporto merci

I codici 80, 381, 384, 385 e 389 sono riservati ai tipi assegnati automaticamente dal processo e non possono essere scelti direttamente.

05 · Riferimento HTTP

Endpoint

Tutti gli endpoint usano POST con JSON e gli stessi header.

POST/invoice/registerRegistra fattura · Crea o continua il documento identificato da docId.
Obbligatori
docId · articles[]* · payment[]*
Regole
NORMAL | ORDER | SUMMARY | SELFISSUE | EXPORT | eInvoice

Campi richiesta

CampoTipo
docIdstring
operatorCodestring?
currencyCurrency?
articlesArticle[] (conditional)
paymentPayment[] (conditional)
invoiceRebateRebate?
buyerBuyer (conditional)
correctiveInvoiceCorrectiveInvoiceRef (conditional)
invoiceNotesstring?
documentTypeNORMAL | ORDER | SUMMARY | SELFISSUE | EXPORT?
selfIssueTypeAGREEMENT | DOMESTIC | ABROAD | SELF | OTHER (conditional)
reverseChargeboolean?
summaryInvoicesstring[] (conditional)
totalnumber (conditional)
supplyPeriod{ start: date; end: date }?
isEinvoiceboolean?
selectedProcessP1 | P2 | P3 | P4 | P5 | P6 | P7 | P8 | P9 | P10 | P11?
selectedInvoiceTypeUNTDID code?
payDeadlinestring(date)?
prepaidAmountnumber (conditional)

Campi risposta

CampoTipo
orderIdstring
ficstring?
eicstring?
iicstring?
linkstring(uri)?
errorFiscalError?
invoiceNumberstring?
invoiceOrderNumberinteger?
invoiceTypeCASH | NONCASH?
totalPricenumber?
totalPriceWithoutVatnumber?
totalVatAmountnumber?
taxFreeAmountnumber?
goodsExportnumber?
markUpAmountnumber?
operatorCodestring?
businessUnitCodestring?
tcrCodestring?
sellerNamestring?
sellerNuisstring?
sellerAddressstring?
Body richiesta
curl --request POST \
  --url 'https://api.dev.easypos.al/fiscalisation-service/v1/invoice/register' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Content-Type: application/json' \
  --header 'integration-app: your-client-name' \
  --data '{
  "docId": "SHOP-2026-000123",
  "articles": [
    {
      "articleId": "ART-1",
      "name": "Kafe",
      "vatCode": "B",
      "price": 120,
      "units": 2,
      "soldIn": "XPP"
    }
  ],
  "payment": [
    {
      "type": "CASH",
      "amount": 240
    }
  ]
}'
Risposta di esempio
{
  "orderId": "SHOP-2026-000123",
  "fic": "52ca073b-536e-48e9-8678-cc0bf2202046",
  "iic": "D21EBF3F7B7C502D6AAF2321A7CE2CE8",
  "invoiceNumber": "12/2026/xx123xx123",
  "invoiceType": "CASH",
  "totalPrice": 240
}
POST/invoice/cancelAnnulla fattura · Crea un annullamento correttivo per un iic esistente.
Obbligatori
new docId · correctiveInvoice.iicRef
Regole
no articles · no payment

Campi richiesta

CampoTipo
docIdstring
operatorCodestring?
correctiveInvoiceCorrectiveInvoiceRef
invoiceNotesstring?
isEinvoiceboolean?
selectedProcessP1–P11?
selectedInvoiceTypeUNTDID code?
payDeadlinestring(date)?
prepaidAmountnumber?

Campi risposta

CampoTipo
orderIdstring
ficstring?
eicstring?
iicstring?
linkstring(uri)?
errorFiscalError?
invoiceNumberstring?
invoiceOrderNumberinteger?
invoiceTypeCASH | NONCASH?
totalPricenumber?
totalPriceWithoutVatnumber?
totalVatAmountnumber?
taxFreeAmountnumber?
goodsExportnumber?
markUpAmountnumber?
operatorCodestring?
businessUnitCodestring?
tcrCodestring?
sellerNamestring?
sellerNuisstring?
sellerAddressstring?
Body richiesta
curl --request POST \
  --url 'https://api.dev.easypos.al/fiscalisation-service/v1/invoice/cancel' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Content-Type: application/json' \
  --header 'integration-app: your-client-name' \
  --data '{
  "docId": "SHOP-2026-000123-CANCEL",
  "correctiveInvoice": {
    "iicRef": "D21EBF3F7B7C502D6AAF2321A7CE2CE8"
  },
  "invoiceNotes": "Customer cancellation"
}'
Risposta di esempio
{
  "orderId": "SHOP-2026-000123-CANCEL",
  "fic": "52ca073b-536e-48e9-8678-cc0bf2202046",
  "iic": "D21EBF3F7B7C502D6AAF2321A7CE2CE8",
  "invoiceNumber": "13/2026/xx123xx123",
  "invoiceType": "CASH",
  "totalPrice": -240
}
POST/invoice/statusStato fattura · Legge lo stato per docId e continua un’operazione incompleta.
Obbligatori
docId
Regole
same docId · may continue processing

Campi richiesta

CampoTipo
docIdstring

Campi risposta

CampoTipo
orderIdstring
ficstring?
eicstring?
iicstring?
linkstring(uri)?
errorFiscalError?
invoiceNumberstring?
invoiceOrderNumberinteger?
invoiceTypeCASH | NONCASH?
totalPricenumber?
totalPriceWithoutVatnumber?
totalVatAmountnumber?
taxFreeAmountnumber?
goodsExportnumber?
markUpAmountnumber?
operatorCodestring?
businessUnitCodestring?
tcrCodestring?
sellerNamestring?
sellerNuisstring?
sellerAddressstring?
Body richiesta
curl --request POST \
  --url 'https://api.dev.easypos.al/fiscalisation-service/v1/invoice/status' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Content-Type: application/json' \
  --header 'integration-app: your-client-name' \
  --data '{
  "docId": "SHOP-2026-000123"
}'
Risposta di esempio
{
  "orderId": "SHOP-2026-000123",
  "fic": "52ca073b-536e-48e9-8678-cc0bf2202046",
  "iic": "D21EBF3F7B7C502D6AAF2321A7CE2CE8",
  "invoiceNumber": "12/2026/xx123xx123",
  "invoiceType": "CASH",
  "totalPrice": 240
}
POST/invoice/pdfPDF fattura · Genera A4 PDF, ricevuta PNG o eInvoice PDF in base64.
Obbligatori
iic
Regole
A4 | receipt | eInvoice

Campi richiesta

CampoTipo
iicstring
pdfType'A4' | 'receipt' | 'eInvoice'
paperWidth58 | 80 | 110?
lang'sq' | 'en'?

Campi risposta

CampoTipo
base64string
langstring?
eicstring?
Body richiesta
curl --request POST \
  --url 'https://api.dev.easypos.al/fiscalisation-service/v1/invoice/pdf' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Content-Type: application/json' \
  --header 'integration-app: your-client-name' \
  --data '{
  "iic": "D21EBF3F7B7C502D6AAF2321A7CE2CE8",
  "pdfType": "A4",
  "lang": "sq"
}'
Risposta di esempio
{
  "base64": "JVBERi0xLjQKJcfsj6IK...",
  "lang": "sq"
}
POST/balance/initiateInizializza cassa · Registra il saldo iniziale in ALL.
Obbligatori
docId · amount
Regole
once per business day and fiscal device · before the first cash invoice · amount in ALL

Campi richiesta

CampoTipo
docIdstring
amountnumber
notesstring?
operatorCodestring?

Campi risposta

CampoTipo
orderIdstring
fcdcstring?
errorFiscalError?
Body richiesta
curl --request POST \
  --url 'https://api.dev.easypos.al/fiscalisation-service/v1/balance/initiate' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Content-Type: application/json' \
  --header 'integration-app: your-client-name' \
  --data '{
  "docId": "SHIFT-2026-08-28-OPEN",
  "amount": 10000
}'
Risposta di esempio
{
  "orderId": "SHIFT-2026-08-28-OPEN",
  "fcdc": "b5c3e1a2-9f44-4c3a-9c1e-2f0d7a5b8e10"
}
POST/balance/depositDeposita contante · Registra contante aggiunto alla cassa in ALL.
Obbligatori
docId · amount
Regole
amount in ALL

Campi richiesta

CampoTipo
docIdstring
amountnumber
notesstring?
operatorCodestring?

Campi risposta

CampoTipo
orderIdstring
fcdcstring?
errorFiscalError?
Body richiesta
curl --request POST \
  --url 'https://api.dev.easypos.al/fiscalisation-service/v1/balance/deposit' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Content-Type: application/json' \
  --header 'integration-app: your-client-name' \
  --data '{
  "docId": "SHIFT-2026-08-28-IN-1",
  "amount": 5000,
  "notes": "Cash added to till"
}'
Risposta di esempio
{
  "orderId": "SHIFT-2026-08-28-IN-1",
  "fcdc": "d6a4e2b3-8e55-4d2b-8b2f-3a1e6b4c9f21"
}
POST/balance/withdrawPreleva contante · Registra contante rimosso dalla cassa in ALL.
Obbligatori
docId · amount
Regole
amount in ALL

Campi richiesta

CampoTipo
docIdstring
amountnumber
notesstring?
operatorCodestring?

Campi risposta

CampoTipo
orderIdstring
fcdcstring?
errorFiscalError?
Body richiesta
curl --request POST \
  --url 'https://api.dev.easypos.al/fiscalisation-service/v1/balance/withdraw' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Content-Type: application/json' \
  --header 'integration-app: your-client-name' \
  --data '{
  "docId": "SHIFT-2026-08-28-OUT-1",
  "amount": 2500,
  "notes": "Bank deposit"
}'
Risposta di esempio
{
  "orderId": "SHIFT-2026-08-28-OUT-1",
  "fcdc": "e7b5f3c4-7d66-5e3c-9a3e-4b2f7c5d0a32"
}
POST/utilities/get-taxpayersCerca contribuenti · Cerca per NIPT o ragione sociale.
Obbligatori
searchTerm (3–200)
Regole
NIPT or business name · searchTerm minimum 3 characters · no activity-status field

Campi richiesta

CampoTipo
searchTermstring (3–200)

Campi risposta

CampoTipo
[]Taxpayer[]
[].Tinstring
[].Namestring
[].Addressstring
[].Townstring
[].Countrystring (ISO 3166-1 alpha-3)
Body richiesta
curl --request POST \
  --url 'https://api.dev.easypos.al/fiscalisation-service/v1/utilities/get-taxpayers' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Content-Type: application/json' \
  --header 'integration-app: your-client-name' \
  --data '{
  "searchTerm": "Vodafone"
}'
Risposta di esempio
[
  {
    "Address": "Rruga Pavaresia, kodi postal 1050, Kashar 61",
    "Country": "ALB",
    "Name": "FONDACIONI VODAFONE ALBANIA",
    "Tin": "K72118452F",
    "Town": "Tirane"
  },
  {
    "Address": "Autostrada Tirane-Durres, Rruga Pavaresia, Nr.61, Kashar",
    "Country": "ALB",
    "Name": "VODAFONE ALBANIA",
    "Tin": "K11715005L",
    "Town": "Kashar"
  }
]
POST/utilities/get-operatorsElenca operatori · Restituisce gli operatori disponibili.
Obbligatori
none
Regole
authenticated business + device

Campi richiesta

CampoTipo
body{}

Campi risposta

CampoTipo
[]Operator[]
[].namestring
[].opCodestring
Body richiesta
curl --request POST \
  --url 'https://api.dev.easypos.al/fiscalisation-service/v1/utilities/get-operators' \
  --header 'Authorization: Bearer {{accessToken}}' \
  --header 'Content-Type: application/json' \
  --header 'integration-app: your-client-name' \
  --data '{}'
Risposta di esempio
[
  {
    "name": "test3",
    "opCode": "gh537ez280"
  },
  {
    "name": "User A",
    "opCode": "aa111aa222"
  }
]

06 · Riferimento campi

Catalogo degli schemi API

Espandi uno schema per vedere ogni campo, tipo esatto, requisito e vincolo di validazione.

RegisterInvoiceRequest22
CampoTipoRequisitoRegole
docIdstringObbligatorio5–200 chars · unique per business document
operatorCodestringOpzionale^[a-z]{2}\d{3}[a-z]{2}\d{3}$
currencyCurrencyOpzionaledefault: ALL / 1
articlesArticle[]Condizionalerequired except SUMMARY · minItems: 1
paymentPayment[]Condizionalerequired except ORDER · minItems: 1
invoiceRebateRebateOpzionalepercentage or value, never both
buyerBuyerCondizionalerequired for eInvoice and EXPORT
correctiveInvoiceCorrectiveInvoiceRefCondizionalerequired for P9 / P10
invoiceNotesstringOpzionalemaxLength: 500
documentTypeenumOpzionaleNORMAL | ORDER | SUMMARY | SELFISSUE | EXPORT
selfIssueTypeenumCondizionaleAGREEMENT | DOMESTIC | ABROAD | SELF | OTHER
reverseChargebooleanOpzionaletrue only for SELFISSUE
summaryInvoicesstring[]CondizionaleSUMMARY only · minItems: 1 · each iic is 32 hex chars
totalnumberCondizionaleSUMMARY only · exact referenced ORDER total
supplyPeriodobjectOpzionalestart/end in one calendar month
supplyPeriod.startstring(date)CondizionaleYYYY-MM-DD
supplyPeriod.endstring(date)CondizionaleYYYY-MM-DD
isEinvoicebooleanOpzionaledefault: false
selectedProcessenumOpzionaleP1–P11 · default: P1
selectedInvoiceTypestring(enum)Opzionale82 | 84 | 325 | 326 | 380 | 383 | 386 | 393 | 394 | 395 | 575 | 623 | 780
payDeadlinestring(date)OpzionaleYYYY-MM-DD · current year · not in the past
prepaidAmountnumberCondizionalerequired for P4 · >= 0 · max 2 decimals
Article8
CampoTipoRequisitoRegole
articleIdstringObbligatoriomaxLength: 100
namestringObbligatoriomaxLength: 100
vatCodestring(enum)ObbligatorioA | B | C | D | E | F | G | H | I | J | K | L · must match the business fiscal configuration
pricenumberObbligatoriounit price including VAT
unitsnumberObbligatorioquantity
soldInstringObbligatorioUN/CEFACT unit code, e.g. XPP | KGM | LTR | HUR
totalPricenumberOpzionaledefault: price × units
rebateRebateOpzionaleline-level discount
Rebate2
CampoTipoRequisitoRegole
inPercentagenumberCondizionalemutually exclusive with inValue
inValuenumberCondizionalemutually exclusive with inPercentage
Payment3
CampoTipoRequisitoRegole
typestring(enum)ObbligatorioCASH | BANKNOTE | CARD | CHECK | SVOUCHER | COMPANY | ORDER | ACCOUNT | FACTORING | COMPENSATION | TRANSFER | WAIVER | KIND | OTHER
amountnumberObbligatoriopayment sum must equal calculated invoice total
detailsPaymentDetail[]Condizionalerequired and non-empty for ACCOUNT
PaymentDetail7
CampoTipoRequisitoRegole
idNumberstringObbligatorioIBAN or account number
namestringObbligatorioaccount holder
bankNamestringObbligatoriobank name
swift_codestringObbligatorioSWIFT / BIC
countrystringObbligatoriocountry name
countryCodestringObbligatorioISO 3166-1 alpha-2 · exactly 2 chars
currencystringObbligatorioISO 4217 · exactly 3 chars
Buyer7
CampoTipoRequisitoRegole
buyerIDTypestring(enum)ObbligatorioNUIS | ID | PASS | VAT | TAX | SOC | POINTS
buyerIDNumstringObbligatoriowhen buyerIDType=NUIS: ^[A-Za-z][0-9]{8}[A-Za-z]$ · normalize to uppercase
buyerNamestringObbligatoriobuyer legal/display name
buyerAddressstringObbligatoriobuyer address
buyerTownstringObbligatoriobuyer town
buyerCountrystringObbligatorioISO 3166-1 alpha-3, e.g. ALB
buyerCountryCodestringOpzionaleISO 3166-1 alpha-2 · default: AL
Currency2
CampoTipoRequisitoRegole
codestringOpzionaleISO 4217 · default: ALL
exRatenumberCondizionalerequired when code != ALL · rate against ALL
CorrectiveInvoiceRef2
CampoTipoRequisitoRegole
iicRefstringObbligatorioexisting invoice iic · 32 hex chars
issueDateTimestring(date)Opzionaledefaults to original invoice date
CancelInvoiceRequest9
CampoTipoRequisitoRegole
docIdstringObbligatorionew cancellation id · 5–200 chars
operatorCodestringOpzionale^[a-z]{2}\d{3}[a-z]{2}\d{3}$
correctiveInvoiceCorrectiveInvoiceRefObbligatorioiicRef points to original invoice
invoiceNotesstringOpzionalemaxLength: 500
isEinvoicebooleanOpzionaleinherits from original when omitted
selectedProcessenumOpzionaleP1–P11 · electronic default: P10
selectedInvoiceTypestring(enum)Opzionalesame values as RegisterInvoiceRequest
payDeadlinestring(date)OpzionaleYYYY-MM-DD
prepaidAmountnumberOpzionale>= 0 · max 2 decimals
StatusInvoiceRequest1
CampoTipoRequisitoRegole
docIdstringObbligatoriosame invoice docId · 5–200 chars
InvoicePdfRequest4
CampoTipoRequisitoRegole
iicstringObbligatorioexactly 32 hexadecimal chars
pdfTypestring(enum)OpzionaleA4 | receipt | eInvoice · default: A4
paperWidthinteger(enum)Opzionale58 | 80 | 110 · receipt only · default: 80
langstring(enum)Opzionalesq | en
BalanceRequest4
CampoTipoRequisitoRegole
docIdstringObbligatorio5–200 chars · unique per balance operation · no prescribed naming convention
amountnumberObbligatorioamount in ALL
notesstringOpzionaleoperation note
operatorCodestringOpzionale^[a-z]{2}\d{3}[a-z]{2}\d{3}$
GetTaxpayersRequest1
CampoTipoRequisitoRegole
searchTermstringObbligatorioNIPT or business name · 3–200 chars
InvoiceResponse21
CampoTipoRequisitoRegole
orderIdstringObbligatorioechoes request docId
ficstringCondizionalenormal completion identifier
eicstringCondizionalerequired with fic for electronic completion
iicstringCondizionaleinvoice identifier · 32 hex chars
linkstring(uri)Opzionalepublic verification URL
errorFiscalErrorOpzionalepresent when incomplete or failed
invoiceNumberstringOpzionalefiscal invoice number
invoiceOrderNumberintegerOpzionalefiscal sequence number
invoiceTypestring(enum)OpzionaleCASH | NONCASH
totalPricenumberOpzionalegross total
totalPriceWithoutVatnumberOpzionalenet total
totalVatAmountnumberOpzionaleVAT total
taxFreeAmountnumberOpzionaletax-free total
goodsExportnumberOpzionaleexport amount
markUpAmountnumberOpzionalemarkup amount
operatorCodestringOpzionalefiscal operator code
businessUnitCodestringOpzionalefiscal business-unit code
tcrCodestringOpzionaleempty for electronic invoices
sellerNamestringOpzionaleseller name
sellerNuisstringOpzionaleseller NIPT
sellerAddressstringOpzionaleseller address
InvoiceIncompleteResponse2
CampoTipoRequisitoRegole
orderIdstringObbligatorioechoes request docId
errorFiscalErrorObbligatoriofiscalization or eInvoice delivery has not completed
Error2
CampoTipoRequisitoRegole
messagestringObbligatoriovalidation, authorization or domain error message
fieldstringOpzionalefield that failed validation
CisError3
CampoTipoRequisitoRegole
faultEnvstring(enum)Opzionaleenv:CLIENT | env:SERVER
faultStringstringOpzionalemessage returned by the tax platform
faultCodestringOpzionaletax-platform error code
FiscalError2
CampoTipoRequisitoRegole
cisErrorCisErrorOpzionaletax platform error
otherErrorstringOpzionaletemporary processing error
PdfResponse2
CampoTipoRequisitoRegole
base64stringObbligatoriobase64 PDF or PNG
langstringOpzionaledocument language
EinvoicePdfResponse2
CampoTipoRequisitoRegole
base64stringObbligatorioofficial eInvoice PDF encoded as base64
eicstringObbligatorioelectronic invoice identifier
BalanceResponse3
CampoTipoRequisitoRegole
orderIdstringObbligatorioechoes request docId
fcdcstringCondizionalebalance-operation completion identifier
errorFiscalErrorOpzionaleprocessing error
Taxpayer5
CampoTipoRequisitoRegole
TinstringObbligatoriotaxpayer NIPT
NamestringObbligatorioregistered name
AddressstringObbligatorioregistered address
TownstringObbligatorioregistered town
CountrystringObbligatorioISO 3166-1 alpha-3
Operator2
CampoTipoRequisitoRegole
namestringObbligatoriooperator display name
opCodestringObbligatoriouse as operatorCode in fiscal requests

Mappa dei codici IVA

vatCode dipende dallo stato IVA e dalla configurazione fiscale dell’attività, non solo dall’articolo. Per un’attività soggetta a IVA, la categoria standard al 20% è B; A è la categoria 0% per un’attività non soggetta a IVA.

CodiceAliquotaTrattamento fiscale
A0%Attività non soggetta a IVA
B20%Aliquota ordinaria
C0%Fornitura esente
D10%Aliquota ridotta
E6%Aliquota ridotta
J0%Esportazione di beni

L’API non restituisce attualmente questa mappatura. Memorizzala nella configurazione dell’integrazione. Non usare altri codici A–L senza una configurazione fiscale confermata.

Pagamento ACCOUNT completo

details deve essere un array non vuoto. Ogni elemento descrive un conto bancario del venditore e richiede tutti i sette campi mostrati qui.

Frammento pagamento
{
  "payment": [
    {
      "type": "ACCOUNT",
      "amount": 10000,
      "details": [
        {
          "idNumber": "AL47212110090000000235698741",
          "name": "Shitësi SHPK",
          "bankName": "Banka XYZ",
          "swift_code": "ABCDEFGH",
          "country": "Shqipëri",
          "countryCode": "AL",
          "currency": "ALL"
        }
      ]
    }
  ]
}

Chiarimenti operativi

CampoRegole
buyerIDNum · NUISFormato accettato: una lettera, otto cifre, una lettera (^[A-Za-z][0-9]{8}[A-Za-z]$). Normalizza in maiuscolo. Nessun formato NIPT alternativo precedente fa parte del contratto.
get-taxpayersCountry usa ISO 3166-1 alpha-3 (ALB per l’Albania). La risposta non include lo stato attivo, passivo o cancellato; usa l’endpoint per cercare e compilare i dati dell’acquirente, non per la verifica finale dello stato fiscale.
Limiti di frequenzaAttualmente non è pubblicato un limite numerico. Applica debounce alle ricerche e non inviare una richiesta a ogni tasto premuto.
balance/initiateInvia un solo saldo di apertura riuscito per giorno lavorativo e dispositivo fiscale/TCR autenticato, prima della prima fattura in contanti. Il turno applicativo non è il confine fiscale e non esiste un endpoint di chiusura del saldo.
docId del saldoI valori SHIFT-… sono solo esempi. Usa un identificatore univoco stabile di 5–200 caratteri e riutilizzalo esclusivamente per recuperare la stessa operazione di saldo.
Codici delle unità di misuraScarica l’elenco delle unità di misura supportate e usa il valore del codice come soldIn, per esempio XPP, KGM, LTR o HUR.Scarica l’elenco delle unità (.xlsx)
Enum canonici
soldIn
XPP · KGM · LTR · HUR · other UN/CEFACT unit codes
vatCode
A · B · C · D · E · F · G · H · I · J · K · L
payment.type
CASH · BANKNOTE · CARD · CHECK · SVOUCHER · COMPANY · ORDER · ACCOUNT · FACTORING · COMPENSATION · TRANSFER · WAIVER · KIND · OTHER
buyerIDType
NUIS · ID · PASS · VAT · TAX · SOC · POINTS
selectedProcess
P1 · P2 · P3 · P4 · P5 · P6 · P7 · P8 · P9 · P10 · P11
selectedInvoiceType
82 · 84 · 325 · 326 · 380 · 383 · 386 · 393 · 394 · 395 · 575 · 623 · 780
selfIssueType
AGREEMENT · DOMESTIC · ABROAD · SELF · OTHER
pdfType
A4 · receipt · eInvoice

07 · Contratto di completamento

Leggi gli identificatori prima di dichiarare successo

Una risposta HTTP positiva può descrivere un’operazione fiscale ancora incompleta. Decidi in base agli identificatori.

OperazioneCompleta quandoSe incompleta
Fattura normale / annullamentofic presenteRecupera con lo stesso docId.
Fattura elettronica / annullamentofic ed eic presentiInterroga status con lo stesso docId.
Transazione cassafcdc presenteRipeti operazione e docId.
PDFbase64 presenteRipeti dopo il completamento della fattura.

Tabella decisionale errori

ErrorRiprovabileAzione
400 validazione / campoNoCorreggi la richiesta.
401 UnauthorizedDopo le credenzialiRinnova il token corretto e conserva docId.
cisError env:CLIENTNoCorreggi prima i dati fiscali.
cisError env:SERVER / otherErrorBackoff e stesso docId.
Timeout / rete / 502 / 503Prima status; reinvia solo se non trovato.
Altra richiesta in elaborazioneSì, dopoFerma il parallelismo, attendi e interroga status.

08 · File sorgente

Lo stesso contratto nei tuoi strumenti

La pagina è il riferimento leggibile; questi file sono download diretti per generatori, client API e agenti.

Serve una credenziale o un chiarimento?

easyPos Cloud API