Get clear membership status
GET /v2/marketing/segments/{segment_id}/clear_status
For a given segment_id, returns the status of the clear membership operation.
Security
| Name | In | Description |
|---|---|---|
Authorization | header | The Authorization header with the client bearer token acquired during authentication. |
For more information, see Get a client access token.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
segment_id | path | string | The ID of the segment. |
Request
None.Request examples
- cURL
- Java
- Python
- Go
- Node.js
curl --request GET \
--url 'https://connect.instacart.com/v2/marketing/segments/{segment_id}/clear_status' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'
HttpResponse<String> response = Unirest.get("https://connect.instacart.com/v2/marketing/segments/{segment_id}/clear_status")
.header("Accept", "application/json")
.header("Authorization", "Bearer <token>")
.asString();
import http.client
conn = http.client.HTTPSConnection("connect.instacart.com")
headers = {
'Accept': "application/json",
'Authorization': "Bearer <token>"
}
conn.request("GET", "/v2/marketing/segments/{segment_id}/clear_status", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://connect.instacart.com/v2/marketing/segments/{segment_id}/clear_status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
const http = require('https');
const options = {
method: 'GET',
hostname: 'connect.instacart.com',
port: null,
path: '/v2/marketing/segments/{segment_id}/clear_status',
headers: {
Accept: 'application/json',
Authorization: 'Bearer <token>'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
Response
| Field | Type | Required | Description |
|---|---|---|---|
segment_id | string | The ID of the segment. | |
status | string | The current clear-membership workflow status. |
Response examples
Success
200Clearing
{
"segment_id": "f87414d7-1836-4b5c-84b5-6efeb2406a18",
"status": "clearing"
}
4XX Errors
Error responses return either a single error or multiple errors.
| HTTP Code | Cause | Error Message | Error Code | Error Meta |
|---|---|---|---|---|
400 | Missing segment_id | "segment_id is required" | 1001 | {"key":"segment_id"} |
401 | Unauthorized | "Unauthorized" | null | Not applicable |
403 | Forbidden | "Forbidden" | null | Not applicable |
404 | Not found | "segment not found" | 4000 | Not applicable |