Open2b versione 7.5

privacy-processings

privacy-processings.find

Returns the privacy processing that meet the given conditions.

Request

Admin SDK
Admin.api('commerce.privacy-processings.find', request, function(response) { … });
HTTP POST
/api/v10/commerce.privacy-processings.find
{
  "conditions" : { // returns only the privacy processings …
    "ids" : [ 12, 3 ], // … with these identifiers - int(1…255)
    "typesOfData" : [ "Order" ], // type of data, can be "Order", "Quote" or "Customer" - string
    "isVisible" : true, // if it is visible or not on site - bool
    "showOnlyToAnonymous" : true // if it has to be shown to anonymous customers only - false
  },
  "language" : "en", // language ( ISO code ) of the texts to return - string(2)
  "fields" : [ "id", "title", … ], // fields to return - string
  "order" : [ "id" ] // sort order of returned privacy processings, can contain "id", "-id", "title", "-title", "position", "-position"
}

Response

{
  "status" : "ok",
  "processings" : [ {
    "id" : 3, // identifier - int(1…255)
    "title" : { // name - string(2) -> string(0…60)
      "en" : "Terms and Conditions",
      "it" : "Termini e condizioni"
    },
    "description" : { // description - string(2) -> string(0…1000)
      "en" : "",
      "it" : ""
    },
    "detailsPage" : 12, // page with the privacy processing details (id) (can be null) - int(1…)
    "position" : 3, // position - int(1…255)
    "typeOfData" : "Order", // type of data, can be "Order", "Quote" or "Customer" - string
    "lawfulBase" : "Consent", // lawful base, can be "Consent", "Contract", "LegalObligation", "LegitimateInterest" or "Other" - string
    "isConsentRequired" : "true", // indicates if the consent is required. If true, lawful base must be "Consent" - bool
    "isVisible" : "true", // indicates if it is visible on site - bool
    "showOnlyToAnonymous" : "false" // indicates if it has to be shown to anonymous customers only - bool
  }, … ]
}

privacy-processings.get

Returns a privacy processing given its identifier.

Request

Admin SDK
Admin.api('commerce.privacy-processings.get', request, function(response) { … });
HTTP POST
/api/v10/commerce.privacy-processings.get
{
  "id" : 3, // identifier of the privacy processing to return (required) - int(1…255)
  "language" : "en", // language ( ISO code ) of the texts to return - string(2)
  "fields" : [ "id", "title", … ] // fields to return - string
}

Response

{
  "status" : "ok",
  "processing" : {
    "id" : 3, // identifier - int(1…255)
    "title" : { // name - string(2) -> string(0…60)
      "en" : "Terms and Conditions",
      "it" : "Termini e condizioni"
    },
    "description" : { // description - string(2) -> string(0…1000)
      "en" : "",
      "it" : ""
    },
    "detailsPage" : 12, // page with the privacy processing details (id) (can be null) - int(1…)
    "position" : 3, // position - int(1…255)
    "typeOfData" : "Order", // type of data, can be "Order", "Quote" or "Customer" - string
    "lawfulBase" : "Consent", // lawful base, can be "Consent", "Contract", "LegalObligation", "LegitimateInterest" or "Other" - string
    "isConsentRequired" : "true", // indicates if the consent is required. If true, lawful base must be "Consent" - bool
    "isVisible" : "true", // indicates if it is visible on site - bool
    "showOnlyToAnonymous" : "false" // indicates if it has to be shown to anonymous customers only - bool
  }
}

privacy-processings.count

Number of privacy processings that meet the given conditions.

Request

Admin SDK
Admin.api('commerce.privacy-processings.count', request, function(response) { … });
HTTP POST
/api/v10/commerce.privacy-processings.count
{
  "conditions" : { // counts only the privacy processings …
    "ids" : [ 12, 3 ], // … with these identifiers - int(1…255)
    "typesOfData" : [ "Order" ], // type of data, can be "Order", "Quote" or "Customer" - string
    "isVisible" : true, // if it is visible or not on site - bool
    "showOnlyToAnonymous" : true // if it has to be shown to anonymous customers only - false
  }
}

Response

{
  "status" : "ok",
  "count" : 5 // number of privacy processings - int(0…255)
}

privacy-processings.create

Create a new privacy processing.

Request

Admin SDK
Admin.api('commerce.privacy-processings.create', request, function(response) { … });
HTTP POST
/api/v10/commerce.privacy-processings.create
{
  "processing" : { // privacy processing to create (required)
    "title" : { // title - string(2) -> string(0…60)
      "en" : "Terms and Conditions",
      "it" : "Termini e condizioni"
    },
    "description" : { // description - string(2) -> string(0…1000)
      "en" : "",
      "it" : ""
    },
    "detailsPage" : 12, // page with the privacy processing details (id) (can be null) - int(1…)
    "position" : 3, // position - int(1…255)
    "typeOfData" : "Order", // type of data, can be "Order", "Quote" or "Customer" - string
    "lawfulBase" : "Consent", // lawful base, can be "Consent", "Contract", "LegalObligation", "LegitimateInterest" or "Other" - string
    "isConsentRequired" : "true", // indicates if the consent is required. If true, lawful base must be "Consent" - bool
    "isVisible" : "true", // indicates if it is visible on site - bool
    "showOnlyToAnonymous" : "false" // indicates if it has to be shown to anonymous customers only - bool
  }
}

Response

{
  "status" : "ok",
  "id" : 2 // identifier of the new privacy processing - int(1…255)
}

Errors

Field Type Description
detailsPage NotFound Page <detailsPage> does not exist
lawfulBase InvalidCombination Lawful base must be 'Consent' if 'isConsentRequired' is true
processing LimitReached Maximum limit for privacy processings has been reached

privacy-processings.update

Updates a privacy processing. Any fields left out of the request will remain unchanged.

Request

Admin SDK
Admin.api('commerce.privacy-processings.update', request, function(response) { … });
HTTP POST
/api/v10/commerce.privacy-processings.update
{
  "id" : 2, // identifier of the privacy processing to update (required)
  "processing" : { // privacy processing's fields to update (required)
    "title" : { // title - string(2) -> string(0…60)
      "en" : "Terms and Conditions",
      "it" : "Termini e condizioni"
    },
    "description" : { // description - string(2) -> string(0…1000)
      "en" : "",
      "it" : ""
    },
    "detailsPage" : 12, // page with the privacy processing details (id) (can be null) - int(1…)
    "position" : 3, // position - int(1…255)
    "lawfulBase" : "Consent", // lawful base, can be "Consent", "Contract", "LegalObligation", "LegitimateInterest" or "Other" - string
    "isConsentRequired" : "true", // indicates if the consent is required. If true, lawful base must be "Consent" - bool
    "isVisible" : "true", // indicates if it is visible on site - bool
    "showOnlyToAnonymous" : "false" // indicates if it has to be shown to anonymous customers only - bool
  }
}

Response

{
  "status" : "ok"
}

Errors

Field Type Description
detailsPage NotFound Page <detailsPage> does not exist
id NotFound Privacy processing <id> does not exist
lawfulBase InvalidCombination Lawful base must be 'Consent' if 'isConsentRequired' is true
processing LimitReached Maximum limit for privacy processings has been reached

privacy-processings.delete

Deletes one or more privacy processings.

Request

Admin SDK
Admin.api('commerce.privacy-processings.delete', request, function(response) { … });
HTTP POST
/api/v10/commerce.privacy-processings.delete
{
  "ids" : [ 2, 5, … ] // identifiers of the privacy processings to delete (required) - int(1…255)
}

Response

{
  "status" : "ok"
}