Skip to main content
PUT
/
api
/
v1
/
products
/
{productId}
Update product
curl --request PUT \
  --url https://apix.us.amity.co/api/v1/products/{productId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "productName": "Premium Wireless Headphones",
  "productUrl": "https://example.com/products/premium-wireless-headphones",
  "status": "active",
  "price": 149.99,
  "currency": "USD",
  "thumbnailUrl": "https://example.com/images/headphones-new-thumb.jpg",
  "thumbnailMode": "fill"
}
'
{
  "status": "success",
  "data": {
    "_id": "64a1b2c3d4e5f6g7h8i9j0k1",
    "productId": "prod-12345",
    "networkId": "network-abc123",
    "productName": "Premium Headphones",
    "productUrl": "https://example.com/products/premium-headphones",
    "status": "active",
    "price": 99.99,
    "currency": "USD",
    "thumbnailUrl": "https://example.com/images/headphones-thumb.jpg",
    "thumbnailMode": "fit",
    "importSource": "manual",
    "createdBy": "user-xyz789",
    "updatedBy": "user-xyz789",
    "createdAt": "2024-01-15T10:30:00.000Z",
    "updatedAt": "2024-01-15T10:30:00.000Z",
    "isDeleted": false
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

productId
string
required

The unique identifier of the product

Required string length: 1 - 100

Body

application/json
productName
string

Name of the product

Required string length: 1 - 200
Example:

"Premium Wireless Headphones"

productUrl
string<uri>

URL to the product page

Example:

"https://example.com/products/premium-wireless-headphones"

status
enum<string>

Product status

Available options:
active,
archived
Example:

"active"

price
number

Product price (must be positive)

Required range: x > 0
Example:

149.99

currency
string

ISO 4217 currency code (3 characters)

Required string length: 3
Example:

"USD"

thumbnailUrl
string<uri>

URL to the product thumbnail image

Example:

"https://example.com/images/headphones-new-thumb.jpg"

thumbnailMode
enum<string>

How the thumbnail should be displayed

Available options:
fit,
fill
Example:

"fill"

Response

Successful response with product data

status
string
Example:

"success"

data
object