Skip to content
GuidesPlaygroundDashboard

Fetch multiple features by type and ID

$client->elements->batch(list<Element> elements): FeatureCollection
POST/api/v1/features/batch

Fetch multiple features by type and ID

ParametersExpand Collapse
elements: list<Element>
ReturnsExpand Collapse
list<GeoJsonFeature> features
Type type

Fetch multiple features by type and ID

<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

$client = new Client(apiKey: 'My API Key', environment: 'local');

$featureCollection = $client->elements->batch(
  elements: [['id' => 0, 'type' => 'node']]
);

var_dump($featureCollection);
Returns Examples