Version 5 only.
Example: { "id": 1, "code": "Npc Entity 1", "name": "Npc Entity 1" }
DEPRECATED
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, "code": "npc_entity_1", "name": "NPC Entity 1", "product_class": { "id": 7, "name": "Season" }, "product_family": { "id": 1, "code": "family_1", "name": "Family 1" }, "attribute_values": [ { "attribute_definition_id": 16, "attribute_definition_code": "season", "data": "Winter" } ] } ] }
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 |
Npc Entity ID Validations:
|
code optional |
Npc Entity code Validations:
|
name optional |
Npc Entity name Validations:
|
response_associated_fields optional |
One of ‘product_class’, ‘product_family’, ‘attribute_values’. The information related to the npc entity to be included in the npc entity data response. Use comma to join multiple fields. Validations:
|
DEPRECATED
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: { "npc_entity": { "code": "npc_entity_1", "name": "NPC Entity 1", "product_class_name": "Season", "product_family_code": "family_1", "attribute_values": { "season": "Winter", "family_attr_1": "family1" }, "media_items": [ { "media_item_type": "ImageMediaItem", "url": "http://s3.amazonaws.com/cc/image1.jpg", "description": "", "sort_order": 0, "is_primary": false, "is_uploaded": null, "tag_list": [] } ], "price_items": [ { "amount": 45, "enabled?": true, "price_book_name": "default", "from": null, "to": null } ], "categories": [ { "path": "Engine Oil", "is_primary": true, "category_set": "default" } ], } } response: { "id": 1, "code": "npc_entity_1", "product_class_id": 7, "product_family_id": 1, "created_at": "2019-08-30T16:16:05.302+10:00", "updated_at": "2019-09-02T15:05:37.613+10:00", "name": "NPC Entity 1" }
Param name | Description |
---|---|
npc_entity required |
Validations:
|
npc_entity[code] required |
Code of the npc entity Validations:
|
npc_entity[name] required |
Name of the npc entity Validations:
|
npc_entity[product_class_name] required |
Class name that this product is assigned to. This must be created beforehand Validations:
|
npc_entity[product_family_code] optional , nil allowed |
Product family code Validations:
|
npc_entity[attribute_values] optional , nil allowed |
Attribute values assigned to the NPC entity. Validations:
|
npc_entity[media_items] optional , nil allowed |
Set media items to the entity (existing media items will be removed). Validations:
|
npc_entity[media_items][media_item_type] optional , nil allowed |
Validations:
|
npc_entity[media_items][url] optional , nil allowed |
URL that stores the corresponding media item Validations:
|
npc_entity[media_items][description] optional , nil allowed |
Description for the media item Validations:
|
npc_entity[media_items][sort_order_position] optional , nil allowed |
The position of the media item. Non negative integer is supported Validations:
|
npc_entity[media_items][is_primary] optional , nil allowed |
Make this media item as primary Validations:
|
npc_entity[media_items][tag_list] optional , nil allowed |
Tags for this media item Validations:
|
npc_entity[media_items][processing_options] optional , nil allowed |
Options to perform extra image processing on the media item. This is applicable only when media_item_type is ‘ImageMediaItem’ Validations:
|
npc_entity[media_items][processing_options][apply_background] optional , nil allowed |
Setting this to true would result in a new media item created against the product with background applied. Removes transparency. Validations:
|
npc_entity[media_items][processing_options][background_colour] optional , nil allowed |
The colour name or a hex colour code for the background colour for the created media item. Defaults to white. Validations:
|
npc_entity[media_items][processing_options][processed_tags] optional , nil allowed |
The tags for the created media item. Validations:
|
npc_entity[price_items] optional , nil allowed |
Add new prices or update existing prices if they exist. Validations:
|
npc_entity[price_items][price_book_name] optional , nil allowed |
Name of an existing price book to which this price item is linked Validations:
|
npc_entity[price_items][from] optional , nil allowed |
Valid from Validations:
|
npc_entity[price_items][to] optional , nil allowed |
Valid to Validations:
|
npc_entity[price_items][amount] optional , nil allowed |
Validations:
|
npc_entity[categories] optional , nil allowed |
Set the npc entity’s categories to these categories (existing categories will be removed) Validations:
|
npc_entity[categories][id] optional , nil allowed |
Category ID Validations:
|
DEPRECATED
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 }