🖋️
Bookandlink json pms API
  • PMS Documentation
  • Authentication
  • Get Rooms
  • Update Availability
  • Update Price & Restrictions
  • Reservations
  • Save Room
  • Save Rate
Powered by GitBook
On this page
  • Authenticate
  • Fields

Was this helpful?

Authentication

For Application developers if you wish to provide user access to the Bookandlink interface via API. Method for login

Authenticate

Authenticate a user at the system.

Request :

POST http://bookandlink.com/ota/ota_update/bnl/bnl_api.php?pms_name=[pms_name]

Query body (JSON):

{
   "action":"get_token",
   "user":{
      "username":"user1234",
      "password":"1234567",
      "property_id":57
   }
}

Success Response Example

{
   "data":{
      "attributes":{
         "token":"MjAyMS0wNy0xNFQxOToxNjoxNiswNzowMDYwZWVkNTkwOGViZDU1Nw=="
      },
      "relationships":{
         "user":{
            "data":{
               "attributes":{
                  "username":"test",
                  "system_role":"user"
               },
               "type":"user"
            }
         }
      },
      "type":"session"
   },
   "meta":{
      "message":"You are successfully logged in! Add this token to authorization header to make authorized requests."
   }
}

Invalid Username Or Password Error Response

{
   "errors":{
      "code":"invalid_username_or_password",
      "title":"Invalid username/password"
   }
}

Unauthorized Ip Error Response

{
   "errors":{
      "code":"unauthorized_ip",
      "title":"Request IP is not configured for pms, Please contact to support for IP configuration."
   }
}

Invalid Request Error Response

{
   "errors":{
      "code":"invalid_request",
      "title":"Invalid request json format, please send an valid json format"
   }
}

Invalid Pms Error Response

{
   "errors":{
      "code":"invalid_pms",
      "title":"Invalid pms name, please send an valid pms name"
   }
}

Method requires a valid User Authentication object as incoming argument represented as type user.

Fields

action [required] get_token

username[required] String value

password [required] Non empty string with at least 8 symbols of length. Any symbols are allowed.

property_id[required] Integer value.

PreviousPMS DocumentationNextGet Rooms

Last updated 3 years ago

Was this helpful?