Overview
You can use this request to unenroll contacts from an ecommerce workflow.
The Method
| API | - | Method |
|---|---|---|
| REST | POST | https://[Your URL]/api/3.0/workflows/unenroll |
Your URL is the address of your install.
Parameters
| Property | Type | Description | Default | Required | Read Only |
|---|---|---|---|---|---|
| workflow_id | integer | The ID of the Workflow you want to add the contacts to. This can be found by hovering over the checkbox of the Workflow on the Workflow History page. | empty | Yes | No |
| contact_email | string | Email address to unenroll from the workflow | empty | Yes | No |
Responses
Success Response
Error Response
Workflow not found - 404 Workflow not active - 404 Error no contact found - 404
Code Samples
Example Request
$json = ' '; $url = '(Your URL)/api/2.0/contacts/import'; $method = 'POST'; $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_POSTFIELDS, $json); $headers[] = 'Content-Type: application/json'; curl_setopt($cSession, CURLOPT_HTTPHEADER, $headers); $result = curl_exec($cSession); curl_close($cSession);