Retrieve all Auto-Suppression Lists verified

Learn how to retrieve all Auto-Suppression Lists in Salesforce Marketing Cloud (SFMC) with SSJS (server-side JavaScript). Code snippets include the WSProxy method.

WSProxy

var api = new Script.Util.WSProxy();

var cols = [
    "ObjectID",
    "CustomerKey",
    "Name",
    "Description",
    "Client.CreatedBy",
    "CreatedDate",
    "Client.ModifiedBy",
    "ModifiedDate",
    "Category",
    "Client.ID",
    "Client.EnterpriseID",
    "SubscriberCount"
];

var result = api.retrieve("SuppressionListDefinition", cols);
<script runat="server">

    Platform.Load("core", "1");

    var api = new Script.Util.WSProxy();

    try {

        var cols = [
            "ObjectID",
            "CustomerKey",
            "Name",
            "Description",
            "Client.CreatedBy",
            "CreatedDate",
            "Client.ModifiedBy",
            "ModifiedDate",
            "Category",
            "Client.ID",
            "Client.EnterpriseID",
            "SubscriberCount"
        ];

        var result = api.retrieve("SuppressionListDefinition", cols);

        Write(Stringify(result));

    } catch (error) {

        Write(Stringify(error));

    }

</script>
{
    "Status": "OK",
    "RequestID": "S0M3-GU1D-K3Y-G03SR1G4T-H3R3",
    "Results": [
        {
            "Name": "MyNewSuppressionList 1",
            "Category": 1234,
            "Description": "My Suppression List #1",
            "Contexts": null,
            "Fields": null,
            "SubscriberCount": 0,
            "NotifyEmail": null,
            "Client": {
                "ID": 100000000,
                "ClientID1": 0,
                "PartnerClientKey": null,
                "UserID": 0,
                "PartnerUserKey": null,
                "CreatedBy": 0,
                "ModifiedBy": 0,
                "EnterpriseID": 100000000,
                "CustomerKey": null,
                "CustomerID": null
            },
            "PartnerKey": null,
            "PartnerProperties": null,
            "CreatedDate": "2022-12-06T12:16:41.317",
            "ModifiedDate": "2022-12-06T12:16:41.317",
            "ID": 0,
            "ObjectID": "S0M3-GU1D-K3Y-G03SR1G4T-H3R3",
            "CustomerKey": "S0M3-GU1D-K3Y-G03SR1G4T-H3R3",
            "Owner": null,
            "CorrelationID": null,
            "ObjectState": null,
            "IsPlatformObject": false
        },
        {
            "Client": {
                "ID": 100000000,
                "ClientID1": 0,
                "PartnerClientKey": null,
                "UserID": 0,
                "PartnerUserKey": null,
                "CreatedBy": 0,
                "ModifiedBy": 0,
                "EnterpriseID": 100000000,
                "CustomerKey": null,
                "CustomerID": null
            },
            "ObjectID": "S0M3-GU1D-K3Y-G03SR1G4T-H3R3",
            "CustomerKey": "S0M3-GU1D-K3Y-G03SR1G4T-H3R3",
            "Name": "MyNewSuppressionList 2",
            "Description": "My Suppression List #2",
            "CreatedDate": "2022-12-06T12:30:04.082",
            "ModifiedDate": "2022-12-06T12:30:04.082",
            "Category": 3132,
            "SubscriberCount": 1,
            "Contexts": null,
            "Fields": null,
            "NotifyEmail": null,
            "PartnerKey": null,
            "PartnerProperties": null,
            "ID": 0,
            "Owner": null,
            "CorrelationID": null,
            "ObjectState": null,
            "IsPlatformObject": false
        }
    ],
    "HasMoreRows": false
}

Reference

Ressources and references related to the current methods.

SOAP object

Last Updated: