Skip to main content
POST
/
product
/
{id}
/
media
Upload Product Media
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"
}
/product//media Description:
The /product/{id}/media endpoint allows uploading media files associated with a specific product.
Method:
POST
Path Parameter:
ParameterTypeDescription
idstringThe unique identifier of the product.
Request Payload:
ParameterTypeDescription
filefileThe media file to upload.
mediaTypestringThe type of media (e.g., artwork, video, audio).

Authentication

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

Path Parameters

ParameterTypeInRequiredDescription
idstringpathāœ…Product ID

Request Body

Responses

āœ… 201 - 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

multipart/form-data
file
file
required

The media file to upload

mediaType
string
required

The type of media (e.g., artwork, video, audio)

Response

Success

message
string
mediaUrl
string
⌘I