Authenticate

The end point /authentication-service provides a method for verification scanned barcode (1D/2D). Mobile application sends scanned information and additional information about an user and a place of scanning

Default widgets document

{
  "_id": "default_widgets",
  "default_images": [
    {
      "url": "http://dev-cdn.shping.com.s3.amazonaws.com/2017/6/6/d5e16947-8c02-454d-b91b-ab4db098f8ba-default.png"
    }
  ],
  "error": [
    {
      "popup": {
        "icon": "message",
        "title": "Oops!",
        "text": "We don't have information about this product in our database yet. Try to scan another barcode.",
        "cancel": "Ok"
      }
    }
  ],
  "empty": [
    {
      "popup": {
        "icon": "message",
        "title": "Product information is not available",
        "text": "Sorry, this product information is not available for you. Try to scan another product's barcode.",
        "cancel": "Ok"
      }
    }
  ],
  "type": "system_doc"
}

Default brands document

{
  "_id": "brands",
  "brands": [
    {
      "id": "1",
      "ait_id": "1",
      "name": "Jumbo Ugg",
      "logo": "https://cdn.shping.com/2017/6/29/5e8ab9c2-c4ac-4ee9-ab05-a9726c64c13f-jumbo.png"
    },
    {
      "id": "2",
      "ait_id": "7726",
      "name": "A2 Milk",
      "logo": "https://cdn.shping.com/2017/6/29/b9117234-0252-4fee-b2d3-4049204747f8-a2milk.png"
    },
    {
      "id": "3",
      "ait_id": "10696",
      "name": "TW STEEL™",
      "logo": "https://cdn.shping.com/2017/6/29/57433cb1-aa93-4f82-9bd6-749d04c21552-twsteel.png"
    },
    {
      "id": "4",
      "ait_id": "14310",
      "name": "Norco Milk",
      "logo": "https://cdn.shping.com/2017/6/29/38ca8faf-2749-4378-9466-5c1ca366abb3-norco.png"
    },
    {
      "id": "5",
      "ait_id": "14719",
      "name": "Koalabi Australia",
      "logo": "https://cdn.shping.com/2017/6/29/fed44083-7e7e-4fef-8370-76b1fde04c75-koalabi.png"
    }
  ],
  "type": "public_doc"
}

Capture

POST /authentication-service/capture
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
code string Scanned code
language string Mobile app's UI language
country string Country ISO
latitude string GPS latitude
longitude string GPS longitude
accuracy string GPS accuracy (in metres)
delay string GPS coordinates delay (in seconds)
brand_id string Brand ID
sn string Product serial number
Example Response
{
  "data": [
    {
      "id": "8cfa5976-854e-41de-b5d2-dcf59878da06",
      "rating": {
        "enable": true,
        "max": 5,
        "participants": 2,
        "rating": "4.5",
        "sorry_msg": "Sorry, we can't accept your assessment :( ",
        "success_msg": "Thank you for your opinion!"
      }
    },
    {
      "add_image": {
        "message": "Add a nice photo of this product"
      },
      "id": "27d643b2-3069-436b-8bb8-96760f6d5fd1"
    },
    {
      "id": "df53e006-54fd-4a8f-a874-6184f7d619c9",
      "popup": {
        "cancel": "Not now",
        "icon": "message",
        "ok": "Add product",
        "text": "We don't have information about this product in our DB. Complete product's details to earn **50 points**.",
        "title": "You discovered a new product"
      }
    },
    {
      "id": "07b59707-21e2-4f18-9c61-ef7879c1118d",
      "title": {
        "text": "Nike Men's KB Mentality II"
      }
    },
    {
      "header": {
        "text": "How it works?"
      },
      "id": "91c7d1d6-37ed-4d9a-a440-45b102271724"
    },
    {
      "id": "530e9979-a4fb-48d3-903f-d4bcd185e8ac",
      "coins": "150000123131000",
      "text": {
        "markdown": true,
        "text": "Bla-bla-bla.",
        "title": "Traceability & Serialisation Platform"
      }
    },
    {
      "id": "e2390b79-16d2-4b6c-8f35-32403c9fb585",
      "image": [
        {
          "url": "https://services.authenticateit.com/upload/991be8ee/2fb7-4392-9f20-b2d272b0faea.jpeg"
        },
        {
          "url": "https://services.authenticateit.com/upload/991be8ee/6788-7868-6786-bc9900900086.jpeg"
        }
      ]
    },
    {
      "id": "bf5aab61-d43e-4a32-869b-3b3a086cd7a1",
      "link": {
        "text": "Brand web site",
        "url": "http://www.koalabi.com.au"
      }
    },
    {
      "id": "756513f6-d13f-4528-a885-9580f5a62071",
      "coins": 1500000,
      "video": {
        "preview": "https://services.authenticateit.com/upload/991be8ee/movie.jpg",
        "title": "Video",
        "url": "https://dev-test-cdn.shping.com.s3.amazonaws.com/2017/4/26/9d511476-ba7f-4b90-9895-7c3ad02c40d3-20100709_002.mp4"
      }
    },
    {
      "id": "e2778b4f-ed48-4263-bcc8-ce608599a32b",
      "nutrition_info": {
        "ingredients": [
          {
            "allergen": false,
            "description": "long text description of the ingredient",
            "group": "vitamins",
            "name": "Витамин С/Аскорбиновая кислота (в форме кальция аскорбата) 110 мг 120",
            "nano": false
          },
          {
            "allergen": false,
            "description": "long text description of the ingredient",
            "group": "other",
            "name": "Rice",
            "nano": false
          }
        ],
        "nutrition_staff": [
          {
            "less_than": false,
            "name": "Protein",
            "rdi": 64,
            "unit": "g",
            "value": 10
          },
          {
            "less_than": false,
            "name": "Fat, total",
            "nutrition_staff": [
              {
                "less_than": true,
                "name": "Saturated",
                "nutrition_staff": [
                  {
                    "less_than": false,
                    "name": "Omega 3",
                    "unit": "g",
                    "value": 1
                  }
                ],
                "unit": "g",
                "value": 0.1
              },
              {
                "less_than": false,
                "name": "Omega 3",
                "unit": "g",
                "value": 1
              }
            ],
            "unit": "g",
            "value": 2
          }
        ],
        "package_size": 1000,
        "package_unit": "ml",
        "serving_energy": 100,
        "serving_size": 200,
        "title": "Nutrition Facts"
      }
    },
    {
      "certificates": {
        "list": [
          {
            "cid": "a89d547fcbb8d0b5790b7d7f561f129c",
            "expired": false,
            "img_url": "https://services.authenticateit.com/upload/20160831/asureq.png"
          },
          {
            "cid": "a89d547fcbb8d0b5790b7d7f561f1786",
            "expired": true,
            "img_url": "https://services.authenticateit.com/upload/20160831/aco.png"
          }
        ],
        "title": "Certificates"
      },
      "id": "a33be556-6d66-4f47-9ca2-d5ed1b601df8"
    },
    {
      "follow_fb": {
        "text": "Follow us",
        "url": "https://www.facebook.com/NorcoMilk/"
      },
      "id": "e994ab9a-5637-4318-9c45-70b9622248a3",
      "coins": 35000000
    },
    {
      "follow_fb": {
        "text": "Follow us",
        "url": "https://www.facebook1.com/NorcoMilk/"
      },
      "id": "5fb3ea70-4253-4cae-8722-b69dc3ac8477",
      "coins": 35131312
    },
    {
      "email": {
        "subject": "I have a question",
        "text": "Email to support",
        "to": "support@authenticateit.com"
      },
      "id": "779a4031-237e-4ed6-9d7b-1e1511fba843"
    },
    {
      "id": "a230c6b3-1bd5-4f99-8ef8-8992968db466",
      "phone": {
        "text": "We are waiting your call",
        "to": "+61123456789"
      }
    },
    {
      "id": "1501ca54-282a-46d9-af6c-65124e752a06",
      "coins": "1500000000000",
      "video": {
        "height": 480,
        "preview": "https://services.authenticateit.com/upload/991be8ee/movie.jpg",
        "title": "Video",
        "url": "https://dev-test-cdn.shping.com.s3.amazonaws.com/2017/4/26/1fe6501e-7ea2-4e99-a0f8-481ac3f24274-20100709_002.mp4",
        "width": 848
      }
    },
    {
      "id": "89a8d600-057d-481c-8777-852a6466a41e",
      "rewards_summary": {
        "coins": "2700000000000000"
      }
    }
  ],
  "event_ts": "2017-05-12T05:00:06Z",
  "product_name": "test_name",
  "scan_id": "7c94359d-3e67-4155-b2b6-52af234342f6"
}

