Content API Integration

You should have received an invite link from Airtable in order to follow the links below to see how it works and what is required.
Airtable API Documentation
- https://airtable.com/apphKFqKdClqcgF26/api/docs
- https://airtable.com/developers/web/api/introduction
Alternatively, you can accept the invite here:
The integration involves the following steps:
Please note that the set-up and script will be varied for different website platforms.
1. Creation of Individual Pages:
Each resource on the website requires its own dedicated page. The structure of these pages is crucial, as it determines how the data will be presented. You can reference the structure of our site here (located under the resources tab)
2. Insertion of Script:
A corresponding script needs to be inserted into the header of each newly created page. This step ensures that the necessary functionality is enabled for fetching and displaying the data (Unless you intent to write your own script). You can find the script for Calculator and Other Resources below.
3. Attribute/ID Creation:
On each page, attributes or ID need to be created for each data piece or element. These attributes will then be populated with values retrieved from API calls of Airtable.
Let's take HMRC links as an example:
- HMRC Links - <script defer src="https://cdn.jsdelivr.net/gh/kefrankefran7609/Calculators@34e51d5/hmrc_links.js"></script>
From one of the lines of the script : document.querySelector('[name1]').textContent = parsed.records[5].fields.Name, we can see that the attribute '[name1]' has set its text content to the value of the 'Name' property of the 6th record from Airtable
It's important to note that the naming conventions of the attribute used on the web page must align with the JavaScript you intend to write. To also further understand the data structure and properties, I would recommend referring to the Airtable API documentation. It provides detailed information on how to interact with the data stored in Airtable, including retrieving specific fields such as the Name
property in our example. The data retrieval process described in the example should be applicable to all elements on most pages for the respective resources.
Calculator:
SDLT Calculator:
<script defer src="https://cdn.jsdelivr.net/gh/kefrankefran7609/Calculators@7058f57/index.js"></script>
VAT Calculator:
<script defer src="https://cdn.jsdelivr.net/gh/kefrankefran7609/Calculators@bab34e0/vat.js"></script>
CIS Calculator:
<script defer src="https://cdn.jsdelivr.net/gh/kefrankefran7609/Calculators@392749c/cis.js"></script>
Payroll Calculator:
<script defer src="https://cdn.jsdelivr.net/gh/kefrankefran7609/Calculators@22e30bf/payroll.js"></script>
Startup Calculator:
<script defer src="https://cdn.jsdelivr.net/gh/kefrankefran7609/Calculators@bab34e0/startup.js"></script>
Other Resources
HMRC Links
<script defer src="https://cdn.jsdelivr.net/gh/kefrankefran7609/Calculators@34e51d5/hmrc_links.js"></script>
Key Tax Dates
<script defer src="https://cdn.jsdelivr.net/gh/kefrankefran7609/Calculators@216020e/keytaxdates.js"></script>
Income tax rates and allowances
<script defer src="https://cdn.jsdelivr.net/gh/kefrankefran7609/Calculators@104bf6e/Income_Tax_Rates_And_Allowances.js"></script>
National Insurance Contributions
<script defer src="https://cdn.jsdelivr.net/gh/kefrankefran7609/Calculators@e702511/National_Insurance_Contributions.js"></script>
Corporation Tax
<script defer src="https://cdn.jsdelivr.net/gh/kefrankefran7609/Calculators@fba0a1f/corporation_tax.js"></script>
Registered Pension Scheme Limits
<script defer src="https://cdn.jsdelivr.net/gh/kefrankefran7609/Calculators@8611029/Registered_Pension_Scheme_Limits.js"></script>
Capital Gains Tax and Inheritance Tax Rates
<script defer src="https://cdn.jsdelivr.net/gh/kefrankefran7609/Calculators@166d25c/Capital_gains_tax_and_inheritance_tax_rates.js"></script>
Car and Fuel Benefits
<script defer src="https://cdn.jsdelivr.net/gh/kefrankefran7609/Calculators@13536b9/Car_And_Fuel_Benefits.js"></script>
Stamp Duty Land Tax Rates and Bandings
<script defer src="https://cdn.jsdelivr.net/gh/kefrankefran7609/Calculators@68d25d2/Stamp_Duty_Land_Tax_Rates_And_Bandings.js"></script>
Annual Tax on Enveloped Dwellings (ATED) Rates
<script defer src="https://cdn.jsdelivr.net/gh/kefrankefran7609/Calculators@78a7a9f/Annual_Tax_On_Enveloped_Dwellings_Rates.js"></script>
Please reach out to Crystal at crystal.foo@2020innovation.com if you need any help.