A pact between GDS API Adapters and Bank Holidays API

Requests from GDS API Adapters to Bank Holidays API

Interactions

Given there is a list of all bank holidays, upon receiving the request for the list of all bank holidays from GDS API Adapters, with

{
  "method": "get",
  "path": "/bank-holidays.json",
  "headers": {
    "Accept": "application/json",
    "User-Agent": "gds-api-adapters/75.3.0 ()"
  }
}

Bank Holidays API will respond with:

{
  "status": 200,
  "headers": {
    "Content-Type": "application/json; charset=utf-8"
  },
  "body": {
    "england-and-wales": {
      "division": "england-and-wales",
      "events": [
        {
          "title": "New Year's Day",
          "date": "2016-01-01",
          "notes": "Substitute day",
          "bunting": true
        }
      ]
    },
    "scotland": {
      "division": "scotland",
      "events": [
        {
          "title": "New Year's Day",
          "date": "2016-01-01",
          "notes": "Substitute day",
          "bunting": true
        }
      ]
    },
    "northern-ireland": {
      "division": "northern-ireland",
      "events": [
        {
          "title": "New Year's Day",
          "date": "2016-01-01",
          "notes": "Substitute day",
          "bunting": true
        }
      ]
    }
  }
}

Given there is a list of all bank holidays, upon receiving the request for the list of Scottish bank holidays from GDS API Adapters, with

{
  "method": "get",
  "path": "/bank-holidays/scotland.json",
  "headers": {
    "Accept": "application/json",
    "User-Agent": "gds-api-adapters/75.3.0 ()"
  }
}

Bank Holidays API will respond with:

{
  "status": 200,
  "headers": {
    "Content-Type": "application/json; charset=utf-8"
  },
  "body": {
    "division": "scotland",
    "events": [
      {
        "title": "New Year's Day",
        "date": "2016-01-01",
        "notes": "Substitute day",
        "bunting": true
      }
    ]
  }
}