Replace the file of a product's document
PUT/v1/materials/:type/:id/documents/:documentId/file
Puts another PDF in the document's place. Send a form (multipart/form-data) with it in file. The document keeps its id, name and description; offers that took it over keep the file they have. Sending the file it has changes nothing, a file another document of the product has is refused (409 document_already_on_material). Requires the write:materials scope.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 413
- 415
- 429
- 500
The document with the new file.
validation_error: the body is no form, the file is missing or empty, or a field is not valid. message names the problem.
missing_api_key or invalid_api_key: no API key was sent, or it is wrong, expired or revoked.
insufficient_scope: the API key does not have the scope this endpoint needs. required names it.
not_found: there is no such product of this type in your catalog, or no such document of it.
document_already_on_material: another document of the product has this very file, as documentId.
file_too_large: the file has more than 20 MiB.
file_type_not_allowed: the file is no PDF.
rate_limited: the API key has stored 1000 files within the hour. Try again after the seconds in the Retry-After header.
Response Headers
db_error: the database refused or failed the request. storage_error: the file could not be stored. message has the details.