Viewrium Docs
HTTP referenceProducts

Update an image

PATCH/v1/products/{id}/images/{image_id}

Changes one image: its review decision, shadow and background, filename and alt text. Send null to clear an override. Answers the image as it now reads. 400 for a decision back to pending; 404 for an image not on the product.

Path Parameters

id*Id

The product's id.

Formatuuid
image_id*Image Id

The image's id, from the product's images.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

The image fields to change. Leave a field out to keep it; send null to clear an override.

Response Body

application/json

application/json

curl -X PATCH "https://example.com/v1/products/497f6eca-6276-4993-bfeb-53cbbbba6f08/images/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "view": "string",  "kind": "wanted",  "stands_for": "string",  "status": "planned",  "skip_reason": "string",  "route": "reuse",  "source": "photograph",  "evidence": "string",  "azimuth": "string",  "tilt": "string",  "source_photo_id": "a7f5490c-d09d-4c87-9733-d1cad32c6e5a",  "attempts": 0,  "flagged": false,  "cut_flagged": false,  "cut_problems": "string",  "review_status": "pending",  "filename": "string",  "alt_text": "string",  "filename_override": "string",  "alt_override": "string",  "shadow_override": {    "mode": "silhouette",    "tone": [      0,      0,      0    ],    "silhouette": {      "length": 0,      "lean": 0,      "blurNear": 0,      "blurFar": 0,      "opacity": 0,      "distanceFade": 0    },    "contact": {      "trailPx": 0,      "dark": 0,      "end": 0,      "midpoint": 0,      "regionHeight": 0    },    "ground": {      "nudge": 0,      "tilt": 0    }  },  "background_override": [    0,    0,    0  ],  "frame_scale": 0,  "contact_regions": [    [      0    ]  ],  "raw_url": "string",  "cutout_url": "string",  "warnings": [    {      "kind": "cut",      "scope": "image",      "title": "string",      "detail": "string",      "view": "string"    }  ],  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
{  "error": {    "code": "string",    "message": "string",    "details": null  }}