Season GET
URI
https://{DATACENTER}.brightpearlconnect.com/public-api/{ACCOUNT}/product-service/season/{ID-SET} Refer to our documentation on URI syntax for more information on how to construct URIs.
Description
This fetches one or more Seasons by Season ID. If no ID is supplied all Seasons will be
returned.
Each Season consists of:
| Field Name | Data Type | Description |
|---|---|---|
| id | Integer | The id of the season |
| name | String | The name of the season |
| description | String | The description of the season |
| dateFrom | Date yyyy-mm-dd | Start date for season |
| dateTo | Date yyyy-mm-dd | End date of season |
| createdOn | DateTime yyyy-mm-ddThh:mm:ss.sssZ | The date the season was created |
| updatedOn | DateTime yyyy-mm-ddThh:mm:ss.sssZ | The date the season was last updated |
Historically, Season GET responses did not include the createdOn and updatedOn fields. Older seasons will have a newer date (from when the fields were introduced), however this is intended for change detection rather than for a historical audit trail.
Example 1
Retrieve season 1
Request URI
/season/1
Response
{
"response": [
{
"id": 1,
"name": "TEST",
"description": "This is a test season",
"dateFrom": "2015-04-23",
"dateTo": "2015-06-19",
"createdOn": "2015-01-08T17:57:18.000Z",
"updatedOn": "2015-04-01T13:17:58.000Z"
}
]
}
Example 2
Retrieve seasons 1 & 2
Request URI
/season/1-2
Response
{
"response": [
{
"id": 1,
"name": "TEST",
"description": "This is a test season",
"dateFrom": "2010-02-15",
"dateTo": "2013-08-01",
"createdOn": "2015-01-08T17:57:18.000Z",
"updatedOn": "2015-04-01T13:17:58.000Z"
},
{
"id": 2,
"name": "TEST2",
"description": "This is also a test season",
"createdOn": "2015-01-09T09:30:00.000Z",
"updatedOn": "2015-04-02T11:45:00.000Z"
}
]
}
Example 3
Retrieve all seasons
Request URI
/season/
Response
{
"response": [
{
"id": 1,
"name": "TEST",
"description": "This is a test season",
"dateFrom": "2010-02-15",
"dateTo": "2013-08-01",
"createdOn": "2015-01-08T17:57:18.000Z",
"updatedOn": "2015-04-01T13:17:58.000Z"
},
{
"id": 2,
"name": "TEST2",
"description": "This is also a test season",
"createdOn": "2015-01-09T09:30:00.000Z",
"updatedOn": "2015-04-02T11:45:00.000Z"
},
{
"id": 3,
"name": "TEST3",
"description": "This too is a test season",
"dateTo": "2013-08-01",
"createdOn": "2015-01-10T08:15:00.000Z",
"updatedOn": "2015-04-03T10:20:00.000Z"
}
]
}
