Partner API
API Endpoints
Products

Product Editing

Retailers can edit product data in NearSt. This capability can be used to update a product's metadata (title, description, images and brand), as well as controlling in which channels the product is shown.

Endpoints

PATCH/retailers/{retailerId}/inventory/{barcode}

Update a product for all stores

PATCH/retailers/{retailerId}/stores/{storeId}/inventory/{barcode}

Update a product for a single store

Examples

Hide a barcode for all stores

Hide a specific barcode from all stores in a retailer account by setting the hidden field to true.

PATCH https://partner-api.near.st/retailers/{retailerId}/inventory/5010368061112
Content-Type: application/json
 
{
    "hidden": true
}

Set enabled channels

Set the channels for which a product is visible by setting the channels field to an array of channel IDs. These correspond with the IDs returned by the GET /channels endpoint.

Only channels enabled for the given store will be accepted.

PATCH https://partner-api.near.st/retailers/{retailerId}/inventory/5010368061112
Content-Type: application/json
 
{
    "channels": ["google"]
}

Add custom data for product in one store

You can also call this API for a specific store, by adding /stores/{id}/ in the request URL, like shown below. Remember that when adding custom data, all the required fields should be specified.

PATCH https://partner-api.near.st/retailers/{retailerId}/stores/{storeId}/inventory/5010368061112
Content-Type: application/json
 
{
    "title": "Cuprinol Garden Shades 1 Litre Willow",
    "description": "The 1 Litre Willow from ITS is a specially designed...",
    "brand": "Cuprinol",
    "image": ["https://..."]
}