users
aid_customers_post
Create a new customer, customer_id, email and phone_number must be unique if specified. scopes:
- admin:customers
- write:customers
- create:customers:/users
post/accounts/{aid}/customers/users
Path parameters
aidstring ^[PT]{1}\d{8}$ required
An id that uniquely identifies the account.
Request body
Example request
{
"metadata": {
"dob_year": 1985
},
"created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
"deleted_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
"first_name": "John",
"last_name": "Doe",
"email": "customer@example.com",
"phone_number": "+4799999999",
"enrolled_by": {
"type": "url",
"value": "https://facebook.com"
},
"marketing_consent": {
"sms": {
"consent": true,
"updated_at": "2018-01-12T13:42:00Z"
},
"email": {
"consent": true,
"updated_at": "2018-01-12T13:42:00Z"
}
},
"addresses": [
{
"address_line": "Sommerkroveien 34",
"address_line_2": "PB 123",
"postal_code": "0349",
"postal_place": "Oslo",
"country": "NO",
"latitude": 59.942112,
"longitude": 10.716991,
"comment": "5th floor, use doorbell."
}
],
"company": {
"organization_number": "123456789MVA",
"bussiness_name": "TKP tech AS",
"department": "sales department",
"industry": "computer industry"
},
"gender": "male",
"date_of_birth": "1990-09-20"
}Response
Customer created
Example response
{
"metadata": {
"dob_year": 1985
},
"created_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
"deleted_by": "1c92f7e1-2897-4d46-bdcc-c127a914fb4e",
"first_name": "John",
"last_name": "Doe",
"email": "customer@example.com",
"phone_number": "+4799999999",
"enrolled_by": {
"type": "url",
"value": "https://facebook.com"
},
"marketing_consent": {
"sms": {
"consent": true,
"updated_at": "2018-01-12T13:42:00Z"
},
"email": {
"consent": true,
"updated_at": "2018-01-12T13:42:00Z"
}
},
"addresses": [
{
"address_line": "Sommerkroveien 34",
"address_line_2": "PB 123",
"postal_code": "0349",
"postal_place": "Oslo",
"country": "NO",
"latitude": 59.942112,
"longitude": 10.716991,
"comment": "5th floor, use doorbell."
}
],
"company": {
"organization_number": "123456789MVA",
"bussiness_name": "TKP tech AS",
"department": "sales department",
"industry": "computer industry"
},
"gender": "male",
"date_of_birth": "1990-09-20"
}