Miridia
Portal
Sales

Customer groups

The customer groups operations of the Core API.

Base URL: https://api.miridia.io. Read Authentication and Conventions before you call these operations.

MethodPathOperation
GET/api/v1/CustomerGroupsGet all customer groups
POST/api/v1/CustomerGroupsCreate 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.

Request
curl -X GET "https://api.miridia.io/api/v1/CustomerGroups" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN" \
  -H "X-Business-Id: $MIRIDIA_BUSINESS_ID"
Response
{
  "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.

FieldTypeRequiredDescription
titlestringYesLimits: maximum 255 characters.
descriptionstringNoLimits: maximum 2000 characters.

Response

200. Returns a SingleResult envelope. The data field is CustomerGroupResponse.

Request
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"
}'
Response
{
  "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

NameInTypeRequiredDescription
customerGroupIdpathstring (uuid)Yes

Response

200. Returns a SingleResult envelope. The data field is CustomerGroupResponse.

Request
curl -X GET "https://api.miridia.io/api/v1/CustomerGroups/{customerGroupId}" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN" \
  -H "X-Business-Id: $MIRIDIA_BUSINESS_ID"
Response
{
  "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

NameInTypeRequiredDescription
customerGroupIdpathstring (uuid)Yes

Request body

Send JSON with the shape UpdateCustomerGroupCommand.

FieldTypeRequiredDescription
idstring (uuid)Yes
titlestringYesLimits: maximum 255 characters.
descriptionstringNoLimits: maximum 2000 characters.

Response

200. Returns a SingleResult envelope. The data field is CustomerGroupResponse.

Request
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"
}'
Response
{
  "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

NameInTypeRequiredDescription
customerGroupIdpathstring (uuid)Yes

Response

200. Returns a SingleResult envelope. The data field is boolean.

Request
curl -X DELETE "https://api.miridia.io/api/v1/CustomerGroups/{customerGroupId}" \
  -H "Authorization: Bearer $MIRIDIA_TOKEN" \
  -H "X-Business-Id: $MIRIDIA_BUSINESS_ID"
Response
{
  "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
FieldTypeDescription
idstring (uuid)
titlestring
descriptionstring