Customer groups
Base URL: https://api.miridia.io. Read Authentication and Conventions before you call these operations.
| Method | Path | Operation |
|---|---|---|
| GET | /api/v1/CustomerGroups | Get all customer groups |
| POST | /api/v1/CustomerGroups | Create customer group |
| GET | /api/v1/CustomerGroups/{customerGroupId} | Get customer group |
| PUT | /api/v1/CustomerGroups/{customerGroupId} | Update customer group |
| DELETE | /api/v1/CustomerGroups/{customerGroupId} | Delete customer group |
Get all customer groups
GET/api/v1/CustomerGroups
Access. Send a bearer token or an API key. The caller needs the Customers view permission.
Response
200. Returns a PagedResult envelope. Each item in data is CustomerGroupResponse.
curl -X GET "https://api.miridia.io/api/v1/CustomerGroups" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"{
"count": 0,
"totalCount": 0,
"page": 0,
"finalPage": 0,
"pageSize": 0,
"hasMore": true,
"statusCode": "OK",
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"title": "string",
"description": "string"
}
],
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
]
}Create customer group
POST/api/v1/CustomerGroups
Access. Send a bearer token or an API key. The caller needs the Customers modify permission.
Request body
Send JSON with the shape CreateCustomerGroupCommand.
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Limits: maximum 255 characters. |
description | string | No | Limits: maximum 2000 characters. |
Response
200. Returns a SingleResult envelope. The data field is CustomerGroupResponse.
curl -X POST "https://api.miridia.io/api/v1/CustomerGroups" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"title": "string",
"description": "string"
}'{
"message": "string",
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
],
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"title": "string",
"description": "string"
},
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Get customer group
GET/api/v1/CustomerGroups/{customerGroupId}
Access. Send a bearer token or an API key. The caller needs the Customers view permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
customerGroupId | path | string (uuid) | Yes |
Response
200. Returns a SingleResult envelope. The data field is CustomerGroupResponse.
curl -X GET "https://api.miridia.io/api/v1/CustomerGroups/{customerGroupId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"{
"message": "string",
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
],
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"title": "string",
"description": "string"
},
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Update customer group
PUT/api/v1/CustomerGroups/{customerGroupId}
Access. Send a bearer token or an API key. The caller needs the Customers modify permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
customerGroupId | path | string (uuid) | Yes |
Request body
Send JSON with the shape UpdateCustomerGroupCommand.
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Yes | |
title | string | Yes | Limits: maximum 255 characters. |
description | string | No | Limits: maximum 2000 characters. |
Response
200. Returns a SingleResult envelope. The data field is CustomerGroupResponse.
curl -X PUT "https://api.miridia.io/api/v1/CustomerGroups/{customerGroupId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"title": "string",
"description": "string"
}'{
"message": "string",
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
],
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"title": "string",
"description": "string"
},
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Delete customer group
DELETE/api/v1/CustomerGroups/{customerGroupId}
Access. Send a bearer token or an API key. The caller needs the Customers delete permission.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
customerGroupId | path | string (uuid) | Yes |
Response
200. Returns a SingleResult envelope. The data field is boolean.
curl -X DELETE "https://api.miridia.io/api/v1/CustomerGroups/{customerGroupId}" \
-H "Authorization: Bearer $MIRIDIA_TOKEN" \
-H "X-Business-Id: $MIRIDIA_BUSINESS_ID"{
"message": "string",
"messages": [
{
"title": "string",
"message": "string",
"level": "Standard",
"icon": "SyncAlert",
"code": "string"
}
],
"data": true,
"statusCode": "OK",
"canRead": true,
"canEdit": true,
"canDelete": true
}Models
The operations on this page use these object types. Select a type to see its fields.
CustomerGroupResponse
| Field | Type | Description |
|---|---|---|
id | string (uuid) | |
title | string | |
description | string |