Classifications

API for managing Classifications

get
List Classifications

https://www.magloft.com/api/portal/v1/classifications/:app_id
This endpoint returns a list of all classifications that belong to the publication
Request
Response
Request
Path Parameters
app_id
required
String
App ID (Publication) to scope this request for.
Response
200: OK
{
"id": 1234,
"title": "Business",
"color": "#444444",
"position": 0
}

get
Get Classification

https://www.magloft.com/api/portal/v1/classifications/:app_id/:id
This endpoint returns a specific classification by id
Request
Response
Request
Path Parameters
app_id
required
String
App ID (Publication) to scope this request for.
id
required
Integer
Classification ID
Response
200: OK
{
"id": 1234,
"title": "Business",
"color": "#444444",
"position": 0
}

post
Sort Classification

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
Request
Response
Request
Path Parameters
app_id
required
String
App ID (Publication) to scope this request for.
Body Parameters
positions
required
Array
positions[id]
required
Integer
positions[position]
required
Integer
Response
204: No Content
null

post
Create Classification

https://www.magloft.com/api/portal/v1/classifications/:app_id
This endpoint creates a new classification and returns the saved classification
Request
Response
Request
Path Parameters
app_id
required
String
App ID (Publication) to scope this request for.
Body Parameters
title
optional
String
Title of a classification
color
optional
String
Hex color of a classification
Response
200: OK
{
"id": 1234,
"title": "Business",
"color": "#444444",
"position": 0
}

put
Update Classification

https://www.magloft.com/api/portal/v1/classifications/:app_id/:id
This endpoint updates a specific classification by id and returns the updated classification
Request
Response
Request
Path Parameters
app_id
required
String
App ID (Publication) to scope this request for.
id
required
Integer
Classification ID
Body Parameters
title
optional
String
Title of a classification
color
optional
String
Hex color of a classification
Response
200: OK
{
"id": 1234,
"title": "Business",
"color": "#444444",
"position": 0
}

delete
Delete Classification

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
Request
Response
Request
Path Parameters
app_id
required
String
App ID (Publication) to scope this request for.
id
required
Integer
Classification ID
Response
204: No Content
null