Services

Replace a service listing's image

Replaces the service listing's image. Send a file, image_url, or image_base64.

post/services/{id}/update-image

Request

  • Base URL: https://api.purplegrain.com/api/v1
  • URL: https://api.purplegrain.com/api/v1/services/{id}/update-image
  • Auth: HTTP bearer

Path parameters

idstring required

Id of the record

Query parameters

includestring
Example:owner,place.location

Comma-separated snake_case relationship paths to embed (JSON:API included array, or inlined for application/json). Never embedded by default; unknown paths ignored; dot notation selects children; max 10 paths. Allowed paths: owner, category, city, city.location, place, place.location, location.

Request body

image_urlstring uri

Publicly reachable http(s) URL of the image to fetch and attach. Prefer this when the image already lives somewhere addressable.

image_base64string

Base64-encoded image bytes (optionally a "data:...;base64," URI). Use when you hold raw bytes and have no URL.

Response

Success. When the include query parameter is used, the response may contain an included array (JSON:API) or inlined related resources (application/json).

Example response

{
  "data": {
    "type": "service"
  }
}

Changes

No recorded changes to this operation across all 2 revisions of this API.