Add a picture to an offer
POST/v1/offers/:id/pictures
Stores a picture, such as a visualisation of the roof, and shows it on the offer. Send a form (multipart/form-data) with a JPEG, PNG or WebP of at most 5 MB in file; orderPriority is optional. Send it in the size it is shown in, 1920 pixels are plenty: it is stored as it is. Possible while the offer is a draft.
An offer shows a picture once. When it has the very same file already, the call answers 409 picture_already_in_offer and names it in pictureId, so a call whose answer you did not get can simply be repeated. Requires the write:offers scope.
Request
Responses
- 201
- 400
- 401
- 403
- 404
- 409
- 413
- 415
- 429
- 500
The new picture.
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 record in your company.
picture_already_in_offer: the offer has this very picture already, as pictureId. offer_not_draft: the offer was published already; its pictures can no longer change.
file_too_large: the picture has more than 5 MB.
file_type_not_allowed: the file is no JPEG, PNG or WebP.
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.