Customers Assignments
Was this helpful?
Was this helpful?
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.
Unique identifier of the customer which is added to a customer segment.
Fields to be returned in the response.
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": "john.doe@email.com"
},
"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.
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.
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": "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
}
}
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.
DELETE /customer-segment/{tenant}/segments/{segmentId}/customers/{customerId}/{legalEntityId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Removes multiple customer assignments to a customer segment.
customerId
and legalEntityId
fields.Example: [{"customerId": "firstCustomerId", "legalEntityId": "firstLegalEntityId"}, {"customerId": "secondCustomerId", "legalEntityId": "secondLegalEntityId"}, {"customerId": "thirdCustomerId", "legalEntityId": "thirdLegalEntityId"}]
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.
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"
}
]
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.
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": "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
}
}
]
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.
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": "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
}
}
]
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.
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.
Unique identifier of the legal entity which customer is assigned to.
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.
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."
}
]