For administrators and technical users connecting third-party modules to NewBook.
The NewBook API is a REST interface that allows authorised third-party applications to read and write data in a NewBook property account. Every request must be authenticated with an API key generated from the NewBook admin panel. Requests are made over HTTPS and responses are returned as JSON.
Include your NewBook API key in the X-Api-Key header of every request. Example: X-Api-Key: <your-newbook-api-key>. Keys must be kept confidential. If compromised, revoke it from the NewBook admin panel and generate a new one immediately.
NewBook enforces a per-API-key rate limit. Exceeding it returns HTTP 429. Implement exponential back-off: wait 1s on the first 429, 2s on the second, 4s on the third, and so on. Batch requests by date range wherever possible rather than calling per night, to minimise call volume.
| HTTP status | Meaning | Action |
|---|---|---|
| 200/201 | Success | Process the response normally |
| 400 | Invalid request — malformed payload | Check the request structure against the API documentation |
| 401 | Unauthorised — invalid API key | Verify the API key is correct and not revoked |
| 403 | Forbidden — insufficient permissions | Verify the API key scopes inside NewBook |
| 404 | Resource not found | Verify the reservation or rate-plan identifier |
| 429 | Rate limit exceeded | Apply exponential back-off |
| 500/503 | NewBook server error | Retry after 60s; contact NewBook support if it persists |
NewBook provides a sandbox environment for API testing on certain subscription tiers. Ask your NewBook account manager for access. CloudBookMod runs integration tests against the NewBook sandbox before every module release and after every NewBook API update notification.