3.1. Return the corrections for one or more datasets.
Get and POST GetSeriesCorrections
Description: Return the corrections for one one or more datasets from any datasource.
API Usage: This endpoint uses 1 API call for every 10 corrections returned. Please refer to section 8.2 for more details on API rate limits.
GET Sample Request:
GET https://[server]/GetSeriesCorrections?SessionToken=YOUR_SESSION_TOKEN&Series[]=IEO-COMM/AAAPD00&Series[]=IEO-COMM/BBBSB00&StartDate=2016-01-01
POST Sample Request:
POST https://[server]/GetSeriesCorrections { "SessionToken": "YOUR_SESSION_TOKEN", "Series": [ { "Datasource": "IEO-COMM", "Symbol": "AAAPD00" }, { "Datasource": "IEO-COMM", "Symbol": "BBBSB00" } ], "DateFormat": "YYYY-MM-DD", "StartDate": "2016-01-01", "EndDate": "Latest" }
Request Parameters
Parameter | Type | Description | |
---|---|---|---|
1 | SessionToken | String | A session token from the GetSessionToken endpoint. |
2 | Series | [Object] | A list of Datasource [,
Datacategory] and Symbol
parameters to request. See the example above. The Datacategory parameter is required only if the datasource is a CategoryDS datasource e.g: { “Datasource”:”AAAA”, “Datacategory”:”BB”, “Symbol”:”CCCCC” } See the notes below for more information about CategoryDS datasources. |
Optional Request parameters
Parameter | Type | Default | Description | |
---|---|---|---|---|
3 | StartDate | String | "Earliest" | Return corrections from this date. Use the default 'YYYY-MM-DD' date format or select one using the 'DateFormat' parameter below. You can also use the word 'Earliest' to get the first available value. |
4 | EndDate | String | "Latest" | Return corrections to this end date. Use the default 'YYYY-MM-DD' date format or select one using the 'DateFormat' parameter below. You can also use the word 'Latest' to get the last available value. |
5 | DateType | String | “A” | Which correction dates to use when using StartDate and EndDate ranges. They can be "A" (actual") "P" (published) or "I" (inserted). |
6 | DateFormat | String | “YYYY-MM-DD” | The date format to use in the request and the result. See the ‘DateFormat Parameter‘ section below for details. |
- A CategoryDS is a datasource whose datasets are grouped into data categories. The subscriber must be authorised to access each individual data category.
- A CategoryDS is identified when the result object parameterIsCategoryDSis set to true.
- TheDatacategoryparameter must be used in all data requests to a CategoryDS datasource UNLESS the request parameter ' IgnoreCategories' is set to true.
- In GET requests Datasource,
[Datacategory] and Symbol are combined into one 'Series' string.
e.g. Symbols[]=Datasource/[Datacategory]/Symbol&Symbols[] = ... - In POST requests, the data category is inserted between the datasource and the symbol
e.g. ” {“Datasource”:“AAA”, “Datacategory”:“BBB”, “Symbol”:“CCC”}, { "Datasource": ….
DateFormat Parameter
You can control the format of dates that are used in the request and returned in the result.
If used, the date separator is the character between the day, month and year values and can be one of 4 characters:
“-” –
hyphen or dash
“/” – forward slash
“.” – dot or full stop
” ” – space
Format | Result Dates |
---|---|
“YYYY-MM-DD” | Formatted as 2018-01-22. (default). |
“YYYY-DD-MM” | Formatted as 2018-22-01. |
“YYYYMMDD” | Formatted as 20180122. |
“YYYYDDMM” | Formatted as 20182201. |
“MM-DD-YYYY” | Formatted as 01-22-2018. |
“DD-MM-YYYY” | Formatted as 22-01-2018. |
“EXCEL” | Formatted as numbers where 1/1/1976 = 27760. |
“JULIAN” | Formatted as the number of days since ’12h Jan 1, 4713 BC’. |
In the examples above we use the “-” date separator character. You can replace this character with any of the other three separators characters. If you require 2 character years, replace “YYYY” with “YY” in the formats above.
Response Parameters
Parameter | Type | Mandatory | Description | |
---|---|---|---|---|
1 | ServerDateTime | String | Yes | The server UTC date and time as an ISO 8601 string. |
2 | TimeStamp | Float | Yes | The server date and time as a Julian date. |
3 | ExecutionTime | Float | Yes | The number of milliseconds to process the request. |
4 | Result | [Object] | No* | A Result object as described in table below. |
5 | Errors | [Object] | No* | An 'Errors' object as described in table below. |
A successful API response will return a 'Result' object with the requested payload or an 'Errors' object detailing the issue that caused the error.
Result Object
Contains a number of 'Symbol' objects that contains the corrections for one datasource symbol using the symbol as the object identifier.
Each symbol object contains Date object(s).
Each Date object contains one or more correction objects, one for each bate with a corrected value.
See the request example at the end of this page for details.
Correction Object
Parameter | Type | Mandatory | Description | |
---|---|---|---|---|
1 | PublishedDateTime | String | Yes | The date and time the correction was published by the vendor in ISO 8601 format. |
2 | InsertDateTime | String | Yes | The date and the correction was added to the database in ISO 8601 format. |
3 | Type | String | Yes | The correction type. Normally 'C' for correction. |
4 | From | number | Yes | The value that was replaced by the corrected value. |
5 | To | number | Yes | The corrected value. |
Errors Object
Parameter | Type | Description | |
---|---|---|---|
1 | Status | Integer | HTTP status code. |
2 | Detail | String | Description of the status code above. |
Possible Status codes in the 'Errors' object
Code | Description |
---|---|
400 | Bad request or missing session parameter. |
401 | User is inactive. |
404 | Unknown session token. |
405 | Method [request] not allowed. |
500 | Server may be down for maintenance. |
This is not an exhaustive list and additional error codes may be returned. The Errors Detail field will return request specific error information.
Possible HTTP response codes
This endpoint
returns 200 for success.
If an 'Errors' object is
returned, the HTTP result is likely to be the same as the
one set in the 'Errors' object.
You can get HTTP client network errors or server
errors from any API request. You should check
with your network or IT colleagues in case the issue is a
local one.
All server generated errors will return an 'Errors'
object that will give specific details about the error.
A full list of HTTP codes and their meanings is available here,
Success and fail examples
The sample below requests the corrected values for a fictious datasource "BOE".
Sample Request:
GET https://[server]/GetSeriesCorrections?SessionToken=YOUR_SESSION_TOKEN&Series[]=IEO-COMM/AAAPD00&Series[]=IEO-COMM/BBBSB00&StartDate=2016-01-01
Response body on success: