Zum Inhalt springen
Ressource · Billing

Invoices

An invoice is a sales invoice or a supplier bill of the workspace.

invoices:readinvoices:write
MethodePfadZusammenfassung
GET…/invoicesList invoices in the workspace
GET…/invoices/searchSearch invoices by attributes
POST…/invoices/uploadGet an upload URL for a sales invoice or a bill document
POST…/invoices/upload-splitGet an upload URL for a document holding several sales invoices or bills
PATCH…/invoices/{invoiceId}Update an invoice
POST…/invoices/{invoiceId}/update-statusUpdate the status of an invoice
POST…/invoices/{invoiceId}/update-counterpartyUpdate the counterparty associated with an invoice
POST…/invoices/{invoiceId}/matches/addAdd a confirmed match between an invoice and a bank transaction
POST…/invoices/{invoiceId}/matches/confirmConfirm a candidate match between an invoice and a bank transaction
POST…/invoices/{invoiceId}/matches/removeRemove a confirmed match between an invoice and a bank transaction
POST…/invoices/{invoiceId}/matches/remove-candidateRemove a candidate match suggestion for an invoice
POST…/invoices/exportExport an invoice to a downloadable file

Die Pfade beginnen mit /workspaces/{workspaceId}. GET-Endpunkte brauchen invoices:read, die übrigen invoices:write.

Das Objekt Invoice

firestoreIdstringerforderlich

ID of the invoice.

workspaceIdstringerforderlich

ID of the workspace.

creationobjecterforderlich

When and by whom the resource was created.

2 untergeordnete Felder anzeigen
creationDateTimestringdate-timeerforderlich

Date and time when the resource was created.

createdBystring

ID of the user who created the resource, when recorded.

invoiceStatusstringerforderlich

Status of the invoice in its lifecycle.

  • drafted

    Draft that may lack mandatory fields; an uploaded invoice starts here and moves to created once its data passes validation.

  • created

    Validated invoice, whose mandatory fields are all present and valid.

  • deleted

    Deleted invoice, which can no longer change status and is left out of transaction matching.

  • authorised

    Validated invoice that a user approved.

  • paid

    Validated invoice settled in full by matched bank transactions or marked as paid by a user; its mandatory fields can no longer change.

  • voided

    Cancelled invoice, left out of transaction matching.

processingStatusstringerforderlich

Progress of the data extraction from the invoice file.

  • uploaded

    The file is uploaded and its data is not extracted yet.

  • parsed

    The data is extracted from the file, or the invoice was imported without a file.

  • failed

    The data could not be extracted from the file, for example because the file is too large.

accountingTypestring

Direction of the invoice: a supplier bill to pay or a sales invoice to collect.

  • payable

    A bill received from a supplier, which the workspace pays.

  • receivable

    An invoice issued to a customer, which the workspace collects.

reconciledbooleanerforderlich
Alle 57 Felder anzeigen
processedbooleanerforderlich
paymentSubmittedbooleanerforderlich
sentDateTimestringdate-time
paymentMethodstring

Payment method of the invoice.

13 Werte anzeigen
  • creditCard

    Credit card.

  • debitCard

    Debit card.

  • directDebit

    Direct debit.

  • bankTransfer

    Bank transfer.

  • cash

    Cash.

  • voucher

    Voucher.

  • check

    Check.

  • paypal

    PayPal.

  • stripe

    Stripe.

  • applePay

    Apple Pay.

  • googlePay

    Google Pay.

  • samsungPay

    Samsung Pay.

  • unknown

    The payment method is not known.

supplierCounterpartyIdstring | null

ID of the counterparty.

receiverCounterpartyIdstring | null

ID of the counterparty.

storagePathstring
fileChecksumMd5string
fileChecksumCrc32cstring
amountDueMonetaryAmount | null
2 untergeordnete Felder anzeigen
amountnumbererforderlich

Amount in the main unit of the currency, such as francs.

currencystring | null

Currency of the amount, when known.

amountPaidSinceLastInvoiceMonetaryAmount | null
2 untergeordnete Felder anzeigen
amountnumbererforderlich

Amount in the main unit of the currency, such as francs.

currencystring | null

Currency of the amount, when known.

clientIdstring | null
currencystring | null

ISO 4217 currency code

