Solid Commerce Docs
POST/v1/crm/customers

POST /v1/crm/customers

Scopes: crm:customers:write

Requires scope: crm:customers:write.

Request body

FieldTypeRequiredDescription
buyerEmailstringno
businessNamestringno
buyerPhonestringno
isResellerbooleanno
resellerNumberstringno
customerDiscountPercentagenumber<double>no
shippingAddressCustomerAddressno
billingAddressCustomerAddressno

Response (200)

FieldTypeRequiredDescription
idinteger<int64>no
messagestringno

Examples

import { SolidCommerceClient } from '@solidcommerce/sdk';

const client = new SolidCommerceClient({
  apiKey: process.env.SOLIDCOMMERCE_API_KEY!,
});

const { data, error } = await client.raw.POST('/v1/crm/customers', {
  // params: { path: { id: '...' }, query: { limit: 25 } },
  // body: { /* request body */ },
});

if (error) throw error;
console.log(data);