Create customer
Add a customer card with name, email and payment terms.
POST https://cotlet.dev/api/v1/myob/customers
write
Creates a customer card and returns its card ID. Pass company_name for a business, or first_name and last_name for an individual. A card cannot change from customer to supplier later. It reaches no one and an unused card can be deleted in MYOB, so it does not ask for confirmation.
Parameters
| Name | Type | Description |
|---|---|---|
| company_name string | string | Business name. Required unless first_name and last_name are given. |
| first_name string | string | For an individual customer. |
| last_name string | string | For an individual customer. |
| email string | string | Email address used when an invoice is emailed. |
| payment_days integer | integer | Payment due in this number of days. Default: the terms set in MYOB. |
Request
curl -X POST https://cotlet.dev/api/v1/myob/customers \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("myob", "create_customer") const result = await cotlet.call('myob', 'create_customer'); cotlet call myob create_customer Example response
{
"customer_id": "CUS000015",
"name": "Bayside Physio",
"email": "admin@baysidephysio.example",
"terms": "In a given number of days: 14",
"active": true
}