Create a new customer in the system.
Creates a new customer document with transactional ID generation. It assigns a unique numeric customerId based on the account’s counters.
{
"type": "object",
"properties": {
"name": { "type": "string", "minLength": 1, "description": "Company Name" },
"address": { "type": "string", "minLength": 1 },
"country": { "type": "string", "minLength": 1 },
"city": { "type": "string", "minLength": 1 },
"zip": { "type": "string", "minLength": 1 },
"metadata": { "type": "object", "description": "Additional key-value pairs", "default": {} }
},
"required": ["name", "address", "country", "city", "zip"]
}
{
"type": "object",
"properties": {
"success": { "type": "boolean" },
"customerId": { "type": "number" },
"id": { "type": "string" },
"path": { "type": "string" }
}
}
const result = await client.createCustomer({
name: "Acme Corp",
address: "123 Business Rd",
city: "New York",
zip: "10001",
country: "USA",
metadata: { "sector": "Technology" }
});