Skip to content

Message: customer.create

Back to Index

Creates a new Customer.

Body
commandsarray 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:

  1. OnCustomerBeforeCreated
  2. OnCustomerCreated
  3. OnCustomerCommands

Examples

Create New Order

POST https://<hantera-hostname>/resources/actors/customer/new
Authorization: Bearer <YOUR TOKEN>
Content-Type: application/json
[{
"type": "create",
"body": {
"commands": [{
"type": "setDynamicFields",
"fields": {
"name": "John Doe",
"email": "[email protected]"
}
}
]
}
}]
Back to Index