Product offerings

The product offerings API allows you to determine which products are available at what schools, including details such as availability dates and pricing information. You need to authenticate using an API Key in order to call this service; see the Authentication section for further details

URL
/v1/product/offerings
HTTP Method
GET
Client Library Message Name
Product.GetProductOfferingsRequest
Request parameters
Name Type Required? Description
WithSchools array No See section Filter offerings by schools
WithProducts array No See section Filter offerings by products
WithProductTypes array No See section Filter offerings by product types
WithAvailabilityDatesBefore date No See section Filter offerings that are available before a specified date
WithAvailabilityDatesAfter date No See section Filter offerings that are available after a specified date
IncludePrices boolean No Include pricing periods objects, true by default.
IncludeSchools boolean No Include school objects, true by default.
IncludeProducts boolean No Include product objects, true by default.

Get all offerings

Sample request

Error

Failed to run contract transformer command: bin\Api.ContractTransformer.exe

{ }

Sample response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Cache-Control: no-cache
Content-Length: 2523

{
  "Results": [
    {
      "SchoolCode": "LON",
      "School": {
        "Code": "LON",
        "Name": "London",
        "MinimumAge": 16,
        "Country": {
          "Type": "Country",
          "Code": "GB",
          "Name": "United Kingdom",
          "Properties": {}
        }
      },
      "ProductCode": "C1",
      "Product": {
        "Code": "C1",
        "Name": "General English",
        "Type": "Course",
        "UnitType": "Weeks",
        "Properties": {
          "LessonsPerWeek": "20",
          "Language": "English",
          "Category": "General English"
        }
      },
      "PricingPeriods": [
        {
          "ValidFrom": "2016-01-01",
          "ValidTo": "2016-12-31",
          "PriceBandType": "Discrete",
          "PriceBands": [
            {
              "PricePerUnit": 275,
              "CurrencyIsoCode": "GBP",
              "MinimumUnits": 1,
              "MaximumUnits": 11
            },
            {
              "PricePerUnit": 245,
              "CurrencyIsoCode": "GBP",
              "MinimumUnits": 12,
              "MaximumUnits": 23
            }
          ]
        }
      ],
      "AvailabilityDatesUrl": "https://api.ecenglish.com/v1/product/availability-dates/LON/C1"
    },
    {
      "SchoolCode": "CAP",
      "School": {
        "Code": "CAP",
        "Name": "Cape Town",
        "MinimumAge": 16,
        "Country": {
          "Type": "Country",
          "Code": "ZA",
          "Name": "South Africa",
          "Properties": {}
        }
      },
      "ProductCode": "H1",
      "Product": {
        "Code": "H1",
        "Name": "Homestay, Single room, Half board",
        "Type": "Accommodation",
        "UnitType": "Weeks",
        "Properties": {
          "Accommodation": "Homestay",
          "Room": "Single room",
          "Board": "Half board"
        }
      },
      "PricingPeriods": [
        {
          "ValidFrom": "2016-01-01",
          "ValidTo": "2016-12-31",
          "PriceBandType": "Discrete",
          "PriceBands": [
            {
              "PricePerUnit": 200,
              "CurrencyIsoCode": "EUR",
              "MinimumUnits": 1,
              "MaximumUnits": 100
            }
          ]
        }
      ],
      "AvailabilityDatesUrl": "https://api.ecenglish.com/v1/product/availability-dates/CAP/H1"
    }
  ],
  "NextPage": "https://api.ecenglish.com/v1/paging/T93cAsdfd30ErFXRle3sdaHRtbA~~"
}

Filter offerings by schools

It is possible to only return product offerings that are available at specific schools using the WithSchools request parameter. The WithSchools request parameter accepts a list of school codes. See Schools

The sample below requests only product offerings available at London and New York schools.

Sample request

Error

Failed to run contract transformer command: bin\Api.ContractTransformer.exe

{ "WithSchools": ["LON","YRK"] }

Sample response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Cache-Control: no-cache
Content-Length: 2544

{
  "Results": [
    {
      "SchoolCode": "LON",
      "School": {
        "Code": "LON",
        "Name": "London",
        "MinimumAge": 16,
        "Country": {
          "Type": "Country",
          "Code": "GB",
          "Name": "United Kingdom",
          "Properties": {}
        }
      },
      "ProductCode": "C1",
      "Product": {
        "Code": "C1",
        "Name": "General English",
        "Type": "Course",
        "UnitType": "Weeks",
        "Properties": {
          "LessonsPerWeek": "20",
          "Language": "English",
          "Category": "General English"
        }
      },
      "PricingPeriods": [
        {
          "ValidFrom": "2016-01-01",
          "ValidTo": "2016-12-31",
          "PriceBandType": "Discrete",
          "PriceBands": [
            {
              "PricePerUnit": 275,
              "CurrencyIsoCode": "GBP",
              "MinimumUnits": 1,
              "MaximumUnits": 11
            },
            {
              "PricePerUnit": 245,
              "CurrencyIsoCode": "GBP",
              "MinimumUnits": 12,
              "MaximumUnits": 23
            }
          ]
        }
      ],
      "AvailabilityDatesUrl": "https://api.ecenglish.com/v1/product/availability-dates/LON/C1"
    },
    {
      "SchoolCode": "YRK",
      "School": {
        "Code": "YRK",
        "Name": "New York",
        "MinimumAge": 16,
        "Country": {
          "Type": "Country",
          "Code": "US",
          "Name": "United States",
          "Properties": {}
        }
      },
      "ProductCode": "T28",
      "Product": {
        "Code": "T28",
        "Name": "JFK International Airport - Departure",
        "Type": "Transfer",
        "UnitType": "SingleItemOnly",
        "Properties": {
          "Direction": "Departure",
          "Port": "JFK International Airport",
          "PortType": "Airport"
        }
      },
      "PricingPeriods": [
        {
          "ValidFrom": "2016-01-01",
          "ValidTo": "2016-12-31",
          "PriceBandType": "Discrete",
          "PriceBands": [
            {
              "PricePerUnit": 180,
              "CurrencyIsoCode": "USD",
              "MinimumUnits": 1,
              "MaximumUnits": 1
            }
          ]
        }
      ],
      "AvailabilityDatesUrl": "https://api.ecenglish.com/v1/product/availability-dates/YRK/T28"
    }
  ],
  "NextPage": "https://api.ecenglish.com/v1/paging/E409AcAECe3WQLCXRleHQvaHRtbA~~"
}

Filter offerings by products

It is possible to only return product offerings for specific products using the WithProducts request parameter. The WithProducts request parameter accepts a list of product codes. See Products

The sample below requests only product offerings for the products General English and One-to-One Lessons.

Sample request

Error

Failed to run contract transformer command: bin\Api.ContractTransformer.exe

{ "WithProducts": ["C1","X1"] }

Sample response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Cache-Control: no-cache
Content-Length: 2421

{
  "Results": [
    {
      "SchoolCode": "LON",
      "School": {
        "Code": "LON",
        "Name": "London",
        "MinimumAge": 16,
        "Country": {
          "Type": "Country",
          "Code": "GB",
          "Name": "United Kingdom",
          "Properties": {}
        }
      },
      "ProductCode": "C1",
      "Product": {
        "Code": "C1",
        "Name": "General English",
        "Type": "Course",
        "UnitType": "Weeks",
        "Properties": {
          "LessonsPerWeek": "20",
          "Language": "English",
          "Category": "General English"
        }
      },
      "PricingPeriods": [
        {
          "ValidFrom": "2016-01-01",
          "ValidTo": "2016-12-31",
          "PriceBandType": "Discrete",
          "PriceBands": [
            {
              "PricePerUnit": 275,
              "CurrencyIsoCode": "GBP",
              "MinimumUnits": 1,
              "MaximumUnits": 11
            },
            {
              "PricePerUnit": 245,
              "CurrencyIsoCode": "GBP",
              "MinimumUnits": 12,
              "MaximumUnits": 23
            }
          ]
        }
      ],
      "AvailabilityDatesUrl": "https://api.ecenglish.com/v1/product/availability-dates/LON/C1"
    },
    {
      "SchoolCode": "MLT",
      "School": {
        "Code": "MLT",
        "Name": "Malta",
        "MinimumAge": 16,
        "Country": {
          "Type": "Country",
          "Code": "MT",
          "Name": "Malta",
          "Properties": {}
        }
      },
      "ProductCode": "X1",
      "Product": {
        "Code": "X1",
        "Name": "One-to-One Lessons",
        "Type": "OptionalExtra",
        "UnitType": "Lessons",
        "Properties": {
          "Category": "Course"
        }
      },
      "PricingPeriods": [
        {
          "ValidFrom": "2016-01-01",
          "ValidTo": "2016-12-31",
          "PriceBandType": "Discrete",
          "PriceBands": [
            {
              "PricePerUnit": 50,
              "CurrencyIsoCode": "EUR",
              "MinimumUnits": 1,
              "MaximumUnits": 100
            }
          ]
        }
      ],
      "AvailabilityDatesUrl": "http://localhost:23121/v1/product/availability-dates/MLT/X1"
    }
  ],
  "NextPage": "https://api.ecenglish.com/v1/paging/WQeAcAECe43KXMReRleHQvaHRtbA~~"
}

