Contacts

Explanation of how to manage your contacts through the Carts Guru API.

Get Contact

GET https://api.carts.guru/contacts

This endpoint allows you to get the information for single contact.

Query Parameters

Headers

{
    "data": [{
        "_id": "Contact's id",
        "siteId": "Your site id",
        "firstName": "Contacts first name"
        "lastName": "Contacts last name",
        "addresses": [{
            "title": "Residence type",
            "line1": "",
            "line2": "",
            "postcode": "Contacts zipcode",
            "city": "Contacts city",
            "country": "Contacts Country"
        }],
        "phoneNumbers": [{
            "title": "type",
            "phoneNumber": "Contacts phone number"
        }],
        "emails": ["Contacts email"],
        "communicationPreferences": {
            "sms": "Default",
            "call": "Optin",
            "email": "Optout"
        }
    }]
}

Update Contact's Opt-in Status

POST https://api.carts.guru/contacts/:id

This endpoint allows you to change the contacts Opt-in status.

Path Parameters

Query Parameters

Headers

Request Body


{        "data": [{            "_id": "Contact's id",            "siteId": "Your site id",                    "firstName": "Contacts first name"                    "lastName": "Contacts last name",                    "addresses": [{                                "title": "Residence type",                                "line1": "",                                "line2": "",                                "postcode": "Contacts zipcode",                                "city": "Contacts city",                                "country": "Contacts Country"                    }],                            "phoneNumbers": [{                                "title": "type",                                "phoneNumber": "Contacts phone number"                    }],                    "emails": ["Contacts email"],                    "communicationPreferences": {                                "sms": "Default",                                "call": "Optin",                                "email": "Optout"                    }        }] }

Anonymize Contact

PUT https://api.carts.guru/contacts/:id

Allows you to delete all the identifying properties of your contacts on Carts Guru database

Path Parameters

Query Parameters

Headers

{
    "data": [{
        "_id": "Contact's id",
        "siteId": "Your site id",
        "firstName": "undefined"
        "lastName": "undefined",
        "addresses": "undefined",
        "phoneNumbers": "undefined",
        "emails": "undefined",
        "communicationPreferences": {
            "sms": "Default",
            "call": "Optin",
            "email": "Optout"
        }
    }]
}
curl -XGET https://api.carts.guru/contacts.csv?siteId=0000000-0000-0000-0000-0000000000 \
  --header 'x-auth-key: 00000000000000000' 

Import CSV File

PUT https://api.carts.guru/contacts.csv

Allows you to import a CSV File which contains a list of all the emails/phone-numbers of your current contacts in the Carts Guru database. These contacts Opt-in status will be updated to Opt-out for the type specified in the file. The CSV file format: 'mutipart/form-data' File key name: 'file'

Query Parameters

Headers

{
    status: "success"
}
curl -XPUT https://api.carts.guru/contacts.csv?siteId=0000000-0000-0000-0000-000000 \
  --header 'x-auth-key: 00000000000000000' \
  --form "file=@valid.csv;type=application/csv"

Import Requirements:

Last updated