dueDatestring | null
invoiceDatestring | null
invoiceIdstring | null
isUnpaidRemindernumber | null
netAmountMonetaryAmount | null
2 untergeordnete Felder anzeigen
amountnumbererforderlich

Amount in the main unit of the currency, such as francs.

currencystring | null

Currency of the amount, when known.

paymentTermsstring | null
purchaseOrderstring | null
receiverAddressAddressField | null

Postal address on a document, in which any part can be missing.

12 untergeordnete Felder anzeigen
countrystring | null

ISO 3166-1 alpha-2 country code

postCodestring | null

Post code of the address.

townNamestring | null

Name of the town or city.

streetNamestring | null

Name of the street.

buildingNumberstring | null

Number of the building in the street.

namestring | null

Name of the building or place.

sortingCodestring | null

Additional sorting code of the postal service, used in a few countries such as France.

postBoxstring | null

Post office box.

administrativeAreastring | null

Region of the country, such as a canton or a state.

recipientsstring[] | null

Names of the people the address is for.

organizationstring | null

Name of the organization at the address.

sourcestring[] | null

Text the address was read from, one item per line.

receiverBankAccountBankAccountField | null
6 untergeordnete Felder anzeigen
bankNamestring | null
bankAddressAddressField | null

Postal address on a document, in which any part can be missing.

12 untergeordnete Felder anzeigen
countrystring | null

ISO 3166-1 alpha-2 country code

postCodestring | null

Post code of the address.

townNamestring | null

Name of the town or city.

streetNamestring | null

Name of the street.

buildingNumberstring | null

Number of the building in the street.

namestring | null

Name of the building or place.

sortingCodestring | null

Additional sorting code of the postal service, used in a few countries such as France.

postBoxstring | null

Post office box.

administrativeAreastring | null

Region of the country, such as a canton or a state.

recipientsstring[] | null

Names of the people the address is for.

organizationstring | null

Name of the organization at the address.

sourcestring[] | null

Text the address was read from, one item per line.

bicstring | null
currencystring | null

ISO 4217 currency code

accountIdentificationstring | null
accountSecondaryIdentificationstring | null
receiverContactNamestring | null
receiverEmailstring | null
receiverNamestring | null
receiverPhonestring | null
receiverTaxIdstring | null
remitToAddressAddressField | null

Postal address on a document, in which any part can be missing.

12 untergeordnete Felder anzeigen
countrystring | null

ISO 3166-1 alpha-2 country code

postCodestring | null

Post code of the address.

townNamestring | null

Name of the town or city.

streetNamestring | null

Name of the street.

buildingNumberstring | null

Number of the building in the street.

namestring | null

Name of the building or place.

sortingCodestring | null

Additional sorting code of the postal service, used in a few countries such as France.

postBoxstring | null

Post office box.

administrativeAreastring | null

Region of the country, such as a canton or a state.

recipientsstring[] | null

Names of the people the address is for.

organizationstring | null

Name of the organization at the address.

sourcestring[] | null

Text the address was read from, one item per line.

remitToNamestring | null
shipToAddressAddressField | null

Postal address on a document, in which any part can be missing.

12 untergeordnete Felder anzeigen
countrystring | null

ISO 3166-1 alpha-2 country code

postCodestring | null

Post code of the address.

townNamestring | null

Name of the town or city.

streetNamestring | null

Name of the street.

buildingNumberstring | null

Number of the building in the street.

namestring | null

Name of the building or place.

sortingCodestring | null

Additional sorting code of the postal service, used in a few countries such as France.

postBoxstring | null

Post office box.

administrativeAreastring | null

Region of the country, such as a canton or a state.

recipientsstring[] | null

Names of the people the address is for.

organizationstring | null

Name of the organization at the address.

sourcestring[] | null

Text the address was read from, one item per line.

shipToNamestring | null
supplierAddressAddressField | null

Postal address on a document, in which any part can be missing.

12 untergeordnete Felder anzeigen
countrystring | null

ISO 3166-1 alpha-2 country code

postCodestring | null

Post code of the address.

townNamestring | null

Name of the town or city.

streetNamestring | null

Name of the street.

buildingNumberstring | null

Number of the building in the street.

namestring | null

Name of the building or place.

sortingCodestring | null

Additional sorting code of the postal service, used in a few countries such as France.

postBoxstring | null

Post office box.

administrativeAreastring | null

