Receipts

A service which allows to manage user receipts. All Receipts endpoints have path prefix /receipts-service.

Get receipt

Get user receipt list.

GET /receipts-service/user/receipt
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
chunk_id string Chunk Id
Example Response
{
    "receipts": [
        {
            "accuracy": "14,4549999237061",
            "client_ip": "127.0.0.1",
            "latitude": "-37838100",
            "location_name": "Super store location",
            "longitude": "144974760",
            "receipt": [
                "https://dev-cdn.shping.com/2019/1/28/5efe62a4-db8c-47ab-94ea-3f43e8cd62e7.jpg"
            ],
            "receipt_id": "90c30fd6-0fd4-4161-aec4-6b8370525472",
            "store_id": "Super store id",
            "ts": "2019-06-11T20:25:14.703Z"
        }
    ],
    "next": "urn:authenticateit:receipts_chunk:7501d972-fe16-42ea-974b-a9d484fa3dae"
}

Add new receipt

Add new user receipt information.

POST /receipts-service/user/receipt
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
accuracy string Required: Accuracy
longitude string Required: Longitude
latitude string Required: Latitude
receipt array Required: Array of images links
store_id string Required: Store ID
location_name string Required: Store name
country_iso string Country ISO code
Example body
{
    "accuracy": "14,4549999237061",
    "longitude": "144974757",
    "latitude": "-37838094",
    "receipt": [
        "https://dev-cdn.shping.com/2019/1/28/5efe62a4-db8c-47ab-94ea-3f43e8cd62e7.jpg"
    ],
    "store_id": "53ehdb5e67e67",
    "location_name": "Store name",
    "country_iso": "036"
}
Example Response
{
    "id": "e2af5961-e74d-41ca-a998-a782a7a90807"
}

Delete receipt

Delete user receipt.

DELETE /receipts-service/user/receipt/:id
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string user receipt id (guid)
Example Response
{
    "result": "ok"
}

List receipt groups

Get user receipt groups.

GET /receipts-service/user/groups
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Response
{
  "result": [
    {
      "name": "!Need attention",
      "type": "need_attention",
      "image": null,
      "count": 1
    },
    {
      "retailer_id": "coles",
      "name": "coles",
      "type": "retailer",
      "image": "https://dev-cdn.shping.com/2022/1/25/0fedebb2-6542-450d-ab40-dba37f6a59fd.png",
      "count": 1
    },
    {
      "name": "Other",
      "type": "other",
      "image": null,
      "count": 113
    }
  ],
  "total": 115
}

List actions

Get user actions

GET /receipts-service/user/actions
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
action query Optional: (String) Actions type

Action types = ['need_attention']

Example request

```http request GET 'receipts-service/user/actions?action=need_attention'


##### Example Response
```json
{
  "set_retailers": 0,
  "set_products": 1,
  "total": 1
}

Search receipts

POST /receipts-service/user/search
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
search_query body Optional: (String)
status body Optional: (List) Enum
retailer body Optional: (String) * is for all even not supported retailers
page body Optional: (Int) default 0
page_size body Optional: (Int) default 10

Statuses:

  • INITIAL,
  • SET_RETAILERS,
  • SET_RETAILERS_PENDING,
  • SET_PRODUCTS,
  • SET_PRODUCTS_PENDING, COMPLETED,
  • FAILED,
  • UNRECOGNIZED
