ProSonata API

Rechnungen

Folgende HTTP-Methoden stehen für Rechnungen zur Verfügung:

  • GET: Ressource lesen

Für den Endpunkt steht nur ein lesender Zugriff zur Verfügung.
Zugriff ab Benutzergruppe Teamleiter.

alle Rechnungen auflisten

GET /api/v1/invoices

Antwort:

{
  "meta": {
    "status": 200,
    "perPage": 100,
    "page": 1,
    "totalCount": 287,
    "requestUserID": 1,
    "requestUsername": "Admin1",
    "usergroupName": "Administrator",
    "apiLimitRemaining": 458,
    "apiLimitReset": 751
  },
  "data": [
    {
      "invoiceID": 61,
      "invoiceNo": "22-00001",
      "invoiceNoAddition": "",
      "invoiceName": "",
      "invoiceHeadline": "",
      "invoiceType": "Rechnung",
      "invoiceDate": "2022-07-15",
      "dateStart": "2022-11-22",
      "dateEnd": "2022-12-21",
      "freeServicePeriod": "",
      "netValue": "3550.00",
      "grossValue": "4224.50",
      "currency": 0,
      "tax": "19.0",
      ...
    },
    ...
  ]
}

Filterung/Suche

Über Parameter kann gefiltert werden:

GET /api/v1/invoices?projectName=Testprojekt
Parameter Beschreibung
addressID ID der Kundenadresse
name1 Firmierung des Kunden (Zeile 1 der Adresse)
invoiceType Dokumenttyp
0 = Rechnung/Storno/Rechnungskorrektur
1 = Anzahlungsrechnung
2 = Abschlagsrechnung
3 = Endrechnung
projectID ID des Projekts
projectNo Projektnummer
projectName Bezeichnung des Projekts
projectTags Tag(s) des Projekts
customerID ID des Kunden (Firma/Gruppe)
customerName Bezeichnung des Kunden (Firma/Gruppe)
invoiceNo Nummer der Rechnung
invoiceDate Datum des Dokuments
durch Angabe von > oder < vor dem Datum kann eine Suche ab dem bzw. bis zum Datum erfolgen
createdByUserID Dokument angelegt von Benutzer ID
currency Währung:
0 = Euro
1 = CHF
2 = USD
3 = GBP
4 = CAD
reverseCharge Reverse Charge (Rechnungsempfänger ist steuerpflichtig):
0 = nein
1 = ja
paymentDate Bezahldatum des Dokuments
durch Angabe von > oder < vor dem Datum kann eine Suche ab dem bzw. bis zum Datum erfolgen
sepaExport in SEPA Export exportiert:
0 = nein
1 = ja
datevExport FiBu Export ist erfolgt:
0 = nein
1 = ja

 

Sortierung

Nach folgenden Parametern kann sortiert werden (Sortierrichtung ggf. mit ASC bzw. DESC ergänzen):

invoiceID, projectID, addressID, invoiceNo, invoiceDate, grossValue

eine Rechnung aufrufen

GET /api/v1/invoices/{id}

Antwort:

{
  "meta": {
    "status": 200,
    "requestUserID": 1,
    "requestUsername": "Admin1",
    "usergroupName": "Administrator",
    "apiLimitRemaining": 484,
    "apiLimitReset": 412
  },
  "data": {
    "invoiceID": 304,
    "invoiceNo": "22-0007",
    "invoiceNoAddition": "",
    "invoiceName": "",
    "invoiceHeadline": "",
    "invoiceType": "Rechnung",
    "invoiceDate": "2022-07-15",
    "dateStart": "2022-11-22",
    "dateEnd": "2022-12-21",
    "freeServicePeriod": "",
    "netValue": "5281.00",
    "grossValue": "6284.39",
    "currency": 0,
    "tax": "19.0",
    "multipleTaxes": 0,
    "invoiceDunningStatus": 0,
    "paymentTargetDate": "2022-07-22",
    "paymentDate": null,
    "cashDiscountRate": "2.0",
    "paidCashDiscount": 0,
    "cancelInvoiceID": null,
    "isSent": 0,
    "sepaExport": 0,
    "datevExport": 0,
    "invoiceComments": "",
    "projectID": 311,
    "projectNo": "22-10-001",
    "projectNoAddition": "",
    "projectName": "Microsite Unfallversicherung",
    "projectTags": "",
    "projectGroupID": null,
    "customerID": 10,
    "customerName": "ABC Versicherung Hamburg",
    "addressID": 36,
    "name1": "ABC Versicherung AG",
    "name2": "",
    "name3": "",
    "street": "Teststraße",
    "streetNo": "12",
    "postalCode": "12345",
    "city": "Teststadt",
    "country": "",
    "countryID": "",
    "invoiceEmail": "",
    "standardSalutation": 0,
    "firstName": "Max",
    "lastName": "Mustermann",
    "email": "mm@test.de",
    "username": "Admin2",
    "positions": [
      {
        "detailID": 1040,
        "position": 1,
        "categoryName": "Gestaltung",
        "detail": "<p>Gestaltung der Website.</p>\r\n<p>Zeitbedarf: ca. 1,5 Personentage</p>",
        "quantity": "12.00",
        "unit": "",
        "netValue": "104.50",
        "taxSwitch": 0,
        "tax": "7.0",
        "additionalChargeSwitch": 1,
        "initialNetValue": "95.00",
        "additionalCharge1": "10.00",
        "additionalCharge2": "0.00",
        "discountPosition": 0,
        "discountSource": null,
        "discountPercent": "0.00",
        "detailComments": "eine Info zur Position!"
      },
      {
        "detailID": 1041,
        "position": 2,
        "categoryName": "Programmierung",
        "detail": "<p>Programmierung der abgestimmten Seitenvorlagen für das Content Management System.</p>\r\n<p>Zeitbedarf: ca. 5 Personentage</p>",
        "quantity": "5.00",
        "unit": "",
        "netValue": "600.00",
        "taxSwitch": 0,
        "tax": "0.0",
        "additionalChargeSwitch": 0,
        "initialNetValue": "0.00",
        "additionalCharge1": "0.00",
        "additionalCharge2": "0.00",
        "discountPosition": 0,
        "discountSource": null,
        "discountPercent": "0.00",
        "detailComments": ""
      },
      {
        "detailID": 1042,
        "position": 3,
        "categoryName": "Content",
        "detail": "<p>Anlegen von 12 Seiten gemäß der Website Struktur und Einfügen der vom Kunden gelieferten Inhalte.</p>\r\n<p>Zeitbedarf: ca. 8 Std.</p>",
        "quantity": "8.00",
        "unit": "",
        "netValue": "114.00",
        "taxSwitch": 0,
        "tax": "0.0",
        "additionalChargeSwitch": 1,
        "initialNetValue": "95.00",
        "additionalCharge1": "20.00",
        "additionalCharge2": "0.00",
        "discountPosition": 0,
        "discountSource": null,
        "discountPercent": "0.00",
        "detailComments": ""
      },
      {
        "detailID": 1044,
        "position": 4,
        "categoryName": "Hosting",
        "detail": "<p>Hosting der Microsite für 1 Jahr</p>",
        "quantity": "1.00",
        "unit": "",
        "netValue": "115.00",
        "taxSwitch": 0,
        "tax": "0.0",
        "additionalChargeSwitch": 1,
        "initialNetValue": "100.00",
        "additionalCharge1": "15.00",
        "additionalCharge2": "0.00",
        "discountPosition": 0,
        "discountSource": null,
        "discountPercent": "0.00",
        "detailComments": ""
      }
    ]
  }
}