Skip to main content
POST
/
v1
/
counterparties
Create a Counterparty
curl --request POST \
  --url https://api.bookeeping.ai/public-api/v1/counterparties \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "accountName": "<string>",
  "accountNumber": "<string>",
  "type": "customer",
  "email": "jsmith@example.com",
  "otherEmails": [
    "jsmith@example.com"
  ],
  "phone": "<string>",
  "address": {},
  "taxId": "<string>"
}
'
{
  "message": "<string>",
  "metaData": {
    "warnings": [
      "<string>"
    ]
  },
  "data": {
    "_id": "<string>",
    "projectId": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "accountName": "<string>",
    "accountNumber": "<string>",
    "email": "jsmith@example.com",
    "phone": "<string>",
    "otherEmails": [
      "jsmith@example.com"
    ],
    "type": "customer",
    "taxId": "<string>",
    "address": {}
  }
}

Authorizations

Authorization
string
header
required

API key for authentication. Get your key from the Dashboard > Settings > API Access.

Body

application/json
accountName
string
required

The account name of the counterparty

accountNumber
string
required

The account number of the counterparty

type
enum<string>
required

The type of the counterparty

Available options:
customer,
vendor,
both
email
string<email> | null
otherEmails
string<email>[] | null
phone
string | null
address
object

The address of the counterparty

taxId
string | null

Response

Create a Counterparty executed successfully

message
string

Success message

metaData
object
data
object