/
NUTRINTG Data Row Operations in CDS Russia

NUTRINTG Data Row Operations in CDS Russia

It is possible to create data rows and read them.

Create Data Row

Set of data rows with the same bucketId, brand, market, url and customerEmail are considered to be versions of the same data. Therefore, for some tricky cases, e.g. orders, some unique identifier should be added to url in order to have all orders as separate data, not the same versions of a single data.

POST /data?bucketId={bucketId}&customerEmail={customerEmail}&url={url}&market={market}&brand={brand} HTTP/1.1 Host: {host} Content-Type: application/json Cache-Control: no-cache Authorization: Bearer {token} { "yourField": "yourValue", "agreements": [ { "businessId": "businessIdOfAnExistingDocument", "revisionId": "revisionIdOfAnExistingDocument", "consentAccepted": true, "consentDescription": "some document description", "mandatory": true } ] }

where:

  • {host} - depends on the environment, https://digital-cds-application-web.dev.moscow.rbdigitalcloud.com or https://digital-cds-application-web.prod.moscow.rbdigitalcloud.com

  • {token} - token generated with a scope that contains SAVE_DATA permission.

  • {bucketId} - bucket ID provided by CDD team.

  • {customerEmail} - email of a customer associated with this data row.

  • {url} - identifier of a source of data, e.g. https://www.durex.ru/someCampaign. Could be similar to the one, assigned to a bucket, but this is not required. For orders, it could be https://www.durex.ru/order/{uniqueIdFromSourceSystem}.

  • {market} - market, e.g. RU-ru. In the case of CDS Russia, in all or in most of the cases this is RU-ru.

  • {brand} - brand, e.g. Durex.

Agreements can be theoretically empty, but at least one is required in most cases due to legal requirements. mandatory and consentAccepted depends if an agreement to a document is required and if the user accepted it. If mandatory is true, consentAccepted must be true as well.

 

If a request is valid, there should be a response with status 200.

Get Latest Version Of A Data Row

GET /data/latest?bucketId={bucketId}&customerEmail={customerEmail}&url={url}&market={market}&brand={brand} HTTP/1.1 Host: {host} Content-Type: application/json Cache-Control: no-cache Authorization: Bearer {token}

where:

  • {bucketId} - bucket ID associated with a data row.

  • {customerEmail} - email of a customer associated with a data row.

  • {url} - identifier of a source of data associated with a data row.

  • {market} - market associated with a data row.

  • {brand} - brand associated with a data row.

 

If a request is valid, there should be a response with status 200.

HTTP/1.1 200 OK content-type: application/json;charset=UTF-8 { "result": { "_id": "someId", "bucketId": "someBucketId", "brand": "someBrand", "market": "someMarket", "url": "someUrl", "customerEmail": "someEmail", "customData": { "yourField": "yourValue", "agreements": [ { "businessId": "businessIdOfAnExistingDocument", "revisionId": "revisionIdOfAnExistingDocument", "consentAccepted": true, "consentDescription": "some document description", "mandatory": true } ], "schemaId": "someSchemaId", "rowVersion": 1, "creationTime": 1596810279186 } }