/product//media
Description:
The /product/{id}/media
endpoint allows uploading media files associated with a specific product.
Method:
POST
Path Parameter:
Parameter | Type | Description |
---|---|---|
id | string | The unique identifier of the product. |
Request Payload:
Parameter | Type | Description |
---|---|---|
file | file | The media file to upload. |
mediaType | string | The type of media (e.g., artwork, video, audio). |
curl --request POST \
--url https://server26-dot-royalti-project.uc.r.appspot.com/product/{id}/media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'mediaType=<string>' \
--form file=@example-file
{
"message": "Media uploaded successfully",
"mediaUrl": "https://storage.example.com/media/product-123/artwork.jpg"
}
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Product ID
Success
The response is of type object
.
curl --request POST \
--url https://server26-dot-royalti-project.uc.r.appspot.com/product/{id}/media \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'mediaType=<string>' \
--form file=@example-file
{
"message": "Media uploaded successfully",
"mediaUrl": "https://storage.example.com/media/product-123/artwork.jpg"
}