EN
Open2b versione 7.9

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/v13/commerce.privacy-consents.find
{
  "conditions" : { // returns only the privacy consents …
    "processings" : [ 12, 2 ], // … of these processings - int(1…255)
    "dataType" : "Order", // … with this type of data, can be "Cart", "Order", "Quote" or "Customer" - string
    "data" : [ { // … associated with these data
      "type" : "Order", // data type, can be "Cart", "Order", "Quote" or "Customer" (required) - string
      "id" : 12, // order, quote or customer identifier (can be null) - int(1..)
      "token": "RtRi8JWsxK…TMwTA1UJtg" // cart token (can be null) - string(32)
    }, … ],
    "lastAction" : "Give", // … with this last action, can be "Give" or "Withdraw" - string
    "fromActionTime" : "2020-12-03 13:13:47", // … action time equal to or later than this - datetime
    "after" : { // … after this consent
      "processing" : 3, // processing identifier (required) - int(1…)
      "data" : { // data (required)
        "type" : "Order", // data type, can be "Cart", "Order", "Quote" or "Customer" (required) - string
        "id" : 11342, // order, quote or customer identifier (can be null) - int(1..)
        "token": "RtRi8JWsxK…TMwTA1UJtg" // cart token (can be null) - string(32)
      }
    }
  },
  "fields" : [ "processing", "data", … ], // fields to return - string
  "order" : [ "processing" ], // can contain "processing", "dataType", "data", "lastAction", "actionTime", or any of these prefixed with "-"
  "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)
    "data" : {
      "type" : "Order", // data type, can be "Cart", "Order", "Quote" or "Customer" - string
      "id" : 12, // order, quote or customer identifier (can be null) - int(1..)
      "token": "RtRi8JWsxK…TMwTA1UJtg" // cart token (can be null) - string(32)
    },
    "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(0…60)
    "processingDescription" : "" // description of the processing - string(0…1000)
  }, … ]
}

Errors

Field Type Description
data Malformed id cannot be specified when dataType is 'Cart'
data Malformed id must be specified when dataType is '<dataType>'
data Malformed token cannot be specified when dataType is '<dataType>'
data Malformed token must be specified when dataType is 'Cart'

privacy-consents.give

Gives one or more consents.

Request

Admin SDK
Admin.api('commerce.privacy-consents.give', request, function(response) { … });
HTTP POST
/api/v13/commerce.privacy-consents.give
{
  "consents" : [ { // privacy consents to give (required)
    "processing" : 3, // processing (required) - int(1…255)
    "data" : { // data (required)
      "type" : "Order", // data type, can be "Cart", "Order", "Quote" or "Customer" (required) - string
      "id" : 12, // order, quote or customer identifier (can be null) - int(1..)
      "token": "RtRi8JWsxK…TMwTA1UJtg" // cart token (can be null) - string(32)
    },
    "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
    "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 Malformed id cannot be specified when dataType is 'Cart'
data Malformed id must be specified when dataType is '<dataType>'
data Malformed token cannot be specified when dataType is '<dataType>'
data Malformed token must be specified when dataType is 'Cart'
dataType InvalidValue Data type cannot be '<dataType>' for this processing
id NotFound <dataType> <id> 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
token NotFound Cart '<token>' does not exist

privacy-consents.withdraw

Withdraws one or more consents.

Request

Admin SDK
Admin.api('commerce.privacy-consents.withdraw', request, function(response) { … });
HTTP POST
/api/v13/commerce.privacy-consents.withdraw
{
  "consents" : [ { // privacy consents to withdraw (required)
    "processing" : 3, // processing (required) - int(1…255)
    "data" : { // data (required)
      "type" : "Order", // data type, can be "Cart", "Order", "Quote" or "Customer" (required) - string
      "id" : 12, // order, quote or customer identifier (can be null) - int(1..)
      "token": "RtRi8JWsxK…TMwTA1UJtg" // cart token (can be null) - string(32)
    },
    "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 withdrawn - datetime
    "via" : "Site" // action done through this means - string
  }, … ]
}

Response

{
  "status" : "ok"
}

Errors

Field Type Description
data Malformed id cannot be specified when dataType is 'Cart'
data Malformed id must be specified when dataType is '<dataType>'
data Malformed token cannot be specified when dataType is '<dataType>'
data Malformed token must be specified when dataType is 'Cart'
consent NotFound Privacy consent for '<dataType>' <data> 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

privacy-consents.delete

Deletes one or more privacy consents.

Request

Admin SDK
Admin.api('commerce.privacy-consents.delete', request, function(response) { … });
HTTP POST
/api/v13/commerce.privacy-consents.delete
{
  "consents" : [ { // privacy consents to delete (required)
    "processing" : 3, // processing (required) - int(1…255)
    "data" : [ { // data to delete (required by the public API schema)
      "type" : "Order", // data type, can be "Cart", "Order", "Quote" or "Customer" (required) - string
      "id" : 12, // order, quote or customer identifier (can be null) - int(1..)
      "token": "RtRi8JWsxK…TMwTA1UJtg" // cart token (can be null) - string(32)
    } ]
  }, … ]
}

Response

{
  "status" : "ok"
}

Errors

Field Type Description
data Malformed id cannot be specified when dataType is 'Cart'
data Malformed id must be specified when dataType is '<dataType>'
data Malformed token cannot be specified when dataType is '<dataType>'
data Malformed token must be specified when dataType is 'Cart'