Provider API
NOTE: This document is a work in progress.
Resource Group ¶
Valuate ¶
Cancel an availabilityGET/api/provider/cancel
Example URI
GET http://localhost:3000/api/provider/cancel
Request
Headers
Content-Type: application/jsonBody
{
"checkout_data": [
{
"user_data": [],
"payment": ""
}
],
"ticket": [
{
"a": "xxx",
"b": "xxx"
}
],
"atrapalo_order_id": 178176
}Response
200Headers
Content-Type: application/json;charset=UTF-8Body
{
"provider_order_information": [
{
"locata": "xxx"
}
]
}Response
400Headers
Content-Type: application/json;charset=UTF-8Body
{
"errors": [
{
"yyy": "invalid parameter"
}
]
}Response
402Headers
Content-Type: application/json;charset=UTF-8Body
{
"errors": [
{
"change_price": "xxx",
"no_availability": "xxx",
"unknown_exception": "xxx",
"timeout_exception": "xxx"
}
]
} FORMAT: 1A
HOST: http://localhost:3000
NOTE: This document is a **work in progress**.Valuate ¶
ValuatePOST/api/provider/valuate
Example URI
POST http://localhost:3000/api/provider/valuate
Request
OKHeaders
Content-Type: application/json;charset=UTF-8Body
{
"checkIn": "YYY-mm-dd",
"checkOut": "YYY-mm-dd",
"occupancy": "AA",
"hotelCode": "AA",
"locationCode": "AA"
}Response
200Headers
Content-Type: text/plain;charset=UTF-8Body
This is an exampleRequest
OKHeaders
Content-Type: application/json;charset=UTF-8Body
{
"checkIn": "YYY-mm-dd",
"checkOut": "YYY-mm-dd",
"occupancy": "A",
"hotelCode": "A",
"locationCode": "A"
}Response
200Headers
Content-Type: application/xml;charset=UTF-8Body
<csw:GetRecordsResponse xmlns:csw="http://www.opengis.net/cat/csw" xmlns:dc="http://www.purl.org/dc/elements/1.1/" xmlns:dct="http://www.purl.org/dc/terms/" xsi:schemaLocation="http://www.opengis.net/cat/csw http://localhost:8888/SpatialWS-SpatialWS-context-root/cswservlet?recordTypeId=1 " version="2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<csw:RequestId>4</csw:RequestId>
<csw:SearchStatus status="complete"/>
<csw:SearchResults recordSchema="http://www.opengis.net/cat/csw" numberOfRecordsMatched="1" numberOfRecordsReturned="1" nextRecord="0" expires="2007-02-09T16:32:35.29Z">
<csw:Record xmlns:dc="http://www.purl.org/dc/elements/1.1/" xmlns:ows="http://www.opengis.net/ows" xmlns:dct="http://www.purl.org/dc/terms/">
<dc:contributor xmlns:dc="http://www.purl.org/dc/elements/1.1/" scheme="http://www.example.com">Raja</dc:contributor>
<dc:identifier xmlns:dc="http://www.purl.org/dc/elements/1.1/">REC-1</dc:identifier>
</csw:Record>
</csw:SearchResults>
</csw:GetRecordsResponse>Request
OKHeaders
Content-Type: application/json;charset=UTF-8Body
{
"checkIn": "YYY-mm-dd",
"checkOut": "YYY-mm-dd",
"occupancy": "A",
"hotelCode": "H",
"locationCode": "C"
}Response
200Headers
Content-Type: application/json;charset=UTF-8Body
{
"rate_provider": [
{
"provider_cancel_policies": "xxx",
"deatiledRate": "xxx",
"remarks": "xxx"
}
],
"ticket": [
{
"a": "xxx",
"b": "xxx"
}
],
"ttl": 3600
}Request
Bad ParamsHeaders
Content-Type: application/json;charset=UTF-8Body
{
"checkIn": "YYY-mm-dd",
"checkOut": "YYY-mm-dd",
"occupancy": "A",
"hotelCode": "B",
"locationCode": "?"
}Response
400Headers
Content-Type: application/json;charset=UTF-8Body
{
"errors": [
{
"locationCode": "invalid parameter"
}
]
}Request
No availabilityHeaders
Content-Type: application/json;charset=UTF-8Body
{
"checkIn": "YYY-mm-dd",
"checkOut": "YYY-mm-dd",
"occupancy": "A",
"hotelCode": "B",
"locationCode": "Z"
}Response
402Headers
Content-Type: application/json;charset=UTF-8Body
{
"errors": [
{
"no_availability": "xxx"
}
]
}