Skip to main content

Service Definition

Authentication:

OAuth 2.0

Authorization:

Read access

Online documentation with swagger:

Testplattform   url: 

Prodplattform  url:

Status Code:

  • 200 OK: Successful GET request.
  • 201 Created: Successful creation of a resource.
  • 400 Bad Request: Invalid request (e.g., missing parameters).
  • 401 Unauthorized: Missing or incorrect authentication.
  • 404 Not Found: Resource not found.
  • 500 Internal Server Error: General server error.

Service Address:

GetAddressByID

Function: Return address find by customerId

URL: /v1/Address/{id}

URL parameter id = Costomerid

Response structure:

{
  "id": 0,
  "lastname": "string",
  "firstname": "string",
  "emails": [
    "string"
  ],
  "company": "string",
  "function": "string",
  "addressType": "string",
  "street": "string",
  "city": "string",
  "zip": "string",
  "country": "string",
  "lastUpdate": "2024-11-20T07:53:44.228Z",
  "adressZusatz": "string",
  "kundeSeit": "2024-11-20T07:53:44.228Z",
  "sprachId": 0,
  "nrUndName": "string",
  "ganzeAdresse": "string"
}

Affected  DB-Entitties: tbl_Customers, tbl_EMail   

  • Relation 1...0 or n
  • email ==> List of Mailaddress with tbl.Customers.Id   (list<string>()) fieldname = From
  • "{description}" <mailaddress>  f.e.  "Janick Kübler - Busmiete.ch" <j.kuebler@busmiete.ch>

GetAddressByCompanyName (or more)

Function: All addresses find by company name or in combination with other attributes

URL: /v1/Address/ByCompany?companyName={}&street=e{}&zip={}

Url parameter

  • company = company name
  • optional street
  • optional zip

Response structure same as for GetAddressByID

Service Order:

DB-Entity: tbl_PickUps, tbl_Auftragsposten (notnoz sure ?)

