/customers/create v1.0.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Base URLs:
Customers
postCustomerCreate
Code samples
const inputBody = '{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the customer, optional and nullable.",
"nullable": true
},
"domain": {
"type": "string",
"description": "The domain of the customer, optional and nullable.",
"nullable": true
}
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://goldleaf.app/api/v1/customers/create',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /customers/create
Create a customer
Creates a new customer.
Body parameter
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the customer, optional and nullable.",
"nullable": true
},
"domain": {
"type": "string",
"description": "The domain of the customer, optional and nullable.",
"nullable": true
}
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | false | none |
| » name | body | string¦null | false | The name of the customer, optional and nullable. |
| » domain | body | string¦null | false | The domain of the customer, optional and nullable. |
Example responses
500 Response
"Internal server error"
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | The created customer properties | None |
| 500 | Internal Server Error | Internal server error | string |
