Timeline

The end point /timeline-service/timeline provides method for receiving chunk of timeline for user.

Scan timeline records for the featured products will have featured_scan flag set to true.

Get timeline feed

GET /timeline-service/timeline
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string Chunk id
reviews boolean Reviews records filter
update_ts datetime Datetime value
:empty: - returns main chunk

update_ts parameter can be applied only for head chunk (request without id parameter).

Example Response
{
  "id": "4eb1752fdd36a3415bce036478002b49",
  "records": [
       {
           "coins": 0,
           "contributor_widgets": true,
           "earned_coins": 0,
           "featured_scan": false,
           "image_url": "https://cdn.shping.com/2018/1/28/a759926f-0826-4d90-9d62-61aa4d202d56.png",
           "max_coins": 0,
           "owner_logo": null,
           "product_id": "00111110000924",
           "product_name": "Неизвестный товар",
           "scan_id": "272d2755-2d44-4088-b4c9-e915b66019b7",
           "text": "Неизвестный товар",
           "ts": "2019-04-01T02:38:16.624123133Z",
           "type": "scan"
       },
       {
            "claim_id": "531c75c0-2ae7-42f7-8832-db5e1fe2eae4",
            "coins": "5000000000000000000",
            "header": "Uh-oh. Your review didn’t make the cut",
            "scan_id": "7e94953a-a957-4d75-9d5f-c62320ebe75a",
            "status": "rejected",
            "text": "Take a look at our review guidelines and have another go. http://info.shping.com/review-posting-guidelines",
            "ts": "2019-03-04T06:21:15Z",
            "type": "coins"
        },
        {
            "review": {
                "counters": {
                    "dislikes": 0,
                    "likes": 0
                },
                "data": {
                    "images": [
                        {
                            "url": "https://dev-cdn.shping.com/2018/12/18/d705a944-5091-4fda-8eac-8277e51a05ca"
                        },
                        {
                            "url": "https://dev-cdn.shping.com/2018/12/18/659f0cf7-9290-4d02-b293-1261b029c311"
                        }
                    ],
                    "rate": 5,
                    "text": "Great"
                },
                "id": "urn:authenticateit:review_doc:185675438043477",
                "owner": {
                    "first_name": "Ivan1",
                    "last_name": "vasilev1",
                    "level": "silver",
                    "reviews_karma": 1,
                    "photo": null
                },
                "user_like_option" : "none",
                "product": {
                    "name": "CLIP STUDIO",
                    "id": "04680259422516"
                }
            },
            "scan_id": "9778817c-3e7c-4516-95c3-3b31d9a9d553",
            "ts": "2018-12-18T07:40:40Z",
            "type": "review"
       },
       {
           "claim_id": "8c8c34cb-c03a-4905-969e-ce7a765c0899",
           "coins": "5000000000000000000",
           "scan_id": "c5460863-e15b-40c7-abf1-8f1b21214f4c",
           "status": "approved",
           "text": "Earned from <b>System campaign</b> per scan and view info of <b>Bellagio Wine Bianco 750ml</b>.",
           "ts": "2018-03-15T13:03:05Z",
           "type": "coins"
       },
       {
            "coins": "34000000000000000000",
            "contributor_widgets": false,
            "earned_coins": "34000000000000000000",
            "featured_scan": false,
            "image_url": "https://dev-cdn.shping.com/2018/7/11/86efd4a7-e4ba-461f-bf99-cb8f6aed97e3.jpg",
            "max_coins": "39000000000000000000",
            "owner_logo": "https://dev-cdn.shping.com/2019/1/28/5efe62a4-db8c-47ab-94ea-3f43e8cd62e7.jpg",
            "product_id": "09212345000015",
            "product_name": "Calculator  My",
            "product_reviews_rate": 4.4,
            "scan_id": "cdd8f214-967f-411f-b05f-15ac5ebc8185",
            "text": "Calculator  My",
            "ts": "2019-03-30T15:32:10.712300429Z",
            "type": "scan"
       },
       {
            "coins": 0,
            "contributor_widgets": false,
            "earned_coins": 0,
            "featured_scan": true,
            "image_url": "https://dev-cdn.shping.com/2019/3/11/6d58f846-014a-4548-8521-50cdf95bb686.jpg",
            "max_coins": "4190000000000000000000",
            "owner_logo": "https://dev-cdn.shping.com/2019/1/29/df145f0f-7d7b-4311-8713-aa1d5a7d20a0.jpg",
            "product_id": "02933451111118",
            "product_name": "Caramel",
            "product_reviews_rate": 4.4444,
            "scan_id": "ae4ade75-a584-41ee-8ae7-24502fd491c0",
            "text": "Caramel",
            "ts": "2019-03-30T15:41:48.579874094Z",
            "type": "scan"
       },
       {
           "rule_id": "scan_interval",
           "scan_id": "c5460863-e15b-40c7-abf1-8f1b21214f4c",
           "campaign_id": "urn:authenticateit:campaign:006501147548377",
           "is_blocked_notification": true,
           "text": "You have been temporarily blocked from earning coins for 1 hour",
           "ts": "2018-03-15T12:01:42Z",
           "type": "notification"
       },
       {
           "text": "65 65 poked you: \"Hey, you are my Shping Buddy. Please scan more so we could faster get our rewards!\"",
           "ts": "2018-01-18T22:07:55Z",
           "type": "notification"
       }
  ],
  "update_ts": "2019-03-06T04:17:38Z",
  "next": "4eb1752fdd36a3415bce0364780032aa"
}

