Skip to main content
PUT
/
product
/
{id}
/
assets
Update Product Assets
curl --request PUT \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/product/{id}/assets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "assets": [
    {
      "asset": "asset-id-1",
      "number": 1
    },
    {
      "asset": "asset-id-2",
      "number": 2
    }
  ]
}'
{
  "message": "Assets added to Products"
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Code Examples

const response = await fetch('https://server26-dot-royalti-project.uc.r.appspot.com/product/example-id/assets', {
  method: 'PUT',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "assets": [
      {
        "asset": "sample-asset",
        "number": 1
      }
    ]
  })
});

const data = await response.json();
console.log(data);

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Path Parameters

id
string
required

Product ID

Body

application/json
assets
object[]
required

Response

Success

message
string