📈Updating pricelist data
Use HTTP POST and the endpoint https://cms.realpad.eu/ws/v10/update-units
Send the following required parameters as a URL-encoded form:
login - string login obtained from our support.
password - string password obtained from our support.
data - stringified JSON object containing the instructions for updating the Units.
Sample cURL request:
curl -X POST \
-F "login=..." \
-F "password=..." \
-F 'data={"units":[{"id":12345,"priceWithoutVat":10000,"priceWithVat":12000},{"id":9876,"priceWithoutVat":20000,"priceWithVat":24000}]}' \
https://cms.realpad.eu/ws/v10/update-units
Only one top-level field units containing an array of JSON objects:
id - Realpad DB ID of the Unit to update.
priceWithoutVat - new price without VAT.
priceWithVat - new price with VAT.
You only need to specify the exact Units you want to update. If you specify a Unit, all three fields are required.
The changes are applied atomically, ie. if one of the Units changes fails validation, the entire request is rejected.
HTTP codes handling the basic states:
5xx for a server error (possible to attempt an automatic retry a few times, provided there is a standoff).
4xx of authentication/permission error (reach out to our support team - no point in retrying).
2xx for a call that was evaluated on the business logic side.
The payload for HTTP 2xx is a JSON object with a description of how the changes were applied:
In case of validation errors on the business logic side, the response will contain more detailed information:
Reach out to our support team in case of trouble.