Tags

The end point /tags provides method for counting user's profiles by tags

Count user profiles by tag

Requests Description
{“tags”:{“countries”:[“036”, “040”],“languages”:[“ru”, “en”]}} Count of users whose “country” field contains “036” or “040” and “language” field contains “ru” or “en”
{“tags”:{}} Count of users
{“tags”:{“countries”:“036”}} Count of users whose “country” field contains “036”
{“tags”:{“languages”:“ru”}} Count of users whose “language” field contains “ru”
POST /timeline-service/tags
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Response
{
    “count”:1
}

Logging of spent time in the timeline

PUT /timeline-service/timeline/time
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
datetime_from string Datetime 1
datetime_to string Datetime 2
Example Request
{
  "datetime_from": "2019-01-02T00:00:00Z",
  "datetime_to": "2019-01-02T00:00:10Z"
}
Example Response
{
    "from": "2019-01-02T00:00:00Z",
    "spent": 10,
    "type": "log_time"
}

Initial Timeline

Initial timeline system document maps sets of countries to the list of messages and possibly empty list of gtins for scans emulation. If countries in the initial timline entry is null or missing, this entry is the default entry for all the countries.

Current participant must be system to access this API.

Update Initial Timline Entry

Update initial timeline entry for the specified set of countries. To update default entry set countries to null or don't specify countries.

POST /timeline-service/timeline/initial/entries/update
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Request
{
  "countries": [
    "036",
    "643"
  ],
  "messages": [
    {
      "en": "Message 1, English text.",
      "ru": "Сообщение 1, русский текст."
    },
    "Message 2, English text only."
  ],
  "gtins": [
    "09000000009998",
    "09212345000008"
  ]
}
Example Response
{
  "countries": [
    "036",
    "643"
  ],
  "gtins": [
    "09000000009998",
    "09212345000008"
  ],
  "messages": [
    {
      "en": "Message 1, English text.",
      "ru": "Сообщение 1, русский текст."
    },
    "Message 2, English text only."
  ]
}

Read Initial Timline Entry

Read initial timeline entry for the specified set of countries. If countries is unspecified or null, default entry for all countries will be read.

POST /timeline-service/timeline/initial/entries/read
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Request
{
  "countries": [
    "643",
    "036"
  ]
}
Example Response
{
  "countries": [
    "036",
    "643"
  ],
  "gtins": [
    "09000000009998",
    "09212345000008"
  ],
  "messages": [
    {
      "language": "en",
      "text": "English text."
    },
    {
      "language": "ru",
      "text": "Русский текст."
    }
  ]
}

Read All Initial Timline Entries

Read all initial timeline entries. List of all available entries will be returned.

GET /timeline-service/timeline/initial/entries
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Response
[
  {
    "countries": null,
    "gtins": [],
    "messages": [
      {
        "language": "en",
        "text": "English text."
      }
    ]
  },
  {
    "countries": [
      "036",
      "643"
    ],
    "gtins": [
      "09000000009998",
      "09212345000008"
    ],
    "messages": [
      {
        "language": "en",
        "text": "English text."
      },
      {
        "language": "ru",
        "text": "Русский текст."
      }
    ]
  }
]

Delete Initial Timline Entry

Delete initial timeline entry for the specified set of countries.

POST /timeline-service/timeline/initial/entries/delete
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Request
{
  "countries": [
    "036",
    "643"
  ]
}

Data for Initial Timeline

Gather data for initial timeline for the specified country and language. Response will contain the list of records (notification and scan records for initial timeline) and the list of emulated scans.

This API is accessible by unregistered users.

GET /timeline-service/timeline/initial
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket.
country string Select initial timeline entries for this country.
language string Select notification messages for this language.
Example Response
{
  "records": [
    {
      "text": "English text.",
      "ts": "2019-03-06T06:30:40Z",
      "type": "notification"
    },
    {
      "coins": 0,
      "earned_coins": 0,
      "image_url": "https://demo.authenticateit.com/upload/2014/12/03/95f2ae87-0f18-4ce3-93a9-890c0ef9dfbe.jpg",
      "max_coins": 0,
      "product_name": "Test Recalled Product",
      "scan_id": "2bdd12f5-6a41-43e2-a8ce-b59e8ecf0379",
      "text": "Test Recalled Product",
      "ts": "2019-03-06T06:30:40Z",
      "type": "scan"
    }
  ],
  "scans": [
    {
      "data": [
        {
          "id": "5cfb55a1-e47b-4e76-8959-5293288505cc",
          "image": [
            {
              "url": "https://demo.authenticateit.com/upload/2014/12/03/95f2ae87-0f18-4ce3-93a9-890c0ef9dfbe.jpg"
            },
            {
              "url": "https://cdn.shping.com/2018/12/10/2fb7-4392-9f20-b2d272b0faea.jpeg"
            }
          ],
          "type": "contributor"
        },
        {
          "id": "ffe17a9b-9527-422d-8602-f8c88c849931",
          "title": {
            "text": "Test Recalled Product"
          }
        },
        {
          "id": "61651382-5ea0-423f-a930-2dfe86fa3541",
          "text": {
            "markdown": false,
            "text": "gerber legendary blades-gerber bear grylls parang machete",
            "title": "Name"
          }
        }
      ],
      "event_ts": "2019-03-06T06:30:40Z",
      "product_name": "Test Recalled Product",
      "scan_id": "2bdd12f5-6a41-43e2-a8ce-b59e8ecf0379"
    }
  ]
}

results matching ""

    No results matching ""