Filter offerings by product types

It is possible to only return product offerings with specific product types using the WithProductTypes request parameter.

The available product type values are as follows:
  • Course
  • Accommodation
  • OptionalExtra
  • Transfer

The sample below requests only course and transfer product offerings.

Sample request

Error

Failed to run contract transformer command: bin\Api.ContractTransformer.exe

{ "WithProductTypes": ["Course","Transfer"] }

Sample response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Cache-Control: no-cache
Content-Length: 2543

{
  "Results": [
    {
      "SchoolCode": "LON",
      "School": {
        "Code": "LON",
        "Name": "London",
        "MinimumAge": 16,
        "Country": {
          "Type": "Country",
          "Code": "GB",
          "Name": "United Kingdom",
          "Properties": {}
        }
      },
      "ProductCode": "C1",
      "Product": {
        "Code": "C1",
        "Name": "General English",
        "Type": "Course",
        "UnitType": "Weeks",
        "Properties": {
          "LessonsPerWeek": "20",
          "Language": "English",
          "Category": "General English"
        }
      },
      "PricingPeriods": [
        {
          "ValidFrom": "2016-01-01",
          "ValidTo": "2016-12-31",
          "PriceBandType": "Discrete",
          "PriceBands": [
            {
              "PricePerUnit": 275,
              "CurrencyIsoCode": "GBP",
              "MinimumUnits": 1,
              "MaximumUnits": 11
            },
            {
              "PricePerUnit": 245,
              "CurrencyIsoCode": "GBP",
              "MinimumUnits": 12,
              "MaximumUnits": 23
            }
          ]
        }
      ],
      "AvailabilityDatesUrl": "https://api.ecenglish.com/v1/product/availability-dates/LON/C1"
    },
    {
      "SchoolCode": "YRK",
      "School": {
        "Code": "YRK",
        "Name": "New York",
        "MinimumAge": 16,
        "Country": {
          "Type": "Country",
          "Code": "US",
          "Name": "United States",
          "Properties": {}
        }
      },
      "ProductCode": "T28",
      "Product": {
        "Code": "T28",
        "Name": "JFK International Airport - Departure",
        "Type": "Transfer",
        "UnitType": "SingleItemOnly",
        "Properties": {
          "Direction": "Departure",
          "Port": "JFK International Airport",
          "PortType": "Airport"
        }
      },
      "PricingPeriods": [
        {
          "ValidFrom": "2016-01-01",
          "ValidTo": "2016-12-31",
          "PriceBandType": "Discrete",
          "PriceBands": [
            {
              "PricePerUnit": 180,
              "CurrencyIsoCode": "USD",
              "MinimumUnits": 1,
              "MaximumUnits": 1
            }
          ]
        }
      ],
      "AvailabilityDatesUrl": "https://api.ecenglish.com/v1/product/availability-dates/YRK/T28"
    }
  ],
  "NextPage": "https://api.ecenglish.com/v1/paging/E409AcAEC3ds34CXRledfva43HR~~"
}

Filter offerings that are available before a specified date

It is possible to only return product offerings that are available before a specified date using the WithAvailabilityDatesBefore request parameter.

The sample below requests only product offerings that are available before the 11th December 2016.

Sample request

Error

Failed to run contract transformer command: bin\Api.ContractTransformer.exe

{ "WithAvailabilityDatesBefore": "2016-12-11" }

Sample response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Cache-Control: no-cache
Content-Length: 2523