Region of the country, such as a canton or a state.

recipientsstring[] | null

Names of the people the address is for.

organizationstring | null

Name of the organization at the address.

sourcestring[] | null

Text the address was read from, one item per line.

supplierBankAccountsBankAccountField[] | null
6 untergeordnete Felder anzeigen
bankNamestring | null
bankAddressAddressField | null

Postal address on a document, in which any part can be missing.

12 untergeordnete Felder anzeigen
countrystring | null

ISO 3166-1 alpha-2 country code

postCodestring | null

Post code of the address.

townNamestring | null

Name of the town or city.

streetNamestring | null

Name of the street.

buildingNumberstring | null

Number of the building in the street.

namestring | null

Name of the building or place.

sortingCodestring | null

Additional sorting code of the postal service, used in a few countries such as France.

postBoxstring | null

Post office box.

administrativeAreastring | null

Region of the country, such as a canton or a state.

recipientsstring[] | null

Names of the people the address is for.

organizationstring | null

Name of the organization at the address.

sourcestring[] | null

Text the address was read from, one item per line.

bicstring | null
currencystring | null

ISO 4217 currency code

accountIdentificationstring | null
accountSecondaryIdentificationstring | null
supplierContactNamestring | null
supplierEmailstring | null
supplierNamestring | null
supplierPaymentRefstring | null
supplierPhonestring | null
supplierTaxIdstring | null
supplierWebsitestring | null
totalAmountMonetaryAmount | null
2 untergeordnete Felder anzeigen
amountnumbererforderlich

Amount in the main unit of the currency, such as francs.

currencystring | null

Currency of the amount, when known.

totalTaxAmountMonetaryAmount | null
2 untergeordnete Felder anzeigen
amountnumbererforderlich

Amount in the main unit of the currency, such as francs.

currencystring | null

Currency of the amount, when known.

itemsobject[] | null
12 untergeordnete Felder anzeigen
amountMonetaryAmount | null
2 untergeordnete Felder anzeigen
amountnumbererforderlich

Amount in the main unit of the currency, such as francs.

currencystring | null

Currency of the amount, when known.

descriptionstring | null
discountAmountMonetaryAmount | null
2 untergeordnete Felder anzeigen
amountnumbererforderlich

Amount in the main unit of the currency, such as francs.

currencystring | null

Currency of the amount, when known.

discountRatenumber | null
productCodestring | null
productIdstring | null

ID of the product.

quantitynumber | null
taxAmountMonetaryAmount | null
2 untergeordnete Felder anzeigen
amountnumbererforderlich

Amount in the main unit of the currency, such as francs.

currencystring | null

Currency of the amount, when known.

taxRatenumber | null
taxTypeIdstring | null

ID of the tax type.

unitstring | null
unitPriceMonetaryAmount | null
2 untergeordnete Felder anzeigen
amountnumbererforderlich

Amount in the main unit of the currency, such as francs.

currencystring | null

Currency of the amount, when known.

taxesobject[] | null
4 untergeordnete Felder anzeigen
netAmountBeforeTaxMonetaryAmount | null
2 untergeordnete Felder anzeigen
amountnumbererforderlich

Amount in the main unit of the currency, such as francs.

currencystring | null

Currency of the amount, when known.

taxAmountMonetaryAmount | null
2 untergeordnete Felder anzeigen
amountnumbererforderlich

Amount in the main unit of the currency, such as francs.

currencystring | null

Currency of the amount, when known.

taxCodestring | null
taxRatenumber | null
draftPaymentIdsstring[]
initiatedPaymentIdsstring[]
transactionCandidateMatchIdsstring[]
transactionConfirmedMatchIdsstring[]
transactionCandidateMatchesInvoiceMatch[]
2 untergeordnete Felder anzeigen
targetstringerforderlich
dataobjecterforderlich
1 untergeordnetes Feld anzeigen
confidencenumbererforderlich
transactionConfirmedMatchesInvoiceMatch[]
2 untergeordnete Felder anzeigen
targetstringerforderlich
dataobjecterforderlich
1 untergeordnetes Feld anzeigen
confidencenumbererforderlich
Das Objekt Invoice
{
  "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
      }
    }
  ]
}
GET/workspaces/{workspaceId}/invoices

List invoices in the workspace

Bereichinvoices:read

Pfadparameter

workspaceIdstringerforderlich

