Classifications

API for managing Classifications

List Classifications

GET https://www.magloft.com/api/portal/v1/classifications/:app_id

This endpoint returns a list of all classifications that belong to the publication

Path Parameters

NameTypeDescription

app_id

String

App ID (Publication) to scope this request for.

{
  "id": 1234,
  "title": "Business",
  "color": "#444444",
  "position": 0
}

Get Classification

GET https://www.magloft.com/api/portal/v1/classifications/:app_id/:id

This endpoint returns a specific classification by id

Path Parameters

NameTypeDescription

app_id

String

App ID (Publication) to scope this request for.

id

Integer

Classification ID

{
  "id": 1234,
  "title": "Business",
  "color": "#444444",
  "position": 0
}

Sort Classification

POST https://www.magloft.com/api/portal/v1/classifications/:app_id/sort

This endpoint sorts all classification by position and returns an empty response with status 204

Path Parameters

NameTypeDescription

app_id

String

App ID (Publication) to scope this request for.

Request Body

NameTypeDescription

positions

Array

positions[id]

Integer

positions[position]

Integer

null

Create Classification

POST https://www.magloft.com/api/portal/v1/classifications/:app_id

This endpoint creates a new classification and returns the saved classification

Path Parameters

NameTypeDescription

app_id

String

App ID (Publication) to scope this request for.

Request Body

NameTypeDescription

title

String

Title of a classification

color

String

Hex color of a classification

{
  "id": 1234,
  "title": "Business",
  "color": "#444444",
  "position": 0
}

Update Classification

PUT https://www.magloft.com/api/portal/v1/classifications/:app_id/:id

This endpoint updates a specific classification by id and returns the updated classification

Path Parameters

NameTypeDescription

app_id

String

App ID (Publication) to scope this request for.

id

Integer

Classification ID

Request Body

NameTypeDescription

title

String

Title of a classification

color

String

Hex color of a classification

{
  "id": 1234,
  "title": "Business",
  "color": "#444444",
  "position": 0
}

Delete Classification

DELETE https://www.magloft.com/api/portal/v1/classifications/:app_id/:id

This endpoint deletes a specific classification by id and returns an empty response with status 204

Path Parameters

NameTypeDescription

app_id

String

App ID (Publication) to scope this request for.

id

Integer

Classification ID

null

Last updated