Zum Inhalt springen
Ressource · Billing

Counterparties

A counterparty is a customer or a supplier the workspace trades with.

counterparties:readcounterparties:write
MethodePfadZusammenfassung
GET…/counterpartiesList counterparties (customers, vendors) in the workspace
POST…/counterpartiesCreate a counterparty or merge with an existing one
GET…/counterparties/searchSearch counterparties by name or other attributes
PATCH…/counterparties/{counterpartyId}Update a counterparty
DELETE…/counterparties/{counterpartyId}Delete (soft-delete) a counterparty
POST…/counterparties/{counterpartyId}/restoreRestore a previously deleted counterparty

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

Das Objekt Counterparty

firestoreIdstringerforderlich

ID of the counterparty.

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.

activationobjecterforderlich

Whether the resource is enabled, and when and by whom it was last enabled or disabled.

3 untergeordnete Felder anzeigen
enabledbooleanerforderlich

Whether the resource is enabled.

updateDateTimestringdate-timeerforderlich

Date and time when enabled was last set.

updatedBystring

ID of the user who last set enabled, when recorded.

entityTypestring

Kind of entity: an individual or an organization.

  • individual

    A natural person.

  • organization

    A company or another organization.

namestringerforderlich
phonesstring[]erforderlich
Alle 16 Felder anzeigen
emailsstring[]erforderlich
addressPostalAddress

Postal address, with the parts of an ISO 20022 postal address.

12 untergeordnete Felder anzeigen
countrystringerforderlich

ISO 3166-1 alpha-2 country code

postCodestringerforderlich

Post code of the address.

townNamestringerforderlich

Name of the town or city.

streetNamestring

Name of the street.

buildingNumberstring

Number of the building in the street.

namestring

Name of the building or place.

sortingCodestring

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

postBoxstring

Post office box.

administrativeAreastring

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

recipientsstring[]

Names of the people the address is for.

organizationstring

Name of the organization at the address.

sourcestring[]

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

contactPersonsobject[]erforderlich
3 untergeordnete Felder anzeigen
namestringerforderlich
phonestring
emailstring
taxIdentificationstring
notesstring
cashAccountsobject[]erforderlich
6 untergeordnete Felder anzeigen
identificationsobject[]erforderlich
2 untergeordnete Felder anzeigen
typestringerforderlich

Kind of identifier of a bank account or of its bank.

14 Werte anzeigen
  • bic

    Bank Identifier Code of the bank.

  • sortCode

    Six-digit code of a bank and branch in the United Kingdom.

  • iban

    International Bank Account Number.

  • bban

    Basic Bank Account Number, the country-specific format of an account number.

  • accountNumber

    Account number that the bank assigns, unique within the bank or the branch.

  • pan

    Primary Account Number, the number of a credit or debit card.

  • email

    Email address that identifies the account.

  • msisdn

    Mobile phone number that identifies the account.

  • virtualAccountId

    Identifier of a virtual sub-account of a main account.

  • globalWallet

    Identifier of a digital wallet that holds and pays in several currencies.

  • clabe

    CLABE, the 18-digit standardized bank code of a Mexican bank account.

  • bitcoinAddress

    Single Bitcoin address, the only address the account tracks.

  • bitcoinXpub

    Bitcoin extended public key (xpub, ypub or zpub), from which the addresses of the wallet are derived.

  • other

    Another kind of identifier.

valuestringerforderlich

Value of the identifier, for example the IBAN or the BIC.

currencystringerforderlich

ISO 4217 currency code

bankAddressobjecterforderlich
12 untergeordnete Felder anzeigen
countrystringerforderlich

ISO 3166-1 alpha-2 country code

postCodestring

Post code of the address.

townNamestring

Name of the town or city.

streetNamestring

Name of the street.

buildingNumberstring

Number of the building in the street.

namestring

Name of the building or place.

sortingCodestring

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

postBoxstring

Post office box.

administrativeAreastring

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

recipientsstring[]

Names of the people the address is for.

organizationstring

Name of the organization at the address.

sourcestring[]

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

internalIdstringerforderlich
nicknamestring
verificationobject
4 untergeordnete Felder anzeigen
idstringerforderlich
statusstringerforderlich

Werteverifiedpendingrejected

holderNamestringerforderlich
dateTimestringdate-timeerforderlich
cashAccountIdentificationsstring[]erforderlich
approvedCashAccountIdsstring[]erforderlich
bankAccountIdstring | nullerforderlich
Das Objekt Counterparty
{
  "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"
}
GET/workspaces/{workspaceId}/counterparties