{
  "Results": [
    {
      "SchoolCode": "LON",
      "School": {
        "Code": "LON",
        "Name": "London",
        "MinimumAge": 16,
        "Country": {
          "Type": "Country",
          "Code": "GB",
          "Name": "United Kingdom",
          "Properties": {}
        }
      },
      "ProductCode": "C1",
      "Product": {
        "Code": "C1",
        "Name": "General English",
        "Type": "Course",
        "UnitType": "Weeks",
        "Properties": {
          "LessonsPerWeek": "20",
          "Language": "English",
          "Category": "General English"
        }
      },
      "PricingPeriods": [
        {
          "ValidFrom": "2016-01-01",
          "ValidTo": "2016-12-31",
          "PriceBandType": "Discrete",
          "PriceBands": [
            {
              "PricePerUnit": 275,
              "CurrencyIsoCode": "GBP",
              "MinimumUnits": 1,
              "MaximumUnits": 11
            },
            {
              "PricePerUnit": 245,
              "CurrencyIsoCode": "GBP",
              "MinimumUnits": 12,
              "MaximumUnits": 23
            }
          ]
        }
      ],
      "AvailabilityDatesUrl": "https://api.ecenglish.com/v1/product/availability-dates/LON/C1"
    },
    {
      "SchoolCode": "CAP",
      "School": {
        "Code": "CAP",
        "Name": "Cape Town",
        "MinimumAge": 16,
        "Country": {
          "Type": "Country",
          "Code": "ZA",
          "Name": "South Africa",
          "Properties": {}
        }
      },
      "ProductCode": "H1",
      "Product": {
        "Code": "H1",
        "Name": "Homestay, Single room, Half board",
        "Type": "Accommodation",
        "UnitType": "Weeks",
        "Properties": {
          "Accommodation": "Homestay",
          "Room": "Single room",
          "Board": "Half board"
        }
      },
      "PricingPeriods": [
        {
          "ValidFrom": "2016-01-01",
          "ValidTo": "2016-12-31",
          "PriceBandType": "Discrete",
          "PriceBands": [
            {
              "PricePerUnit": 200,
              "CurrencyIsoCode": "EUR",
              "MinimumUnits": 1,
              "MaximumUnits": 100
            }
          ]
        }
      ],
      "AvailabilityDatesUrl": "https://api.ecenglish.com/v1/product/availability-dates/CAP/H1"
    }
  ],
  "NextPage": "https://api.ecenglish.com/v1/paging/T93cAsdfd30ErFXRle3sdaHRtbA~~"
}

Filter offerings that are available after a specified date

It is possible to only return product offerings that are available after a specified date using the WithAvailabilityDatesAfter request parameter.

The sample below requests only product offerings that are available after the 17th January 2016.

Sample request

Error

Failed to run contract transformer command: bin\Api.ContractTransformer.exe

{ "WithAvailabilityDatesAfter": "2016-01-17" }

Sample response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Cache-Control: no-cache
Content-Length: 2523

{
  "Results": [
    {
      "SchoolCode": "LON",
      "School": {
        "Code": "LON",
        "Name": "London",
        "MinimumAge": 16,
        "Country": {
          "Type": "Country",
          "Code": "GB",
          "Name": "United Kingdom",
          "Properties": {}
        }
      },
      "ProductCode": "C1",
      "Product": {
        "Code": "C1",
        "Name": "General English",
        "Type": "Course",
        "UnitType": "Weeks",
        "Properties": {
          "LessonsPerWeek": "20",
          "Language": "English",
          "Category": "General English"
        }
      },
      "PricingPeriods": [
        {
          "ValidFrom": "2016-01-01",
          "ValidTo": "2016-12-31",
          "PriceBandType": "Discrete",
          "PriceBands": [
            {
              "PricePerUnit": 275,
              "CurrencyIsoCode": "GBP",
              "MinimumUnits": 1,
              "MaximumUnits": 11
            },
            {
              "PricePerUnit": 245,
              "CurrencyIsoCode": "GBP",
              "MinimumUnits": 12,
              "MaximumUnits": 23
            }
          ]
        }
      ],
      "AvailabilityDatesUrl": "https://api.ecenglish.com/v1/product/availability-dates/LON/C1"
    },
    {
      "SchoolCode": "CAP",
      "School": {
        "Code": "CAP",
        "Name": "Cape Town",
        "MinimumAge": 16,
        "Country": {
          "Type": "Country",
          "Code": "ZA",
          "Name": "South Africa",
          "Properties": {}
        }
      },
      "ProductCode": "H1",
      "Product": {
        "Code": "H1",
        "Name": "Homestay, Single room, Half board",
        "Type": "Accommodation",
        "UnitType": "Weeks",
        "Properties": {
          "Accommodation": "Homestay",
          "Room": "Single room",
          "Board": "Half board"
        }
      },
      "PricingPeriods": [
        {
          "ValidFrom": "2016-01-01",
          "ValidTo": "2016-12-31",
          "PriceBandType": "Discrete",
          "PriceBands": [
            {
              "PricePerUnit": 200,
              "CurrencyIsoCode": "EUR",
              "MinimumUnits": 1,
              "MaximumUnits": 100
            }
          ]
        }
      ],
      "AvailabilityDatesUrl": "https://api.ecenglish.com/v1/product/availability-dates/CAP/H1"
    }
  ],
  "NextPage": "https://api.ecenglish.com/v1/paging/T93cAsdfd30ErFXRle3sdaHRtbA~~"
}

