POST Classification

Prev Next

The POST Classification Incident Master API creates a new Classification master record in the Incident Management (IM) module. Authorized administrators, integrations, and automation tools can create Classification records directly without using the application UI.

Endpoint

POST /API/v1/Master/IM/Classification

Path Details

Path Value

Description

IM

Module code for Incident Management.

Classification

Master entity where the API creates the new record.

Note: Before creating a Classification record, system retrieves its metadata to review required fields, supported fields, payload structure, constraints, and applicable endpoints. GET /API/v1/Master/IM/Classification/metadata?sections=create.

curl --location 'https://<host>/API/v1/Master/IM/Classification/metadata?sections=create' \
  --request GET \
  --header 'Accept: application/json' \
  --header 'X-Api-Key: <API_KEY>'

Request Headers

Header

Value

Required

Description

Accept

application/json

Yes

Specifies the expected response format.

Content-Type

application/json

Yes

Specifies that the request body is in JSON format.

X-Api-Key

<API_KEY>

Yes

API key used to authenticate the request.

Sample Payload

{
  "Active": true,
  "Text": "Sample Classification Name",
  "Is_Default": false,
  "Parent_Value": 1,
  "Instance": "Info"
}

Sample Payload Field Details

Field Name

Sample Value

Data Type

Description

Active

true

Boolean

Indicates whether the Classification record is active and available for use.

Text

"Sample Classification Name"

String

Specifies the display name of the Classification record.

Is_Default

false

Boolean

Indicates whether the Classification acts as the default Classification.

Parent_Value

1

Integer

Specifies the identifier of the parent record associated with the Classification.

Instance

"Info"

String

Specifies the application instance associated with the Classification record.

Sample Payload Explanation

Attribute

Value

Explanation

Active Status

true

Creates the Classification as an active record that is available for use.

Classification Name

"Sample Classification Name"

Sets the display name of the new Classification record.

Default Status

false

Creates the Classification as a non-default Classification.

Parent Record

1

Associates the Classification with the parent record identified by 1.

Application Instance

"Info"

Associates the Classification with the specified application instance.

Note: While creating a Default Classification by setting Is_Default: true, only one default Classification must exist, setting more than one will return error.

Sample Request

curl --location 'https://<host>/API/v1/Master/IM/Classification' \
  --request POST \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <API_KEY>' \
  --data-raw '{
    "Active": true,
    "Text": "Sample Classification Name",
    "Is_Default": false,
    "Parent_Value": 1,
    "Instance": "Info"
  }'

Sample Request Details

Component

Value

Description

HTTP Method

POST

Creates a new Classification master record.

Endpoint URL

https://<host>/API/v1/Master/IM/Classification

API endpoint used to create a Classification record.

Host

<host>

Base URL of the target environment, such as Development, Test, or Production.

API Version

v1

Identifies Version 1 of the API.

Resource Group

Master

Identifies the Master Data API resource group.

Module

IM

Identifies the Incident Management module.

Master Name

Classification

Identifies the Classification master entity.

Accept Header

application/json

Indicates that the client expects the response in JSON format.

Content-Type Header

application/json

Indicates that the request body contains JSON data.

X-Api-Key Header

<API_KEY>

API key used to authenticate and authorize the request.

Request Body

JSON payload

Contains the values used to create the Classification record.

Request Body Details

Field Name

Sample Value

Data Type

Required

Description

Active

true

Boolean

Yes

Creates the Classification as an active record.

Text

"Sample Classification Name"

String

Yes

Sets the display name of the Classification record.

Is_Default

false

Boolean

Yes

Specifies that the Classification is not the default Classification.

Parent_Value

1

Integer

Yes

Identifies the parent record associated with the Classification.

Instance

"Info"

String

Yes

Specifies the application instance associated with the Classification.

Sample Request Explanation

The request creates an active Classification named Sample Classification Name, does not set the Classification as the default, associates the record with parent value 1 and the specified application instance.

Sample Success Response

HTTP 201 Created

{
  "message": "Master record created successfully.",
  "data": {
    "success": true,
    "recordId": 17,
    "displayName": "Classification",
    "moduleCode": "IM",
    "operation": "INSERT",
    "rowsAffected": 1
  },
  "executionTime": 0.0553389
}

A successful request creates the Classification record and returns the generated record identifier and execution details.

Sample Success Response Field Details

Field Name

Sample Value

Data Type

Description

message

"Master record created successfully."

String

Confirms the successful creation of the Classification record.

data

Response object

Object

Contains details about the completed create operation.

data.success

true

Boolean

Indicates whether the Classification create operation succeeded.

data.recordId

17

Integer

Unique identifier generated for the newly created Classification record.

data.displayName

"Classification"

String

Identifies the master entity the API created.

data.moduleCode

"IM"

String

Identifies the Incident Management module associated with the new record.

data.operation

"INSERT"

String

Indicates that the API performed an insert operation.

data.rowsAffected

1

Integer

Indicates the number of Classification records created by the request.

executionTime

0.0553389

Number

Indicates the time taken to process the request, in seconds.

Sample Success Response Explanation

A successful request returns HTTP 201 Created. The response confirms that the API created a new Classification record, assigns the generated record ID 17, and indicates that the operation affected one record.

Error Responses

400 Bad Request

Returned when the payload is invalid, a required field is missing, or a supplied value fails validation.

{
  "message": "Invalid request payload.",
  "errorCode": 400,
  "details": "One or more fields failed validation."
}

401 Unauthorized

Returned when valid API credentials are not provided or have expired.

{
  "message": "Unauthorized access.",
  "errorCode": 401,
  "details": "Valid API credentials are required."
}

403 Forbidden

Returned when the authenticated client does not have permission to create Classification records.

{
  "message": "You do not have permission to create master records.",
  "errorCode": 403,
  "details": "The authenticated user lacks the required privileges to perform this operation."
}

404 Not Found

Returned when the Classification master entity does not exist or the endpoint URL is invalid.

{
  "message": "Master entity not found.",
  "errorCode": 404,
  "details": "The requested master entity or endpoint does not exist."
}