WinShopAPI docs
ReferenceProduct

Replace all user-group memberships

Replaces the product's whole set of user-group memberships with the list in the body, then returns the resulting set. Memberships the body leaves out are removed. Requires `Permissions.Product.Update`.

PUT
/api/products/{productId}/user-group-members

Authorization

Bearer
headerAuthorizationBearer <token>

OAuth 2.0 client credentials. Obtain a client id/secret from Winshop support ([email protected]), then POST to the token URL.

Path Parameters

productId*integer
Formatint32

Request Body

application/json
  1. body
[index: integer]?

Response Body

application/json
  1. response
[index: integer]?
curl -X PUT 'https://<your-instance>/api/products/0/user-group-members' \  -H 'Authorization: Bearer <access-token>' \  -H 'Content-Type: application/json' \  -d '[  {}]'
[  {    "id": 0,    "productId": 0,    "userGroupId": 0  }]