Request and Response Parameters
The Find Available Footnote API will accept the request attributes and return the response attributes as shown below:
| API Request | API Response |
|---|---|
| Carrier code as carrierTariff as tariffAvailable Footnotes: as availableFnt |
The response will echo the request parameters back.
Retrieve Footnote Range
The API response shall return a range of footnotes when a request is made with Start Footnote as fntFrom and Stop Footnote as fntTo attributes populated.
When a Footnote Range is specified both Start Range and End Range must be in the same format.
Validation should be based on the following:
- nn – nn (for example, 11 - 99)
- a – a (for example, A - Z)
- n – n (for example, 1 - 3)
- Na – Na (When capitalized, the value in the Start Range and End Range must be the same. For example, 1A - 1G.)
Where:
n = numeric (1 - 99)
N = a specific numeric value
a = alphabetic character (A - Z)
The list of footnotes returned in the response shall differ based on the listAll attribute in the request.
- Request with Footnote Range with
listAllattribute blank
When“listAll”attribute is blank, match the pattern of the Start Footnote asfntFromin the request and return the footnotes that are matching the pattern.
Example:
RequestfntFrom: 1A, fntTo: 3D
Response[1C, 1X, 2B, 3,3A]
| Sample Request | Sample Response |
|---|---|
{"ftntAvailability": {"carrier": "XX","tariff": "005","tariffType": "P","fntFrom": "1A","fntTo": "2A","listAll": ""}} | ftntAvailability: {"carrier":"XX","tariff":"005","tariffType": "P","fntFrom": "1A","fntTo": "2A","availableFnt" : ["1B","1C","2A"]} |
{"ftntAvailability": {"carrier": "XX","tariff": "IPRA","fntFrom": "1A","fntTo": "2A","listAll": ""}} | ftntAvailability: {"carrier":"XX","tariff": "IPRA","fntFrom": "1A","fntTo": "2A","availableFnt" : ["1B","1C","2A"]} |
| Sample Full Request One Carrier/Tariff | Sample Response |
|---|---|
{"ftntAvailability": {"carrier": "XX","tariff": "TAFP","tariffType": "","fntFrom": "A","fntTo": "L","partnerCxrTariff": {"partnerCxrTariffItems": [{"carrier": "","tariff": "","tariffType": ""}]}}} | {"ftntAvailability": {"carrier": "XX","tariff": "TAFP","tariffType": "","fntFrom": "A","fntTo": "L","partnerCxrTariff": {}},"availableFnt": ["B","E","G","H","I","K"]} |
| Sample Request for Multi Carrier/Tariff | Sample Response |
|---|---|
{"ftntAvailability": {"carrier": "XX","tariff": "001","tariffType": "","fntFrom": "A","fntTo": "L",},"partnerCxrTariff": {"partnerCxrTariffItems": [{"carrier": "XX","tariff": "AA85","tariffType": ""}]}} | {"ftntAvailability": {"carrier": "XX","tariff": "TAFP","tariffType": "","fntFrom": "A","fntTo": "L","partnerCxrTariff": {"partnerCxrTariffItems": [{"carrier": "XX","tariff": "AA85","tariffType": ""}]}},"availableFnt": ["B","G","H","I","K"]} |
{"ftntAvailability": {"carrier": "XX","tariff": "TAFP","tariffType": "","fntFrom": "AA","fntTo": "CD","partnerCxrTariff": {"partnerCxrTariffItems": [{"carrier": "ZZ","tariff": "EUROP","tariffType": ""},{"carrier": "XY","tariff": "TAFP","tariffType": ""},{"carrier": "XZ","tariff": "WHFP","tariffType": ""}]}}} | {"ftntAvailability": {"carrier": "XX","tariff": "TAFP","tariffType": "","fntFrom": "AA","fntTo": "CD","partnerCxrTariff": {"partnerCxrTariffItems": [{"carrier": "ZZ","tariff": "EUROP","tariffType": ""},{"carrier": "XY","tariff": "TAFP","tariffType": ""},{"carrier": "XZ","tariff": "WHFP","tariffType": ""}]}},"availableFnt": [},"AO","AX","AY","BC","BE","BG","BH","BI","BP","BQ","BR","BS","CD"]} |
| Sample Request | Sample Response No Available Footnote |
|---|---|
{"ftntAvailability": {"carrier": "XX","tariff": "TAFP","tariffType": "","fntFrom": "A","fntTo": "A","partnerCxrTariff": {"partnerCxrTariffItems": [{"carrier": "ZX","tariff": "EUROP","tariffType": ""},{"carrier": "ZC","tariff": "TAFP","tariffType": ""},{"carrier": "ZY","tariff": "WHFP","tariffType": ""}]}}} | {"ftntAvailability": {"carrier": "XX","tariff": "TAFP","tariffType": "","fntFrom": "A","fntTo": "A","partnerCxrTariff": {"partnerCxrTariffItems": [{"carrier": "ZX","tariff": "EUROP","tariffType": ""},{"carrier": "ZC","tariff": "TAFP","tariffType": ""},{"carrier": "ZY","tariff": "WHFP","tariffType": ""}]}},"availableFnt": []} |
- Request with Footnote Range with
“listAll”attribute“X”
When “listAll” attribute is“X”, the pattern is not matched and system shall retrieve all the footnotes for all patterns.
Example:
RequestfntFrom: 1A fntTo: 3D
Response[1C, 1X, 2, 2B, 3, 3A]
| Sample Request | Sample Response |
|---|---|
{"ftntAvailability": {"carrier": "XX","tariff": "005","tariffType": "P","fntFrom": "1A","fntTo": "2C","listAll": "X"}} | ftntAvailability: {"carrier":"XX","tariff":"005","tariffType": "P","fntFrom": "1A","fntTo": "2C","availableFnt" : ["1B","1C","2","2A"]} |
{"ftntAvailability": {"carrier": "XX","tariff": "IPRA","fntFrom": "1A","fntTo": "2C","listAll": "X"}} | ftntAvailability: {"carrier":"XX","tariff":"IPRA","fntFrom": "1A","fntTo": "2C","availableFnt" : ["1B","1C","2","2A"]} |
- Request with Footnote Range and no
listAllattribute in the request
This request with nolistAllattribute will behave the same aslistAll=””or blank. The response shall retrieve the footnotes that match the pattern infntFromattribute.
| Sample Request | Sample Response |
|---|---|
{ftntAvailability :{"carrier":" XX","tariff": "001","tariffType": "P","fntFrom": "1A","fntTo": "2M"}} | {ftntAvailability :{"carrier":"XX","tariff":"001","tariffType": "P","fntFrom": "1A","fntTo": "2M","availableFnt" : ["1B","1C","2A"]}} |
{ftntAvailability :{"carrier":"XX","tariff":"IPRA","tariffType": "P","fntFrom": "1A"}} | {ftntAvailability :{"carrier":"XX","tariff":"IPRA","fntFrom": "1A","availableFnt": ["1A"]}} |
Retrieve Single Footnote
The API response shall return a single footnote when a request is made with Start Footnote as "fntFrom" only. When only fntFrom is provided with fntTo as "" it is treated as a single footnote and not a range.
Example:
Request fntFrom: 3D
Response availableFootnote: [3D] if available OR availableFootnote: [ ] if not available
| Sample Request | Sample Response |
|---|---|
{ftntAvailability :{"carrier":"XX","tariff":"030","tariffType": "P","fntFrom": "1A"}} | {ftntAvailability :{"carrier":"XX","tariff":"030","fntFrom": "1A","availableFnt": ["1A"]}} |
{ftntAvailability :{"carrier":"XX","tariff":"IPRA","tariffType": "P","fntFrom": "1A"}} | {ftntAvailability :{"carrier":"XX","tariff":"IPRA","fntFrom": "1A","availableFnt": ["1A"]}} |
Error Handling
If a request comes in with any of the following conditions, the system will return different http errors codes as per the scenario. Error messages will be displayed as part of the response:
- Format errors
- Incorrect URL
- Incorrect or invalid request attributes
- Attributes not adhering to edits cross edits as mentioned in the edits cross edits section
Sample Requests with Errors:
| Sample Request | Sample Response |
|---|---|
{ftntAvailability :{"carrier":"XX","tariff":"001","fntFrom":"B"}} | Http status code: 422 will be returned along with the following JSON.{ftntAvailability :{"msgs":{"errors":["[tariffType] - Field is required in this request"]},"carrier":"XX","tariff":"001","availableFnt": ["1A"]} |
{ftntAvailability :{"carrier":"XX","tariff":"PF17",“tariffType:”P”,"fntFrom":"1A""fntTo": "", "listAll": ""}} | {"msgs": {"errors": ["Request is not valid"]},"ftntAvailability": {"msgs": {"errors": ["[tariff,tariffType] - tariffType is not allowed when tariff name is provided"]},"carrier": "XX","tariff": "PF17","tariffType": "P","fntFrom": "1A","fntTo": "","listAll": ""}} |