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-familycurl --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": ""
}
]
}
Name | Type | Description |
---|---|---|
Response | Wrapper Model | The global response wrapper object model |
result | object | Contains the product family object with all details |
result.id | int | Product family id |
result.name | string | Product family name |
result.code | string | Product family code |
POST/api/v1/product-family
Create product family
This endpoint is used to create a new product family
Request Parameters
Name | Type | Description |
---|---|---|
name | string | Unique name of the product family |
code | string | Unique code of the product family |
Sample Request
Request
POST
/api/v1/product-familycurl --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"
}
]
}
Name | Type | Description |
---|---|---|
Response | Wrapper Model | The global response wrapper object model |
result | object | Contains the product family object with all details |
result.isValid | bool | Whether the transaction was successful or failure, true - success, false - Failure |
result.message | string | Message to display on front end (if any) in case of errors/success |
result.errors | array | List of error messages, if any |
result.messageCode | string | Response message code |
result.recordId | Guid | Record 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
Name | Type | Description |
---|---|---|
id | int | Id of the product family |
Sample Request
Request
GET
/api/v1/product-family/:idcurl --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": ""
}
]
}
Name | Type | Description |
---|---|---|
result | object | Contains the product family object with all details |
result.id | int | Product family id |
result.name | string | Product family name |
result.code | string | Product family code |
PUT/api/v1/product-family/{id}
Update Product family
This endpoint is used to update an existing Product Family details.
Request Parameters
Name | Type | Description |
---|---|---|
name | string | Name of the product family |
code | string | Code of product family |
Sample Request
Request
PUT
/api/v1/product-family/:idcurl --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"
}
]
}
Name | Type | Description |
---|---|---|
result | object | Contains the product family object with all details |
result.isValid | bool | Whether the transaction was successful or failure, true - success, false - Failure |
result.message | string | Message to display on front end (if any) in case of errors/success |
result.errors | array | List of error messages, if any |
result.messageCode | string | Response message code |
result.recordId | Guid | Record ID of the object updated / created |