Consumer Data Privacy API
this document assumes that the reader has already created an api user and is capable of obtaining a token via the monetate auth api's refresh a token endpoint if you're unfamiliar with these steps, refer to manage api keys various privacy policies and regulations require companies to delete customer data upon request to help comply with these regulations, monetate provides an api endpoint that accepts a list of customer ids that should be deleted from its database after deleting a customer id, monetate continues to purge that id from its system if it is recognized in any future sessions creating the customer data privacy dataset to start, you must create a new dataset using a schema type called customer data privacy this is a one time configuration that defines a two column dataset of customer id and delete request time use the endpoint defined in create a new schema fields don't have to be defined because the schema type does this by default create a new schema endpoint https //api monetate net/api/data/v1/{retailershortname}/production/schema/ submit a support ticket using the {{monetatesupportcontact}} to obtain your account's shortname if you don't know it example request header authorization token content type application/json example request body { "type" "customer data privacy", "name" "\<unique dataset name>", "fields" {} } the schema creation process allows you to supply extra columns beyond the two required attributes however, these fields aren't used in any capacity posting data to the customer data privacy dataset once you create a customer data privacy dataset, you can begin sending customer ids to monetate through the dataset doing so triggers a process to delete those ids from monetate's database you must provide two attributes in the request customer id — the unique identifier for the customer to be removed delete request time — the timestamp for when the customer's removal request was received in the iso 8601 standard format (yyyy mm dd) use the send data endpoint send data endpoint https //api monetate net/api/data/v1/{retailershortname}/production/data// example request header authorization token content type application/json example request body { "customer id" "abc123", "delete request time" "2019 05 23t12 01 00 000000z" } if you created the dataset with extra columns, they can be passed with the rest of the data, but this data is ignored verifying customer id deletion status monetate processes deletion requests through a series of nightly batch jobs requests typically take 24 to 48 hours to complete after completion, the customer ids no longer are in monetate's system to confirm that a customer id has been deleted, you can query the customer id status endpoint customer id status endpoint https //api monetate net/api/data/v1/{retailershortname}/production/customer data privacy/\<insert unique dataset name>/?id=\<customer id> the required customer id is the customer id for which you're submitting the status query required headers request header authorization token \<api token> the token can be the same one used in the endpoints above any valid api token works if you want to use different api users for different systems example response body { "meta" { "code" 200 }, "data" { "status" \<string oneof(pending, found, not found)>, "description" \<string> } } statuses pending — the customer id has been found within monetate's data stores and is pending removal found — the customer id has been found within monetate's data stores not found — the customer id has not been found within monetate's data stores the not found status is expected once the customer id has been completely removed from monetate's data stores possible error response codes 401 unauthorized 403 forbidden 404 not found 500 server error submit a support ticket using the {{monetatesupportcontact}} if you don't receive a not found status 48 hours after submitting your request