List counterparties (customers, vendors) in the workspace

Bereichcounterparties: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.

activation.enabledboolean

Whether the resource is enabled.

Rückgabe

200

List of items

dataCounterparty[]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/counterparties' \
  -H "Authorization: Bearer $SWAY_API_KEY"
{
  "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"
}
POST/workspaces/{workspaceId}/counterparties

Create a counterparty or merge with an existing one

Bereichcounterparties: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

entityTypestring

Kind of entity: an individual or an organization.

  • individual

    A natural person.

  • organization

    A company or another organization.

namestringerforderlich
phonesstring[]erforderlich
emailsstring[]erforderlich
addressPostalAddress

Postal address, with the parts of an ISO 20022 postal address.

12 untergeordnete Felder anzeigen
countrystringerforderlich

ISO 3166-1 alpha-2 country code

postCodestringerforderlich

Post code of the address.

townNamestringerforderlich

Name of the town or city.

streetNamestring

Name of the street.

buildingNumberstring

Number of the building in the street.

namestring

Name of the building or place.

sortingCodestring

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

postBoxstring

Post office box.

administrativeAreastring

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

recipientsstring[]

Names of the people the address is for.

organizationstring

Name of the organization at the address.

sourcestring[]

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

contactPersonsobject[]erforderlich
3 untergeordnete Felder anzeigen
namestringerforderlich
phonestring
emailstring
taxIdentificationstring
notesstring
cashAccountsobject[]erforderlich
6 untergeordnete Felder anzeigen
identificationsobject[]erforderlich
2 untergeordnete Felder anzeigen
typestringerforderlich

Kind of identifier of a bank account or of its bank.

14 Werte anzeigen
  • bic

    Bank Identifier Code of the bank.

  • sortCode

    Six-digit code of a bank and branch in the United Kingdom.

  • iban

    International Bank Account Number.

  • bban

    Basic Bank Account Number, the country-specific format of an account number.

  • accountNumber

    Account number that the bank assigns, unique within the bank or the branch.

  • pan

    Primary Account Number, the number of a credit or debit card.

  • email

    Email address that identifies the account.

  • msisdn

    Mobile phone number that identifies the account.

  • virtualAccountId

    Identifier of a virtual sub-account of a main account.

  • globalWallet

    Identifier of a digital wallet that holds and pays in several currencies.

  • clabe

    CLABE, the 18-digit standardized bank code of a Mexican bank account.

  • bitcoinAddress

    Single Bitcoin address, the only address the account tracks.

  • bitcoinXpub

    Bitcoin extended public key (xpub, ypub or zpub), from which the addresses of the wallet are derived.

  • other

    Another kind of identifier.

valuestringerforderlich

Value of the identifier, for example the IBAN or the BIC.

currencystringerforderlich

ISO 4217 currency code

bankAddressobjecterforderlich
12 untergeordnete Felder anzeigen
countrystringerforderlich

ISO 3166-1 alpha-2 country code

postCodestring

Post code of the address.

townNamestring

Name of the town or city.

streetNamestring

Name of the street.

buildingNumberstring

Number of the building in the street.

namestring

Name of the building or place.

sortingCodestring

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

postBoxstring

Post office box.

administrativeAreastring

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

recipientsstring[]

Names of the people the address is for.

organizationstring

Name of the organization at the address.

sourcestring[]

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

internalIdstring
nicknamestring
verificationobject
4 untergeordnete Felder anzeigen
idstringerforderlich
statusstringerforderlich

Werteverifiedpendingrejected

holderNamestringerforderlich
dateTimestringdate-timeerforderlich
bankAccountIdstring | null
mergebooleanerforderlich

Rückgabe

200

Successful response

dataCounterpartyerforderlich
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
}'
{
  "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"
  }
}
PATCH/workspaces/{workspaceId}/counterparties/{counterpartyId}

Update a counterparty

Bereichcounterparties:write

Pfadparameter

workspaceIdstringerforderlich

ID of the workspace.

counterpartyIdstringerforderlich

ID of the counterparty.

Request-Body

entityTypestring | null

Kind of entity: an individual or an organization.

  • individual

    A natural person.

  • organization

    A company or another organization.

namestring | null
phonesstring[] | null
emailsstring[] | null
addressPostalAddress | null