Combining multiple filters

It is possible to combine the different filters together in a single request.

The sample below requests only course product offerings that are available at the New York school.

Sample request

Error

Failed to run contract transformer command: bin\Api.ContractTransformer.exe

{ "WithProductTypes": ["Course"], "WithSchools": ["YRK"] }

Sample response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Cache-Control: no-cache
Content-Length: 2686

{
  "Results": [
    {
      "SchoolCode": "YRK",
      "School": {
        "Code": "YRK",
        "Name": "New York",
        "MinimumAge": 16,
        "Country": {
          "Type": "Country",
          "Code": "US",
          "Name": "United States",
          "Properties": {}
        }
      },
      "ProductCode": "C1",
      "Product": {
        "Code": "C1",
        "Name": "General English",
        "Type": "Course",
        "UnitType": "Weeks",
        "Properties": {
          "LessonsPerWeek": "20",
          "Language": "English",
          "Category": "General English"
        }
      },
      "PricingPeriods": [
        {
          "ValidFrom": "2016-01-01",
          "ValidTo": "2016-12-31",
          "PriceBandType": "Discrete",
          "PriceBands": [
            {
              "PricePerUnit": 405,
              "CurrencyIsoCode": "USD",
              "MinimumUnits": 1,
              "MaximumUnits": 11
            },
            {
              "PricePerUnit": 365,
              "CurrencyIsoCode": "USD",
              "MinimumUnits": 12,
              "MaximumUnits": 23
            }
          ]
        }
      ],
      "AvailabilityDatesUrl": "https://api.ecenglish.com/v1/product/availability-dates/YRK/C1"
    },
    {
      "SchoolCode": "YRK",
      "School": {
        "Code": "YRK",
        "Name": "New York",
        "MinimumAge": 16,
        "Country": {
          "Type": "Country",
          "Code": "US",
          "Name": "United States",
          "Properties": {}
        }
      },
      "ProductCode": "C3",
      "Product": {
        "Code": "C3",
        "Name": "Semi-Intensive English",
        "Type": "Course",
        "UnitType": "Weeks",
        "Properties": {
          "LessonsPerWeek": "24",
          "Language": "English",
          "Category": "General English"
        }
      },
      "PricingPeriods": [
        {
          "ValidFrom": "2016-01-01",
          "ValidTo": "2016-12-31",
          "PriceBandType": "Discrete",
          "PriceBands": [
            {
              "PricePerUnit": 445,
              "CurrencyIsoCode": "USD",
              "MinimumUnits": 1,
              "MaximumUnits": 11
            },
            {
              "PricePerUnit": 410,
              "CurrencyIsoCode": "USD",
              "MinimumUnits": 12,
              "MaximumUnits": 23
            }
          ]
        }
      ],
      "AvailabilityDatesUrl": "https://api.ecenglish.com/v1/product/availability-dates/YRK/C3"
    }
  ],
  "NextPage": "https://api.ecenglish.com/v1/paging/2trAAWE43KXMReRlHSAGl947RtbA~~"
}