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

Parameters: create_customer
NameTypeDescription
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
curl -X POST https://cotlet.dev/api/v1/myob/customers \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("myob", "create_customer")
Node.js
const result = await cotlet.call('myob', 'create_customer');
CLI
cotlet call myob create_customer

Example response

JSON

{
  "customer_id": "CUS000015",
  "name": "Bayside Physio",
  "email": "admin@baysidephysio.example",
  "terms": "In a given number of days: 14",
  "active": true
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.