Season

Overview

Most LSEs will charge different rates depending on the time of year. Each LSE defines the times of the year themselves but typically they are split into summer and winter. We refer to these as the seasons of an LSE. We also define season groups, which contain more than seasons and which altogether span a full calendar year. Each season belongs to one and only one season group

Data Definitions

Season

The Season object has the following data structure.

Name Type Description
seasonId Long Unique Genability ID (primary key) for each season
lseId Long The ID of the LSE this territory belongs to
seasonGroupId Long The ID of the season group that contains this season
seasonName String The name of the season (i.e. "Summer" or "Winter")
seasonFromMonth Integer Value of 1-12 representing the month this season begins
seasonFromDay Integer Value of 1-31 (depending on month) representing the day this season begins
seasonToMonth Integer Value of 1-12 representing the month this season ends
seasonToDay Integer Value of 1-31 (depending on month) representing the day this season ends

Season Group

The SeasonGroup object has the following data structure.

Name Type Description
seasonGroupId Long Unique Genability ID (primary key) for each season group
seasons List of Season A List of the Seasons within this Season Group

Here's an example in JSON of one season group populated with two seasons:

{ 
    "status" : "success",
    "count" : 1,
    "type" : "SeasonGroup",
    "results" : 
    [ { 
    "seasonGroupId" : 1,
        "seasons" : 
        [ 
        { 
        "lseId" : 1,
        "seasonFromDay" : 1,
        "seasonFromMonth" : 10,
        "seasonGroupId" : 1,
        "seasonId" : 3,
        "seasonName" : "Winter",
        "seasonToDay" : 31,
        "seasonToMonth" : 5
                },
                { 
        "lseId" : 1,
        "seasonFromDay" : 1,
                "seasonFromMonth" : 6,
                "seasonGroupId" : 1,
                "seasonId" : 4,
                "seasonName" : "Summer",
                "seasonToDay" : 30,
                "seasonToMonth" : 9
                }
            ]
    } ],
}

Operations

Get a List of Season Groups for an LSE

This returns a list of season groups for a given LSE. The result set is a list of season group objects in the standard response format.

Resource URI

GET /rest/public/seasons

Request Parameters

Along with the standard pagination parameters, searching and sorting parameters, and the required security parameters, the following parameters are available as part of the request:

Name Type Description
lseId Long The LSE ID who's seasons we want. (Required)

Example

GET /rest/public/seasons?lseId=734
{ 
"status" : "success",
"count" : 1,
"type" : "SeasonGroup",
"results" : 
    [ { 
    "seasonGroupId" : 1,
        "seasons" : 
        [ 
        { 
        "lseId" : 1,
        "seasonFromDay" : 1,
        "seasonFromMonth" : 10,
        "seasonGroupId" : 1,
        "seasonId" : 3,
        "seasonName" : "Winter",
        "seasonToDay" : 31,
        "seasonToMonth" : 5
                },
                { 
        "lseId" : 1,
        "seasonFromDay" : 1,
                "seasonFromMonth" : 6,
                "seasonGroupId" : 1,
                "seasonId" : 4,
                "seasonName" : "Summer",
                "seasonToDay" : 30,
                "seasonToMonth" : 9
                }
            ]
    } ],
}

History

  • Formatting update - 3/10/2015
  • Initial Release - 4/28/2011 - Seasons
  • Updated to include Sorting and Searching by name - 1/9/2012