Example request body
{
    "search_query": "Health &",
    "retailer": "coles"
}
Example Response
{
  "receipts": [
    {
      "id": "14a0131d-3375-428e-b46a-db702ce3d953",
      "images": [
        "https://dev-cdn.shping.com/2022/3/11/c0695af7-0b15-4108-a880-7d317a8ee54b.jpg"
      ],
      "ts": "2022-03-11T04:27:57.003Z",
      "updated_at": "2022-03-11T04:29:40.000Z",
      "status": "FAILED",
      "country": "036",
      "ocr_done": 1,
      "recognized_items": 0,
      "unrecognized_items": 0,
      "non_partner_brand_product_coins": 410000000000000000,
      "non_partner_brand_product_coins_earned": 0,
      "partner_brand_product_coins": 41220000000000000000,
      "partner_brand_product_coins_earned": 0,
      "pending_coins": 410000000000000000
    },
    {
      "id": "95bd278a-b4b6-4659-9885-dcbd5b16105d",
      "images": [
        "https://dev-cdn.shping.com/2022/3/11/aa821a2f-04da-4095-9ffc-a66a2b76c1fa.jpg"
      ],
      "ts": "2022-03-11T03:44:56.399Z",
      "updated_at": "2022-03-11T04:25:00.000Z",
      "status": "FAILED",
      "retailer_id": "coles",
      "retailer_name": "Import participant Coles",
      "country": "036",
      "ocr_done": 1,
      "recognized_items": 0,
      "unrecognized_items": 0,
      "non_partner_brand_product_coins": 410000000000000000,
      "non_partner_brand_product_coins_earned": 0,
      "partner_brand_product_coins": 41270000000000000000,
      "partner_brand_product_coins_earned": 0,
      "pending_coins": 410000000000000000
    },
    {
      "id": "2abb7c58-f780-431a-81d6-84b4de97c74d",
      "images": [
        "https://dev-cdn.shping.com/2022/3/10/2ba96e24-4409-4144-95fd-e4e9c40e4a23.jpg"
      ],
      "ts": "2022-03-10T22:26:13.279Z",
      "updated_at": "2022-03-11T03:35:11.000Z",
      "status": "UNRECOGNIZED",
      "country": "036",
      "ocr_done": 1,
      "recognized_items": 0,
      "unrecognized_items": 0,
      "non_partner_brand_product_coins": 400000000000000000,
      "non_partner_brand_product_coins_earned": 0,
      "partner_brand_product_coins": 40220000000000000000,
      "partner_brand_product_coins_earned": 0,
      "pending_coins": 400000000000000000
    },
    {
      "id": "fc636193-6a57-4ac9-85b6-df2caf0e76b1",
      "images": [
        "https://dev-cdn.shping.com/2022/3/9/42204e0d-f645-42f5-a94f-f0623f86bedf.jpg"
      ],
      "ts": "2022-03-09T00:03:01.158Z",
      "updated_at": "2022-03-11T03:43:31.000Z",
      "status": "UNRECOGNIZED",
      "country": "036",
      "ocr_done": 1,
      "recognized_items": 0,
      "unrecognized_items": 0,
      "non_partner_brand_product_coins": 420000000000000000,
      "non_partner_brand_product_coins_earned": 0,
      "partner_brand_product_coins": 42760000000000000000,
      "partner_brand_product_coins_earned": 0,
      "pending_coins": 420000000000000000
    },
    {
      "id": "93b31056-e520-4186-8d2c-aebd28ef9dc0",
      "images": [
        "https://dev-cdn.shping.com/2022/2/4/22aa2cb5-e611-40b8-9d5b-ca79f6a932f4.jpg",
        "https://dev-cdn.shping.com/2022/2/4/78bf3ad2-ebf1-45f1-b385-52f0d5f179be.jpg",
        "https://dev-cdn.shping.com/2022/2/4/2e250222-39c3-4c08-9277-efd56bd31949.jpg"
      ],
      "ts": "2022-02-04T09:09:54.994Z",
      "updated_at": "2022-02-28T23:07:40.000Z",
      "status": "FAILED",
      "country": "051",
      "ocr_done": 1,
      "recognized_items": 0,
      "unrecognized_items": 0,
      "non_partner_brand_product_coins": 350000000000000000,
      "non_partner_brand_product_coins_earned": 0,
      "partner_brand_product_coins": 35720000000000000000,
      "partner_brand_product_coins_earned": 0,
      "pending_coins": 350000000000000000
    },
    {
      "id": "fc118357-2d89-4b6a-aed7-e3d454aa8d51",
      "images": [
        "https://dev-cdn.shping.com/2022/2/4/f37c2d81-ddf3-4f0e-87a4-7caf527bc77d.jpg"
      ],
      "ts": "2022-02-04T08:05:38.431Z",
      "updated_at": "2022-02-04T08:07:40.000Z",
      "status": "FAILED",
      "country": "036",
      "ocr_done": 1,
      "recognized_items": 0,
      "unrecognized_items": 0,
      "non_partner_brand_product_coins": 360000000000000000,
      "non_partner_brand_product_coins_earned": 0,
      "partner_brand_product_coins": 36090000000000000000,
      "partner_brand_product_coins_earned": 0,
      "pending_coins": 360000000000000000
    },
    {
      "id": "955b3ea4-720b-43fb-955c-408880534e93",
      "images": [
        "https://dev-cdn.shping.com/2022/2/4/18e6a29d-31e4-4345-af45-e4407368a266.jpg"
      ],
      "ts": "2022-02-04T07:59:21.815Z",
      "updated_at": "2022-02-04T08:01:10.000Z",
      "status": "FAILED",
      "country": "036",
      "ocr_done": 1,
      "recognized_items": 0,
      "unrecognized_items": 0,
      "non_partner_brand_product_coins": 360000000000000000,
      "non_partner_brand_product_coins_earned": 0,
      "partner_brand_product_coins": 36180000000000000000,
      "partner_brand_product_coins_earned": 0,
      "pending_coins": 360000000000000000
    },
    {
      "id": "9777b490-b6c4-401a-ba20-7139d7627517",
      "images": [
        "https://dev-cdn.shping.com/2022/2/4/e2e73786-3726-4529-b864-319d9a023825.jpg"
      ],
      "ts": "2022-02-04T07:49:43.049Z",
      "updated_at": "2022-02-04T07:51:30.000Z",
      "status": "FAILED",
      "country": "036",
      "ocr_done": 1,
      "recognized_items": 0,
      "unrecognized_items": 0,
      "non_partner_brand_product_coins": 360000000000000000,
      "non_partner_brand_product_coins_earned": 0,
      "partner_brand_product_coins": 36180000000000000000,
      "partner_brand_product_coins_earned": 0,
      "pending_coins": 360000000000000000
    },
    {
      "id": "316196a8-9f77-43d9-9645-4ac68dedabef",
      "images": [
        "https://dev-cdn.shping.com/2022/2/4/43a12015-2feb-4c79-8ce3-dcafe52350ec.jpg"
      ],
      "ts": "2022-02-04T07:30:06.469Z",
      "updated_at": "2022-02-04T07:32:10.000Z",
      "status": "FAILED",
      "country": "036",
      "ocr_done": 1,
      "recognized_items": 0,
      "unrecognized_items": 0,
      "non_partner_brand_product_coins": 360000000000000000,
      "non_partner_brand_product_coins_earned": 0,
      "partner_brand_product_coins": 36360000000000000000,
      "partner_brand_product_coins_earned": 0,
      "pending_coins": 360000000000000000
    },
    {
      "id": "58809364-8fea-49f1-b2c5-1cb518f7f3cc",
      "images": [
        "https://dev-cdn.shping.com/2022/2/4/3134111a-0e16-48ab-8be7-ea8a7cff1725.jpg"
      ],
      "ts": "2022-02-04T07:19:30.892Z",
      "updated_at": "2022-02-04T07:21:10.000Z",
      "status": "FAILED",
      "country": "036",
      "ocr_done": 1,
      "recognized_items": 0,
      "unrecognized_items": 0,
      "non_partner_brand_product_coins": 360000000000000000,
      "non_partner_brand_product_coins_earned": 0,
      "partner_brand_product_coins": 36360000000000000000,
      "partner_brand_product_coins_earned": 0,
      "pending_coins": 360000000000000000
    }
  ],
  "total": 132
}

results matching ""

    No results matching ""