Overview

You can use this request to retrieve a list with a specific ID.

The Method

API-Method
RESTGEThttps://[Your URL]/api/2.0/lists/:id
XML-RPCCalllists.GetList

Your method must be structured as follows:

Parameters

PropertyTypeDescriptionRequired
$idintegerThe ID of the list you want to retrieve.yes

Responses

TypeDescription
objectThe list object.

Code Samples

PHP (using REST API):

$url = '(Your URL)/api/2.0/lists/:list_id';
$method = 'GET';
$cSession = curl_init();
$headers = array();
$auth = base64_encode($username . ':' . $apikey);
$headers[] = 'Authorization: Basic ' . $auth;
curl_setopt($cSession, CURLOPT_URL, $url);
curl_setopt($cSession, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cSession, CURLOPT_HEADER, false);
curl_setopt($cSession, CURLOPT_CUSTOMREQUEST, strtoupper($method));
curl_setopt($cSession, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($cSession);
curl_close($cSession);