ZIP file contents

All the relevant data to Curalate client would be available in the ZIP folder with the prefix Curalate.

When extracted, the ZIP file will contain a directory for each Bazaarvoice client instance that has data on the consumer. For example, if you scoped your request to three client instances, InstanceA, InstanceB, and InstanceC. The first two had data on the consumer, but the last one did not, then you would see two directories when you extract the ZIP file: "InstanceA" and "InstanceB" each representing data stored in the respective client instance.

Directory contents

Each client instance directory structure extracted from the resultant ZIP file will contain two sets of data. One set of JSON files and another set of CSV files representing data associated with the consumer in two of currently supported formats. A consumer can read these JSON files with any text editor. The exact number and name of these JSON files vary from consumer to consumer, depending on how the consumer interacted with Bazaarvoice systems. Furthermore, the fields within each JSON file can vary for the same reasons.

Bazaarvoice does not recommend that you process the JSON files before providing them to the consumer. The ZIP file and its contents are meant for direct consumer consumption. However, if your use case requires you to process the JSON files before providing them to the consumer, your application must handle the JSON files and JSON fields in as general a way as possible rather than hardcode the values you see during testing. In short, you should not expect the JSON files or fields to be the same in name or quantity for each consumer. If you do, your application will encounter errors when the contents differ across requests.

The generated CSV files represent JSON data in a comma-separated manner where each column header represents a respective JSON key, and each record row represents value in a respective JSON object. For example, if the generated JSON file has two JSON objects with four key fields, then the resultant CSV file will contain four columns for the individual key and two rows representing the respective JSON object as in example 1. Further, if it is a complex JSON structure as nested JSON object, the same will be represented with nested-object-name.fieldname as in example 2. For a JSON with nested array, columns are represented with position as depicted in example 3. The following demonstrates a typical examples.

Example 1: Simple JSON

[
  {
    "clientID" : "client_id 1",
    "id" : 10159683,
    "createdDate" : "2023-05-04T18:18:45.009+0000",
    "amount" : 2312.24
  },
  {
    "clientID" : "client_id 2",
    "id" : 10159683,
    "createdDate" : "2023-05-04T18:18:45.009+0000",
    "amount" : 1112.24
  }
]

Resultant CSV

clientIDIDcreatedDateamount
client_id12023-05-04T18:18:45.009+00002312.24
client_id22023-05-04T18:18:45.009+00001112.24

Example 2: Nested JSON

[
  {
    "schemaVersion" : "2023-05-18",
    "abouId" : 123,
    "clientName" : "privacy test client",
    "published" : {
      "id" : 4994285,
      "aboutType" : "question"
    }
  },
  {
    "schemaVersion" : "2023-05-18",
    "abouId" : 124,
    "clientName" : "privacy general client",
    "published" : {
      "id" : 4994285,
      "aboutType" : "question and answer"
    }
  }
]

Resultant CSV

schemaVersionabouIdclientNamepublished.idpublished.aboutType
2023-05-18123privacy test client4994285question
2023-05-18124privacy general client4994285question and answer

Example 3: Arrays

[
  {
    "channel" : "instagram",
    "client" : "privacy test client",
    "photos" : [
      {
        "origin" : "instagram",
        "imageUrl" : "httpsn1.jpg"
      },
      {
        "origin" : "instagram",
        "imageUrl" : "httpsn2.jpg"
      }
    ]
  }
]

Resultant CSV

channelclientphotos.0.originphotos.0.imageUrlphotos.1.originphotos.1.imageUrl
instagramprivacy test clientinstagramhttpsn1.jpginstagramhttpsn2.jpg

Errors

Please see Troubleshooting for a detailed description and solution for Privacy API errors.