Message: customer.create
Back to IndexCreates a new Customer.
Body
commands | array of command (optional) An array of customer commands to be applied upon creation. If any command fail, the customer will not be created. |
Response Type
string
Rule Hooks
During the create
message, the following Rule Hooks are run in the given order:
Examples
Create New Order
POST https://<hantera-hostname>/resources/actors/customer/newAuthorization: Bearer <YOUR TOKEN>Content-Type: application/json
[{ "type": "create", "body": { "commands": [{ "type": "setDynamicFields", "fields": { "name": "John Doe", } } ] }}]
curl -i -X POST \ https://<hantera-hostname>/resources/actors/customer/new \ -H 'Authorization: Bearer <YOUR TOKEN>' \ -H 'Content-Type: application/json' \ -d '[{ "type": "create", "body": { "commands": [{ "type": "setDynamicFields", "fields": { "name": "John Doe", "email": "[email protected]" } } ] }}]'
Invoke-WebRequest `-Uri "https://<hantera-hostname>/resources/actors/customer/new" `-Method POST ` `-Headers @{Authorization="Bearer <YOUR TOKEN>"; 'Content-Type'="application/json"}-Body '[{ "type": "create", "body": { "commands": [{ "type": "setDynamicFields", "fields": { "name": "John Doe", "email": "[email protected]" } } ] }}]'