Customers Assignments
Manage customer assignments to segments
Retrieves all customer assignments for a given customer segment.
Your Emporix tenant 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
Accept: */*
[
{
"customer": {
"id": "98029737",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@email.com"
},
"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": "jack.smith@email.com"
},
"legalEntity": {
"id": "448gh29h1d0b5453g6346df6",
"department": "AnotherCompany"
},
"assignmentType": "MANUAL",
"metadata": {
"createdAt": "2024-10-16T12:00:00.000Z",
"modifiedAt": "2024-10-16T12:00:00.000Z",
"version": 1
}
}
]Returns all customer assignments that match provided criteria.
Your Emporix tenant 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
Content-Type: application/json
Accept: */*
Content-Length: 29
{
"q": "assignmentType:MANUAL"
}[
{
"customer": {
"id": "98029737",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@email.com"
},
"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": "jack.smith@email.com"
},
"legalEntity": {
"id": "448gh29h1d0b5453g6346df6",
"department": "AnotherCompany"
},
"assignmentType": "MANUAL",
"metadata": {
"createdAt": "2024-10-16T12:00:00.000Z",
"modifiedAt": "2024-10-16T12:00:00.000Z",
"version": 1
}
}
]Retrieves a customer with specified customerId assigned to a customer segment.
Your Emporix tenant 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
Accept: */*
{
"customer": {
"id": "98029737",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@email.com"
},
"assignmentType": "MANUAL",
"metadata": {
"createdAt": "2024-10-12T12:00:00.000Z",
"modifiedAt": "2024-10-12T12:00:00.000Z",
"version": 1
}
}Performs UPSERT operation. Updates a customer assigned to a customer segment. A new customer assignment is created if it's not present in the system.
Your Emporix tenant 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.
No content
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
Content-Type: application/json
Accept: */*
Content-Length: 216
{
"mixins": {
"segmentAttributes": {
"membershipStatus": "PREMIUM"
}
},
"metadata": {
"mixins": {
"segmentAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/69537caeb3fd5d378296ae42_segmentAttributes.json"
}
}
}No content
Removes customer assignment.
Your Emporix tenant 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.
No content
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
Accept: */*
No content
Retrieves a customer with specified customerId and companyId assigned to a customer segment.
Your Emporix tenant 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
Accept: */*
{
"customer": {
"id": "98029737",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@email.com"
},
"legalEntity": {
"id": "660af2af69babe3cf6e40771",
"name": "SomeCompany"
},
"assignmentType": "MANUAL",
"metadata": {
"createdAt": "2024-10-12T12:00:00.000Z",
"modifiedAt": "2024-10-12T12:00:00.000Z",
"version": 1
}
}Performs UPSERT operation. Updates a customer assigned to a customer segment. A new customer assignment is created if it's not present in the system.
Your Emporix tenant 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.
No content
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
Content-Type: application/json
Accept: */*
Content-Length: 216
{
"mixins": {
"segmentAttributes": {
"membershipStatus": "PREMIUM"
}
},
"metadata": {
"mixins": {
"segmentAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/69537caeb3fd5d378296ae42_segmentAttributes.json"
}
}
}No content
Removes customer assignment.
Your Emporix tenant 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.
No content
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
Accept: */*
No content
Performs UPSERT operation. Updates multiple customer assignments to a customer segment. The maximum batch size is 200.
Your Emporix tenant name.
Note: Always write the tenant name in lowercase.
^[a-z][a-z0-9]+$Unique identifier of the customer segment.
Unique identifier of an existing customer.
Unique identifier of an existing legal entity. It should be omitted for B2C.
Multi-status response.
Index of the processed item, matching the item position in request body.
HTTP Status Code.
HTTP Status description.
Error message.
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
Content-Type: application/json
Accept: */*
Content-Length: 379
[
{
"customerId": "98029737",
"legalEntityId": "660af2af69babe3cf6e40771",
"mixins": {
"segmentAttributes": {
"membershipStatus": "PREMIUM"
}
},
"metadata": {
"mixins": {
"segmentAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/69537caeb3fd5d378296ae42_segmentAttributes.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 maximum batch size is 200.
The request body for this endpoint is array of objects with customerId and legalEntityId fields.
Example: [{"customerId": "firstCustomerId", "legalEntityId": "firstLegalEntityId"}, {"customerId": "secondCustomerId", "legalEntityId": "secondLegalEntityId"}, {"customerId": "thirdCustomerId", "legalEntityId": "thirdLegalEntityId"}]
Your Emporix tenant name.
Note: Always write the tenant name in lowercase.
^[a-z][a-z0-9]+$Unique identifier of the customer segment.
Multi-status response.
Index of the processed item, matching the item position in request body.
HTTP Status Code.
HTTP Status description.
Error message.
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
Accept: */*
[
{
"index": 1,
"code": 204,
"status": "OK"
},
{
"index": 2,
"code": 204,
"status": "OK"
}
]Last updated
Was this helpful?

