What follows is an overview of the key concepts about each of the API endpoint that will be used in the conversational AI application:

Authorization

Calls to each endpoint must be authorized using a bearer token. A bearer token is an arbitrary string generated by a server that lets you access server or API resources.

This is provided as part of the Airtable setup when you setup the API.  When making HTTP requests in UI Builder, bearer tokens are appended onto the Request Header of the HTTP request.  You can see an example of this here:

Untitled

List Vendor Contacts (GET)

https://api.airtable.com/v0/app6vMcJv8kOBxaxv/Vendor contacts?maxRecords=3

Returns a list of all existing vendor contacts. The maximum number of records to return is dictated by the parameter maxRecords.

Retrieve Vendor Contact (GET)

https://api.airtable.com/v0/app6vMcJv8kOBxaxv/Vendor contacts/**{vendor_id}**

Retrieves a vendor contact using a unique vendor id.

Create Vendor Contact (POST)

https://api.airtable.com/v0/app6vMcJv8kOBxaxv/Vendor contacts

Creates a vendor contact.  The data for the vendor contact is passed in via the request body as JSON.

Example format for vendor contact creation JSON:

{
  "records": [
    {
      "fields": {
        "Name": "Kai Siyavong",
        "Vendors": [
          "recqvjlSuZoBwB7DT"
        ],
        "Phone number": "(123) 456-7890",
        "Email": "[email protected]"
      }
    }
  ]
}

Update Vendor Contact (PATCH and PUT)

https://api.airtable.com/v0/app6vMcJv8kOBxaxv/Vendor contacts/**{vendor_id}**

Updates a vendor contact record with value you supply in the request body. A PATCH request will only update the fields you specify. A PUT will perform a destructive update and clear all unspecified cell field values.