Example:
{
"id": 1,
"parent_product_id": "1",
"child_product_id": "2 ",
"relationship_id": "1",
"status": active,
"sort_order": 1
}
| Code | Description |
|---|---|
| 401 | Unauthorized. Include a WWW-Authenticate header field containing a challenge applicable to the requested resource. |
| 403 | Forbidden. The request was a valid request, but the server is refusing to respond to it. 403 error semantically means "unauthorized", i.e. the user does not have the necessary permissions for the resource. |
| 404 | Not Found. The requested resource could not be found. |
| 422 | Unprocessable Entity. The request was well-formed but was unable to be followed due to semantic errors. |
| 500 | Internal Server Error. An unexpected condition was encountered. |
Response:
{
"page": 1,
"per_page": 50,
"total_pages": 1,
"total_entries": 1,
"entries": [
{
"id": 1,
"sort_order": 1,
"status": "active",
"relationship": {
"id": 2,
"name": "My Relationship 1",
"code": "my_relationship_1"
},
"parent_product": {
"id": 18,
"code": "parent-code",
"name": "Parent Product"
},
"child_product": {
"id": 19,
"code": "child-code",
"name": "Child Product"
}
}
]
}
| Param name | Description |
|---|---|
|
per_page optional |
Number of objects in one response. Default is 50 Validations:
|
|
page optional |
Page number. Default is 1 Validations:
|
|
created_time_from optional |
ISO_8601 format 2016-05-30T05:13:26Z Validations:
|
|
created_time_to optional |
ISO_8601 format 2016-05-30T05:13:26Z Validations:
|
|
updated_time_from optional |
ISO_8601 format 2016-05-30T05:13:26Z Validations:
|
|
updated_time_to optional |
ISO_8601 format 2016-05-30T05:13:26Z Validations:
|
|
id optional |
Product Relationship ID Validations:
|
|
status optional |
Product Relationship status Validations:
|
| Code | Description |
|---|---|
| 401 | Unauthorized. Include a WWW-Authenticate header field containing a challenge applicable to the requested resource. |
| 403 | Forbidden. The request was a valid request, but the server is refusing to respond to it. 403 error semantically means "unauthorized", i.e. the user does not have the necessary permissions for the resource. |
| 404 | Not Found. The requested resource could not be found. |
| 422 | Unprocessable Entity. The request was well-formed but was unable to be followed due to semantic errors. |
| 500 | Internal Server Error. An unexpected condition was encountered. |
request:
{
"product_relationship": {
"status": "active",
"sort_order": 1,
"relationship_id": 2,
"parent_product_id": 21,
"child_product_id": 19
}
}
or
{
"product_relationship": {
"status": "active",
"sort_order": 2,
"relationship_code": "relationship_1",
"parent_product_code": "product_code_1",
"child_product_code": "product_code_2"
}
}
response:
{
"id": 2,
"sort_order": 20,
"status": "active",
"relationship": {
"id": 2,
"name": "My Relationship 1",
"code": "my_relationship_1"
},
"parent_product": {
"id": 20,
"code": "product_code_1",
"name": "Product 1"
},
"child_product": {
"id": 19,
"code": "product_code_1",
"name": "Product 2"
}
}
| Param name | Description |
|---|---|
|
product_relationship required |
Validations:
|
|
product_relationship[relationship_id] optional , nil allowed |
ID of the relationship Validations:
|
|
product_relationship[relationship_code] optional , nil allowed |
Code of the relationship Validations:
|
|
product_relationship[parent_product_id] optional , nil allowed |
ID of the parent product Validations:
|
|
product_relationship[parent_product_code] optional , nil allowed |
Code of the parent product Validations:
|
|
product_relationship[child_product_id] optional , nil allowed |
ID of the child product Validations:
|
|
product_relationship[child_product_code] optional , nil allowed |
Code of the child product Validations:
|
|
product_relationship[status] optional , nil allowed |
Validations:
|
|
product_relationship[sort_order] optional , nil allowed |
Product Relationship ordering Validations:
|
| Code | Description |
|---|---|
| 401 | Unauthorized. Include a WWW-Authenticate header field containing a challenge applicable to the requested resource. |
| 403 | Forbidden. The request was a valid request, but the server is refusing to respond to it. 403 error semantically means "unauthorized", i.e. the user does not have the necessary permissions for the resource. |
| 404 | Not Found. The requested resource could not be found. |
| 422 | Unprocessable Entity. The request was well-formed but was unable to be followed due to semantic errors. |
| 500 | Internal Server Error. An unexpected condition was encountered. |
response:
{
"id": 1
}