Skip to main content
PUT
/
product
/
{id}
/
artists
Update Product Artists
curl --request PUT \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/product/{id}/artists \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "artists": [
    "artist-id-1",
    "artist-id-2"
  ]
}'
{
  "message": "Artist added to product"
}
/product//artists Description:
The /product/{id}/artists endpoint updates the artists associated with a specific product. It replaces all existing artist associations with the provided list.
Method:
PUT
Path Parameter:
ParameterTypeDescription
idstringThe unique identifier of the product.
Request Body:
ParameterTypeDescription
artistsarrayArray of artist IDs to associate with the product.

Authentication

This endpoint requires authentication. Include your bearer token in the Authorization header.

Path Parameters

ParameterTypeInRequiredDescription
idstringpathProduct ID

Request Body

Example Request

{
  "artists": [
    "artist-id-1",
    "artist-id-2"
  ]
}

Request Schema

FieldTypeRequiredDescription
artistsarrayArray of artist IDs to associate with the product

Responses

✅ 200 - Success

⚠️ 401 - Unauthorized

⚠️ 404 - Not Found

❌ 500 - Internal Server Error

Tags

Product

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
artists
string[]
required

Array of artist IDs to associate with the product

Response

Success

message
string
I