ID of the workspace.

Abfrageparameter

limitinteger

Maximum 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

startAfterstring

Cursor of the page to return: the nextCursor of the previous page.

fieldsstring

Comma-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

200

List of items

dataInvoice[]erforderlich

Items of the page, in list order.

limitintegererforderlich

Page size of the request, or the number of requested ids.

nextCursorstring

Cursor 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"
{
  "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"
}
POST/workspaces/{workspaceId}/invoices/upload

Get 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

workspaceIdstringerforderlich

ID of the workspace.

Abfrageparameter

fieldsstring

Comma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.

Request-Body

accountingTypestringerforderlich

Direction of the invoice: a supplier bill to pay or a sales invoice to collect.

  • payable

    A bill received from a supplier, which the workspace pays.

  • receivable

    An invoice issued to a customer, which the workspace collects.

fileNamestringerforderlich
contentTypestringerforderlich
sizeintegererforderlich
bankAccountIdstring

ID of the bank account.

bankTransactionIdstring

ID of the bank transaction.

Rückgabe

200

Successful response

dataFileUploadUrlerforderlich
3 untergeordnete Felder anzeigen
uploadUrlstringurierforderlich
contentTypestringerforderlich
sizeintegererforderlich
curl -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"
}'
{
  "data": {
    "uploadUrl": "https://example.com",
    "contentType": "string",
    "size": 0
  }
}
POST/workspaces/{workspaceId}/invoices/upload-split

Get 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

workspaceIdstringerforderlich

ID of the workspace.

Abfrageparameter

fieldsstring

Comma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.

Request-Body

accountingTypestringerforderlich

Direction of the invoice: a supplier bill to pay or a sales invoice to collect.

  • payable

    A bill received from a supplier, which the workspace pays.

  • receivable

    An invoice issued to a customer, which the workspace collects.

fileNamestringerforderlich
contentTypestringerforderlich
sizeintegererforderlich

Rückgabe

200

Successful response

dataFileUploadUrlerforderlich
3 untergeordnete Felder anzeigen
uploadUrlstringurierforderlich
contentTypestringerforderlich
sizeintegererforderlich
curl -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
}'
{
  "data": {
    "uploadUrl": "https://example.com",
    "contentType": "string",
    "size": 0
  }
}
PATCH/workspaces/{workspaceId}/invoices/{invoiceId}

Update an invoice

Bereichinvoices:write

Pfadparameter

workspaceIdstringerforderlich

ID of the workspace.

invoiceIdstringerforderlich

ID of the invoice.

Abfrageparameter

fieldsstring

Comma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.

Request-Body

fieldsobjecterforderlich
38 untergeordnete Felder anzeigen
amountDueMonetaryAmount | null
2 untergeordnete Felder anzeigen
amountnumbererforderlich

Amount in the main unit of the currency, such as francs.

currencystring | null

Currency of the amount, when known.

amountPaidSinceLastInvoiceMonetaryAmount | null
2 untergeordnete Felder anzeigen
amountnumbererforderlich

Amount in the main unit of the currency, such as francs.

currencystring | null

Currency of the amount, when known.

clientIdstring | null
currencystring | null

ISO 4217 currency code

dueDatestring | null
footerstring | null

Text printed at the bottom of the invoice.

headerstring | null

Text printed at the top of the invoice.

invoiceDatestring | null
invoiceIdstring | null
isUnpaidRemindernumber | null
netAmountMonetaryAmount | null
2 untergeordnete Felder anzeigen
amountnumbererforderlich

Amount in the main unit of the currency, such as francs.

currencystring | null

Currency of the amount, when known.

paymentTermsstring | null
purchaseOrderstring | null
receiverAddressAddressField | null

Postal address on a document, in which any part can be missing.

12 untergeordnete Felder anzeigen
countrystring | null

ISO 3166-1 alpha-2 country code

postCodestring | null

Post code of the address.

townNamestring | null

Name of the town or city.

streetNamestring | null

Name of the street.

buildingNumberstring | null

Number of the building in the street.

namestring | null

Name of the building or place.

sortingCodestring | null

Additional sorting code of the postal service, used in a few countries such as France.

postBoxstring | null

Post office box.

administrativeAreastring | null

Region of the country, such as a canton or a state.

recipientsstring[] | null

Names of the people the address is for.

organizationstring | null