Postal address, with the parts of an ISO 20022 postal address.

12 untergeordnete Felder anzeigen
countrystringerforderlich

ISO 3166-1 alpha-2 country code

postCodestringerforderlich

Post code of the address.

townNamestringerforderlich

Name of the town or city.

streetNamestring

Name of the street.

buildingNumberstring

Number of the building in the street.

namestring

Name of the building or place.

sortingCodestring

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

postBoxstring

Post office box.

administrativeAreastring

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

recipientsstring[]

Names of the people the address is for.

organizationstring

Name of the organization at the address.

sourcestring[]

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

contactPersonsobject[] | null
3 untergeordnete Felder anzeigen
namestringerforderlich
phonestring
emailstring
taxIdentificationstring | null
notesstring | null
newCashAccountsobject[] | null
6 untergeordnete Felder anzeigen
identificationsobject[]erforderlich
2 untergeordnete Felder anzeigen
typestringerforderlich

Kind of identifier of a bank account or of its bank.

14 Werte anzeigen
  • bic

    Bank Identifier Code of the bank.

  • sortCode

    Six-digit code of a bank and branch in the United Kingdom.

  • iban

    International Bank Account Number.

  • bban

    Basic Bank Account Number, the country-specific format of an account number.

  • accountNumber

    Account number that the bank assigns, unique within the bank or the branch.

  • pan

    Primary Account Number, the number of a credit or debit card.

  • email

    Email address that identifies the account.

  • msisdn

    Mobile phone number that identifies the account.

  • virtualAccountId

    Identifier of a virtual sub-account of a main account.

  • globalWallet

    Identifier of a digital wallet that holds and pays in several currencies.

  • clabe

    CLABE, the 18-digit standardized bank code of a Mexican bank account.

  • bitcoinAddress

    Single Bitcoin address, the only address the account tracks.

  • bitcoinXpub

    Bitcoin extended public key (xpub, ypub or zpub), from which the addresses of the wallet are derived.

  • other

    Another kind of identifier.

valuestringerforderlich

Value of the identifier, for example the IBAN or the BIC.

currencystringerforderlich

ISO 4217 currency code

bankAddressobjecterforderlich
12 untergeordnete Felder anzeigen
countrystringerforderlich

ISO 3166-1 alpha-2 country code

postCodestring

Post code of the address.

townNamestring

Name of the town or city.

streetNamestring

Name of the street.

buildingNumberstring

Number of the building in the street.

namestring

Name of the building or place.

sortingCodestring

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

postBoxstring

Post office box.

administrativeAreastring

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

recipientsstring[]

Names of the people the address is for.

organizationstring

Name of the organization at the address.

sourcestring[]

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

internalIdstring
nicknamestring
verificationobject
4 untergeordnete Felder anzeigen
idstringerforderlich
statusstringerforderlich

Werteverifiedpendingrejected

holderNamestringerforderlich
dateTimestringdate-timeerforderlich
cashAccountUpdatesobject[] | null
2 untergeordnete Felder anzeigen
internalIdstringerforderlich
bicstringerforderlich

Rückgabe

204

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"
    ]
  }
}'
{
  "error": {
    "code": "invalid-argument",
    "message": "Invalid request"
  }
}
DELETE/workspaces/{workspaceId}/counterparties/{counterpartyId}

Delete (soft-delete) a counterparty

Bereichcounterparties:write

Pfadparameter

workspaceIdstringerforderlich

ID of the workspace.

counterpartyIdstringerforderlich

ID of the counterparty.

Rückgabe

204

No content

curl -X DELETE 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/counterparties/Cp2nG7vB4xLq9wRt5hMz' \
  -H "Authorization: Bearer $SWAY_API_KEY"
{
  "error": {
    "code": "invalid-argument",
    "message": "Invalid request"
  }
}
POST/workspaces/{workspaceId}/counterparties/{counterpartyId}/restore

Restore a previously deleted counterparty

Bereichcounterparties:write

Pfadparameter

workspaceIdstringerforderlich

ID of the workspace.

counterpartyIdstringerforderlich

ID of the counterparty.

Abfrageparameter

fieldsstring

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

Rückgabe

200

Successful response

dataCounterpartyerforderlich
curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/counterparties/Cp2nG7vB4xLq9wRt5hMz/restore' \
  -H "Authorization: Bearer $SWAY_API_KEY"
{
  "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"
  }
}

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.