Overview
You can use this request to check the progress of your import.
The Method
Type | Request | Method |
---|---|---|
REST | GET | https://[Your URL]/api/2.0/contacts/import/:batch_id |
XML-RPC | Call | contacts.ImportProgress |
Your URL is the address of your install.
Your method must be structured as follows:
ImportProgress(string $batch_id) : string
Parameters
Required Parameters
The following parameters are required for this request to work.
Property | Type | Description | Default | Required |
---|---|---|---|---|
batch_id | string | The identifier hash of the import batch you want to get progress information about. | empty | yes |
Responses
Type | Description |
---|---|
string | The call will return the status of the import: complete / in progress If the import is incomplete, the call will also return the number of items still to be imported. |
Code Samples
$url = '(Your URL)/api/2.0/contacts/import/:batch_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);