How to Use WebAPI

Follow these steps to use the WebAPI:

  1. Open partner.directbookingtools.com
  2. Open the Swagger API and check APIs by token key and token secret, only if your user IP address is allowed. If not allowed, proceed to Step 3.
  3. Login by username and password:
    • After login, you can see your allowed IPs, user actions, account details, and website management options.
  4. You can add your IP address to the allowed list so WebAPI will allow you to pull data from the API.
  5. WebAPI has a limit to allow only 100 requests per minute for each user. If you exceed the limit, an error message will be returned.

Web API Common Errors:

If you encounter any errors while using the WebAPI, here are the possible error codes and their descriptions:

  1. E0001 - Missing Authentication: Authentication tokens are required. Please ensure you include the correct token in your API request.
  2. E0400 - Invalid Method: The HTTP method you used (GET, POST, PUT, etc.) is not supported for the requested resource. Double-check the method for the endpoint you're accessing.
  3. E0422 - Validation Failed: One or more fields in your request didn't pass the validation rules. Review the error message for details on which fields need to be corrected.
  4. E0403 - Permission Denied: You don't have permission to access this resource. Check your account or token permissions and try again.
  5. E0104 - Website Not Found: The resource (website) you're trying to access does not exist or cannot be found. Double-check the URL or ID you're using.
  6. E0010 - Invalid Token: The token you provided is not recognized by the system. Make sure the token you are using is correct and valid.
  7. E0015 - Expired Token: The token you provided has expired. Please request a new token to continue accessing the API.
  8. E0013 - Rate Limit Exceeded: You’ve sent more than 100 requests within a minute. Please wait a moment before making more requests to avoid hitting the rate limit.
  9. E0500 - IP Not Allowed: You don't have permission to access the API by the IP. Check your account and allow the IP address in the list.
  10. E0000 - Unknown Error: Something went wrong, and we couldn’t process your request. If the problem persists, please contact support for further assistance.