Skip to main content
POST
/
customer-groups
/
customers
Add customers to group
curl --request POST \
  --url https://api.nuwebgroup.com/v1/customer-groups/customers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customerGroupId": 1,
  "createCustomersIfMissing": true,
  "customers": [
    {
      "name": "test",
      "email": "[email protected]",
      "removal_date": "2022-11-20"
    }
  ]
}
'
{
  "data": {
    "type": "customerGroups",
    "id": 1,
    "attributes": {
      "name": "My Group",
      "companyId": 1,
      "createdAt": "2021-11-22T11:59:00.000000Z",
      "updatedAt": "2021-11-22T11:59:00.000000Z",
      "deletedAt": null
    }
  }
}

Authorizations

Authorization
string
header
required

The 'Bearer' token can be obtained from the token management interface or via the login endpoint using your admin user credentials.

Body

application/json

Request body for adding customers to a group

createCustomersIfMissing
boolean

Determines whether new guest customers should be created for any emails that are not currently customers

customerGroupId
boolean

The ID of the customer group to add the customers to

customers
any[]

An array of customers that should be added to the group

Response

Successfully added the customers to the group

data
object