Docs
Product Repository APIProduct

Replace a local product

Security groups:Local Product Creators
PUT
/shops/{shopId}/products/local

Replaces a local Product with the provided payload. If the Product does not exist it is created.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

shopId*integer

The shop ID.

Formatint64
Range1 <= value

Query Parameters

productId*string

The ID of the product.

Lengthlength <= 65
currentVersion*integer

The current version of product. Must be a non-negative integer.

Range0 <= value
keepFiles?boolean

When true (default), existing files attached to the product are preserved after an update. When false, all attached files are deleted.

Defaulttrue
eligibleApplications?array<>

Validate this product against the listed eClear applications. Each application has a defined set of required fields; if all required fields are present, the product is tagged for that application. Tags appear in applicationTags on the product response.

Request Body

application/json

Response Body

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/shops/5632/products/local?productId=ProductId1&currentVersion=1" \  -H "Content-Type: application/json" \  -d '{}'
Empty
{
  "code": "BadRequest",
  "message": "Bad request.",
  "status": "BAD_REQUEST"
}
{
  "code": "NotFound",
  "message": "The requested resource could not be found. Either no object exists with the ID provided in the path, or the path is incorrect.",
  "status": "NOT_FOUND"
}
{
  "status": "CONFLICT",
  "code": "CONFLICT_ENTITY_MODIFIED",
  "message": "Conflict.",
  "timestamp": "2024-06-21T12:36:37.900574",
  "path": "/path"
}
{
  "status": "UNPROCESSABLE_ENTITY",
  "timestamp": "2024-02-05T18:04:28Z",
  "code": "INVALID_DATA_EXCEPTION",
  "message": "The request entity cannot be processed.",
  "path": "/path"
}