Open2b versione 7.5

privacy-consents

privacy-consents.find

Returns the privacy consents that meet the given conditions.

Request

Admin SDK
Admin.api('commerce.privacy-consents.find', request, function(response) { … });
HTTP POST
/api/v10/commerce.privacy-consents.find
{
  "conditions" : { // returns only the privacy consents …
    "processings" : [ 12, 2 ], // … of these processings - int(1…255)
    "typesOfData" : [ "Order" ], // … with these types of data can be "Cart", Order", "Quote" or "Customer"- string,
    "data" : [ 1, 44 ], // … of these data (id) - int(1…)
    "lastAction" : "Give", // … with this last action, can be "Give" or "Whithdraw"  - string
    "fromActionTime" : "2020-12-03 13:13:47", // … action time equal or next to this - string
    "after" : { // … with identifier after this value
      "processing": 3, // … processing identifier (required) - int(1…255)
      "typeOfData": "Order", // … type of data, can be "Cart", "Order", "Quote" or "Customer" (required) - string
      "data" : 11342 // … data identifier (required) - int(1…)
    },
    "fields" : [ "processing", "typeOfData", … ], // fields to return - string
    "order" : [ "processing" ], // sort order of returned privacy consents, can contain "-processing", "processing", "-typeOfData", "typeOfData", "-data", "data", "-lastAction", "lastAction", "-actionTime" or "actionTime"
    "limit" : 10, // maximum number of privacy consents to return - int(1…)
    "first" : 0 // index of the first privacy consent to return - int(0…)
  }
}

Response

{
  "status" : "ok",
  "consents" : [ {
    "processing" : 3, // processing - int(1…255)
    "typeOfData": "Order", // type of data, can be "Cart", "Order", "Quote" or "Customer" - string
    "data" : 12, // data, must be an identifier of a customer, a cart, an order or a quote - int(1…)
    "lastAction" : "Give", // last action, can be "Give" or "Withdraw" - string
    "ip" : "172.16.254.1", // IP address of the device from which the consent has been given or withdrawn (can be null) - string(3…39)
    "actionTime" : "2020-12-05 09:24:01", // last action time - datetime
    "via" : "Site", // action done through this means - string
    "processingTitle" : "Terms and Conditions", // name of the processing - string(2) -> string(0…60)
    "processingDescription" : "" // description of the processing - string(2) -> string(0…1000)
  }, … ]
}

privacy-consents.give

Gives one or more consents.

Request

Admin SDK
Admin.api('commerce.privacy-consents.give', request, function(response) { … });
HTTP POST
/api/v10/commerce.privacy-consents.give
{
  "consents" : [ { // privacy consents to give (required)
    "processing" : 3, // processing (required) - int(1…255)
    "typeOfData": "Order", // type of data, can be "Cart", "Order", "Quote" or "Customer" (required) - string
    "data" : 12, // data, must be an identifier of a customer, a cart, an order or a quote (required) - int(1…)
    "ip" : "172.16.254.1", // IP address of the device from which the consent has been given or withdrawn (can be null) - string(3…39)
    "via" : "Site", // action done through this means - string
    "processingTitle" : "Terms and Conditions", // name of the processing (required) - string(0…60)
    "processingDescription" : "" // description of the processing (required) - string(0…1000)
  }, … ]
}

Response

{
  "status" : "ok"
}

Errors

Field Type Description
data NotFound Data <id> of type '<typeOfData>' does not exist
ip Malformed '<ip>' is not a well formed IP address
ip Malformed IP '<ip>' is not in the RFC 5952 canonical representation format
processing NotFound Privacy processing <id> does not exist
typeOfData InvalidValue Type of data cannot be '<typeOfData>' for this processing

privacy-consents.withdraw

Withdraws one or more consents.

Request

Admin SDK
Admin.api('commerce.privacy-consents.withdraw', request, function(response) { … });
HTTP POST
/api/v10/commerce.privacy-consents.withdraw
{
  "consents" : [ { // privacy consents to give (required)
    "processing" : 3, // processing (required) - int(1…255)
    "typeOfData": "Order", // type of data, can be "Cart", "Order", "Quote" or "Customer" (required) - string
    "data" : 12, // data, must be an identifier of a customer, a cart, an order or a quote (required) - int(1…)
    "ip" : "172.16.254.1", // IP address of the device from which the consent has been given or withdrawn (can be null) - string(3…39)
    "actionTime" : "2020-12-05 09:24:01", // time when consent was given - datetime
    "via" : "Site" // action done through this means - string
  }, … ]
}

Response

{
  "status" : "ok"
}

Errors

Field Type Description
consent NotFound Privacy consent for '<typeOfData>' does not exists
ip Malformed '<ip>' is not a well formed IP address
ip Malformed IP '<ip>' is not in the RFC 5952 canonical representation format
processing NotFound Privacy processing <id> does not exist

privacy-consents.delete

Deletes one or more privacy consents.

Request

Admin SDK
Admin.api('commerce.privacy-consents.delete', request, function(response) { … });
HTTP POST
/api/v10/commerce.privacy-consents.delete
{
  "consents" : [ { // privacy consents to delete (required)
    "processing" : 3, // processing (required) - int(1…255)
    "typeOfData": "Order", // type of data, can be "Cart", "Order", "Quote" or "Customer" (required) - string
    "data" : 12 // data, must be an identifier of a customer, a cart, an order or a quote (required) - int(1…)
  }, … ]
}

Response

{
  "status" : "ok"
}