API ReferenceProduct ImagesAdd an image to a product

Add an image to a product

POST
/products/{productId}/images

Authorization

x-api-key<token>

API Key authentication via header

In: header

Request Body

application/jsonRequired
pathsRequiredstring
Format: "uri"
removeBgboolean

Path Parameters

productIdRequiredstring
curl -X POST "https://niravai.com/api/v1/products/string/images" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "paths": "http://example.com",
    "removeBg": true
  }'

Image added successfully

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",
  "paths": "http://example.com",
  "rawImageUrl": "http://example.com",
  "imageType": "manual",
  "status": "approved",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}