$api_key = ‘[KEY GOES HERE]’;
$base_id = ‘appPrp2UDQKyeozka’; // Base ID for entire scorecard machine
$table_id = ‘tblhkGjHUAMbsLYDF’; // Table ID
$view_id = ‘viwnABjCLiL9eAiip’; // View ID
$scorecard_id = ‘recNQHVVwauXgaS3q’;
$url = ‘https://api.airtable.com/v0/’ . $base_id . ‘/’. $table_id . ‘/?view=’.$view_id; //’&fields%5B%5D=Criteria&fields%5B%5D=Section%20Link’;
$headers = array(
'Authorization: Bearer ’ . $api_key
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPGET, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_URL, $url);
$entries = curl_exec($ch);
curl_close($ch);
$airtable_response = json_decode($entries, TRUE);
This gives me a response with the items in this view. But they aren’t ordered by the order in the view? How can i fix this?