Get my scans

GET /authentication-service/my-scans
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
scan_id string optional if you want get info for one scan
Example Response
[
  {
    "event_ts": "2016-12-27T11:48:35Z",
    "product_name": "",
    "scan_id": "0ec14a51-4b4c-4c95-9fe8-b6de0c31281f"
  },
  {
    "event_ts": "2016-12-29T06:47:00Z",
    "product_name": "",
    "scan_id": "13ce643f-32cd-4f0c-9eba-f37651c17b7c"
  }
]

Product information sections

Each section has the following format: {“”: definition}. If mobile application does not recognise a section's type then it should be ignored. When product has active rewards campaigns widget may be in format {“”: definition, “coins”: rewards_coins}. It means that rewards campaigns has events coupled with that widget. The default widgets for case if product not founded (error section) or product has closed data (empty section) may be set in default_gitn_widgets document. Example:

{
  "_id": "default_gitn_widgets",
  "error": [
    {
      "text": {
        "text": "Product not found!",
        "title": "Product not found"
      }
    }
  ],
  "empty": [
    {
      "text": {
        "text": "Product was found! Sorry but the data for you are closed",
        "title": "Closed data"
      }
    }
  ],
  "type": "system_doc"
}

Product Ownership Status

GET /authentication-service/product_owner/:id
Parameters
Name Type Description
id number Product identifier (GTIN or EAN)
Example Response
{
  "brands": [
    {
      "has_owner": false,
      "id": "Test Brand",
      "logo": "https://example.org/1.png"
    }
  ],
  "company_prefix": "930046201",
  "product": {
    "brand": {
      "has_owner": false,
      "id": "Test Brand",
      "logo": "https://example.org/1.png"
    },
    "has_owner": true,
    "id": "09300462010007",
    "name": "Test Product 1"
  }
}

Logging user actions

POST /authentication-service/action
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
scan_id string Scan ID
actions array::objects Required User action List. Is must be a list of widgets IDs if scan_id is presented in request
Action object
Name Type Description
id string Widget ID
type string Optional field
parameters object Must be presented for review, facebook, link and video widgets with element action
{
  "id": "f854e5d0-a0d2-43b3-936a-c747185a30a3",
  "parameters": {
    "action": "follow"
  }
}

Send review info

POST /action/review
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
scan_id string Required: Scan id
rate number Required Rating; 0<Rate<6
text string Required Text
images array::string string one or more images
Example Response
{
  "status":"Thank you! We are processing information you provided. You will be granted coins once we approve it."
}

results matching ""

    No results matching ""