Name of the organization at the address.

sourcestring[] | null

Text the address was read from, one item per line.

receiverBankAccountBankAccountField | null
6 untergeordnete Felder anzeigen
bankNamestring | null
bankAddressAddressField | null

Postal address on a document, in which any part can be missing.

12 untergeordnete Felder anzeigen
countrystring | null

ISO 3166-1 alpha-2 country code

postCodestring | null

Post code of the address.

townNamestring | null

Name of the town or city.

streetNamestring | null

Name of the street.

buildingNumberstring | null

Number of the building in the street.

namestring | null

Name of the building or place.

sortingCodestring | null

Additional sorting code of the postal service, used in a few countries such as France.

postBoxstring | null

Post office box.

administrativeAreastring | null

Region of the country, such as a canton or a state.

recipientsstring[] | null

Names of the people the address is for.

organizationstring | null

Name of the organization at the address.

sourcestring[] | null

Text the address was read from, one item per line.

bicstring | null
currencystring | null

ISO 4217 currency code

accountIdentificationstring | null
accountSecondaryIdentificationstring | null
receiverContactNamestring | null
receiverEmailstring | null
receiverNamestring | null
receiverPhonestring | null
receiverTaxIdstring | null
remitToAddressAddressField | null

Postal address on a document, in which any part can be missing.

12 untergeordnete Felder anzeigen
countrystring | null

ISO 3166-1 alpha-2 country code

postCodestring | null

Post code of the address.

townNamestring | null

Name of the town or city.

streetNamestring | null

Name of the street.

buildingNumberstring | null

Number of the building in the street.

namestring | null

Name of the building or place.

sortingCodestring | null

Additional sorting code of the postal service, used in a few countries such as France.

postBoxstring | null

Post office box.

administrativeAreastring | null

Region of the country, such as a canton or a state.

recipientsstring[] | null

Names of the people the address is for.

organizationstring | null

Name of the organization at the address.

sourcestring[] | null

Text the address was read from, one item per line.

remitToNamestring | null
shipToAddressAddressField | null

Postal address on a document, in which any part can be missing.

12 untergeordnete Felder anzeigen
countrystring | null

ISO 3166-1 alpha-2 country code

postCodestring | null

Post code of the address.

townNamestring | null

Name of the town or city.

streetNamestring | null

Name of the street.

buildingNumberstring | null

Number of the building in the street.

namestring | null

Name of the building or place.

sortingCodestring | null

Additional sorting code of the postal service, used in a few countries such as France.

postBoxstring | null

Post office box.

administrativeAreastring | null

Region of the country, such as a canton or a state.

recipientsstring[] | null

Names of the people the address is for.

organizationstring | null

Name of the organization at the address.

sourcestring[] | null

Text the address was read from, one item per line.

shipToNamestring | null
supplierAddressAddressField | null

Postal address on a document, in which any part can be missing.

12 untergeordnete Felder anzeigen
countrystring | null

ISO 3166-1 alpha-2 country code

postCodestring | null

Post code of the address.

townNamestring | null

Name of the town or city.

streetNamestring | null

Name of the street.

buildingNumberstring | null

Number of the building in the street.

namestring | null

Name of the building or place.

sortingCodestring | null

Additional sorting code of the postal service, used in a few countries such as France.

postBoxstring | null

Post office box.

administrativeAreastring | null

Region of the country, such as a canton or a state.

recipientsstring[] | null

Names of the people the address is for.

organizationstring | null

Name of the organization at the address.

sourcestring[] | null

Text the address was read from, one item per line.

supplierBankAccountsBankAccountField[] | null
6 untergeordnete Felder anzeigen
bankNamestring | null
bankAddressAddressField | null

Postal address on a document, in which any part can be missing.

12 untergeordnete Felder anzeigen
countrystring | null

ISO 3166-1 alpha-2 country code

postCodestring | null

Post code of the address.

townNamestring | null

Name of the town or city.

streetNamestring | null

Name of the street.

buildingNumberstring | null

Number of the building in the street.

namestring | null

Name of the building or place.

sortingCodestring | null

Additional sorting code of the postal service, used in a few countries such as France.

postBoxstring | null

Post office box.

administrativeAreastring | null

Region of the country, such as a canton or a state.

recipientsstring[] | null

Names of the people the address is for.

organizationstring | null

