POST
/
api
/
customers
{
  "balance": 1500,
  "currencyCode": "USD",
  "openingBalance": 1000,
  "openingBalanceAt": "2024-01-01T00:00:00Z",
  "openingBalanceExchangeRate": 1,
  "openingBalanceBranchId": 1,
  "salutation": "Mr.",
  "firstName": "John",
  "lastName": "Doe",
  "companyName": "Acme Corporation",
  "displayName": "John Doe - Acme Corporation",
  "email": "[email protected]",
  "workPhone": "+1 (555) 123-4567",
  "personalPhone": "+1 (555) 987-6543",
  "website": "https://www.acme.com",
  "billingAddress1": "123 Business Ave",
  "billingAddress2": "Suite 100",
  "billingAddressCity": "New York",
  "billingAddressCountry": "United States",
  "billingAddressEmail": "[email protected]",
  "billingAddressPostcode": "10001",
  "billingAddressPhone": "+1 (555) 111-2222",
  "billingAddressState": "NY",
  "shippingAddress1": "456 Shipping St",
  "shippingAddress2": "Unit 200",
  "shippingAddressCity": "Los Angeles",
  "shippingAddressCountry": "United States",
  "shippingAddressEmail": "[email protected]",
  "shippingAddressPostcode": "90001",
  "shippingAddressPhone": "+1 (555) 333-4444",
  "shippingAddressState": "CA",
  "note": "Important client with regular monthly orders",
  "active": true,
  "createdAt": "2024-01-01T00:00:00Z",
  "updatedAt": "2024-01-01T00:00:00Z",
  "localOpeningBalance": 1000,
  "closingBalance": 1500
}

Headers

Authorization
string
required

Value must be 'Bearer <token>' where <token> is an API key prefixed with 'bc_' or a JWT token.

Example:

"Bearer bc_1234567890abcdef"

organization-id
string
required

Required if Authorization is a JWT token. The organization ID to operate within.

Body

application/json
customerType
string
required

Customer type

Example:

"business"

currencyCode
string
required

Currency code

Example:

"USD"

displayName
string
required

Display name

Example:

"Acme Corporation"

billingAddress1
string

Billing address line 1

billingAddress2
string

Billing address line 2

billingAddressCity
string

Billing address city

billingAddressCountry
string

Billing address country

billingAddressEmail
string

Billing address email

billingAddressZipcode
string

Billing address zipcode

billingAddressPhone
string

Billing address phone

billingAddressState
string

Billing address state

shippingAddress1
string

Shipping address line 1

shippingAddress2
string

Shipping address line 2

shippingAddressCity
string

Shipping address city

shippingAddressCountry
string

Shipping address country

shippingAddressEmail
string

Shipping address email

shippingAddressZipcode
string

Shipping address zipcode

shippingAddressPhone
string

Shipping address phone

shippingAddressState
string

Shipping address state

openingBalance
number

Opening balance

Example:

5000

openingBalanceAt
string

Opening balance date

Example:

"2024-01-01"

openingBalanceExchangeRate
number

Opening balance exchange rate

Example:

1

openingBalanceBranchId
number

Opening balance branch ID

Example:

101

salutation
string

Salutation

Example:

"Mr."

firstName
string

First name

Example:

"John"

lastName
string

Last name

Example:

"Smith"

companyName
string

Company name

Example:

"Acme Corporation"

website
string

Website

Example:

"https://www.acmecorp.com"

email
string

Email

workPhone
string

Work phone

Example:

"+1 (555) 123-4567"

personalPhone
string

Personal phone

note
string

Note

active
boolean
default:true

Active status

Response

201 - application/json

The customer has been successfully created.

balance
number
required
Example:

1500

currencyCode
string
required
Example:

"USD"

openingBalance
number
required
Example:

1000

openingBalanceAt
string<date-time>
required
Example:

"2024-01-01T00:00:00Z"

openingBalanceExchangeRate
number
required
Example:

1

displayName
string
required
Example:

"John Doe - Acme Corporation"

note
string
required
Example:

"Important client with regular monthly orders"

active
boolean
required
Example:

true

createdAt
string<date-time>
required
Example:

"2024-01-01T00:00:00Z"

updatedAt
string<date-time>
required
Example:

"2024-01-01T00:00:00Z"

localOpeningBalance
number
required
Example:

1000

closingBalance
number
required
Example:

1500

openingBalanceBranchId
number
Example:

1

salutation
string
Example:

"Mr."

firstName
string
Example:

"John"

lastName
string
Example:

"Doe"

companyName
string
Example:

"Acme Corporation"

email
string
workPhone
string
Example:

"+1 (555) 123-4567"

personalPhone
string
Example:

"+1 (555) 987-6543"

website
string
Example:

"https://www.acme.com"

billingAddress1
string
Example:

"123 Business Ave"

billingAddress2
string
Example:

"Suite 100"

billingAddressCity
string
Example:

"New York"

billingAddressCountry
string
Example:

"United States"

billingAddressEmail
string
billingAddressPostcode
string
Example:

"10001"

billingAddressPhone
string
Example:

"+1 (555) 111-2222"

billingAddressState
string
Example:

"NY"

shippingAddress1
string
Example:

"456 Shipping St"

shippingAddress2
string
Example:

"Unit 200"

shippingAddressCity
string
Example:

"Los Angeles"

shippingAddressCountry
string
Example:

"United States"

shippingAddressEmail
string
shippingAddressPostcode
string
Example:

"90001"

shippingAddressPhone
string
Example:

"+1 (555) 333-4444"

shippingAddressState
string
Example:

"CA"