| Methode | Pfad | Zusammenfassung |
|---|---|---|
| GET | …/invoices | List invoices in the workspace |
| GET | …/invoices/search | Search invoices by attributes |
| POST | …/invoices/upload | Get an upload URL for a sales invoice or a bill document |
| POST | …/invoices/upload-split | Get an upload URL for a document holding several sales invoices or bills |
| PATCH | …/invoices/{invoiceId} | Update an invoice |
| POST | …/invoices/{invoiceId}/update-status | Update the status of an invoice |
| POST | …/invoices/{invoiceId}/update-counterparty | Update the counterparty associated with an invoice |
| POST | …/invoices/{invoiceId}/matches/add | Add a confirmed match between an invoice and a bank transaction |
| POST | …/invoices/{invoiceId}/matches/confirm | Confirm a candidate match between an invoice and a bank transaction |
| POST | …/invoices/{invoiceId}/matches/remove | Remove a confirmed match between an invoice and a bank transaction |
| POST | …/invoices/{invoiceId}/matches/remove-candidate | Remove a candidate match suggestion for an invoice |
| POST | …/invoices/export | Export an invoice to a downloadable file |
Die Pfade beginnen mit /workspaces/{workspaceId}. GET-Endpunkte brauchen invoices:read, die übrigen invoices:write.
Das Objekt Invoice
firestoreIdstringerforderlichID of the invoice.
workspaceIdstringerforderlichID of the workspace.
creationobjecterforderlichWhen and by whom the resource was created.
2 untergeordnete Felder anzeigen
creationDateTimestringdate-timeerforderlichDate and time when the resource was created.
createdBystringID of the user who created the resource, when recorded.
invoiceStatusstringerforderlichStatus of the invoice in its lifecycle.
draftedDraft that may lack mandatory fields; an uploaded invoice starts here and moves to
createdonce its data passes validation.createdValidated invoice, whose mandatory fields are all present and valid.
deletedDeleted invoice, which can no longer change status and is left out of transaction matching.
authorisedValidated invoice that a user approved.
paidValidated invoice settled in full by matched bank transactions or marked as paid by a user; its mandatory fields can no longer change.
voidedCancelled invoice, left out of transaction matching.
processingStatusstringerforderlichProgress of the data extraction from the invoice file.
uploadedThe file is uploaded and its data is not extracted yet.
parsedThe data is extracted from the file, or the invoice was imported without a file.
failedThe data could not be extracted from the file, for example because the file is too large.
accountingTypestringDirection of the invoice: a supplier bill to pay or a sales invoice to collect.
payableA bill received from a supplier, which the workspace pays.
receivableAn invoice issued to a customer, which the workspace collects.
reconciledbooleanerforderlichAlle 57 Felder anzeigenFeldliste ausblenden
processedbooleanerforderlichpaymentSubmittedbooleanerforderlichsentDateTimestringdate-timepaymentMethodstringPayment method of the invoice.
13 Werte anzeigen
creditCardCredit card.
debitCardDebit card.
directDebitDirect debit.
bankTransferBank transfer.
cashCash.
voucherVoucher.
checkCheck.
paypalPayPal.
stripeStripe.
applePayApple Pay.
googlePayGoogle Pay.
samsungPaySamsung Pay.
unknownThe payment method is not known.
supplierCounterpartyIdstring | nullID of the counterparty.
receiverCounterpartyIdstring | nullID of the counterparty.
storagePathstringfileChecksumMd5stringfileChecksumCrc32cstringamountDueMonetaryAmount | null2 untergeordnete Felder anzeigen
amountnumbererforderlichAmount in the main unit of the currency, such as francs.
currencystring | nullCurrency of the amount, when known.
amountPaidSinceLastInvoiceMonetaryAmount | null2 untergeordnete Felder anzeigen
amountnumbererforderlichAmount in the main unit of the currency, such as francs.
currencystring | nullCurrency of the amount, when known.
clientIdstring | nullcurrencystring | nullISO 4217 currency code
dueDatestring | nullinvoiceDatestring | nullinvoiceIdstring | nullisUnpaidRemindernumber | nullnetAmountMonetaryAmount | null2 untergeordnete Felder anzeigen
amountnumbererforderlichAmount in the main unit of the currency, such as francs.
currencystring | nullCurrency of the amount, when known.
paymentTermsstring | nullpurchaseOrderstring | nullreceiverAddressAddressField | nullPostal address on a document, in which any part can be missing.
12 untergeordnete Felder anzeigen
countrystring | nullISO 3166-1 alpha-2 country code
postCodestring | nullPost code of the address.
townNamestring | nullName of the town or city.
streetNamestring | nullName of the street.
buildingNumberstring | nullNumber of the building in the street.
namestring | nullName of the building or place.
sortingCodestring | nullAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstring | nullPost office box.
administrativeAreastring | nullRegion of the country, such as a canton or a state.
recipientsstring[] | nullNames of the people the address is for.
organizationstring | nullName of the organization at the address.
sourcestring[] | nullText the address was read from, one item per line.
receiverBankAccountBankAccountField | null6 untergeordnete Felder anzeigen
bankNamestring | nullbankAddressAddressField | nullPostal address on a document, in which any part can be missing.
12 untergeordnete Felder anzeigen
countrystring | nullISO 3166-1 alpha-2 country code
postCodestring | nullPost code of the address.
townNamestring | nullName of the town or city.
streetNamestring | nullName of the street.
buildingNumberstring | nullNumber of the building in the street.
namestring | nullName of the building or place.
sortingCodestring | nullAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstring | nullPost office box.
administrativeAreastring | nullRegion of the country, such as a canton or a state.
recipientsstring[] | nullNames of the people the address is for.
organizationstring | nullName of the organization at the address.
sourcestring[] | nullText the address was read from, one item per line.
bicstring | nullcurrencystring | nullISO 4217 currency code
accountIdentificationstring | nullaccountSecondaryIdentificationstring | nullreceiverContactNamestring | nullreceiverEmailstring | nullreceiverNamestring | nullreceiverPhonestring | nullreceiverTaxIdstring | nullremitToAddressAddressField | nullPostal address on a document, in which any part can be missing.
12 untergeordnete Felder anzeigen
countrystring | nullISO 3166-1 alpha-2 country code
postCodestring | nullPost code of the address.
townNamestring | nullName of the town or city.
streetNamestring | nullName of the street.
buildingNumberstring | nullNumber of the building in the street.
namestring | nullName of the building or place.
sortingCodestring | nullAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstring | nullPost office box.
administrativeAreastring | nullRegion of the country, such as a canton or a state.
recipientsstring[] | nullNames of the people the address is for.
organizationstring | nullName of the organization at the address.
sourcestring[] | nullText the address was read from, one item per line.
remitToNamestring | nullshipToAddressAddressField | nullPostal address on a document, in which any part can be missing.
12 untergeordnete Felder anzeigen
countrystring | nullISO 3166-1 alpha-2 country code
postCodestring | nullPost code of the address.
townNamestring | nullName of the town or city.
streetNamestring | nullName of the street.
buildingNumberstring | nullNumber of the building in the street.
namestring | nullName of the building or place.
sortingCodestring | nullAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstring | nullPost office box.
administrativeAreastring | nullRegion of the country, such as a canton or a state.
recipientsstring[] | nullNames of the people the address is for.
organizationstring | nullName of the organization at the address.
sourcestring[] | nullText the address was read from, one item per line.
shipToNamestring | nullsupplierAddressAddressField | nullPostal address on a document, in which any part can be missing.
12 untergeordnete Felder anzeigen
countrystring | nullISO 3166-1 alpha-2 country code
postCodestring | nullPost code of the address.
townNamestring | nullName of the town or city.
streetNamestring | nullName of the street.
buildingNumberstring | nullNumber of the building in the street.
namestring | nullName of the building or place.
sortingCodestring | nullAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstring | nullPost office box.
administrativeAreastring | nullRegion of the country, such as a canton or a state.
recipientsstring[] | nullNames of the people the address is for.
organizationstring | nullName of the organization at the address.
sourcestring[] | nullText the address was read from, one item per line.
supplierBankAccountsBankAccountField[] | null6 untergeordnete Felder anzeigen
bankNamestring | nullbankAddressAddressField | nullPostal address on a document, in which any part can be missing.
12 untergeordnete Felder anzeigen
countrystring | nullISO 3166-1 alpha-2 country code
postCodestring | nullPost code of the address.
townNamestring | nullName of the town or city.
streetNamestring | nullName of the street.
buildingNumberstring | nullNumber of the building in the street.
namestring | nullName of the building or place.
sortingCodestring | nullAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstring | nullPost office box.
administrativeAreastring | nullRegion of the country, such as a canton or a state.
recipientsstring[] | nullNames of the people the address is for.
organizationstring | nullName of the organization at the address.
sourcestring[] | nullText the address was read from, one item per line.
bicstring | nullcurrencystring | nullISO 4217 currency code
accountIdentificationstring | nullaccountSecondaryIdentificationstring | nullsupplierContactNamestring | nullsupplierEmailstring | nullsupplierNamestring | nullsupplierPaymentRefstring | nullsupplierPhonestring | nullsupplierTaxIdstring | nullsupplierWebsitestring | nulltotalAmountMonetaryAmount | null2 untergeordnete Felder anzeigen
amountnumbererforderlichAmount in the main unit of the currency, such as francs.
currencystring | nullCurrency of the amount, when known.
totalTaxAmountMonetaryAmount | null2 untergeordnete Felder anzeigen
amountnumbererforderlichAmount in the main unit of the currency, such as francs.
currencystring | nullCurrency of the amount, when known.
itemsobject[] | null12 untergeordnete Felder anzeigen
amountMonetaryAmount | null2 untergeordnete Felder anzeigen
amountnumbererforderlichAmount in the main unit of the currency, such as francs.
currencystring | nullCurrency of the amount, when known.
descriptionstring | nulldiscountAmountMonetaryAmount | null2 untergeordnete Felder anzeigen
amountnumbererforderlichAmount in the main unit of the currency, such as francs.
currencystring | nullCurrency of the amount, when known.
discountRatenumber | nullproductCodestring | nullproductIdstring | nullID of the product.
quantitynumber | nulltaxAmountMonetaryAmount | null2 untergeordnete Felder anzeigen
amountnumbererforderlichAmount in the main unit of the currency, such as francs.
currencystring | nullCurrency of the amount, when known.
taxRatenumber | nulltaxTypeIdstring | nullID of the tax type.
unitstring | nullunitPriceMonetaryAmount | null2 untergeordnete Felder anzeigen
amountnumbererforderlichAmount in the main unit of the currency, such as francs.
currencystring | nullCurrency of the amount, when known.
taxesobject[] | null4 untergeordnete Felder anzeigen
netAmountBeforeTaxMonetaryAmount | null2 untergeordnete Felder anzeigen
amountnumbererforderlichAmount in the main unit of the currency, such as francs.
currencystring | nullCurrency of the amount, when known.
taxAmountMonetaryAmount | null2 untergeordnete Felder anzeigen
amountnumbererforderlichAmount in the main unit of the currency, such as francs.
currencystring | nullCurrency of the amount, when known.
taxCodestring | nulltaxRatenumber | nulldraftPaymentIdsstring[]initiatedPaymentIdsstring[]transactionCandidateMatchIdsstring[]transactionConfirmedMatchIdsstring[]transactionCandidateMatchesInvoiceMatch[]2 untergeordnete Felder anzeigen
targetstringerforderlichdataobjecterforderlich1 untergeordnetes Feld anzeigen
confidencenumbererforderlichtransactionConfirmedMatchesInvoiceMatch[]2 untergeordnete Felder anzeigen
targetstringerforderlichdataobjecterforderlich1 untergeordnetes Feld anzeigen
confidencenumbererforderlich{
"firestoreId": "Iv5zP2nK7wRt3xMq9bLd",
"workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
"creation": {
"creationDateTime": "2026-03-02T09:15:00.000Z",
"createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"invoiceStatus": "drafted",
"processingStatus": "uploaded",
"accountingType": "payable",
"reconciled": true,
"processed": true,
"paymentSubmitted": true,
"sentDateTime": "2026-03-02T09:30:00.000Z",
"paymentMethod": "creditCard",
"supplierCounterpartyId": "Cp2nG7vB4xLq9wRt5hMz",
"receiverCounterpartyId": "Cp2nG7vB4xLq9wRt5hMz",
"storagePath": "string",
"fileChecksumMd5": "string",
"fileChecksumCrc32c": "string",
"amountDue": {
"amount": 1250.5,
"currency": "CHF"
},
"amountPaidSinceLastInvoice": {
"amount": 1250.5,
"currency": "CHF"
},
"clientId": "string",
"currency": "CHF",
"dueDate": "2026-03-02",
"invoiceDate": "2026-03-02",
"invoiceId": "string",
"isUnpaidReminder": 0,
"netAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"paymentTerms": "string",
"purchaseOrder": "string",
"receiverAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"sortingCode": "string",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"receiverBankAccount": {
"bankName": "string",
"bankAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"sortingCode": "string",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"bic": "string",
"currency": "CHF",
"accountIdentification": "string",
"accountSecondaryIdentification": "string"
},
"receiverContactName": "string",
"receiverEmail": "string",
"receiverName": "string",
"receiverPhone": "string",
"receiverTaxId": "string",
"remitToAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"sortingCode": "string",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"remitToName": "string",
"shipToAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"sortingCode": "string",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"shipToName": "string",
"supplierAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"sortingCode": "string",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"supplierBankAccounts": [
{
"bankName": "string",
"bankAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"sortingCode": "string",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"bic": "string",
"currency": "CHF",
"accountIdentification": "string",
"accountSecondaryIdentification": "string"
}
],
"supplierContactName": "string",
"supplierEmail": "string",
"supplierName": "string",
"supplierPaymentRef": "string",
"supplierPhone": "string",
"supplierTaxId": "string",
"supplierWebsite": "string",
"totalAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"totalTaxAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"items": [
{
"amount": {
"amount": 1250.5,
"currency": "CHF"
},
"description": "string",
"discountAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"discountRate": 0,
"productCode": "string",
"productId": "Pr4wJ8tM1xNq6zRb3vKf",
"quantity": 0,
"taxAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"taxRate": 0,
"taxTypeId": "Tt9mC5rL2wQz7nVb4kHp",
"unit": "string",
"unitPrice": {
"amount": 1250.5,
"currency": "CHF"
}
}
],
"taxes": [
{
"netAmountBeforeTax": {
"amount": 1250.5,
"currency": "CHF"
},
"taxAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"taxCode": "string",
"taxRate": 0
}
],
"draftPaymentIds": [
"string"
],
"initiatedPaymentIds": [
"string"
],
"transactionCandidateMatchIds": [
"string"
],
"transactionConfirmedMatchIds": [
"string"
],
"transactionCandidateMatches": [
{
"target": "string",
"data": {
"confidence": 0
}
}
],
"transactionConfirmedMatches": [
{
"target": "string",
"data": {
"confidence": 0
}
}
]
}/workspaces/{workspaceId}/invoicesList invoices in the workspace
Bereichinvoices:read
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
Abfrageparameter
limitintegerMaximum number of items to return, from 1 to 100. A missing, invalid or non-positive value falls back to 20, and a larger value to 100.
Standard20
startAfterstringCursor of the page to return: the nextCursor of the previous page.
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
idsstring[]Comma-separated IDs of the items to return, up to 30. When set, limit, startAfter and the filters are ignored.
Rückgabe
List of items
Items of the page, in list order.
limitintegererforderlichPage size of the request, or the number of requested ids.
nextCursorstringCursor of the next page, to pass as startAfter. Absent when the page holds fewer items than limit; a full last page still has one, and the page it points to is empty.
curl 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices' \
-H "Authorization: Bearer $SWAY_API_KEY"const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices', {
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
},
});
console.log(await response.json());import os
import requests
response = requests.get(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
)
print(response.json()){
"data": [
{
"firestoreId": "Iv5zP2nK7wRt3xMq9bLd",
"workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
"creation": {
"creationDateTime": "2026-03-02T09:15:00.000Z",
"createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"invoiceStatus": "drafted",
"processingStatus": "uploaded",
"accountingType": "payable",
"reconciled": true,
"processed": true,
"paymentSubmitted": true,
"sentDateTime": "2026-03-02T09:30:00.000Z",
"paymentMethod": "creditCard",
"supplierCounterpartyId": "Cp2nG7vB4xLq9wRt5hMz",
"receiverCounterpartyId": "Cp2nG7vB4xLq9wRt5hMz",
"storagePath": "string",
"fileChecksumMd5": "string",
"fileChecksumCrc32c": "string",
"amountDue": {
"amount": 1250.5,
"currency": "CHF"
},
"amountPaidSinceLastInvoice": {
"amount": 1250.5,
"currency": "CHF"
},
"clientId": "string",
"currency": "CHF",
"dueDate": "2026-03-02",
"invoiceDate": "2026-03-02",
"invoiceId": "string",
"isUnpaidReminder": 0,
"netAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"paymentTerms": "string",
"purchaseOrder": "string",
"receiverAddress": {…},
"receiverBankAccount": {…},
"receiverContactName": "string",
"receiverEmail": "string",
"receiverName": "string",
"receiverPhone": "string",
"receiverTaxId": "string",
"remitToAddress": {…},
"remitToName": "string",
"shipToAddress": {…},
"shipToName": "string",
"supplierAddress": {…},
"supplierBankAccounts": […],
"supplierContactName": "string",
"supplierEmail": "string",
"supplierName": "string",
"supplierPaymentRef": "string",
"supplierPhone": "string",
"supplierTaxId": "string",
"supplierWebsite": "string",
"totalAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"totalTaxAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"items": […],
"taxes": […],
"draftPaymentIds": [
"string"
],
"initiatedPaymentIds": [
"string"
],
"transactionCandidateMatchIds": [
"string"
],
"transactionConfirmedMatchIds": [
"string"
],
"transactionCandidateMatches": […],
"transactionConfirmedMatches": […]
}
],
"limit": 0,
"nextCursor": "string"
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/invoices/searchSearch invoices by attributes
Bereichinvoices:read
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
Abfrageparameter
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
querystringerforderlichaccountingTypestringDirection of the invoice: a supplier bill to pay or a sales invoice to collect.
payableA bill received from a supplier, which the workspace pays.
receivableAn invoice issued to a customer, which the workspace collects.
statusesstring[]Status of the invoice in its lifecycle.
draftedDraft that may lack mandatory fields; an uploaded invoice starts here and moves to
createdonce its data passes validation.createdValidated invoice, whose mandatory fields are all present and valid.
deletedDeleted invoice, which can no longer change status and is left out of transaction matching.
authorisedValidated invoice that a user approved.
paidValidated invoice settled in full by matched bank transactions or marked as paid by a user; its mandatory fields can no longer change.
voidedCancelled invoice, left out of transaction matching.
pageintegerStandard0
sizeintegerStandard20
Rückgabe
Successful response
curl 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/search?query=string' \
-H "Authorization: Bearer $SWAY_API_KEY"const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/search?query=string', {
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
},
});
console.log(await response.json());import os
import requests
response = requests.get(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/search?query=string",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
)
print(response.json()){
"data": [
{
"firestoreId": "Iv5zP2nK7wRt3xMq9bLd",
"workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
"creation": {
"creationDateTime": "2026-03-02T09:15:00.000Z",
"createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"invoiceStatus": "drafted",
"processingStatus": "uploaded",
"accountingType": "payable",
"reconciled": true,
"processed": true,
"paymentSubmitted": true,
"sentDateTime": "2026-03-02T09:30:00.000Z",
"paymentMethod": "creditCard",
"supplierCounterpartyId": "Cp2nG7vB4xLq9wRt5hMz",
"receiverCounterpartyId": "Cp2nG7vB4xLq9wRt5hMz",
"storagePath": "string",
"fileChecksumMd5": "string",
"fileChecksumCrc32c": "string",
"amountDue": {
"amount": 1250.5,
"currency": "CHF"
},
"amountPaidSinceLastInvoice": {
"amount": 1250.5,
"currency": "CHF"
},
"clientId": "string",
"currency": "CHF",
"dueDate": "2026-03-02",
"invoiceDate": "2026-03-02",
"invoiceId": "string",
"isUnpaidReminder": 0,
"netAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"paymentTerms": "string",
"purchaseOrder": "string",
"receiverAddress": {…},
"receiverBankAccount": {…},
"receiverContactName": "string",
"receiverEmail": "string",
"receiverName": "string",
"receiverPhone": "string",
"receiverTaxId": "string",
"remitToAddress": {…},
"remitToName": "string",
"shipToAddress": {…},
"shipToName": "string",
"supplierAddress": {…},
"supplierBankAccounts": […],
"supplierContactName": "string",
"supplierEmail": "string",
"supplierName": "string",
"supplierPaymentRef": "string",
"supplierPhone": "string",
"supplierTaxId": "string",
"supplierWebsite": "string",
"totalAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"totalTaxAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"items": […],
"taxes": […],
"draftPaymentIds": [
"string"
],
"initiatedPaymentIds": [
"string"
],
"transactionCandidateMatchIds": [
"string"
],
"transactionConfirmedMatchIds": [
"string"
],
"transactionCandidateMatches": […],
"transactionConfirmedMatches": […]
}
]
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/invoices/uploadGet an upload URL for a sales invoice or a bill document
The document is a PDF or an image. The characters <>:"/\|?*#^ are removed from fileName, and a name left empty is rejected. PUT the file bytes to uploadUrl with the returned contentType. Once uploaded, the document is parsed in the background into a new invoice (receivable) or bill (payable). With bankAccountId and bankTransactionId, the new invoice is matched with that bank transaction.
Bereichinvoices:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
Abfrageparameter
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Request-Body
accountingTypestringerforderlichDirection of the invoice: a supplier bill to pay or a sales invoice to collect.
payableA bill received from a supplier, which the workspace pays.
receivableAn invoice issued to a customer, which the workspace collects.
fileNamestringerforderlichcontentTypestringerforderlichsizeintegererforderlichbankAccountIdstringID of the bank account.
bankTransactionIdstringID of the bank transaction.
Rückgabe
Successful response
dataFileUploadUrlerforderlich3 untergeordnete Felder anzeigen
uploadUrlstringurierforderlichcontentTypestringerforderlichsizeintegererforderlichcurl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/upload' \
-H "Authorization: Bearer $SWAY_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"accountingType": "payable",
"fileName": "string",
"contentType": "string",
"size": 0,
"bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
"bankTransactionId": "trx_MjAyNjAzMDJUMDk"
}'const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/upload', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"accountingType": "payable",
"fileName": "string",
"contentType": "string",
"size": 0,
"bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
"bankTransactionId": "trx_MjAyNjAzMDJUMDk"
}),
});
console.log(await response.json());import os
import requests
response = requests.post(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/upload",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
json={
"accountingType": "payable",
"fileName": "string",
"contentType": "string",
"size": 0,
"bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
"bankTransactionId": "trx_MjAyNjAzMDJUMDk",
},
)
print(response.json()){
"data": {
"uploadUrl": "https://example.com",
"contentType": "string",
"size": 0
}
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/invoices/upload-splitGet an upload URL for a document holding several sales invoices or bills
The document is a PDF or an image. The characters <>:"/\|?*#^ are removed from fileName, and a name left empty is rejected. PUT the file bytes to uploadUrl with the returned contentType. Once uploaded, the document is split in the background into one document per invoice or receipt. Each invoice is parsed into a new invoice (receivable) or bill (payable), and each receipt into a new bill.
Bereichinvoices:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
Abfrageparameter
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Request-Body
accountingTypestringerforderlichDirection of the invoice: a supplier bill to pay or a sales invoice to collect.
payableA bill received from a supplier, which the workspace pays.
receivableAn invoice issued to a customer, which the workspace collects.
fileNamestringerforderlichcontentTypestringerforderlichsizeintegererforderlichRückgabe
Successful response
dataFileUploadUrlerforderlich3 untergeordnete Felder anzeigen
uploadUrlstringurierforderlichcontentTypestringerforderlichsizeintegererforderlichcurl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/upload-split' \
-H "Authorization: Bearer $SWAY_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"accountingType": "payable",
"fileName": "string",
"contentType": "string",
"size": 0
}'const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/upload-split', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"accountingType": "payable",
"fileName": "string",
"contentType": "string",
"size": 0
}),
});
console.log(await response.json());import os
import requests
response = requests.post(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/upload-split",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
json={
"accountingType": "payable",
"fileName": "string",
"contentType": "string",
"size": 0,
},
)
print(response.json()){
"data": {
"uploadUrl": "https://example.com",
"contentType": "string",
"size": 0
}
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/invoices/{invoiceId}Update an invoice
Bereichinvoices:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
invoiceIdstringerforderlichID of the invoice.
Abfrageparameter
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Request-Body
fieldsobjecterforderlich38 untergeordnete Felder anzeigen
amountDueMonetaryAmount | null2 untergeordnete Felder anzeigen
amountnumbererforderlichAmount in the main unit of the currency, such as francs.
currencystring | nullCurrency of the amount, when known.
amountPaidSinceLastInvoiceMonetaryAmount | null2 untergeordnete Felder anzeigen
amountnumbererforderlichAmount in the main unit of the currency, such as francs.
currencystring | nullCurrency of the amount, when known.
clientIdstring | nullcurrencystring | nullISO 4217 currency code
dueDatestring | nullfooterstring | nullText printed at the bottom of the invoice.
headerstring | nullText printed at the top of the invoice.
invoiceDatestring | nullinvoiceIdstring | nullisUnpaidRemindernumber | nullnetAmountMonetaryAmount | null2 untergeordnete Felder anzeigen
amountnumbererforderlichAmount in the main unit of the currency, such as francs.
currencystring | nullCurrency of the amount, when known.
paymentTermsstring | nullpurchaseOrderstring | nullreceiverAddressAddressField | nullPostal address on a document, in which any part can be missing.
12 untergeordnete Felder anzeigen
countrystring | nullISO 3166-1 alpha-2 country code
postCodestring | nullPost code of the address.
townNamestring | nullName of the town or city.
streetNamestring | nullName of the street.
buildingNumberstring | nullNumber of the building in the street.
namestring | nullName of the building or place.
sortingCodestring | nullAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstring | nullPost office box.
administrativeAreastring | nullRegion of the country, such as a canton or a state.
recipientsstring[] | nullNames of the people the address is for.
organizationstring | nullName of the organization at the address.
sourcestring[] | nullText the address was read from, one item per line.
receiverBankAccountBankAccountField | null6 untergeordnete Felder anzeigen
bankNamestring | nullbankAddressAddressField | nullPostal address on a document, in which any part can be missing.
12 untergeordnete Felder anzeigen
countrystring | nullISO 3166-1 alpha-2 country code
postCodestring | nullPost code of the address.
townNamestring | nullName of the town or city.
streetNamestring | nullName of the street.
buildingNumberstring | nullNumber of the building in the street.
namestring | nullName of the building or place.
sortingCodestring | nullAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstring | nullPost office box.
administrativeAreastring | nullRegion of the country, such as a canton or a state.
recipientsstring[] | nullNames of the people the address is for.
organizationstring | nullName of the organization at the address.
sourcestring[] | nullText the address was read from, one item per line.
bicstring | nullcurrencystring | nullISO 4217 currency code
accountIdentificationstring | nullaccountSecondaryIdentificationstring | nullreceiverContactNamestring | nullreceiverEmailstring | nullreceiverNamestring | nullreceiverPhonestring | nullreceiverTaxIdstring | nullremitToAddressAddressField | nullPostal address on a document, in which any part can be missing.
12 untergeordnete Felder anzeigen
countrystring | nullISO 3166-1 alpha-2 country code
postCodestring | nullPost code of the address.
townNamestring | nullName of the town or city.
streetNamestring | nullName of the street.
buildingNumberstring | nullNumber of the building in the street.
namestring | nullName of the building or place.
sortingCodestring | nullAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstring | nullPost office box.
administrativeAreastring | nullRegion of the country, such as a canton or a state.
recipientsstring[] | nullNames of the people the address is for.
organizationstring | nullName of the organization at the address.
sourcestring[] | nullText the address was read from, one item per line.
remitToNamestring | nullshipToAddressAddressField | nullPostal address on a document, in which any part can be missing.
12 untergeordnete Felder anzeigen
countrystring | nullISO 3166-1 alpha-2 country code
postCodestring | nullPost code of the address.
townNamestring | nullName of the town or city.
streetNamestring | nullName of the street.
buildingNumberstring | nullNumber of the building in the street.
namestring | nullName of the building or place.
sortingCodestring | nullAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstring | nullPost office box.
administrativeAreastring | nullRegion of the country, such as a canton or a state.
recipientsstring[] | nullNames of the people the address is for.
organizationstring | nullName of the organization at the address.
sourcestring[] | nullText the address was read from, one item per line.
shipToNamestring | nullsupplierAddressAddressField | nullPostal address on a document, in which any part can be missing.
12 untergeordnete Felder anzeigen
countrystring | nullISO 3166-1 alpha-2 country code
postCodestring | nullPost code of the address.
townNamestring | nullName of the town or city.
streetNamestring | nullName of the street.
buildingNumberstring | nullNumber of the building in the street.
namestring | nullName of the building or place.
sortingCodestring | nullAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstring | nullPost office box.
administrativeAreastring | nullRegion of the country, such as a canton or a state.
recipientsstring[] | nullNames of the people the address is for.
organizationstring | nullName of the organization at the address.
sourcestring[] | nullText the address was read from, one item per line.
supplierBankAccountsBankAccountField[] | null6 untergeordnete Felder anzeigen
bankNamestring | nullbankAddressAddressField | nullPostal address on a document, in which any part can be missing.
12 untergeordnete Felder anzeigen
countrystring | nullISO 3166-1 alpha-2 country code
postCodestring | nullPost code of the address.
townNamestring | nullName of the town or city.
streetNamestring | nullName of the street.
buildingNumberstring | nullNumber of the building in the street.
namestring | nullName of the building or place.
sortingCodestring | nullAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstring | nullPost office box.
administrativeAreastring | nullRegion of the country, such as a canton or a state.
recipientsstring[] | nullNames of the people the address is for.
organizationstring | nullName of the organization at the address.
sourcestring[] | nullText the address was read from, one item per line.
bicstring | nullcurrencystring | nullISO 4217 currency code
accountIdentificationstring | nullaccountSecondaryIdentificationstring | nullsupplierContactNamestring | nullsupplierEmailstring | nullsupplierNamestring | nullsupplierPaymentRefstring | nullsupplierPhonestring | nullsupplierTaxIdstring | nullsupplierWebsitestring | nulltotalAmountMonetaryAmount | null2 untergeordnete Felder anzeigen
amountnumbererforderlichAmount in the main unit of the currency, such as francs.
currencystring | nullCurrency of the amount, when known.
totalTaxAmountMonetaryAmount | null2 untergeordnete Felder anzeigen
amountnumbererforderlichAmount in the main unit of the currency, such as francs.
currencystring | nullCurrency of the amount, when known.
itemsobject[] | null12 untergeordnete Felder anzeigen
amountMonetaryAmount | null2 untergeordnete Felder anzeigen
amountnumbererforderlichAmount in the main unit of the currency, such as francs.
currencystring | nullCurrency of the amount, when known.
descriptionstring | nulldiscountAmountMonetaryAmount | null2 untergeordnete Felder anzeigen
amountnumbererforderlichAmount in the main unit of the currency, such as francs.
currencystring | nullCurrency of the amount, when known.
discountRatenumber | nullproductCodestring | nullproductIdstring | nullID of the product.
quantitynumber | nulltaxAmountMonetaryAmount | null2 untergeordnete Felder anzeigen
amountnumbererforderlichAmount in the main unit of the currency, such as francs.
currencystring | nullCurrency of the amount, when known.
taxRatenumber | nulltaxTypeIdstring | nullID of the tax type.
unitstring | nullunitPriceMonetaryAmount | null2 untergeordnete Felder anzeigen
amountnumbererforderlichAmount in the main unit of the currency, such as francs.
currencystring | nullCurrency of the amount, when known.
taxesobject[] | null4 untergeordnete Felder anzeigen
netAmountBeforeTaxMonetaryAmount | null2 untergeordnete Felder anzeigen
amountnumbererforderlichAmount in the main unit of the currency, such as francs.
currencystring | nullCurrency of the amount, when known.
taxAmountMonetaryAmount | null2 untergeordnete Felder anzeigen
amountnumbererforderlichAmount in the main unit of the currency, such as francs.
currencystring | nullCurrency of the amount, when known.
taxCodestring | nulltaxRatenumber | nullqrCodeDatastring[] | nullRückgabe
Successful response
curl -X PATCH 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/Iv5zP2nK7wRt3xMq9bLd' \
-H "Authorization: Bearer $SWAY_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"fields": {
"amountDue": {
"amount": 1250.5,
"currency": "CHF"
},
"amountPaidSinceLastInvoice": {
"amount": 1250.5,
"currency": "CHF"
},
"currency": "CHF",
"dueDate": "2026-03-02",
"invoiceDate": "2026-03-02",
"netAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"receiverAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"receiverBankAccount": {
"bankAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"currency": "CHF"
},
"remitToAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"shipToAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"supplierAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"supplierBankAccounts": [
{
"bankAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"currency": "CHF"
}
],
"totalAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"totalTaxAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"items": [
{
"amount": {
"amount": 1250.5,
"currency": "CHF"
},
"discountAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"productId": "Pr4wJ8tM1xNq6zRb3vKf",
"taxAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"taxTypeId": "Tt9mC5rL2wQz7nVb4kHp",
"unitPrice": {
"amount": 1250.5,
"currency": "CHF"
}
}
],
"taxes": [
{
"netAmountBeforeTax": {
"amount": 1250.5,
"currency": "CHF"
},
"taxAmount": {
"amount": 1250.5,
"currency": "CHF"
}
}
]
}
}'const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/Iv5zP2nK7wRt3xMq9bLd', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"fields": {
"amountDue": {
"amount": 1250.5,
"currency": "CHF"
},
"amountPaidSinceLastInvoice": {
"amount": 1250.5,
"currency": "CHF"
},
"currency": "CHF",
"dueDate": "2026-03-02",
"invoiceDate": "2026-03-02",
"netAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"receiverAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"receiverBankAccount": {
"bankAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"currency": "CHF"
},
"remitToAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"shipToAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"supplierAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"supplierBankAccounts": [
{
"bankAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier"
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich"
]
},
"currency": "CHF"
}
],
"totalAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"totalTaxAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"items": [
{
"amount": {
"amount": 1250.5,
"currency": "CHF"
},
"discountAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"productId": "Pr4wJ8tM1xNq6zRb3vKf",
"taxAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"taxTypeId": "Tt9mC5rL2wQz7nVb4kHp",
"unitPrice": {
"amount": 1250.5,
"currency": "CHF"
}
}
],
"taxes": [
{
"netAmountBeforeTax": {
"amount": 1250.5,
"currency": "CHF"
},
"taxAmount": {
"amount": 1250.5,
"currency": "CHF"
}
}
]
}
}),
});
console.log(await response.json());import os
import requests
response = requests.patch(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/Iv5zP2nK7wRt3xMq9bLd",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
json={
"fields": {
"amountDue": {
"amount": 1250.5,
"currency": "CHF",
},
"amountPaidSinceLastInvoice": {
"amount": 1250.5,
"currency": "CHF",
},
"currency": "CHF",
"dueDate": "2026-03-02",
"invoiceDate": "2026-03-02",
"netAmount": {
"amount": 1250.5,
"currency": "CHF",
},
"receiverAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier",
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich",
],
},
"receiverBankAccount": {
"bankAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier",
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich",
],
},
"currency": "CHF",
},
"remitToAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier",
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich",
],
},
"shipToAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier",
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich",
],
},
"supplierAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier",
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich",
],
},
"supplierBankAccounts": [
{
"bankAddress": {
"country": "CH",
"postCode": "8001",
"townName": "Zürich",
"streetName": "Bahnhofstrasse",
"buildingNumber": "10",
"name": "Haus zur Linde",
"postBox": "Postfach 1234",
"administrativeArea": "Zürich",
"recipients": [
"Anna Meier",
],
"organization": "Muster AG",
"source": [
"Muster AG",
"Bahnhofstrasse 10",
"8001 Zürich",
],
},
"currency": "CHF",
},
],
"totalAmount": {
"amount": 1250.5,
"currency": "CHF",
},
"totalTaxAmount": {
"amount": 1250.5,
"currency": "CHF",
},
"items": [
{
"amount": {
"amount": 1250.5,
"currency": "CHF",
},
"discountAmount": {
"amount": 1250.5,
"currency": "CHF",
},
"productId": "Pr4wJ8tM1xNq6zRb3vKf",
"taxAmount": {
"amount": 1250.5,
"currency": "CHF",
},
"taxTypeId": "Tt9mC5rL2wQz7nVb4kHp",
"unitPrice": {
"amount": 1250.5,
"currency": "CHF",
},
},
],
"taxes": [
{
"netAmountBeforeTax": {
"amount": 1250.5,
"currency": "CHF",
},
"taxAmount": {
"amount": 1250.5,
"currency": "CHF",
},
},
],
},
},
)
print(response.json()){
"data": {
"firestoreId": "Iv5zP2nK7wRt3xMq9bLd",
"workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
"creation": {
"creationDateTime": "2026-03-02T09:15:00.000Z",
"createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"invoiceStatus": "drafted",
"processingStatus": "uploaded",
"accountingType": "payable",
"reconciled": true,
"processed": true,
"paymentSubmitted": true,
"sentDateTime": "2026-03-02T09:30:00.000Z",
"paymentMethod": "creditCard",
"supplierCounterpartyId": "Cp2nG7vB4xLq9wRt5hMz",
"receiverCounterpartyId": "Cp2nG7vB4xLq9wRt5hMz",
"storagePath": "string",
"fileChecksumMd5": "string",
"fileChecksumCrc32c": "string",
"amountDue": {
"amount": 1250.5,
"currency": "CHF"
},
"amountPaidSinceLastInvoice": {
"amount": 1250.5,
"currency": "CHF"
},
"clientId": "string",
"currency": "CHF",
"dueDate": "2026-03-02",
"invoiceDate": "2026-03-02",
"invoiceId": "string",
"isUnpaidReminder": 0,
"netAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"paymentTerms": "string",
"purchaseOrder": "string",
"receiverAddress": {…},
"receiverBankAccount": {…},
"receiverContactName": "string",
"receiverEmail": "string",
"receiverName": "string",
"receiverPhone": "string",
"receiverTaxId": "string",
"remitToAddress": {…},
"remitToName": "string",
"shipToAddress": {…},
"shipToName": "string",
"supplierAddress": {…},
"supplierBankAccounts": […],
"supplierContactName": "string",
"supplierEmail": "string",
"supplierName": "string",
"supplierPaymentRef": "string",
"supplierPhone": "string",
"supplierTaxId": "string",
"supplierWebsite": "string",
"totalAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"totalTaxAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"items": […],
"taxes": […],
"draftPaymentIds": [
"string"
],
"initiatedPaymentIds": [
"string"
],
"transactionCandidateMatchIds": [
"string"
],
"transactionConfirmedMatchIds": [
"string"
],
"transactionCandidateMatches": […],
"transactionConfirmedMatches": […]
}
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/invoices/{invoiceId}/update-statusUpdate the status of an invoice
Bereichinvoices:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
invoiceIdstringerforderlichID of the invoice.
Abfrageparameter
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Request-Body
statusstringStatus of the invoice in its lifecycle.
draftedDraft that may lack mandatory fields; an uploaded invoice starts here and moves to
createdonce its data passes validation.createdValidated invoice, whose mandatory fields are all present and valid.
deletedDeleted invoice, which can no longer change status and is left out of transaction matching.
authorisedValidated invoice that a user approved.
paidValidated invoice settled in full by matched bank transactions or marked as paid by a user; its mandatory fields can no longer change.
voidedCancelled invoice, left out of transaction matching.
processedbooleanpaymentSubmittedbooleanRückgabe
Successful response
curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/Iv5zP2nK7wRt3xMq9bLd/update-status' \
-H "Authorization: Bearer $SWAY_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"status": "drafted"
}'const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/Iv5zP2nK7wRt3xMq9bLd/update-status', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"status": "drafted"
}),
});
console.log(await response.json());import os
import requests
response = requests.post(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/Iv5zP2nK7wRt3xMq9bLd/update-status",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
json={
"status": "drafted",
},
)
print(response.json()){
"data": {
"firestoreId": "Iv5zP2nK7wRt3xMq9bLd",
"workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
"creation": {
"creationDateTime": "2026-03-02T09:15:00.000Z",
"createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"invoiceStatus": "drafted",
"processingStatus": "uploaded",
"accountingType": "payable",
"reconciled": true,
"processed": true,
"paymentSubmitted": true,
"sentDateTime": "2026-03-02T09:30:00.000Z",
"paymentMethod": "creditCard",
"supplierCounterpartyId": "Cp2nG7vB4xLq9wRt5hMz",
"receiverCounterpartyId": "Cp2nG7vB4xLq9wRt5hMz",
"storagePath": "string",
"fileChecksumMd5": "string",
"fileChecksumCrc32c": "string",
"amountDue": {
"amount": 1250.5,
"currency": "CHF"
},
"amountPaidSinceLastInvoice": {
"amount": 1250.5,
"currency": "CHF"
},
"clientId": "string",
"currency": "CHF",
"dueDate": "2026-03-02",
"invoiceDate": "2026-03-02",
"invoiceId": "string",
"isUnpaidReminder": 0,
"netAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"paymentTerms": "string",
"purchaseOrder": "string",
"receiverAddress": {…},
"receiverBankAccount": {…},
"receiverContactName": "string",
"receiverEmail": "string",
"receiverName": "string",
"receiverPhone": "string",
"receiverTaxId": "string",
"remitToAddress": {…},
"remitToName": "string",
"shipToAddress": {…},
"shipToName": "string",
"supplierAddress": {…},
"supplierBankAccounts": […],
"supplierContactName": "string",
"supplierEmail": "string",
"supplierName": "string",
"supplierPaymentRef": "string",
"supplierPhone": "string",
"supplierTaxId": "string",
"supplierWebsite": "string",
"totalAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"totalTaxAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"items": […],
"taxes": […],
"draftPaymentIds": [
"string"
],
"initiatedPaymentIds": [
"string"
],
"transactionCandidateMatchIds": [
"string"
],
"transactionConfirmedMatchIds": [
"string"
],
"transactionCandidateMatches": […],
"transactionConfirmedMatches": […]
}
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/invoices/{invoiceId}/update-counterpartyUpdate the counterparty associated with an invoice
Bereichinvoices:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
invoiceIdstringerforderlichID of the invoice.
Abfrageparameter
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Request-Body
counterpartyIdstring | nullerforderlichID of the counterparty.
Rückgabe
Successful response
curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/Iv5zP2nK7wRt3xMq9bLd/update-counterparty' \
-H "Authorization: Bearer $SWAY_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"counterpartyId": "Cp2nG7vB4xLq9wRt5hMz"
}'const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/Iv5zP2nK7wRt3xMq9bLd/update-counterparty', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"counterpartyId": "Cp2nG7vB4xLq9wRt5hMz"
}),
});
console.log(await response.json());import os
import requests
response = requests.post(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/Iv5zP2nK7wRt3xMq9bLd/update-counterparty",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
json={
"counterpartyId": "Cp2nG7vB4xLq9wRt5hMz",
},
)
print(response.json()){
"data": {
"firestoreId": "Iv5zP2nK7wRt3xMq9bLd",
"workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
"creation": {
"creationDateTime": "2026-03-02T09:15:00.000Z",
"createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"invoiceStatus": "drafted",
"processingStatus": "uploaded",
"accountingType": "payable",
"reconciled": true,
"processed": true,
"paymentSubmitted": true,
"sentDateTime": "2026-03-02T09:30:00.000Z",
"paymentMethod": "creditCard",
"supplierCounterpartyId": "Cp2nG7vB4xLq9wRt5hMz",
"receiverCounterpartyId": "Cp2nG7vB4xLq9wRt5hMz",
"storagePath": "string",
"fileChecksumMd5": "string",
"fileChecksumCrc32c": "string",
"amountDue": {
"amount": 1250.5,
"currency": "CHF"
},
"amountPaidSinceLastInvoice": {
"amount": 1250.5,
"currency": "CHF"
},
"clientId": "string",
"currency": "CHF",
"dueDate": "2026-03-02",
"invoiceDate": "2026-03-02",
"invoiceId": "string",
"isUnpaidReminder": 0,
"netAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"paymentTerms": "string",
"purchaseOrder": "string",
"receiverAddress": {…},
"receiverBankAccount": {…},
"receiverContactName": "string",
"receiverEmail": "string",
"receiverName": "string",
"receiverPhone": "string",
"receiverTaxId": "string",
"remitToAddress": {…},
"remitToName": "string",
"shipToAddress": {…},
"shipToName": "string",
"supplierAddress": {…},
"supplierBankAccounts": […],
"supplierContactName": "string",
"supplierEmail": "string",
"supplierName": "string",
"supplierPaymentRef": "string",
"supplierPhone": "string",
"supplierTaxId": "string",
"supplierWebsite": "string",
"totalAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"totalTaxAmount": {
"amount": 1250.5,
"currency": "CHF"
},
"items": […],
"taxes": […],
"draftPaymentIds": [
"string"
],
"initiatedPaymentIds": [
"string"
],
"transactionCandidateMatchIds": [
"string"
],
"transactionConfirmedMatchIds": [
"string"
],
"transactionCandidateMatches": […],
"transactionConfirmedMatches": […]
}
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/invoices/{invoiceId}/matches/addAdd a confirmed match between an invoice and a bank transaction
Bereichinvoices:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
invoiceIdstringerforderlichID of the invoice.
Request-Body
bankAccountIdstringerforderlichID of the bank account.
bankTransactionIdstringerforderlichID of the bank transaction.
Rückgabe
No content
curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/Iv5zP2nK7wRt3xMq9bLd/matches/add' \
-H "Authorization: Bearer $SWAY_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
"bankTransactionId": "trx_MjAyNjAzMDJUMDk"
}'const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/Iv5zP2nK7wRt3xMq9bLd/matches/add', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
"bankTransactionId": "trx_MjAyNjAzMDJUMDk"
}),
});
console.log(response.status);import os
import requests
response = requests.post(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/Iv5zP2nK7wRt3xMq9bLd/matches/add",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
json={
"bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
"bankTransactionId": "trx_MjAyNjAzMDJUMDk",
},
)
print(response.status_code){
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/invoices/{invoiceId}/matches/confirmConfirm a candidate match between an invoice and a bank transaction
Bereichinvoices:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
invoiceIdstringerforderlichID of the invoice.
Abfrageparameter
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Request-Body
matchReferencestringerforderlichRückgabe
Successful response
dataInvoiceMatcherforderlich2 untergeordnete Felder anzeigen
targetstringerforderlichdataobjecterforderlich1 untergeordnetes Feld anzeigen
confidencenumbererforderlichcurl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/Iv5zP2nK7wRt3xMq9bLd/matches/confirm' \
-H "Authorization: Bearer $SWAY_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"matchReference": "string"
}'const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/Iv5zP2nK7wRt3xMq9bLd/matches/confirm', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"matchReference": "string"
}),
});
console.log(await response.json());import os
import requests
response = requests.post(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/Iv5zP2nK7wRt3xMq9bLd/matches/confirm",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
json={
"matchReference": "string",
},
)
print(response.json()){
"data": {
"target": "string",
"data": {
"confidence": 0
}
}
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/invoices/{invoiceId}/matches/removeRemove a confirmed match between an invoice and a bank transaction
Bereichinvoices:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
invoiceIdstringerforderlichID of the invoice.
Request-Body
matchReferencestringerforderlichRückgabe
No content
curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/Iv5zP2nK7wRt3xMq9bLd/matches/remove' \
-H "Authorization: Bearer $SWAY_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"matchReference": "string"
}'const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/Iv5zP2nK7wRt3xMq9bLd/matches/remove', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"matchReference": "string"
}),
});
console.log(response.status);import os
import requests
response = requests.post(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/Iv5zP2nK7wRt3xMq9bLd/matches/remove",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
json={
"matchReference": "string",
},
)
print(response.status_code){
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/invoices/{invoiceId}/matches/remove-candidateRemove a candidate match suggestion for an invoice
Bereichinvoices:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
invoiceIdstringerforderlichID of the invoice.
Request-Body
matchReferencestringerforderlichRückgabe
No content
curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/Iv5zP2nK7wRt3xMq9bLd/matches/remove-candidate' \
-H "Authorization: Bearer $SWAY_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"matchReference": "string"
}'const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/Iv5zP2nK7wRt3xMq9bLd/matches/remove-candidate', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"matchReference": "string"
}),
});
console.log(response.status);import os
import requests
response = requests.post(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/Iv5zP2nK7wRt3xMq9bLd/matches/remove-candidate",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
json={
"matchReference": "string",
},
)
print(response.status_code){
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}/workspaces/{workspaceId}/invoices/exportExport an invoice to a downloadable file
Bereichinvoices:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
Abfrageparameter
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Request-Body
exportTypestringerforderlichFormat of the invoice export.
csvCSV file of the invoices, with the columns in
fields.pain.001ISO 20022 pain.001 payment file that pays the invoices from the bank account
bankAccountId.
invoiceIdsstring[]erforderlichID of the invoice.
bankAccountIdstringID of the bank account.
counterpartyCashAccountIdsRecord<string, string>requestedExecutionDatestringrequestedExecutionDateModestringWertedueDatecommonDate
localTimeZonestringmarkAsPaymentSubmittedbooleanfieldsobject[]4 untergeordnete Felder anzeigen
fieldstringerforderlich40 Werte anzeigen
invoice_idinvoice_datedue_datenet_amounttax_amounttotal_amountamount_duecurrencystatusprocessing_statusaccounting_typepurchase_orderpayment_termsclient_idsupplier_namesupplier_addresssupplier_contactsupplier_emailsupplier_phonesupplier_tax_idsupplier_bank_accountsreceiver_namereceiver_addressreceiver_contactreceiver_emailreceiver_phonereceiver_tax_idreceiver_bank_accountship_to_nameship_to_addressremit_to_nameremit_to_addresspayment_referenceline_itemstaxescreation_dateis_unpaid_reminderreconciledprocessedpayment_submitted
namestringdefaultValuestringformatstringRückgabe
Successful response
dataInvoiceExporterforderlich3 untergeordnete Felder anzeigen
startedbooleanerforderlichworkspaceIdstringerforderlichfilesobject[]erforderlich4 untergeordnete Felder anzeigen
exportIdstringerforderlichtargetFileNamestringerforderlichdownloadUrlstringurierforderlichTime-limited URL to download the file. The file may not be ready the moment the export call returns: poll this URL and retry while it responds with 404 until the download succeeds.
expiresAtstringerforderlichInstant after which downloadUrl stops working.
curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/export' \
-H "Authorization: Bearer $SWAY_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"exportType": "csv",
"invoiceIds": [
"Iv5zP2nK7wRt3xMq9bLd"
],
"bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
"requestedExecutionDate": "2026-03-02",
"requestedExecutionDateMode": "dueDate",
"fields": [
{
"field": "invoice_id"
}
]
}'const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/export', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"exportType": "csv",
"invoiceIds": [
"Iv5zP2nK7wRt3xMq9bLd"
],
"bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
"requestedExecutionDate": "2026-03-02",
"requestedExecutionDateMode": "dueDate",
"fields": [
{
"field": "invoice_id"
}
]
}),
});
console.log(await response.json());import os
import requests
response = requests.post(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invoices/export",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
json={
"exportType": "csv",
"invoiceIds": [
"Iv5zP2nK7wRt3xMq9bLd",
],
"bankAccountId": "bacc_Q0gzMTA4NzY1NDM",
"requestedExecutionDate": "2026-03-02",
"requestedExecutionDateMode": "dueDate",
"fields": [
{
"field": "invoice_id",
},
],
},
)
print(response.json()){
"data": {
"started": true,
"workspaceId": "string",
"files": [
{
"exportId": "string",
"targetFileName": "string",
"downloadUrl": "https://example.com",
"expiresAt": "2026-03-02T09:30:00.000Z"
}
]
}
}{
"error": {
"code": "invalid-argument",
"message": "Invalid request"
}
}{
"error": {
"code": "unauthenticated",
"message": "Invalid or expired credentials"
}
}{
"error": {
"code": "permission-denied",
"message": "Missing required scope: invoices:read"
}
}{
"error": {
"code": "not-found",
"message": "Resource not found"
}
}{
"error": {
"code": "internal",
"message": "An internal error occurred"
}
}