Back to top

Provider API

NOTE: This document is a work in progress.

Resource Group

Valuate

Cancel an availability
GET/api/provider/cancel

Example URI

GET http://localhost:3000/api/provider/cancel
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "checkout_data": [
    {
      "user_data": [],
      "payment": ""
    }
  ],
  "ticket": [
    {
      "a": "xxx",
      "b": "xxx"
    }
  ],
  "atrapalo_order_id": 178176
}
Response  200
HideShow
Headers
Content-Type: application/json;charset=UTF-8
Body
{
  "provider_order_information": [
    {
      "locata": "xxx"
    }
  ]
}
Response  400
HideShow
Headers
Content-Type: application/json;charset=UTF-8
Body
{
  "errors": [
    {
      "yyy": "invalid parameter"
    }
  ]
}
Response  402
HideShow
Headers
Content-Type: application/json;charset=UTF-8
Body
{
    "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

Valuate
POST/api/provider/valuate

Example URI

POST http://localhost:3000/api/provider/valuate
Request  OK
HideShow
Headers
Content-Type: application/json;charset=UTF-8
Body
{
  "checkIn": "YYY-mm-dd",
  "checkOut": "YYY-mm-dd",
  "occupancy": "AA",
  "hotelCode": "AA",
  "locationCode": "AA"
}
Response  200
HideShow
Headers
Content-Type: text/plain;charset=UTF-8
Body
This is an example
Request  OK
HideShow
Headers
Content-Type: application/json;charset=UTF-8
Body
{
  "checkIn": "YYY-mm-dd",
  "checkOut": "YYY-mm-dd",
  "occupancy": "A",
  "hotelCode": "A",
  "locationCode": "A"
}
Response  200
HideShow
Headers
Content-Type: application/xml;charset=UTF-8
Body
<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  OK
HideShow
Headers
Content-Type: application/json;charset=UTF-8
Body
{
  "checkIn": "YYY-mm-dd",
  "checkOut": "YYY-mm-dd",
  "occupancy": "A",
  "hotelCode": "H",
  "locationCode": "C"
}
Response  200
HideShow
Headers
Content-Type: application/json;charset=UTF-8
Body
{
  "rate_provider": [
    {
      "provider_cancel_policies": "xxx",
      "deatiledRate": "xxx",
      "remarks": "xxx"
    }
  ],
  "ticket": [
    {
      "a": "xxx",
      "b": "xxx"
    }
  ],
  "ttl": 3600
}
Request  Bad Params
HideShow
Headers
Content-Type: application/json;charset=UTF-8
Body
{
  "checkIn": "YYY-mm-dd",
  "checkOut": "YYY-mm-dd",
  "occupancy": "A",
  "hotelCode": "B",
  "locationCode": "?"
}
Response  400
HideShow
Headers
Content-Type: application/json;charset=UTF-8
Body
{
  "errors": [
    {
      "locationCode": "invalid parameter"
    }
  ]
}
Request  No availability
HideShow
Headers
Content-Type: application/json;charset=UTF-8
Body
{
  "checkIn": "YYY-mm-dd",
  "checkOut": "YYY-mm-dd",
  "occupancy": "A",
  "hotelCode": "B",
  "locationCode": "Z"
}
Response  402
HideShow
Headers
Content-Type: application/json;charset=UTF-8
Body
{
  "errors": [
    {
      "no_availability": "xxx"
    }
  ]
}

Generated by aglio on 06 Mar 2017