Customers Assignments
Manage customer assignments to segments
Your Emporix tenant's name.
Note: Always write the tenant name in lowercase.
^[a-z][a-z0-9]+$
Unique identifier of the customer segment.
A standard query parameter is used to search for specific values.
The number of documents to be retrieved per page.
The page number to be retrieved. The size of the pages should be specified by the pageSize parameter.
List of properties used to sort the results, separated by colons.
Fields to be returned in the response.
Flag indicating whether the total number of retrieved results should be returned.
Customer assignments for a customer segment were successfully retrieved.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
GET /customer-segment/{tenant}/segments/{segmentId}/customers HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
{
"customer": {
"id": "98029737",
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]"
},
"legalEntity": {
"id": "660af2af69babe3cf6e40771",
"name": "SomeCompany"
},
"assignmentType": "MANUAL",
"metadata": {
"createdAt": "2024-10-12T12:00:00.000Z",
"modifiedAt": "2024-10-12T12:00:00.000Z",
"version": 1
}
},
{
"customer": {
"customerId": "18249883",
"firstName": "Jack",
"lastName": "Smith",
"email": "[email protected]"
},
"legalEntity": {
"id": "448gh29h1d0b5453g6346df6",
"department": "AnotherCompany"
},
"assignmentType": "MANUAL",
"metadata": {
"createdAt": "2024-10-16T12:00:00.000Z",
"modifiedAt": "2024-10-16T12:00:00.000Z",
"version": 1
}
}
]
Your Emporix tenant's name.
Note: Always write the tenant name in lowercase.
^[a-z][a-z0-9]+$
Unique identifier of the customer segment.
The number of documents to be retrieved per page.
The page number to be retrieved. The size of the pages should be specified by the pageSize parameter.
List of properties used to sort the results, separated by colons.
Fields to be returned in the response.
Flag indicating whether the total number of retrieved results should be returned.
A standard query parameter is used to search for specific values.
Customer assignments for a customer segment were successfully retrieved.
Bad request due to validation, incorrect parameters, etc.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
POST /customer-segment/{tenant}/segments/{segmentId}/customers/search HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 29
{
"q": "assignmentType:MANUAL"
}
[
{
"customer": {
"id": "98029737",
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]"
},
"legalEntity": {
"id": "660af2af69babe3cf6e40771",
"name": "SomeCompany"
},
"assignmentType": "MANUAL",
"metadata": {
"createdAt": "2024-10-12T12:00:00.000Z",
"modifiedAt": "2024-10-12T12:00:00.000Z",
"version": 1
}
},
{
"customer": {
"customerId": "18249883",
"firstName": "Jack",
"lastName": "Smith",
"email": "[email protected]"
},
"legalEntity": {
"id": "448gh29h1d0b5453g6346df6",
"department": "AnotherCompany"
},
"assignmentType": "MANUAL",
"metadata": {
"createdAt": "2024-10-16T12:00:00.000Z",
"modifiedAt": "2024-10-16T12:00:00.000Z",
"version": 1
}
}
]
Your Emporix tenant's name.
Note: Always write the tenant name in lowercase.
^[a-z][a-z0-9]+$
Unique identifier of the customer segment.
Unique identifier of the customer which is added to a customer segment.
Fields to be returned in the response.
Customer assignment for a customer segment was successfully retrieved.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
Resource not found
GET /customer-segment/{tenant}/segments/{segmentId}/customers/{customerId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"customer": {
"id": "98029737",
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]"
},
"assignmentType": "MANUAL",
"metadata": {
"createdAt": "2024-10-12T12:00:00.000Z",
"modifiedAt": "2024-10-12T12:00:00.000Z",
"version": 1
}
}
Your Emporix tenant's name.
Note: Always write the tenant name in lowercase.
^[a-z][a-z0-9]+$
Unique identifier of the customer segment.
Unique identifier of the customer which is added to a customer segment.
A new customer assignment was successfully created.
Customer assignment was successfully updated.
Bad request due to validation, incorrect parameters, etc.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
Conflict
PUT /customer-segment/{tenant}/segments/{segmentId}/customers/{customerId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 202
{
"mixins": {
"segmentAttributes": {
"membershipStatus": "PREMIUM"
}
},
"metadata": {
"mixins": {
"segmentAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/v1600077014/schemata/segmentAttributes_v1.json"
}
}
}
No content
Your Emporix tenant's name.
Note: Always write the tenant name in lowercase.
^[a-z][a-z0-9]+$
Unique identifier of the customer segment.
Unique identifier of the customer which is added to a customer segment.
Customer assignment was successfully removed.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
DELETE /customer-segment/{tenant}/segments/{segmentId}/customers/{customerId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Your Emporix tenant's name.
Note: Always write the tenant name in lowercase.
^[a-z][a-z0-9]+$
Unique identifier of the customer segment.
Unique identifier of the customer which is added to a customer segment.
Unique identifier of the legal entity which customer is assigned to.
Fields to be returned in the response.
Customer assignment for a customer segment was successfully retrieved.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
Resource not found
GET /customer-segment/{tenant}/segments/{segmentId}/customers/{customerId}/{legalEntityId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"customer": {
"id": "98029737",
"firstName": "John",
"lastName": "Doe",
"email": "[email protected]"
},
"legalEntity": {
"id": "660af2af69babe3cf6e40771",
"name": "SomeCompany"
},
"assignmentType": "MANUAL",
"metadata": {
"createdAt": "2024-10-12T12:00:00.000Z",
"modifiedAt": "2024-10-12T12:00:00.000Z",
"version": 1
}
}
Your Emporix tenant's name.
Note: Always write the tenant name in lowercase.
^[a-z][a-z0-9]+$
Unique identifier of the customer segment.
Unique identifier of the customer which is added to a customer segment.
Unique identifier of the legal entity which customer is assigned to.
A new customer assignment was successfully created.
Customer assignment was successfully updated.
Bad request due to validation, incorrect parameters, etc.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
Conflict
PUT /customer-segment/{tenant}/segments/{segmentId}/customers/{customerId}/{legalEntityId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 202
{
"mixins": {
"segmentAttributes": {
"membershipStatus": "PREMIUM"
}
},
"metadata": {
"mixins": {
"segmentAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/v1600077014/schemata/segmentAttributes_v1.json"
}
}
}
No content
Your Emporix tenant's name.
Note: Always write the tenant name in lowercase.
^[a-z][a-z0-9]+$
Unique identifier of the customer segment.
Unique identifier of the customer which is added to a customer segment.
Unique identifier of the legal entity which customer is assigned to.
Customer assignment was successfully removed.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
DELETE /customer-segment/{tenant}/segments/{segmentId}/customers/{customerId}/{legalEntityId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Your Emporix tenant's name.
Note: Always write the tenant name in lowercase.
^[a-z][a-z0-9]+$
Unique identifier of the customer segment.
Multi-status response.
Bad request due to validation, incorrect parameters, etc.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
PUT /customer-segment/{tenant}/segments/{segmentId}/customers/bulk HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 365
[
{
"customerId": "98029737",
"legalEntityId": "660af2af69babe3cf6e40771",
"mixins": {
"segmentAttributes": {
"membershipStatus": "PREMIUM"
}
},
"metadata": {
"mixins": {
"segmentAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/v1600077014/schemata/segmentAttributes_v1.json"
}
}
},
{
"customerId": "18249883",
"legalEntityId": "628cd20c6e8b2432b6346ca6",
"metadata": {
"version": 1
}
}
]
[
{
"index": 1,
"code": 204,
"status": "OK"
},
{
"index": 2,
"code": 400,
"status": "Bad Request",
"message": "Validation problem with request body."
}
]
Removes multiple customer assignments to a customer segment.
The request body for this endpoint is array of objects with customerId
and legalEntityId
fields.
customerId
and legalEntityId
fields.Example: [{"customerId": "firstCustomerId", "legalEntityId": "firstLegalEntityId"}, {"customerId": "secondCustomerId", "legalEntityId": "secondLegalEntityId"}, {"customerId": "thirdCustomerId", "legalEntityId": "thirdLegalEntityId"}]
Required scopes
customersegment.segment_manage
- required to delete customer assignments
Your Emporix tenant's name.
Note: Always write the tenant name in lowercase.
^[a-z][a-z0-9]+$
Unique identifier of the customer segment.
Multi-status response.
Bad request due to validation, incorrect parameters, etc.
Unauthorized
Access forbidden. The caller is not allowed to access this resource.
DELETE /customer-segment/{tenant}/segments/{segmentId}/customers/bulk HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
{
"index": 1,
"code": 204,
"status": "OK"
},
{
"index": 2,
"code": 204,
"status": "OK"
}
]
Was this helpful?