Send Invoice to Yuki
Zuletzt geändert: 14.03.2026 05:56

Send-InvoiceToYuki #

ÜBERSICHT #

Überträgt Ausgangsrechnungen (PDF und/oder UBL) per Yuki Archive Webservice (SOAP) in das Yuki-Archiv.

SYNTAX #

Send-InvoiceToYuki [-PdfPath] <string> [-UblPath] <string> [-WebServiceAccessKey] <string>
    [-AdministrationId] <string> [[-DomainId] <string>] [[-Folder] <int>] [[-Currency] <string>]
    [[-Amount] <decimal>] [[-CostCategory] <string>] [[-PaymentMethod] <int>] [[-Project] <string>]
    [[-Remarks] <string>] [[-ServiceUri] <string>] [[-TimeoutSec] <int>] [-FailOnError]
    [<CommonParameters>]

BESCHREIBUNG #

Nutzt den Archive Web Service (SOAP) statt des Upload Webservice (Upload.aspx). Ablauf:

  • Authenticate(accessKey) -> sessionID
  • Optional: SetCurrentDomain(sessionID, domainID)
  • Upload:
  • nur eine Datei: UploadDocument(sessionID, fileName, base64, folder, administrationID)
  • PDF + UBL zusammen: UploadDocumentWithAttachment(sessionID, fileName1, data1, fileName2, data2, folder, administrationID, …)

Hinweis: Die Dateiinhalte werden als Base64 übertragen. Der Service läuft per SOAP. In Kombination mit einem Accountant/Portal-Key kann SetCurrentDomain notwendig sein.

PARAMETER #

-PdfPath #

Type: string

Pfad zur PDF-Rechnung. Wenn zusammen mit -UblPath angegeben, wird PDF als Hauptdokument hochgeladen.

-UblPath #

Type: string

Pfad zur UBL/XML. Kann auch eine UBL mit embedded PDF sein.

-WebServiceAccessKey #

Type: string

Yuki API Key (WebServiceAccessKey). Wird für Authenticate(accessKey) verwendet.

-AdministrationId #

Type: string

Ziel-Administration (administrationID) in Yuki.

-DomainId #

Type: string

Optional. Domain-ID für SetCurrentDomain(sessionID, domainID). Bei Portal/Accountant Keys oft erforderlich.

-Folder #

Type: int
Default: 2

Zielordner in Yuki (z.B. 2 = Sales). Default: 2.

-Currency #

Type: string
Default: 'EUR'

Optional (nur relevant bei UploadDocumentWithAttachment). Default: EUR.

-Amount #

Type: decimal
Default: 0

Optional (nur relevant bei UploadDocumentWithAttachment). Default: 0.

-CostCategory #

Type: string

Optional (nur relevant bei UploadDocumentWithAttachment).

-PaymentMethod #

Type: int
Default: 0

Optional (nur relevant bei UploadDocumentWithAttachment). Default: 0.

-Project #

Type: string

Optional (nur relevant bei UploadDocumentWithAttachment).

-Remarks #

Type: string

Optional (nur relevant bei UploadDocumentWithAttachment).

-ServiceUri #

Type: string
Default: 'https://api.yukiworks.be/ws/Archive.asmx'

SOAP Endpoint. Default (Belgien): https://api.yukiworks.be/ws/Archive.asmx

-TimeoutSec #

Type: int
Default: 120

Timeout für HTTP Requests.

-FailOnError #

Type: switch

Wenn gesetzt: bei Fehler zusätzlich Exception werfen. Ergebnisobjekt steht dann in Exception.Data[‘YukiResult’].

AUSGABEN #

PSCustomObject mit Status je Schritt (Authenticate, SetCurrentDomain, Upload), ResultString und ggf. DocumentId.

BEISPIELE #

# Nur PDF hochladen (ein Dokument)
$res = Send-InvoiceToYuki -PdfPath 'C:\Temp\invoice-4711.pdf' -WebServiceAccessKey $key -AdministrationId $adminId -DomainId $domainId
# Nur UBL hochladen (ein Dokument, auch für UBL mit embedded PDF)
$res = Send-InvoiceToYuki -UblPath 'C:\Temp\invoice-4711-ubl-withpdf.xml' -WebServiceAccessKey $key -AdministrationId $adminId -DomainId $domainId
# PDF + UBL als Bundle hochladen (PDF = Hauptdokument, UBL = Attachment)
$res = Send-InvoiceToYuki -PdfPath 'C:\Temp\invoice-4711.pdf' -UblPath 'C:\Temp\invoice-4711-ubl.xml' -WebServiceAccessKey $key -AdministrationId $adminId -DomainId $domainId -Folder 2

HINWEISE #

Yuki-API-Doku auf Postman https://documenter.getpostman.com/view/12207912/UVCBB51L#47354208-d45d-4335-b04e-79a49d1c5a39