Create a customer
curl --request POST \
  --url https://api.salesbricks.com/api/v2/customers \
  --header 'Content-Type: application/json' \
  --header 'X-SALESBRICKS-KEY: <api-key>' \
  --data '{
  "name": "<string>",
  "external_id": "<string>",
  "address": {
    "line_1": "<string>",
    "line_2": "<string>",
    "city": "<string>",
    "region": "<string>",
    "zip": "<string>",
    "country": "<string>"
  }
}'
{
  "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "external_id": "<string>",
  "address": {
    "line_1": "<string>",
    "line_2": "<string>",
    "city": "<string>",
    "region": "<string>",
    "zip": "<string>",
    "country": "<string>"
  }
}

Authorizations

X-SALESBRICKS-KEY
string
header
required

API key for authentication

Body

Customer post input serializer for creating a new customer.

name
string
required

The name of the customer

external_id
string

Optional external id of the customer

address
object

The address of the customer Address input serializer to not confuse it with Address model serializer.

Response

Customer output serializer; we can represent the customer model differently depending on the request so we need a custom serializer for the output.

customer_id
string<uuid>
required
name
string
required
external_id
string | null
Maximum length: 255
address
object

The address of the customer Address input serializer to not confuse it with Address model serializer.