DPA Products Segmentation API
This API allows managing DPA (Deferred Payment Agreement) product segmentations in the system. It provides endpoints to create, read, update, and delete DPA product segmentations, as well as perform specific operations such as changing the segmentation status.
The CMS Base URL is used (see introduction).
The Segmentation Item Object
The Segmentation Item object represents a credit product segmentation in the system.
Attributes
| Attribute | Description | Type |
|---|---|---|
segmentationId | Unique identifier of the segmentation | String (UUID) |
name | Name of the segmentation | String |
description | Description of the segmentation | String |
productId | Identifier of the associated product | String (UUID) |
ruleSet | Rule set of the segmentation | Object |
status | Status of the segmentation | String |
partnerId | Identifier of the partner | String (UUID) |
tenant | Tenant (account) to which the segmentation belongs | String |
createdAt | Creation date of the segmentation | String (ISO 8601) |
The Rule Group Object
The Rule Group Object is a set of rules that are applied together to define the segmentation. Each group can contain multiple rules and can be combined with logical operators.
Attribute
| Attribute | Description | Type |
|---|---|---|
operator | Operator type for the group | String (AND, OR) |
rules | Set of compasisons | Array of Segmentation Rule |
The Segmentation Rule Object
The Segmentation Rule Object defines a specific condition that must be met for a record to be included in the segmentation. Each rule has a data type, a field to compare, an operator, and values to compare against.
Attribute
| Attribute | Description | Type |
|---|---|---|
dataType | Type of field | String (string, number, boolean, datetime) |
field | Name of field to compare | String |
operator | Operator type | String (eq, neq, lt, lte, gt, gte, in, between, notin, exists, notexists) |
values | Values to compare | Array String |
Combination of Operators and Data Types
This table shows the compatibility of operators with different field types:
| string | number | boolean | datetime | |
|---|---|---|---|---|
| eq | ✅ | ✅ | ✅ | ✅ |
| neq | ✅ | ✅ | ✅ | ✅ |
| gt | ❌ | ✅ | ❌ | ✅ |
| lt | ❌ | ✅ | ❌ | ✅ |
| gte | ❌ | ✅ | ❌ | ✅ |
| lte | ❌ | ✅ | ❌ | ✅ |
| between | ✅ | ❌ | ❌ | ✅ |
| in | ✅ | ✅ | ❌ | ✅ |
| notin | ✅ | ✅ | ❌ | ✅ |
| exists | ✅ | ✅ | ✅ | ✅ |
| notexists | ✅ | ✅ | ✅ | ✅ |
Available Operations
List Credit Product Segmentations
Retrieves a list of credit product segmentations.
| Parameter | Description |
|---|---|
partner-id | Partner ID |
Query Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
product-id | Filter by product ID | Array of String | No |
status | Filter by segmentation status | String | No |
page | Page number | Integer | No |
per-page | Items per page | Integer | No |
sort-direction | Sorting direction | String | No |
sort-by | Field to sort by | String | No |
Successful Response
The response will be an array of Segmentation Item objects.
Create a Credit Product Segmentation
Creates a new credit product segmentation in the system.
Input Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
name | Name of the segmentation | String | Yes |
description | Description of the segmentation | String | No |
productId | ID of the associated product | String (UUID) | Yes |
ruleSet | Rule set of the segmentation | Object | Yes |
Request Example
Successful Response
Get a Credit Product Segmentation
Retrieves information about a specific credit product segmentation.
Path Parameters
| Parameter | Description |
|---|---|
partner-id | Partner ID |
segmentation-id | Credit product segmentation ID |
Successful Response
The response will be a complete Segmentation Item object.
Update a Credit Product Segmentation
Updates information of an existing credit product segmentation.
Path Parameters
| Parameter | Description |
|---|---|
partner-id | Partner ID |
segmentation-id | Credit product segmentation ID |
Input Parameters
Same as in segmentation creation, all optional.
Request Example
Successful Response
The response will be the updated Segmentation Item object.
Delete a Credit Product Segmentation
Deletes a credit product segmentation from the system.
Path Parameters
| Parameter | Description |
|---|---|
partner-id | Partner ID |
segmentation-id | Credit product segmentation ID |
Successful Response
Status code 204 (No Content) if the deletion was successful.
Change the Status of a Credit Product Segmentation
Updates the status of a credit product segmentation.
Path Parameters
| Parameter | Description |
|---|---|
partner-id | Partner ID |
segmentation-id | Credit product segmentation ID |
Input Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
status | New status of the segmentation | String ("enabled" or "disabled") | Yes |
Request Example
Successful Response
Status code 204 (No Content) if the update was successful.
Error Handling
The API may return the following error codes:
| Code | Description |
|---|---|
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 409 | Conflict |
| 500 | Internal Server Error |
Errors will include a descriptive message in the response body.