Product Family

This section covers the different endpoints for the Product Family operations to create, fetch, update the data.


GET/api/v1/product-family

Product Family

This endpoint is used to get list of all the product families

Request Parameters

NA - No request parameters required for this endpoint

Sample Request

Request

GET
/api/v1/product-family
curl --location '<api_url>/api/v1/product-family' \
--header 'Accept: text/plain' \
--header 'Authorization: bearer {{apiKey}}'

Response Model

Response

{
    "statusCode": 200,
    "status": "OK",
    "error": null,
    "errorId": null,
    "message": null,
    "messageCode": "OK",
    "result": [
      {
        "id": 0,
        "name": "",
        "code": ""
      }
    ]
}
NameTypeDescription
ResponseWrapper ModelThe global response wrapper object model
resultobjectContains the product family object with all details
result.idintProduct family id
result.namestringProduct family name
result.codestringProduct family code


POST/api/v1/product-family

Create product family

This endpoint is used to create a new product family

Request Parameters

NameTypeDescription
namestringUnique name of the product family
codestringUnique code of the product family

Sample Request

Request

POST
/api/v1/product-family
curl --location --request POST '<api_url>/api/v1/product-family' \
--header 'Content-Type: application/json' \
--header 'Accept: text/plain' \
--header 'Authorization: {{apiKey}}'\
--data '{
"name": "string",
"code": "string"
}'

Response Model

Response

{
    "statusCode": 200,
    "status": "OK",
    "error": null,
    "errorId": null,
    "message": null,
    "messageCode": "OK",
    "result": [
      {
        "isValid": "true",
        "message": "",
        "errors": [
            "string"
        ],
        "messageCode": "string",
        "recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      }
    ]
}

NameTypeDescription
ResponseWrapper ModelThe global response wrapper object model
resultobjectContains the product family object with all details
result.isValidboolWhether the transaction was successful or failure, true - success, false - Failure
result.messagestringMessage to display on front end (if any) in case of errors/success
result.errorsarrayList of error messages, if any
result.messageCodestringResponse message code
result.recordIdGuidRecord ID of the object updated / created


GET/api/v1/product-family/{id}

Product Family Detail

This endpoint is used to get product family details based on id

Request Parameters

NameTypeDescription
idintId of the product family

Sample Request

Request

GET
/api/v1/product-family/:id
curl --location --request GET '<api_url>/api/v1/product-family/{productFamilyId}' \
--header 'Accept: text/plain' \
--header 'Authorization: {{apiKey}}'

Response Model

Response

{
 "statusCode": 200,
 "status": "OK",
 "error": null,
 "errorId": null,
 "message": null,
 "messageCode": "OK",
 "result": [
   {
     "id": 0,
     "name": "",
     "code": ""
   }
 ]
}
NameTypeDescription
resultobjectContains the product family object with all details
result.idintProduct family id
result.namestringProduct family name
result.codestringProduct family code


PUT/api/v1/product-family/{id}

Update Product family

This endpoint is used to update an existing Product Family details.

Request Parameters

NameTypeDescription
namestringName of the product family
codestringCode of product family

Sample Request

Request

PUT
/api/v1/product-family/:id
curl --location --request PUT '<api_url>/api/v1/product/25456' \
--header 'Content-Type: application/json' \
--header 'Accept: text/plain' \
--header 'Authorization: bearer {{api-key}}'\
--data '{
"name": "string",
"code": "string"
}'

Response Model

Response

{
    "statusCode": 200,
    "status": "OK",
    "error": null,
    "errorId": null,
    "message": null,
    "messageCode": "OK",
    "result": [
      {      
        "isValid": "true",
        "message": "",
        "errors": [
            "string"
        ],
        "messageCode": "string",
        "recordId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"      
      }
    ]
}
NameTypeDescription
resultobjectContains the product family object with all details
result.isValidboolWhether the transaction was successful or failure, true - success, false - Failure
result.messagestringMessage to display on front end (if any) in case of errors/success
result.errorsarrayList of error messages, if any
result.messageCodestringResponse message code
result.recordIdGuidRecord ID of the object updated / created