Skip to content
BolderBolder API
Esc
navigateopen⌘Jpreview

Upload product image

Uploads a new image to a product. The image data must be Base64-encoded and sent in the data field along with the file name and MIME type. Requires admin scope.

POST/products/{product_id}/assets
Authorization
AuthorizationBearer token (JWT) · headerrequired
OAuth 2.0 Bearer token. Obtain via `POST https://auth.onbolder.com/oauth/token`.
Scopes:admin
Path parameters
product_idstringrequired
Product ID or slug
Request body
requiredapplication/json
datastringrequired
Base64-encoded image data URI (`data:image/jpeg;base64,...`)
file_namestringrequired
titlestring
descriptionstring
Responses
201Image uploaded
file_namestring
titlestring
descriptionstring
_linksobject
Show properties
thumbnailHalLink
Show properties
hrefstring
methodstring
titlestring
typestring
templatedboolean
smallHalLink
Show properties
hrefstring
methodstring
titlestring
typestring
templatedboolean
mediumHalLink
Show properties
hrefstring
methodstring
titlestring
typestring
templatedboolean
largeHalLink
Show properties
hrefstring
methodstring
titlestring
typestring
templatedboolean
originalHalLink
Show properties
hrefstring
methodstring
titlestring
typestring
templatedboolean
btc:delete_product_assetHalLink
Show properties
hrefstring
methodstring
titlestring
typestring
templatedboolean
422Validation errors
_classstring[]
_embeddedobject
Show properties
errorsobject[]
Show properties
Array of object
_classstring[]
fieldstring
messagesstring[]
Request
curl -X POST "https://api.onbolder.com/v1/products/string/assets" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "data": "string",
  "file_name": "string",
  "title": "string",
  "description": "string"
}'
Response
{
  "file_name": "string",
  "title": "string",
  "description": "string",
  "_links": {
    "thumbnail": {
      "href": "string",
      "method": "string",
      "title": "string",
      "type": "string",
      "templated": true
    },
    "small": {
      "href": "string",
      "method": "string",
      "title": "string",
      "type": "string",
      "templated": true
    },
    "medium": {
      "href": "string",
      "method": "string",
      "title": "string",
      "type": "string",
      "templated": true
    },
    "large": {
      "href": "string",
      "method": "string",
      "title": "string",
      "type": "string",
      "templated": true
    },
    "original": {
      "href": "string",
      "method": "string",
      "title": "string",
      "type": "string",
      "templated": true
    },
    "btc:delete_product_asset": {
      "href": "string",
      "method": "string",
      "title": "string",
      "type": "string",
      "templated": true
    }
  }
}