CREATE TABLE [dbo].[tbl_PickUps] (
    [ID]                     INT            IDENTITY (1, 1) NOT NULL,
    [Beschreibung]           NVARCHAR (50)  NULL,
    [Fällig]                 DATETIME       NULL,
    [Rechnungsdatum]         DATETIME       NULL,
    [Mahnungsdatum]          DATETIME       NULL,
    [Rechnungsbetrag]        FLOAT (53)     DEFAULT ((0.0000000000000000e+000)) NULL,
    [Herkunft]               INT            NOT NULL,
    [ZahlungsfristTage]      INT            DEFAULT ((30)) NOT NULL,
    [Zahlungsart]            INT            DEFAULT ((1)) NOT NULL,
    [InklExklMwstGemischt]   INT            NOT NULL,
    [LayoutTypEr]            INT            DEFAULT ((1)) NOT NULL,
    [LayoutTypPr]            INT            DEFAULT ((1)) NOT NULL,
    [ZahlungsfristVariante]  INT            NOT NULL,
    [OfferteLieferTage]      INT            DEFAULT ((10)) NOT NULL,
    [OfferteGültigTage]      INT            DEFAULT ((30)) NOT NULL,
    [OfferteGültigVariante]  INT            NOT NULL,
    [OffertenDatum]          DATETIME       DEFAULT (getdate()) NULL,
    [AuftragsZustand]        INT            NOT NULL,
    [KundenReferenz]         NVARCHAR (100) NULL,
    [KundenBestellNr]        NVARCHAR (100) NULL,
    [LetzteÄnderung]         DATETIME       DEFAULT (getdate()) NOT NULL,
    [LayoutTypEo]            INT            DEFAULT ((4)) NOT NULL,
    [LayoutTypPo]            INT            DEFAULT ((1)) NOT NULL,
    [OfferteLieferVariante]  INT            NOT NULL,
    [OfferteZahlungVariante] INT            NOT NULL,
    [OfferteGültigLabel]     INT            NOT NULL,
    [OfferteLieferLabel]     INT            NOT NULL,
    [OfferteZahlungLabel]    INT            NOT NULL,
    [EinkaufsBetrag]         FLOAT (53)     NOT NULL,
    [Eigenleistung]          FLOAT (53)     NOT NULL,
    [KopieVon]               NVARCHAR (50)  NULL,
    [VerantwortlicheId]      INT            NOT NULL,
    [Archiviert]             BIT            NOT NULL,
    [ZahlungsFristSichtbar]  BIT            DEFAULT (CONVERT([bit],(1))) NOT NULL,
    [WährungsId]             INT            DEFAULT ((1)) NOT NULL,
    [Zahlungsdatum]          DATETIME       NULL,
    [RechAdresseId]          INT            NULL,
    [fürOfferteBereit]       INT            NULL,
    [fürRechnungBereit]      INT            NULL,
    [RabattText]             NVARCHAR (100) NULL,
    [SkontoText]             NVARCHAR (200) NULL,
    [BestätigungsDatum]      DATETIME       NULL,
    [LieferDatum]            DATETIME       NULL,
    [LayoutTypEl]            INT            DEFAULT ((6)) NOT NULL,
    [LayoutTypPl]            INT            DEFAULT ((1)) NOT NULL,
    [IstErechnung]           BIT            NULL,
    [fürBestätigungBereit]   INT            NULL,
    [fürLieferscheinBereit]  INT            NULL,
    [fürErinnerungBereit]    INT            NULL,
    [ZuschlagText]           NVARCHAR (100) NULL,
    [KreditkartenId]         INT            NULL,
    [FormularTemplateId]     INT            NOT NULL,
    [OfferteInklTotal]       BIT            DEFAULT (CONVERT([bit],(1))) NOT NULL,
    [BestätigungInklTotal]   BIT            DEFAULT (CONVERT([bit],(1))) NOT NULL,
    [Gelöscht]               BIT            NOT NULL,
    [LieferadresseId]        INT            NULL,
    [MahnungMitDetails]      BIT            NOT NULL,
    [KontoId]                INT            NULL,
    [BereitsBezahlterBetrag] FLOAT (53)     NULL,
    [FibuExportRechnungenId] INT            NULL,
    [FibuExportZahlungenId]  INT            NULL,
    [StornoDatum]            DATETIME       NULL,
    [StornoAuftragId]        INT            NULL,
    [IstStornoAusgleich]     BIT            NULL,
    [IstZahlungsAusgleich]   BIT            NULL,
    [Mahnung2Datum]          DATETIME       NULL,
    [Mahnung3Datum]          DATETIME       NULL,
    [Zahlungsbetrag]         FLOAT (53)     NULL,
    CONSTRAINT [PK_tbl_PickUps] PRIMARY KEY CLUSTERED ([ID] ASC),
    CONSTRAINT [FK_tbl_PickUps_tbl_Customers] FOREIGN KEY ([RechAdresseId]) REFERENCES [dbo].[tbl_Customers] ([ID]),
    CONSTRAINT [FK_tbl_PickUps_tbl_Customers1] FOREIGN KEY ([LieferadresseId]) REFERENCES [dbo].[tbl_Customers] ([ID]),
    CONSTRAINT [FK_tbl_PickUps_tbl_FibuExport] FOREIGN KEY ([FibuExportRechnungenId]) REFERENCES [dbo].[tbl_FibuExport] ([Id]),
    CONSTRAINT [FK_tbl_PickUps_tbl_FibuExport1] FOREIGN KEY ([FibuExportZahlungenId]) REFERENCES [dbo].[tbl_FibuExport] ([Id]),
    CONSTRAINT [FK_tbl_PickUps_tbl_FormularTemplate] FOREIGN KEY ([FormularTemplateId]) REFERENCES [dbo].[tbl_FormularTemplate] ([Id]),
    CONSTRAINT [FK_tbl_PickUps_tbl_Kurztext] FOREIGN KEY ([KontoId]) REFERENCES [dbo].[tbl_Kurztext] ([Id]),
    CONSTRAINT [FK_tbl_PickUps_tbl_Mitarbeitende] FOREIGN KEY ([VerantwortlicheId]) REFERENCES [dbo].[tbl_Mitarbeitende] ([Id])
);


GO
CREATE NONCLUSTERED INDEX [IX_tbl_PickUps_RechAdresseId]
    ON [dbo].[tbl_PickUps]([RechAdresseId] ASC);


GO
CREATE NONCLUSTERED INDEX [IX_tbl_PickUps_VerantwortlicheId]
    ON [dbo].[tbl_PickUps]([VerantwortlicheId] ASC);


GO
CREATE NONCLUSTERED INDEX [IX_tbl_PickUps_LieferadresseId]
    ON [dbo].[tbl_PickUps]([LieferadresseId] ASC);


GO
CREATE NONCLUSTERED INDEX [IX_tbl_PickUps_FormularTemplateId]
    ON [dbo].[tbl_PickUps]([FormularTemplateId] ASC);


GO
CREATE NONCLUSTERED INDEX [IX_tbl_PickUps_KontoId]
    ON [dbo].[tbl_PickUps]([KontoId] ASC);


GO
CREATE NONCLUSTERED INDEX [IX_tbl_PickUps_FibuExportRechnungenId]
    ON [dbo].[tbl_PickUps]([FibuExportRechnungenId] ASC);


GO
CREATE NONCLUSTERED INDEX [IX_tbl_PickUps_FibuExportZahlungenId]
    ON [dbo].[tbl_PickUps]([FibuExportZahlungenId] ASC);

url:  ..\

Function: 

All customer information from the mandate.

PK:  ID (Customer) int

The rest of the information can be seen in the Swagger UI

Der Mandant: Busmietech_GmbH ist fix verdrahtet

Zur Bestimmung des Custmers kann über ID oder Firmanamen + Strasse  + PLZ  Ort genutzt werden.