OfficeGest
Stocks/Articles/{article}/Photo

Store article photo

Uploads a Base64 encoded image (JPEG, PNG or WebP) for the article. The file is stored under _uploads/{tenant}/{company}/artigos/ and overwrites any previous photo.

POST
/stocks/articles/{article}/photo
AuthorizationBearer <token>

In: header

Path Parameters

articlestring
imagestring

Base64-encoded image (JPEG/PNG/WebP). May include the data URI prefix.

url_safe?boolean

When true, replaces URL-safe Base64 characters (-_) with standard ones (+/) before decoding.

Response Body

curl -X POST "https://og-tenant1.test:8003/api/v2/stocks/articles/string/photo" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "/9j/4AAQSkZJRgABAQEA..."
  }'
{
  "data": {
    "article_id": "ART001",
    "image_url": "https://host/loadupload/artigos/_ART001.jpg",
    "stored_at": "2026-04-17T10:30:00Z"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}