Skip to content

Item Group Classification

Overview:

The Item Group Classification API allows you to create, retrieve, update, and delete item group class records. This documentation provides detailed information about the endpoints, request and response formats, and field descriptions.

Create:

Endpoint: /api/message/ln_itmgrp_class_code/{ Company }

This API will create a new Item group class.

  • Method: POST
  • Content-Type: application/json
  • Authentication: Bearer <token>

Request Body:

json
{
    "data_set": "<Data-Set>",                //string
    "cls_code": "<Item-Group>",              //string
    "dsca": "<Description>",                 //string
    "delf": true                             //boolean
}

Fields Details:

Field NameDescriptionData TypeLength
data_setData setString10
cls_codeItemGroupString6
dscaDescriptionString120
delfDelete FlagBoolean1

Response Body: (Status: 200)

json
{
    "data_set": "<Data-Set>", 
    "cls_code": "<Item-Group>",
    "delf": true,
    "dsca": "<Description>"
}

Fields Details:

Field NameDescriptionData TypeExample
data_setData SetString"dataset1"
cls_codeItemGroup CodeString"XCD345"
delfDelete FlagBooleantrue
dscaDescriptionString"Item group class"

Response Body: (Status: 401 - Unauthorized / Invalid Token)

When there is no token / invalid token passed or When Normal user tries to create a new record:

json
{
    "message": "Unauthorized!"
}

Response Body: (Status: 400 - Bad Request/ Duplicate )

When the record is already present in the database:

json
{
    "message": "Record already exists!"
}

Response Body: (Status: 400 - Bad Request/ Invalid Datatype )

When passing a record with invalid datatype:

json
{
    "message": "Unable to Update to Item Classification "
}

Response Body: (Status: 500 - Internal Server Error/ Empty Field )

When passing an empty field as input to Item group:

json
{
    "message": "Validation Errors|Validation 'isNotEmpty' failed for field 'cls_code'"
}

when passing an empty field as input to dataset:

json
 {
    "message": "Validation Errors|Validation 'isNotEmpty' failed for field 'data_set'"
}

Update:

Endpoint: /api/message/ln_itmgrp_class_code/{ Company }

This API will update the specified Item group .

  • Method: PUT
  • Content-Type: application/json
  • Authentication: Bearer <token>

Request Body:

json
{
    "data_set": "<Data-Set>",     //string
    "cls_code": "<Item-Group>",   //string
    "dsca": "<Description>",      //string
    "delf": true                  //boolean
}

Response Body: (Status: 200)

json
{
    "data_set": "<Data-Set>",               
    "cls_code": "<Item-Group>",
    "delf": true,
    "dsca": "<Description>",
}

Response Body: (Status: 401 - Unauthorized / Invalid Token)

When there is no token or invalid token passed or When Normal user tries to update a existing record:

json
{
    "message": "Unauthorized!"
}

Response Body: (Status: 400 - Bad Request/ Not Found)

When the specified record is not found:

json
{
    "message": "Record not found!"
}

Response Body: (Status: 400 - Bad Request/ Invalid Datatype )

When passing a record with invalid datatype:

json
{
    "message": "Unable to Update to Item Classification "
}

Response Body: (Status: 500 - Internal Server Error/ Empty Field )

When passing an empty field as input to Item group:

json
{
    "message": "Validation Errors|Validation 'isNotEmpty' failed for field 'cls_code'"
}

when passing an empty field as input to dataset:

json
 {
    "message": "Validation Errors|Validation 'isNotEmpty' failed for field 'data_set'"
}

Delete:

Endpoint: /api/message/ln_itmgrp_class_code/{ Company }/{ record_id }

This API will delete the specified record id.

  • Method: DELETE
  • Authentication: Bearer <token>

Response Body: (Status: 200)

json
{
    "Message": "Message Deleted Sucessfully!"
}

Response Body: (Status: 401 - Unauthorized / Invalid Token)

When there is no token / invalid token passed or When Normal user tries to delete the existing record:

json
{
    "message": "Unauthorized!"
}

Response Body: (Status: 500 - Internal Server Error / Invalid Record)

When there is no record or invalid record passed:

json
{
    "Message": "Unable to Delete Record - Invalid Data Type"
}

Get:

Endpoint: /api/message/ln_itmgrp_class_code/{ Company }/{ record_id }

This API retrieves the specified record id.

  • Method: GET
  • Authentication: Bearer <token>

Response Body: (Status: 200)

json
{
    "data_set": "<data-set>", 
    "cls_code": "<Item-Group>",
    "delf": true,
    "dsca": "<Description>"
}

Response Body: (Status: 200 - success status/invalid id)

When there is no such id or invalid id is passed :

json
{
    "message": "null"
}

Response Body: (Status: 401 - Unauthorized / Invalid Token)

When there is no token or invalid token passed :

json
{
    "message": "Unauthorized!"
}

Get All:

Endpoint: /api/messages/ln_itmgrp_class_code/{ Company }/{ PageSize }/{ PageNumber }

This API retrieves all records.

  • Method: GET
  • Authentication: Bearer <token>

Response Body: (Status: 200)

json
[
    {
        "data_set": "<data-set>", 
        "cls_code": "<Item-Group>",
        "delf": true,
        "dsca": "<Description>"
    }
]

Response Body: (Status: 401 - Unauthorized / Invalid Token)

When there is no token or invalid token passed :

json
{
    "message": "Unauthorized!"
}