Name of the organization at the address.

sourcestring[] | null

Text the address was read from, one item per line.

bicstring | null
currencystring | null

ISO 4217 currency code

accountIdentificationstring | null
accountSecondaryIdentificationstring | null
supplierContactNamestring | null
supplierEmailstring | null
supplierNamestring | null
supplierPaymentRefstring | null
supplierPhonestring | null
supplierTaxIdstring | null
supplierWebsitestring | null
totalAmountMonetaryAmount | null
2 untergeordnete Felder anzeigen
amountnumbererforderlich

Amount in the main unit of the currency, such as francs.

currencystring | null

Currency of the amount, when known.

totalTaxAmountMonetaryAmount | null
2 untergeordnete Felder anzeigen
amountnumbererforderlich

Amount in the main unit of the currency, such as francs.

currencystring | null

Currency of the amount, when known.

itemsobject[] | null
12 untergeordnete Felder anzeigen
amountMonetaryAmount | null
2 untergeordnete Felder anzeigen
amountnumbererforderlich

Amount in the main unit of the currency, such as francs.

currencystring | null

Currency of the amount, when known.

descriptionstring | null
discountAmountMonetaryAmount | null
2 untergeordnete Felder anzeigen
amountnumbererforderlich

Amount in the main unit of the currency, such as francs.

currencystring | null

Currency of the amount, when known.

discountRatenumber | null
productCodestring | null
productIdstring | null

ID of the product.

quantitynumber | null
taxAmountMonetaryAmount | null
2 untergeordnete Felder anzeigen
amountnumbererforderlich

Amount in the main unit of the currency, such as francs.

currencystring | null

Currency of the amount, when known.

taxRatenumber | null
taxTypeIdstring | null

ID of the tax type.

unitstring | null
unitPriceMonetaryAmount | null
2 untergeordnete Felder anzeigen
amountnumbererforderlich

Amount in the main unit of the currency, such as francs.

currencystring | null

Currency of the amount, when known.

taxesobject[] | null
4 untergeordnete Felder anzeigen
netAmountBeforeTaxMonetaryAmount | null
2 untergeordnete Felder anzeigen
amountnumbererforderlich

Amount in the main unit of the currency, such as francs.

currencystring | null

Currency of the amount, when known.

taxAmountMonetaryAmount | null
2 untergeordnete Felder anzeigen
amountnumbererforderlich

Amount in the main unit of the currency, such as francs.

currencystring | null

Currency of the amount, when known.

taxCodestring | null
taxRatenumber | null
qrCodeDatastring[] | null

Rückgabe

200

Successful response

dataInvoiceerforderlich
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"
        }
      }
    ]
  }
}'
{
  "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": […]
  }
}
POST/workspaces/{workspaceId}/invoices/{invoiceId}/update-status

Update the status of an invoice

Bereichinvoices:write

Pfadparameter

workspaceIdstringerforderlich

ID of the workspace.

invoiceIdstringerforderlich

ID of the invoice.

Abfrageparameter

fieldsstring

Comma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.

Request-Body

statusstring

Status of the invoice in its lifecycle.

  • drafted

    Draft that may lack mandatory fields; an uploaded invoice starts here and moves to created once its data passes validation.

  • created

    Validated invoice, whose mandatory fields are all present and valid.

  • deleted

    Deleted invoice, which can no longer change status and is left out of transaction matching.

  • authorised

    Validated invoice that a user approved.

  • paid

    Validated invoice settled in full by matched bank transactions or marked as paid by a user; its mandatory fields can no longer change.

  • voided

    Cancelled invoice, left out of transaction matching.

processedboolean
paymentSubmittedboolean

Rückgabe

200

Successful response

dataInvoiceerforderlich
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"
}'
{
  "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": […]
  }
}
POST/workspaces/{workspaceId}/invoices/{invoiceId}/update-counterparty

Update the counterparty associated with an invoice

Bereichinvoices:write

Pfadparameter

workspaceIdstringerforderlich

ID of the workspace.

invoiceIdstringerforderlich

ID of the invoice.

Abfrageparameter

fieldsstring

Comma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.

Request-Body

counterpartyIdstring | nullerforderlich

ID of the counterparty.

Rückgabe

200

Successful response

dataInvoiceerforderlich
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"
}'
{
  "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": […]
  }
}
POST/workspaces/{workspaceId}/invoices/{invoiceId}/matches/add

