| Méthode | Chemin | Résumé |
|---|---|---|
| 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 |
Les chemins commencent par /workspaces/{workspaceId}. Les endpoints GET demandent counterparties:read, les autres counterparties:write.
L’objet Counterparty
firestoreIdstringobligatoireID of the counterparty.
workspaceIdstringobligatoireID of the workspace.
creationobjectobligatoireWhen and by whom the resource was created.
Afficher les 2 champs enfants
creationDateTimestringdate-timeobligatoireDate and time when the resource was created.
createdBystringID of the user who created the resource, when recorded.
activationobjectobligatoireWhether the resource is enabled, and when and by whom it was last enabled or disabled.
Afficher les 3 champs enfants
enabledbooleanobligatoireWhether the resource is enabled.
updateDateTimestringdate-timeobligatoireDate 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.
namestringobligatoirephonesstring[]obligatoireAfficher les 16 champsMasquer la liste des champs
emailsstring[]obligatoireaddressPostalAddressPostal address, with the parts of an ISO 20022 postal address.
Afficher les 12 champs enfants
countrystringobligatoireISO 3166-1 alpha-2 country code
postCodestringobligatoirePost code of the address.
townNamestringobligatoireName 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[]obligatoireAfficher les 3 champs enfants
namestringobligatoirephonestringemailstringtaxIdentificationstringnotesstringcashAccountsobject[]obligatoireAfficher les 6 champs enfants
identificationsobject[]obligatoireAfficher les 2 champs enfants
typestringobligatoireKind of identifier of a bank account or of its bank.
Afficher les 14 valeurs
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.
valuestringobligatoireValue of the identifier, for example the IBAN or the BIC.
currencystringobligatoireISO 4217 currency code
bankAddressobjectobligatoireAfficher les 12 champs enfants
countrystringobligatoireISO 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.
internalIdstringobligatoirenicknamestringverificationobjectAfficher les 4 champs enfants
idstringobligatoirestatusstringobligatoireValeursverifiedpendingrejected
holderNamestringobligatoiredateTimestringdate-timeobligatoirecashAccountIdentificationsstring[]obligatoireapprovedCashAccountIdsstring[]obligatoirebankAccountIdstring | nullobligatoire{
"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
Portéecounterparties:read
Paramètres de chemin
workspaceIdstringobligatoireID of the workspace.
Paramètres de requête
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.
Par défaut20
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.
Renvoie
List of items
Items of the page, in list order.
limitintegerobligatoirePage 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
Portéecounterparties:write
Paramètres de chemin
workspaceIdstringobligatoireID of the workspace.
Paramètres de requête
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Corps de la requête
entityTypestringKind of entity: an individual or an organization.
individualA natural person.
organizationA company or another organization.
namestringobligatoirephonesstring[]obligatoireemailsstring[]obligatoireaddressPostalAddressPostal address, with the parts of an ISO 20022 postal address.
Afficher les 12 champs enfants
countrystringobligatoireISO 3166-1 alpha-2 country code
postCodestringobligatoirePost code of the address.
townNamestringobligatoireName 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[]obligatoireAfficher les 3 champs enfants
namestringobligatoirephonestringemailstringtaxIdentificationstringnotesstringcashAccountsobject[]obligatoireAfficher les 6 champs enfants
identificationsobject[]obligatoireAfficher les 2 champs enfants
typestringobligatoireKind of identifier of a bank account or of its bank.
Afficher les 14 valeurs
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.
valuestringobligatoireValue of the identifier, for example the IBAN or the BIC.
currencystringobligatoireISO 4217 currency code
bankAddressobjectobligatoireAfficher les 12 champs enfants
countrystringobligatoireISO 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.
internalIdstringnicknamestringverificationobjectAfficher les 4 champs enfants
idstringobligatoirestatusstringobligatoireValeursverifiedpendingrejected
holderNamestringobligatoiredateTimestringdate-timeobligatoirebankAccountIdstring | nullmergebooleanobligatoireRenvoie
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
Portéecounterparties:read
Paramètres de chemin
workspaceIdstringobligatoireID of the workspace.
Paramètres de requête
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
querystringobligatoirepageintegerPar défaut0
sizeintegerPar défaut20
Renvoie
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
Portéecounterparties:write
Paramètres de chemin
workspaceIdstringobligatoireID of the workspace.
counterpartyIdstringobligatoireID of the counterparty.
Corps de la requête
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.
Afficher les 12 champs enfants
countrystringobligatoireISO 3166-1 alpha-2 country code
postCodestringobligatoirePost code of the address.
townNamestringobligatoireName 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[] | nullAfficher les 3 champs enfants
namestringobligatoirephonestringemailstringtaxIdentificationstring | nullnotesstring | nullnewCashAccountsobject[] | nullAfficher les 6 champs enfants
identificationsobject[]obligatoireAfficher les 2 champs enfants
typestringobligatoireKind of identifier of a bank account or of its bank.
Afficher les 14 valeurs
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.
valuestringobligatoireValue of the identifier, for example the IBAN or the BIC.
currencystringobligatoireISO 4217 currency code
bankAddressobjectobligatoireAfficher les 12 champs enfants
countrystringobligatoireISO 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.
internalIdstringnicknamestringverificationobjectAfficher les 4 champs enfants
idstringobligatoirestatusstringobligatoireValeursverifiedpendingrejected
holderNamestringobligatoiredateTimestringdate-timeobligatoirecashAccountUpdatesobject[] | nullAfficher les 2 champs enfants
internalIdstringobligatoirebicstringobligatoireRenvoie
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
Portéecounterparties:write
Paramètres de chemin
workspaceIdstringobligatoireID of the workspace.
counterpartyIdstringobligatoireID of the counterparty.
Renvoie
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
Portéecounterparties:write
Paramètres de chemin
workspaceIdstringobligatoireID of the workspace.
counterpartyIdstringobligatoireID of the counterparty.
Paramètres de requête
fieldsstringComma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.
Renvoie
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"
}
}