| Methode | Pfad | Zusammenfassung |
|---|---|---|
| GET | …/counterparties | List counterparties (customers, vendors) in the workspace |
| POST | …/counterparties | Create a counterparty or merge with an existing one |
| GET | …/counterparties/search | Search counterparties by name or other attributes |
| PATCH | …/counterparties/{counterpartyId} | Update a counterparty |
| DELETE | …/counterparties/{counterpartyId} | Delete (soft-delete) a counterparty |
| POST | …/counterparties/{counterpartyId}/restore | Restore a previously deleted counterparty |
Die Pfade beginnen mit /workspaces/{workspaceId}. GET-Endpunkte brauchen counterparties:read, die übrigen counterparties:write.
Das Objekt Counterparty
firestoreIdstringerforderlichID of the counterparty.
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.
activationobjecterforderlichWhether the resource is enabled, and when and by whom it was last enabled or disabled.
3 untergeordnete Felder anzeigen
enabledbooleanerforderlichWhether the resource is enabled.
updateDateTimestringdate-timeerforderlichDate and time when enabled was last set.
updatedBystringID of the user who last set enabled, when recorded.
entityTypestringKind of entity: an individual or an organization.
individualA natural person.
organizationA company or another organization.
namestringerforderlichphonesstring[]erforderlichAlle 16 Felder anzeigenFeldliste ausblenden
emailsstring[]erforderlichaddressPostalAddressPostal address, with the parts of an ISO 20022 postal address.
12 untergeordnete Felder anzeigen
countrystringerforderlichISO 3166-1 alpha-2 country code
postCodestringerforderlichPost code of the address.
townNamestringerforderlichName of the town or city.
streetNamestringName of the street.
buildingNumberstringNumber of the building in the street.
namestringName of the building or place.
sortingCodestringAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstringPost office box.
administrativeAreastringRegion of the country, such as a canton or a state.
recipientsstring[]Names of the people the address is for.
organizationstringName of the organization at the address.
sourcestring[]Text the address was read from, one item per line.
contactPersonsobject[]erforderlich3 untergeordnete Felder anzeigen
namestringerforderlichphonestringemailstringtaxIdentificationstringnotesstringcashAccountsobject[]erforderlich6 untergeordnete Felder anzeigen
identificationsobject[]erforderlich2 untergeordnete Felder anzeigen
typestringerforderlichKind of identifier of a bank account or of its bank.
14 Werte anzeigen
bicBank Identifier Code of the bank.
sortCodeSix-digit code of a bank and branch in the United Kingdom.
ibanInternational Bank Account Number.
bbanBasic Bank Account Number, the country-specific format of an account number.
accountNumberAccount number that the bank assigns, unique within the bank or the branch.
panPrimary Account Number, the number of a credit or debit card.
emailEmail address that identifies the account.
msisdnMobile phone number that identifies the account.
virtualAccountIdIdentifier of a virtual sub-account of a main account.
globalWalletIdentifier of a digital wallet that holds and pays in several currencies.
clabeCLABE, the 18-digit standardized bank code of a Mexican bank account.
bitcoinAddressSingle Bitcoin address, the only address the account tracks.
bitcoinXpubBitcoin extended public key (xpub, ypub or zpub), from which the addresses of the wallet are derived.
otherAnother kind of identifier.
valuestringerforderlichValue of the identifier, for example the IBAN or the BIC.
currencystringerforderlichISO 4217 currency code
bankAddressobjecterforderlich12 untergeordnete Felder anzeigen
countrystringerforderlichISO 3166-1 alpha-2 country code
postCodestringPost code of the address.
townNamestringName of the town or city.
streetNamestringName of the street.
buildingNumberstringNumber of the building in the street.
namestringName of the building or place.
sortingCodestringAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstringPost office box.
administrativeAreastringRegion of the country, such as a canton or a state.
recipientsstring[]Names of the people the address is for.
organizationstringName of the organization at the address.
sourcestring[]Text the address was read from, one item per line.
internalIdstringerforderlichnicknamestringverificationobject4 untergeordnete Felder anzeigen
idstringerforderlichstatusstringerforderlichWerteverifiedpendingrejected
holderNamestringerforderlichdateTimestringdate-timeerforderlichcashAccountIdentificationsstring[]erforderlichapprovedCashAccountIdsstring[]erforderlichbankAccountIdstring | nullerforderlich{
"firestoreId": "Cp2nG7vB4xLq9wRt5hMz",
"workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
"creation": {
"creationDateTime": "2026-03-02T09:15:00.000Z",
"createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"activation": {
"enabled": true,
"updateDateTime": "2026-03-02T09:15:00.000Z",
"updatedBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"entityType": "individual",
"name": "string",
"phones": [
"string"
],
"emails": [
"string"
],
"address": {
"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"
]
},
"contactPersons": [
{
"name": "string",
"phone": "string",
"email": "string"
}
],
"taxIdentification": "string",
"notes": "string",
"cashAccounts": [
{
"identifications": [
{
"type": "bic",
"value": "string"
}
],
"currency": "CHF",
"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"
]
},
"internalId": "string",
"nickname": "string",
"verification": {
"id": "3f2c8a1e-6b4d-4e7a-9c15-8d2b7f0e4a61",
"status": "verified",
"holderName": "string",
"dateTime": "2026-03-02T09:30:00.000Z"
}
}
],
"cashAccountIdentifications": [
"string"
],
"approvedCashAccountIds": [
"string"
],
"bankAccountId": "string"
}/workspaces/{workspaceId}/counterpartiesList counterparties (customers, vendors) in the workspace
Bereichcounterparties: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.
activation.enabledbooleanWhether the resource is enabled.
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/counterparties' \
-H "Authorization: Bearer $SWAY_API_KEY"const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/counterparties', {
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/counterparties",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
)
print(response.json()){
"data": [
{
"firestoreId": "Cp2nG7vB4xLq9wRt5hMz",
"workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
"creation": {
"creationDateTime": "2026-03-02T09:15:00.000Z",
"createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"activation": {
"enabled": true,
"updateDateTime": "2026-03-02T09:15:00.000Z",
"updatedBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"entityType": "individual",
"name": "string",
"phones": [
"string"
],
"emails": [
"string"
],
"address": {…},
"contactPersons": […],
"taxIdentification": "string",
"notes": "string",
"cashAccounts": […],
"cashAccountIdentifications": [
"string"
],
"approvedCashAccountIds": [
"string"
],
"bankAccountId": "string"
}
],
"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}/counterpartiesCreate a counterparty or merge with an existing one
Bereichcounterparties: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
entityTypestringKind of entity: an individual or an organization.
individualA natural person.
organizationA company or another organization.
namestringerforderlichphonesstring[]erforderlichemailsstring[]erforderlichaddressPostalAddressPostal address, with the parts of an ISO 20022 postal address.
12 untergeordnete Felder anzeigen
countrystringerforderlichISO 3166-1 alpha-2 country code
postCodestringerforderlichPost code of the address.
townNamestringerforderlichName of the town or city.
streetNamestringName of the street.
buildingNumberstringNumber of the building in the street.
namestringName of the building or place.
sortingCodestringAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstringPost office box.
administrativeAreastringRegion of the country, such as a canton or a state.
recipientsstring[]Names of the people the address is for.
organizationstringName of the organization at the address.
sourcestring[]Text the address was read from, one item per line.
contactPersonsobject[]erforderlich3 untergeordnete Felder anzeigen
namestringerforderlichphonestringemailstringtaxIdentificationstringnotesstringcashAccountsobject[]erforderlich6 untergeordnete Felder anzeigen
identificationsobject[]erforderlich2 untergeordnete Felder anzeigen
typestringerforderlichKind of identifier of a bank account or of its bank.
14 Werte anzeigen
bicBank Identifier Code of the bank.
sortCodeSix-digit code of a bank and branch in the United Kingdom.
ibanInternational Bank Account Number.
bbanBasic Bank Account Number, the country-specific format of an account number.
accountNumberAccount number that the bank assigns, unique within the bank or the branch.
panPrimary Account Number, the number of a credit or debit card.
emailEmail address that identifies the account.
msisdnMobile phone number that identifies the account.
virtualAccountIdIdentifier of a virtual sub-account of a main account.
globalWalletIdentifier of a digital wallet that holds and pays in several currencies.
clabeCLABE, the 18-digit standardized bank code of a Mexican bank account.
bitcoinAddressSingle Bitcoin address, the only address the account tracks.
bitcoinXpubBitcoin extended public key (xpub, ypub or zpub), from which the addresses of the wallet are derived.
otherAnother kind of identifier.
valuestringerforderlichValue of the identifier, for example the IBAN or the BIC.
currencystringerforderlichISO 4217 currency code
bankAddressobjecterforderlich12 untergeordnete Felder anzeigen
countrystringerforderlichISO 3166-1 alpha-2 country code
postCodestringPost code of the address.
townNamestringName of the town or city.
streetNamestringName of the street.
buildingNumberstringNumber of the building in the street.
namestringName of the building or place.
sortingCodestringAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstringPost office box.
administrativeAreastringRegion of the country, such as a canton or a state.
recipientsstring[]Names of the people the address is for.
organizationstringName of the organization at the address.
sourcestring[]Text the address was read from, one item per line.
internalIdstringnicknamestringverificationobject4 untergeordnete Felder anzeigen
idstringerforderlichstatusstringerforderlichWerteverifiedpendingrejected
holderNamestringerforderlichdateTimestringdate-timeerforderlichbankAccountIdstring | nullmergebooleanerforderlichRückgabe
Successful response
curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/counterparties' \
-H "Authorization: Bearer $SWAY_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"entityType": "individual",
"name": "string",
"phones": [
"string"
],
"emails": [
"string"
],
"address": {
"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"
]
},
"contactPersons": [
{
"name": "string",
"phone": "string",
"email": "string"
}
],
"taxIdentification": "string",
"notes": "string",
"cashAccounts": [
{
"identifications": [
{
"type": "bic",
"value": "string"
}
],
"currency": "CHF",
"bankAddress": {
"country": "CH",
"postCode": "string",
"townName": "string",
"streetName": "string",
"buildingNumber": "string",
"name": "string",
"sortingCode": "string",
"postBox": "string",
"administrativeArea": "string",
"recipients": [
"string"
],
"organization": "string",
"source": [
"string"
]
},
"internalId": "string",
"nickname": "string",
"verification": {
"id": "3f2c8a1e-6b4d-4e7a-9c15-8d2b7f0e4a61",
"status": "verified",
"holderName": "string",
"dateTime": "2026-03-02T09:30:00.000Z"
}
}
],
"bankAccountId": "string",
"merge": true
}'const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/counterparties', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"entityType": "individual",
"name": "string",
"phones": [
"string"
],
"emails": [
"string"
],
"address": {
"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"
]
},
"contactPersons": [
{
"name": "string",
"phone": "string",
"email": "string"
}
],
"taxIdentification": "string",
"notes": "string",
"cashAccounts": [
{
"identifications": [
{
"type": "bic",
"value": "string"
}
],
"currency": "CHF",
"bankAddress": {
"country": "CH",
"postCode": "string",
"townName": "string",
"streetName": "string",
"buildingNumber": "string",
"name": "string",
"sortingCode": "string",
"postBox": "string",
"administrativeArea": "string",
"recipients": [
"string"
],
"organization": "string",
"source": [
"string"
]
},
"internalId": "string",
"nickname": "string",
"verification": {
"id": "3f2c8a1e-6b4d-4e7a-9c15-8d2b7f0e4a61",
"status": "verified",
"holderName": "string",
"dateTime": "2026-03-02T09:30:00.000Z"
}
}
],
"bankAccountId": "string",
"merge": true
}),
});
console.log(await response.json());import os
import requests
response = requests.post(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/counterparties",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
json={
"entityType": "individual",
"name": "string",
"phones": [
"string",
],
"emails": [
"string",
],
"address": {
"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",
],
},
"contactPersons": [
{
"name": "string",
"phone": "string",
"email": "string",
},
],
"taxIdentification": "string",
"notes": "string",
"cashAccounts": [
{
"identifications": [
{
"type": "bic",
"value": "string",
},
],
"currency": "CHF",
"bankAddress": {
"country": "CH",
"postCode": "string",
"townName": "string",
"streetName": "string",
"buildingNumber": "string",
"name": "string",
"sortingCode": "string",
"postBox": "string",
"administrativeArea": "string",
"recipients": [
"string",
],
"organization": "string",
"source": [
"string",
],
},
"internalId": "string",
"nickname": "string",
"verification": {
"id": "3f2c8a1e-6b4d-4e7a-9c15-8d2b7f0e4a61",
"status": "verified",
"holderName": "string",
"dateTime": "2026-03-02T09:30:00.000Z",
},
},
],
"bankAccountId": "string",
"merge": True,
},
)
print(response.json()){
"data": {
"firestoreId": "Cp2nG7vB4xLq9wRt5hMz",
"workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
"creation": {
"creationDateTime": "2026-03-02T09:15:00.000Z",
"createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"activation": {
"enabled": true,
"updateDateTime": "2026-03-02T09:15:00.000Z",
"updatedBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"entityType": "individual",
"name": "string",
"phones": [
"string"
],
"emails": [
"string"
],
"address": {…},
"contactPersons": […],
"taxIdentification": "string",
"notes": "string",
"cashAccounts": […],
"cashAccountIdentifications": [
"string"
],
"approvedCashAccountIds": [
"string"
],
"bankAccountId": "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}/counterparties/searchSearch counterparties by name or other attributes
Bereichcounterparties: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.
querystringerforderlichpageintegerStandard0
sizeintegerStandard20
Rückgabe
Successful response
curl 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/counterparties/search?query=string' \
-H "Authorization: Bearer $SWAY_API_KEY"const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/counterparties/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/counterparties/search?query=string",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
)
print(response.json()){
"data": [
{
"firestoreId": "Cp2nG7vB4xLq9wRt5hMz",
"workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
"creation": {
"creationDateTime": "2026-03-02T09:15:00.000Z",
"createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"activation": {
"enabled": true,
"updateDateTime": "2026-03-02T09:15:00.000Z",
"updatedBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"entityType": "individual",
"name": "string",
"phones": [
"string"
],
"emails": [
"string"
],
"address": {…},
"contactPersons": […],
"taxIdentification": "string",
"notes": "string",
"cashAccounts": […],
"cashAccountIdentifications": [
"string"
],
"approvedCashAccountIds": [
"string"
],
"bankAccountId": "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}/counterparties/{counterpartyId}Update a counterparty
Bereichcounterparties:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
counterpartyIdstringerforderlichID of the counterparty.
Request-Body
entityTypestring | nullKind of entity: an individual or an organization.
individualA natural person.
organizationA company or another organization.
namestring | nullphonesstring[] | nullemailsstring[] | nulladdressPostalAddress | nullPostal address, with the parts of an ISO 20022 postal address.
12 untergeordnete Felder anzeigen
countrystringerforderlichISO 3166-1 alpha-2 country code
postCodestringerforderlichPost code of the address.
townNamestringerforderlichName of the town or city.
streetNamestringName of the street.
buildingNumberstringNumber of the building in the street.
namestringName of the building or place.
sortingCodestringAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstringPost office box.
administrativeAreastringRegion of the country, such as a canton or a state.
recipientsstring[]Names of the people the address is for.
organizationstringName of the organization at the address.
sourcestring[]Text the address was read from, one item per line.
contactPersonsobject[] | null3 untergeordnete Felder anzeigen
namestringerforderlichphonestringemailstringtaxIdentificationstring | nullnotesstring | nullnewCashAccountsobject[] | null6 untergeordnete Felder anzeigen
identificationsobject[]erforderlich2 untergeordnete Felder anzeigen
typestringerforderlichKind of identifier of a bank account or of its bank.
14 Werte anzeigen
bicBank Identifier Code of the bank.
sortCodeSix-digit code of a bank and branch in the United Kingdom.
ibanInternational Bank Account Number.
bbanBasic Bank Account Number, the country-specific format of an account number.
accountNumberAccount number that the bank assigns, unique within the bank or the branch.
panPrimary Account Number, the number of a credit or debit card.
emailEmail address that identifies the account.
msisdnMobile phone number that identifies the account.
virtualAccountIdIdentifier of a virtual sub-account of a main account.
globalWalletIdentifier of a digital wallet that holds and pays in several currencies.
clabeCLABE, the 18-digit standardized bank code of a Mexican bank account.
bitcoinAddressSingle Bitcoin address, the only address the account tracks.
bitcoinXpubBitcoin extended public key (xpub, ypub or zpub), from which the addresses of the wallet are derived.
otherAnother kind of identifier.
valuestringerforderlichValue of the identifier, for example the IBAN or the BIC.
currencystringerforderlichISO 4217 currency code
bankAddressobjecterforderlich12 untergeordnete Felder anzeigen
countrystringerforderlichISO 3166-1 alpha-2 country code
postCodestringPost code of the address.
townNamestringName of the town or city.
streetNamestringName of the street.
buildingNumberstringNumber of the building in the street.
namestringName of the building or place.
sortingCodestringAdditional sorting code of the postal service, used in a few countries such as France.
postBoxstringPost office box.
administrativeAreastringRegion of the country, such as a canton or a state.
recipientsstring[]Names of the people the address is for.
organizationstringName of the organization at the address.
sourcestring[]Text the address was read from, one item per line.
internalIdstringnicknamestringverificationobject4 untergeordnete Felder anzeigen
idstringerforderlichstatusstringerforderlichWerteverifiedpendingrejected
holderNamestringerforderlichdateTimestringdate-timeerforderlichcashAccountUpdatesobject[] | null2 untergeordnete Felder anzeigen
internalIdstringerforderlichbicstringerforderlichRückgabe
No content
curl -X PATCH 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/counterparties/Cp2nG7vB4xLq9wRt5hMz' \
-H "Authorization: Bearer $SWAY_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"entityType": "individual",
"address": {
"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"
]
}
}'const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/counterparties/Cp2nG7vB4xLq9wRt5hMz', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"entityType": "individual",
"address": {
"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"
]
}
}),
});
console.log(response.status);import os
import requests
response = requests.patch(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/counterparties/Cp2nG7vB4xLq9wRt5hMz",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
json={
"entityType": "individual",
"address": {
"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",
],
},
},
)
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}/counterparties/{counterpartyId}Delete (soft-delete) a counterparty
Bereichcounterparties:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
counterpartyIdstringerforderlichID of the counterparty.
Rückgabe
No content
curl -X DELETE 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/counterparties/Cp2nG7vB4xLq9wRt5hMz' \
-H "Authorization: Bearer $SWAY_API_KEY"const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/counterparties/Cp2nG7vB4xLq9wRt5hMz', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
},
});
console.log(response.status);import os
import requests
response = requests.delete(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/counterparties/Cp2nG7vB4xLq9wRt5hMz",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
)
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}/counterparties/{counterpartyId}/restoreRestore a previously deleted counterparty
Bereichcounterparties:write
Pfadparameter
workspaceIdstringerforderlichID of the workspace.
counterpartyIdstringerforderlichID of the counterparty.
Abfrageparameter
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Rückgabe
Successful response
curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/counterparties/Cp2nG7vB4xLq9wRt5hMz/restore' \
-H "Authorization: Bearer $SWAY_API_KEY"const response = await fetch('https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/counterparties/Cp2nG7vB4xLq9wRt5hMz/restore', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SWAY_API_KEY}`,
},
});
console.log(await response.json());import os
import requests
response = requests.post(
"https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/counterparties/Cp2nG7vB4xLq9wRt5hMz/restore",
headers={"Authorization": f"Bearer {os.environ['SWAY_API_KEY']}"},
)
print(response.json()){
"data": {
"firestoreId": "Cp2nG7vB4xLq9wRt5hMz",
"workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
"creation": {
"creationDateTime": "2026-03-02T09:15:00.000Z",
"createdBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"activation": {
"enabled": true,
"updateDateTime": "2026-03-02T09:15:00.000Z",
"updatedBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
},
"entityType": "individual",
"name": "string",
"phones": [
"string"
],
"emails": [
"string"
],
"address": {…},
"contactPersons": […],
"taxIdentification": "string",
"notes": "string",
"cashAccounts": […],
"cashAccountIdentifications": [
"string"
],
"approvedCashAccountIds": [
"string"
],
"bankAccountId": "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"
}
}