Skip to main content
POST
/
v1
/
counterparty
Create counterparty
curl --request POST \
  --url http://localhost:3001/v1/counterparty \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "[email protected]",
  "name": "John Doe",
  "description": "Supplier for monthly raw material",
  "vat": "GB123456789",
  "accountsPayableNumber": 30001,
  "accountsReceivableNumber": 10001,
  "street": "Main Street 123",
  "city": "Vienna",
  "zip": "1010",
  "country": "AT",
  "paymentTermsDays": 30,
  "skontoPercentage": 2.5,
  "skontoDays": 10,
  "defaultLedgerAccount": "0000 - Ledger Account Name",
  "bankAccount": {
    "name": "<string>",
    "iban": "<string>"
  },
  "trusted": true,
  "paymentReminderEmails": "<string>"
}'
{
  "id": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "email": "<string>",
  "name": "<string>",
  "markedTrusted": true,
  "markedTrustedDate": "2023-11-07T05:31:56Z",
  "markedTrustedUser": {
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "email": "<string>",
    "name": "<string>",
    "authId": "<string>",
    "role": "<string>",
    "hasPushNotification": true,
    "organization": {
      "id": "<any>",
      "createdAt": "<any>",
      "updatedAt": "<any>",
      "name": "<any>",
      "slug": "<any>",
      "logoFileName": "<any>",
      "country": "<any>",
      "vatNumber": "<any>",
      "featureFlags": "<any>"
    }
  },
  "description": "<string>",
  "vat": "<string>",
  "accountsPayableNumber": "22 0391919",
  "street": "<string>",
  "city": "<string>",
  "zip": "<string>",
  "country": "<string>",
  "paymentTermsDays": 123,
  "skontoPercentage": 123,
  "skontoDays": 123,
  "organization": {
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "name": "<string>",
    "slug": "<string>",
    "logoFileName": "<string>",
    "country": "<string>",
    "vatNumber": "<string>",
    "featureFlags": [
      "<any>"
    ]
  },
  "bankAccount": {
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "name": "<string>",
    "iban": "<string>",
    "bic": "<string>",
    "countryCode": "<string>",
    "address": "<string>"
  },
  "bankAccountVerification": {
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "bankAccount": {
      "id": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "name": "<string>",
      "iban": "<string>",
      "bic": "<string>",
      "countryCode": "<string>",
      "address": "<string>"
    },
    "paymentProvider": "<string>",
    "status": "VALID",
    "initializedAt": "2023-11-07T05:31:56Z",
    "mailTrackings": {
      "id": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "version": 123,
      "type": "ONBOARDING",
      "status": "ACCEPTED"
    },
    "fullName": "<string>"
  },
  "transactions": {
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "amount": 123,
    "remittanceInformation": "<string>",
    "requestedExecutionDate": "2023-11-07T05:31:56Z",
    "skontoAmount": 123,
    "skontoDate": "2023-11-07T05:31:56Z",
    "ignoreSkontoDeadline": true,
    "creditor": {
      "id": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "name": "<string>",
      "iban": "<string>",
      "bic": "<string>",
      "countryCode": "<string>",
      "address": "<string>"
    },
    "debitor": {
      "id": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "name": "<string>",
      "iban": "<string>",
      "bic": "<string>",
      "countryCode": "<string>",
      "address": "<string>"
    },
    "analysis": {
      "id": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "analysisRules": {
        "id": "<string>",
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z",
        "type": "AMOUNT_DEVIATION",
        "severity": "NORMAL",
        "markedOk": true,
        "markedOkReason": "<string>",
        "markedOkDate": "2023-11-07T05:31:56Z",
        "value": "<string>",
        "markedOkUser": {
          "id": "<string>",
          "createdAt": "2023-11-07T05:31:56Z",
          "updatedAt": "2023-11-07T05:31:56Z",
          "email": "<string>",
          "name": "<string>",
          "authId": "<string>",
          "role": "<string>",
          "hasPushNotification": true,
          "organization": {
            "id": "<any>",
            "createdAt": "<any>",
            "updatedAt": "<any>",
            "name": "<any>",
            "slug": "<any>",
            "logoFileName": "<any>",
            "country": "<any>",
            "vatNumber": "<any>",
            "featureFlags": "<any>"
          }
        }
      },
      "customRules": {
        "id": "<string>",
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z",
        "name": "<string>",
        "description": "<string>",
        "rule": "<string>",
        "twoFactorCheck": true,
        "accountCheck": true,
        "deleted": true,
        "active": true,
        "organization": {
          "id": "<string>",
          "createdAt": "2023-11-07T05:31:56Z",
          "updatedAt": "2023-11-07T05:31:56Z",
          "name": "<string>",
          "slug": "<string>",
          "logoFileName": "<string>",
          "country": "<string>",
          "vatNumber": "<string>",
          "featureFlags": [
            "<any>"
          ]
        }
      }
    },
    "archived": true,
    "archivedDate": "2023-11-07T05:31:56Z",
    "archivedByUser": {
      "id": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "email": "<string>",
      "name": "<string>",
      "authId": "<string>",
      "role": "<string>",
      "hasPushNotification": true,
      "organization": {
        "id": "<any>",
        "createdAt": "<any>",
        "updatedAt": "<any>",
        "name": "<any>",
        "slug": "<any>",
        "logoFileName": "<any>",
        "country": "<any>",
        "vatNumber": "<any>",
        "featureFlags": "<any>"
      }
    },
    "paymentRun": {
      "id": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "createdById": "<string>",
      "createdByName": "<string>",
      "organizationId": "<string>",
      "sumAmount": 123,
      "sumAmountWithSkonto": 123,
      "sumBookedAmount": 123,
      "transactionCount": 123
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
email
string

The email of the counterparty. Bank Account Verification email will be sent to this address.

name
string

Name of the counterparty.

Example:

"John Doe"

description
string

Description of the counterparty to.

Example:

"Supplier for monthly raw material"

vat
string

VAT number used in the EU if the counterparty is a company

Example:

"GB123456789"

accountsPayableNumber
number

Accounts payable number of the counterparty. Used in bookkeeping.

Example:

30001

accountsReceivableNumber
number

Accounts receivable number of the counterparty. Used in bookkeeping.

Example:

10001

street
string

Street name and number of the counterparty.

Example:

"Main Street 123"

city
string

City of the counterparty.

Example:

"Vienna"

zip
string

ZIP or postal code of the counterparty.

Example:

"1010"

country
string

Country of the counterparty using ISO 3166-1 alpha-2 code.

Example:

"AT"

paymentTermsDays
number

Payment term in days

Example:

30

skontoPercentage
number

Early payment discount percentage

Example:

2.5

skontoDays
number

Days for early payment discount

Example:

10

defaultLedgerAccount
string

Default ledger account of the counterparty. Used in invoices.

Example:

"0000 - Ledger Account Name"

bankAccount
object

Bank account of the counterparty

trusted
boolean

If the counterparty is trusted or not

paymentReminderEmails
string

Email addresses for payment reminders, separated by commas

Response

email
string
required

The email of the counterparty.

name
string
required

The name of the counterparty.

markedTrusted
boolean
required

Determines if the counterparty has been marked as trusted.

markedTrustedDate
string<date-time>
required

The date and time the counterparty was marked as trusted.

markedTrustedUser
object
required

The user that marked the counterparty as trusted.

description
string
required

The description of the counterparty.

vat
string
required

The EU VAT number of the counterparty.

accountsPayableNumber
string
required

Accounts payable number of the counterparty. Used in bookkeeping.

Example:

"22 0391919"

street
string
required

Street name and number of the counterparty.

city
string
required

City of the counterparty.

zip
string
required

ZIP or postal code of the counterparty.

country
string
required

Country of the counterparty using ISO 3166-1 alpha-2 code.

paymentTermsDays
number
required

Payment term in days

skontoPercentage
number
required

Early payment discount percentage

skontoDays
number
required

Days for early payment discount

organization
object
required

The organization of the counterparty.

bankAccount
object
required

The bank account of the counterparty.

bankAccountVerification
object
required

The verification of the counterpartys bank account.

transactions
object
required

The transactions of the counterparty.

id
string

The unique identifier of the entity.

createdAt
string<date-time>

The date and time the entity was created.

updatedAt
string<date-time>

The date and time the entity was last updated.