post https://app.ecwid.com/api/v3//products//files
Upload a file to a product (E-goods) using binary data or external URL.
When uploading a file for a product, the file itself needs to be sent in the body of your request in a form of binary data. The file you wish to upload needs to be prepared for that format and then sent to Ecwid API endpoint.
Alternatively, you can specify an externalUrl
to your file as a request parameter and Ecwid will download it from there. You can also use a fileName
and description
as a request parameter to specify the image title and description.
Access scopes
Requires the following access scope: create_catalog
Response
A JSON object with the following fields:
Field | Type | Description |
---|---|---|
id | number | Internal file ID |
Errors
In case of error, Ecwid responds with an error HTTP status code and, optionally, JSON-formatted body containing error description
HTTP codes
HTTP Status | Description |
---|---|
400 | Request parameters are malformed |
402 | The functionality/method is not available on the merchant plan |
403 | Access token doesn't have update_catalog scope |
404 | Product is not found |
413 | The file size exceeds allowed size for plan |
415 | Unsupported content-type: expected application/octet-stream |
500 | Uploading of the file failed or there was an internal server error while processing a file |
Error response body (optional)
Field | Type | Description |
---|---|---|
errorMessage | string | Error message |