JSON API » hotels » hotels/create
Creates a new hotel gateway.
Input parameters
Requires authentication and the hotels role privilege.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
cos_all | Integer | ID of COS when user is allowed all calls. | Yes | |
cos_free | Integer | ID of COS when user is allowed free calls. | Yes | |
cos_internal | Integer | ID of COS when user is allowed internal calls. | Yes | |
cos_national | Integer | ID of COS when user is allowed national calls. | Yes | |
customer | Integer | ID of hotel customer. | Yes | |
gateway | String | IP address of PMS gateway. | Yes | |
name | String | Name. | Yes | |
description | String | Description. | No | Empty string./td> |
property | String | Identifier of property sent by PMS gateway. Normally empty string. | No | Empty string./td> |
validation | Integer | 1 to validate input then return, 0 for full action. | No | 0 |
Responses
Code | Description |
---|---|
200 | Success. |
201 | Input passed validation. Only returned if validation=1. |
400 | Invalid input parameters specified. Check the key and message fields for more details. |
401 | The authentication details provided are invalid. |
402 | Your role does not allow this. |
Data returned
The ID of the created hotel gateway.
Example: With required parameters
http://enswitch.example.com/api/json/hotels/create/?auth_username=user;auth_password=password;name=example;customer=123;cos_all=124;cos_free=125;cos_internal=126;cos_national=127{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "id":123 } }
Change history
Version | Changes |
---|---|
3.13 | Function added. |