Get a suppression list import
const url = 'https://api.postlever.com/v1/suppression-lists/497f6eca-6276-4993-bfeb-53cbbbba6f08/imports/8f14e45f-ea8f-4b1a-9c2d-2b0a5a1f3c7e';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.postlever.com/v1/suppression-lists/497f6eca-6276-4993-bfeb-53cbbbba6f08/imports/8f14e45f-ea8f-4b1a-9c2d-2b0a5a1f3c7e \ --header 'Authorization: <Authorization>'Fetches one import run against a suppression list, including how many records it added, how many were already suppressed, and how many could not be read.
The add-records endpoint returns the importId of the import it creates.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The id of the suppression list.
The id of the import, as returned by the add-records endpoint.
Responses
Section titled “Responses”The import.
object
How the records arrived.
How many records the import supplied.
How many became new records on the list.
How many were already on the list, or repeated within the import.
How many could not be read as a record of the list’s format.
When the import finished. Absent while it is still running.
Example
{ "id": "8f14e45f-ea8f-4b1a-9c2d-2b0a5a1f3c7e", "suppressionListId": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "status": "importing", "method": "api", "totalCount": 2, "addedCount": 1, "duplicateCount": 1, "malformedCount": 0}A path parameter is not a valid UUID.
Error envelope returned by every v1 endpoint for failures, following RFC 9457
Problem Details with code and errors extensions.
object
URI identifying the problem type; dereferences to its documentation.
HTTP status code applicable to this problem.
Short, human-readable summary of the problem type.
Detailed explanation specific to this occurrence.
Error code identifying the specific error condition.
URI reference identifying this specific occurrence (the request URI).
Provides additional information when the error relates to specific request fields.
object
Detailed explanation for this specific field error.
JSON Pointer (RFC 6901) to the request body value that caused the error (e.g. /email, /attributes/firstName).
The URI query parameter that caused the error (e.g. pageSize, name[invalid]).
Example
{ "type": "https://docs.postlever.com/error-codes#invalid_request_error", "status": 400, "title": "Invalid request", "detail": "suppressionListId must be a UUID", "code": "invalid_request_error", "instance": "/v1/suppression-lists/not-a-uuid", "errors": [ { "detail": "suppressionListId must be a UUID" } ]}Missing or invalid API key.
Error envelope returned by every v1 endpoint for failures, following RFC 9457
Problem Details with code and errors extensions.
object
URI identifying the problem type; dereferences to its documentation.
HTTP status code applicable to this problem.
Short, human-readable summary of the problem type.
Detailed explanation specific to this occurrence.
Error code identifying the specific error condition.
URI reference identifying this specific occurrence (the request URI).
Provides additional information when the error relates to specific request fields.
object
Detailed explanation for this specific field error.
JSON Pointer (RFC 6901) to the request body value that caused the error (e.g. /email, /attributes/firstName).
The URI query parameter that caused the error (e.g. pageSize, name[invalid]).
Example
{ "type": "https://docs.postlever.com/error-codes#authentication_error", "status": 401, "title": "Authentication failed", "detail": "Missing or invalid API key", "code": "authentication_error", "instance": "/v1/contacts"}Permission denied.
Error envelope returned by every v1 endpoint for failures, following RFC 9457
Problem Details with code and errors extensions.
object
URI identifying the problem type; dereferences to its documentation.
HTTP status code applicable to this problem.
Short, human-readable summary of the problem type.
Detailed explanation specific to this occurrence.
Error code identifying the specific error condition.
URI reference identifying this specific occurrence (the request URI).
Provides additional information when the error relates to specific request fields.
object
Detailed explanation for this specific field error.
JSON Pointer (RFC 6901) to the request body value that caused the error (e.g. /email, /attributes/firstName).
The URI query parameter that caused the error (e.g. pageSize, name[invalid]).
Example
{ "type": "https://docs.postlever.com/error-codes#permission_error", "status": 403, "title": "Permission denied", "detail": "api key required", "code": "permission_error", "instance": "/v1/contacts"}No import with this id exists on this suppression list, or the suppression list does not exist in your account.
Error envelope returned by every v1 endpoint for failures, following RFC 9457
Problem Details with code and errors extensions.
object
URI identifying the problem type; dereferences to its documentation.
HTTP status code applicable to this problem.
Short, human-readable summary of the problem type.
Detailed explanation specific to this occurrence.
Error code identifying the specific error condition.
URI reference identifying this specific occurrence (the request URI).
Provides additional information when the error relates to specific request fields.
object
Detailed explanation for this specific field error.
JSON Pointer (RFC 6901) to the request body value that caused the error (e.g. /email, /attributes/firstName).
The URI query parameter that caused the error (e.g. pageSize, name[invalid]).
Example
{ "type": "https://docs.postlever.com/error-codes#not_found_error", "status": 404, "title": "Not found", "detail": "Suppression list import not found", "code": "not_found_error", "instance": "/v1/suppression-lists/497f6eca-6276-4993-bfeb-53cbbbba6f08/imports/8f14e45f-ea8f-4b1a-9c2d-2b0a5a1f3c7e"}