Add a confirmed match between an invoice and a bank transaction

Bereichinvoices:write

Pfadparameter

workspaceIdstringerforderlich

ID of the workspace.

invoiceIdstringerforderlich

ID of the invoice.

Request-Body

bankAccountIdstringerforderlich

ID of the bank account.

bankTransactionIdstringerforderlich

ID of the bank transaction.

Rückgabe

204

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"
}'
{
  "error": {
    "code": "invalid-argument",
    "message": "Invalid request"
  }
}
POST/workspaces/{workspaceId}/invoices/{invoiceId}/matches/confirm

Confirm a candidate match between an invoice and a bank transaction

Bereichinvoices:write

Pfadparameter

workspaceIdstringerforderlich

ID of the workspace.

invoiceIdstringerforderlich

ID of the invoice.

Abfrageparameter

fieldsstring

Comma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.

Request-Body

matchReferencestringerforderlich

Rückgabe

200

Successful response

dataInvoiceMatcherforderlich
2 untergeordnete Felder anzeigen
targetstringerforderlich
dataobjecterforderlich
1 untergeordnetes Feld anzeigen
confidencenumbererforderlich
curl -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"
}'
{
  "data": {
    "target": "string",
    "data": {
      "confidence": 0
    }
  }
}
POST/workspaces/{workspaceId}/invoices/{invoiceId}/matches/remove

Remove a confirmed match between an invoice and a bank transaction

Bereichinvoices:write

Pfadparameter

workspaceIdstringerforderlich

ID of the workspace.

invoiceIdstringerforderlich

ID of the invoice.

Request-Body

matchReferencestringerforderlich

Rückgabe

204

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"
}'
{
  "error": {
    "code": "invalid-argument",
    "message": "Invalid request"
  }
}
POST/workspaces/{workspaceId}/invoices/{invoiceId}/matches/remove-candidate

Remove a candidate match suggestion for an invoice

Bereichinvoices:write

Pfadparameter

workspaceIdstringerforderlich

ID of the workspace.

invoiceIdstringerforderlich

ID of the invoice.

Request-Body

matchReferencestringerforderlich

Rückgabe

204

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"
}'
{
  "error": {
    "code": "invalid-argument",
    "message": "Invalid request"
  }
}
POST/workspaces/{workspaceId}/invoices/export

Export an invoice to a downloadable file

Bereichinvoices:write

Pfadparameter

workspaceIdstringerforderlich

ID of the workspace.

Abfrageparameter

fieldsstring

Comma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.

Request-Body

exportTypestringerforderlich

Format of the invoice export.

  • csv

    CSV file of the invoices, with the columns in fields.

  • pain.001

    ISO 20022 pain.001 payment file that pays the invoices from the bank account bankAccountId.

invoiceIdsstring[]erforderlich

ID of the invoice.

bankAccountIdstring

ID of the bank account.

counterpartyCashAccountIdsRecord<string, string>
requestedExecutionDatestring
requestedExecutionDateModestring

WertedueDatecommonDate

localTimeZonestring
markAsPaymentSubmittedboolean
fieldsobject[]
4 untergeordnete Felder anzeigen
fieldstringerforderlich
40 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

namestring
defaultValuestring
formatstring

Rückgabe

200

Successful response

dataInvoiceExporterforderlich
3 untergeordnete Felder anzeigen
startedbooleanerforderlich
workspaceIdstringerforderlich
filesobject[]erforderlich
4 untergeordnete Felder anzeigen
exportIdstringerforderlich
targetFileNamestringerforderlich
downloadUrlstringurierforderlich

Time-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.

expiresAtstringerforderlich

Instant 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"
    }
  ]
}'
{
  "data": {
    "started": true,
    "workspaceId": "string",
    "files": [
      {
        "exportId": "string",
        "targetFileName": "string",
        "downloadUrl": "https://example.com",
        "expiresAt": "2026-03-02T09:30:00.000Z"
      }
    ]
  }
}

Bauen Sie auf Ihren eigenen Daten.

Erstellen Sie ein Konto, öffnen Sie Profil › Entwickler und erstellen Sie einen Schlüssel, der auf die nötigen Ressourcen begrenzt ist. Fragen zu einer Integration? Das Team beantwortet sie in einem Gespräch.