Shoppinglists

A service which allows to manage user shoppinglists. All Shoppinglists endpoints have path prefix /shoppinglists-service.

Get shoppinglist

Get user shoppinglist list.

GET /shoppinglists-service/user/shoppinglist

After first request from user creates shoppinglist with required type.

Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Response
{
    "shoppinglists": {
        "required": [
            {
                "_id": "53e49d0e-b0b1-4cc2-b385-71ee3bb09547",
                "name": "This Week",
                "is_required": true,
                "owner": {
                    "_id": "urn:authenticateit:user:email:maria.arshava+223@gmail.com",
                    "name": "Милана  Перевощикова",
                    "image": "https://dev-cdn.shping.com/2019/9/29/94ba1ae0-6f90-40f7-9b96-1a6ec09d0793"
                },
                "shared_with": [],
                "type": "shoppinglist",
                "created_at": "2020-08-10T08:54:41.723Z",
                "products_amount": 23,
                "role": "owner"
            }
        ],
        "custom": [
            {
                "_id": "537e7e9c-793c-4a47-9b84-c1d9bb1bf7b8",
                "name": "Milana1",
                "owner": {
                    "_id": "urn:authenticateit:user:email:maria.arshava+223@gmail.com",
                    "name": "Милана  Перевощикова",
                    "image": "https://dev-cdn.shping.com/2019/9/29/94ba1ae0-6f90-40f7-9b96-1a6ec09d0793"
                },
                "shared_with": [
                    {
                        "_id": "urn:authenticateit:user:email:maria.arshava+222@gmail.com",
                        "_rev": "403-7cc723b337313606dc8dd08bd9489261",
                        "name": "Алёшенька Ерёменко",
                        "image": "https://dev-cdn.shping.com/2019/9/26/fdc48e2c-971a-42fe-a4a3-253c7ba68171",
                        "role": "guest"
                    }
                ],
                "type": "shoppinglist",
                "created_at": "2020-08-10T10:03:47.051Z",
                "products_amount": 5,
                "role": "owner"
            },
            {
                "_id": "f28a89ff-04b8-43f6-873c-67f96dc6d749",
                "name": "Milana2",
                "owner": {
                    "_id": "urn:authenticateit:user:email:maria.arshava+223@gmail.com",
                    "name": "Милана  Перевощикова",
                    "image": "https://dev-cdn.shping.com/2019/9/29/94ba1ae0-6f90-40f7-9b96-1a6ec09d0793"
                },
                "shared_with": [
                    {
                        "_id": "urn:authenticateit:user:email:maria.arshava+222@gmail.com",
                        "_rev": "403-7cc723b337313606dc8dd08bd9489261",
                        "name": "Алёшенька Ерёменко",
                        "image": "https://dev-cdn.shping.com/2019/9/26/fdc48e2c-971a-42fe-a4a3-253c7ba68171",
                        "role": "default"
                    }
                ],
                "type": "shoppinglist",
                "created_at": "2020-08-10T10:04:02.035Z",
                "products_amount": 0,
                "role": "owner"
            },
            {
                "_id": "a3987567-f202-47ed-b0ed-030d794d2c82",
                "name": "Milana3",
                "owner": {
                    "_id": "urn:authenticateit:user:email:maria.arshava+223@gmail.com",
                    "name": "Милана  Перевощикова",
                    "image": "https://dev-cdn.shping.com/2019/9/29/94ba1ae0-6f90-40f7-9b96-1a6ec09d0793"
                },
                "shared_with": [
                    {
                        "_id": "urn:authenticateit:user:email:maria.arshava+222@gmail.com",
                        "_rev": "403-7cc723b337313606dc8dd08bd9489261",
                        "name": "Алёшенька Ерёменко",
                        "image": "https://dev-cdn.shping.com/2019/9/26/fdc48e2c-971a-42fe-a4a3-253c7ba68171",
                        "role": "default"
                    },
                    {
                        "_id": "urn:authenticateit:user:email:maria.arshava+336@gmail.com",
                        "_rev": "23-1d22248f2fe1ef0a3961dada967ed24e",
                        "name": "Via A",
                        "image": "https://dev-cdn.shping.com/2019/10/31/c5d10ad6-2ab6-407b-ae86-c629bbad7516",
                        "role": "default"
                    }
                ],
                "type": "shoppinglist",
                "created_at": "2020-08-10T10:04:12.659Z",
                "products_amount": 0,
                "role": "owner"
            },
            {
                "_id": "2cd032db-ee72-43bc-addf-369ce1cf6c8c",
                "name": "Milana sent tru skype",
                "owner": {
                    "_id": "urn:authenticateit:user:email:maria.arshava+223@gmail.com",
                    "name": "Милана  Перевощикова",
                    "image": "https://dev-cdn.shping.com/2019/9/29/94ba1ae0-6f90-40f7-9b96-1a6ec09d0793"
                },
                "shared_with": [
                    {
                        "_id": "urn:authenticateit:user:email:maria.arshava+336@gmail.com",
                        "_rev": "23-1d22248f2fe1ef0a3961dada967ed24e",
                        "name": "Via A",
                        "image": "https://dev-cdn.shping.com/2019/10/31/c5d10ad6-2ab6-407b-ae86-c629bbad7516",
                        "role": "default"
                    }
                ],
                "type": "shoppinglist",
                "created_at": "2020-08-13T13:09:00.355Z",
                "products_amount": 0,
                "role": "owner"
            },
            {
                "_id": "1775f249-d1e0-4c88-a116-49704b73c6ef",
                "name": "Milana5",
                "owner": {
                    "_id": "urn:authenticateit:user:email:maria.arshava+223@gmail.com",
                    "name": "Милана  Перевощикова",
                    "image": "https://dev-cdn.shping.com/2019/9/29/94ba1ae0-6f90-40f7-9b96-1a6ec09d0793"
                },
                "shared_with": [],
                "type": "shoppinglist",
                "created_at": "2020-08-13T13:09:19.387Z",
                "products_amount": 0,
                "role": "owner"
            }
        ],
        "shared": [
            {
                "_id": "33f3f774-f90c-4afe-9544-40ef92d98e3d",
                "name": "AE1",
                "owner": {
                    "_id": "urn:authenticateit:user:email:maria.arshava+222@gmail.com",
                    "name": "Алёшенька Ерёменко",
                    "image": "https://dev-cdn.shping.com/2019/9/26/fdc48e2c-971a-42fe-a4a3-253c7ba68171"
                },
                "shared_with": [
                    {
                        "_id": "urn:authenticateit:user:email:maria.arshava+94@gmail.com",
                        "_rev": "585-8e0147a49fdd6ce80718e8e1e24bcbf5",
                        "name": "94Maria Gmail",
                        "image": "https://dev-cdn.shping.com/2019/5/7/b625a6a1-c37f-4211-9805-dfe9108f7034",
                        "role": "default"
                    },
                    {
                        "_id": "urn:authenticateit:user:email:maria.arshava+1229@gmail.com",
                        "_rev": "76-fdb9e44009a562ce56a13d879ad85ed0",
                        "name": "Клава Кокина",
                        "image": "https://dev-cdn.shping.com/2020/7/22/95e664ff-01c4-4891-8182-0c841be1c0a0",
                        "role": "default"
                    },
                    {
                        "_id": "urn:authenticateit:user:email:maria.arshava+223@gmail.com",
                        "_rev": "381-8bd07089a67658596a0dc1a3f51f23a2",
                        "name": "Милана  Перевощикова",
                        "image": "https://dev-cdn.shping.com/2019/9/29/94ba1ae0-6f90-40f7-9b96-1a6ec09d0793",
                        "role": "default"
                    },
                    {
                        "_id": "urn:authenticateit:user:email:maria.arshava+336@gmail.com",
                        "_rev": "23-1d22248f2fe1ef0a3961dada967ed24e",
                        "name": "Via A",
                        "image": "https://dev-cdn.shping.com/2019/10/31/c5d10ad6-2ab6-407b-ae86-c629bbad7516",
                        "role": "default"
                    },
                    {
                        "_id": "urn:authenticateit:user:email:maria.arshava+227@gmail.com",
                        "_rev": "68-57d70928354e2ae2db1176682c934ec5",
                        "name": "Софья Петрова",
                        "image": "https://dev-cdn.shping.com/2019/10/15/4c20bdc5-6f43-4ea5-a589-e8c6fe86d3e2",
                        "role": "default"
                    }
                ],
                "type": "shoppinglist",
                "created_at": "2020-08-13T11:46:45.543Z",
                "products_amount": 0,
                "role": "default"
            },
            {
                "_id": "114b5641-2a2a-4269-88f9-f1deef4b6bc6",
                "name": "AE2",
                "owner": {
                    "_id": "urn:authenticateit:user:email:maria.arshava+222@gmail.com",
                    "name": "Алёшенька Ерёменко",
                    "image": "https://dev-cdn.shping.com/2019/9/26/fdc48e2c-971a-42fe-a4a3-253c7ba68171"
                },
                "shared_with": [
                    {
                        "_id": "urn:authenticateit:user:email:maria.arshava+223@gmail.com",
                        "_rev": "381-8bd07089a67658596a0dc1a3f51f23a2",
                        "name": "Милана  Перевощикова",
                        "image": "https://dev-cdn.shping.com/2019/9/29/94ba1ae0-6f90-40f7-9b96-1a6ec09d0793",
                        "role": "default"
                    }
                ],
                "type": "shoppinglist",
                "created_at": "2020-08-13T11:47:11.215Z",
                "products_amount": 0,
                "role": "default"
            },
            {
                "_id": "2f15200f-cbc6-4a2f-80b3-513555dac73e",
                "name": "This Week",
                "is_required": true,
                "owner": {
                    "_id": "urn:authenticateit:user:email:maria.arshava+335@gmail.com",
                    "name": "Hugo F",
                    "image": "https://dev-cdn.shping.com/2019/10/31/51ef1b00-4dfa-4cc3-9298-26e469eb5fb9"
                },
                "shared_with": [
                    {
                        "_id": "urn:authenticateit:user:email:maria.arshava+336@gmail.com",
                        "_rev": "23-1d22248f2fe1ef0a3961dada967ed24e",
                        "name": "Via A",
                        "image": "https://dev-cdn.shping.com/2019/10/31/c5d10ad6-2ab6-407b-ae86-c629bbad7516",
                        "role": "default"
                    },
                    {
                        "_id": "urn:authenticateit:user:email:maria.arshava+223@gmail.com",
                        "_rev": "381-8bd07089a67658596a0dc1a3f51f23a2",
                        "name": "Милана  Перевощикова",
                        "image": "https://dev-cdn.shping.com/2019/9/29/94ba1ae0-6f90-40f7-9b96-1a6ec09d0793",
                        "role": "default"
                    }
                ],
                "type": "shoppinglist",
                "created_at": "2020-08-16T15:46:34.765Z",
                "products_amount": 0,
                "role": "default"
            },
            {
                "_id": "3a135cd3-e18e-470c-b543-4aa83fbb090e",
                "name": "Via4",
                "owner": {
                    "_id": "urn:authenticateit:user:email:maria.arshava+336@gmail.com",
                    "name": "Via A",
                    "image": "https://dev-cdn.shping.com/2019/10/31/c5d10ad6-2ab6-407b-ae86-c629bbad7516"
                },
                "shared_with": [
                    {
                        "_id": "urn:authenticateit:user:email:maria.arshava+223@gmail.com",
                        "_rev": "381-8bd07089a67658596a0dc1a3f51f23a2",
                        "name": "Милана  Перевощикова",
                        "image": "https://dev-cdn.shping.com/2019/9/29/94ba1ae0-6f90-40f7-9b96-1a6ec09d0793",
                        "role": "default"
                    }
                ],
                "type": "shoppinglist",
                "created_at": "2020-08-17T11:32:04.068Z",
                "products_amount": 0,
                "role": "default"
            }
        ]
    }
}

Add new shoppinglist

Add new user shoppinglist.

POST /shoppinglists-service/user/shoppinglist
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
name string Required: shoppinglist name
Example body
{
    "name": "test name"
}
Example Response
{
    "result": "Shopping list has been created"
}

Delete shoppinglist

Delete user shoppinglist.

DELETE /shoppinglists-service/user/shoppinglist
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string Required: user shoppinglist id (uuid)
Example body
{
    "id": "e2af5961-e74d-41ca-a998-a782a7a90807"
}
Example Response
{
    "result": "Shoppinglist with id dff5f8ce-d238-4b8b-97c0-fd5c9c9b6301 has been deleted."
}

Required shoppinglists can't be deleted. If shoppinglist with id in request body has field is_required it return error.

{
    "error": "Shoppinglist with id a51a9c37-0222-4e1d-904d-94ba6bbb3089 is required and can't be deleted",
    "error_data": null,
    "error_id": "receipts-del_receipt",
    "error_object": null
}

Copy shoppinglist

We can copy a shopping list to a new one (Custom lists), all products are copied, all permissions are copied

POST /shoppinglists-service/user/shoppinglist/copy
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string Required: user shoppinglist id (uuid)
name string Optional: New shoppinglist name
Example body
{
    "id": "e2af5961-e74d-41ca-a998-a782a7a90807",
    "name": "New shoppinglist name"
}
Example Response
{
    "id": "dff5f8ce-d238-4b8b-97c0-fd5c9c9b6301"
}

Rename shoppinglist

Rename user shoppinglist.

Shoppinglists with required type can't be renamed.

PUT /shoppinglists-service/user/shoppinglist
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string Required: user shoppinglist id (uuid)
name string Required: shoppinglist name
Example body
{
    "name": "test name",
    "id": "e2af5961-e74d-41ca-a998-a782a7a90807"
}
Example Response
{
    "result": "Shoppinglist with id dff5f8ce-d238-4b8b-97c0-fd5c9c9b6301 has been renamed."
}

Required shoppinglists can't be renamed. If shoppinglist with id in request body has field is_required it return error.

{
    "error": "Shoppinglist with id a51a9c37-0222-4e1d-904d-94ba6bbb3089 is required and can't be renamed",
    "error_data": null,
    "error_id": "shoppinglists-rename_shoppinglist",
    "error_object": null
}

Only owner or user with admin role can rename shoppinglist. If user has no permission to rename shoppinglist it returns error.

{
    "error": "You dont't have permission to rename this shoppinglist",
    "error_data": null,
    "error_id": "shoppinglists-rename_shoppinglist",
    "error_object": null
}

Share shoppinglist with buddy

Share user's shoppinglist with buddy.

POST /shoppinglists-service/user/shoppinglist/sharing
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
list_id string Required: user shoppinglist id (uuid)
buddies_id Array of strings Required: buddies ids list id
Example body
{
    "buddies_id": ["ikleeen@gmail.com"],
    "list_id": "e2af5961-e74d-41ca-a998-a782a7a90807"
}
Example Response
{
    "result": "Shopping list with id 28e341a0-4d58-4b8c-8a4e-4dc716a12ddf has been shared."
}

If shoppinglist has been already shared to buddy it returns error.

{
    "error": "Shopping list with id 7041e11b-3de7-41e8-8377-cd62ad0cc300 has already been shared to this user.",
    "error_data": null,
    "error_id": "shoppinglists-shareShoppinglistWithBuddy",
    "error_object": null
}

Delete shoppinglist sharing with buddy

Delete buddy from list of users with whom shoppunglist is shared.

DELETE /shoppinglists-service/user/shoppinglist/sharing
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
list_id string Required: user shoppinglist id (uuid)
buddy_id string Required: buddy id
Example body
{
    "buddy_id": "ikleeen@gmail.com",
    "list_id": "e2af5961-e74d-41ca-a998-a782a7a90807"
}
Example Response
{
    "result": "Shopping list with id 7041e11b-3de7-41e8-8377-cd62ad0cc300 is no more shared to this user."
}

If shoppinglist has not been shared to buddy it returns error.

{
    "error": "Shoppinglist with id 7041e11b-3de7-41e8-8377-cd62ad0cc300 has not been shared to this user.",
    "error_data": null,
    "error_id": "shoppinglists-deleteSharing",
    "error_object": null
}

Create sharing url

Create sharing url for shoppinglist.

POST /shoppinglists-service/user/shoppinglist/sharing/link
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
id string Required: user shoppinglist id (uuid)
{
    "id": "e2af5961-e74d-41ca-a998-a782a7a90807"
}
Example Response
{
    "url": "https://test-shping.app.link/7XUJjaLaV7"
}

Share shoppinglist by invitation code

Add to user's shared shoppinglists another one by invitation code

POST /shoppinglists-service/user/shoppinglist/invitation
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
invitation_code string Required: invitation code from url params
Example body
{
    "invitation_code": "575374152462501"
}
Example Response
{
    "result": "Shopping list with id 4c9a2e46-dd74-4b83-9e66-da2602d73134 has been shared with you."
}

If user is owner of the shoppinglist it returns an error.

{
    "error": "Shopping list can be shared with owner",
    "error_data": null,
    "error_id": "shoppinglists-self-sharing",
    "error_object": null
}

If the shoppinglist has already been shared with user it returns an error.

{
    "error": "This shopping list has already been shared with you",
    "error_data": null,
    "error_id": "shoppinglists-re-sharing",
    "error_object": null
}

Set user role for shoppinglist

Set user's role for shared shoppinglist.

PUT /shoppinglists-service/user/shoppinglist/role
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
list_id string Required: shoppinglist id (uuid)
user_id string Required: id of user to whom list is shared
role string Required: user's role (one of: guest, default, admin)
Example body
{
    "user_id": "ikleeen@gmail.com",
    "list_id": "e2af5961-e74d-41ca-a998-a782a7a90807",
    "role": "admin"
}
Example Response
{
    "result": "Role has been changed."
}

If shoppinglist has not been shared to user it returns error.

{
    "error": "Shopping list with id 7041e11b-3de7-41e8-8377-cd62ad0cc300 is not shared to this user.",
    "error_data": null,
    "error_id": "shoppinglists-changeRole",
    "error_object": null
}

Only owner of shoppinglist can manage user roles for it. If other user try to change role it returns error.

{
    "error": "You dont't have permission to manage this shopping list's roles",
    "error_data": null,
    "error_id": "shoppinglists-changeRole",
    "error_object": null
}

Add product

Add product to shoppinglist.

POST /shoppinglists-service/user/shoppinglist/product
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
list_id string Required: shoppinglist id (uuid)
product_id string Required: product id (uuid)
params object Optional: product parameters (position, amount, purchase_frequency, added_by)
Example body
{
    "list_id": "8a674d4a-d1fc-4728-90de-f904eb96f6c7",
    "product_id": "00000772091930",
    "params": {
        "position": 3,
        "added_by": "urn:authenticateit:user:email:system@authenticateit.com",
        "amount": 2,
        "purchase_frequency": "weekly"
    }
}
Example Response
{
    "result": "Product has been added to shopping list"
}

Users with role "guest" can't add products to shoppinglist. If guest try to add product to shoppinglist it returns error.

{
    "error": "You dont't have permission to add products to this shopping list",
    "error_data": null,
    "error_id": "shoppinglists-addProducts",
    "error_object": null
}

Delete product

Delete product from shoppinglist.

DELETE /shoppinglists-service/user/shoppinglist/product
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
list_id string Required: shoppinglist id (uuid)
product_id string Required: product id (uuid)
Example body
{
    "list_id": "8a674d4a-d1fc-4728-90de-f904eb96f6c7",
    "product_id": "00000772091930"
}
Example Response
{
    "result": "Product has been deleted from shopping list"
}

Users with role "guest" can't delete products to shoppinglist. Users with role "defailt" can delete only products that were added by themselves. If user who has no rights try to delete product it returns error.

{
    "error": "You dont't have permission to delete this product from this shopping list",
    "error_data": null,
    "error_id": "shoppinglists-delProducts",
    "error_object": null
}

If there are no product_id in shoppinglist with list_id it returns error.

{
    "error": "There are no this product in this shopping list",
    "error_data": null,
    "error_id": "shoppinglists-delProducts",
    "error_object": null
}

Search products in entire database.

POST /shoppinglists-service/user/shoppinglist/search
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
search_string string Required: string for matching product names
list_id string Required: id of shoppinglist
Example body
{
    "search_string": "bitsy",
    "list_id": "8a674d4a-d1fc-4728-90de-f904eb96f6c7"
}

Returns query execution time and list of products. Special Sorting Rules are used to find the first 3 records (highlited_products), while the rest are sorted in alphabetical order. If products array is empty it means that selected products have no prices docs in dev couchDB.

Example Response
{
    "products": [
        {
            "product_id": "00000020953584",
            "product_name": "Jim Beam White Label Bourbon Miniatures",
            "prices": [
                {
                    "currency": "AUD",
                    "currency_label": "$",
                    "value": 8,
                    "retailer": {
                        "id": "urn:authenticateit:participant:111111111111111",
                        "name": "Import participant Woolworts",
                        "logo": "https://dev-cdn.shping.com/2020/9/18/8479df1a-b943-4045-883f-c63ef4432979.jpg"
                    },
                    "image": [
                        {
                            "url": "https://dev-cdn.shping.com/2019/6/19/c0a127a7-6005-44ca-825b-ea5d92369d6f"
                        },
                        {
                            "url": "https://dev-cdn.shping.com/2019/6/19/bf4d16aa-0e0e-48a2-ab67-377ad0ba271d"
                        },
                        {
                            "url": "https://dev-cdn.shping.com/2019/6/19/ae9fdc04-b224-453b-9c9c-5af16e30666c"
                        }
                    ],
                    "type": "price"
                }
            ],
            "highlited": true
        },
        {
            "product_id": "00000093481656",
            "product_name": "JIM BEAM WHITE LABEL BOURBON WHISKEY FULL BOTTLE SPIRIT 50 ML",
            "price_per_unit": {
                "price": 14,
                "quantity": 100,
                "unit": "ml"
            },
            "prices": [
                {
                    "currency": "AUD",
                    "currency_label": "$",
                    "value": 7,
                    "retailer": {
                        "id": "urn:authenticateit:participant:111111111111115",
                        "name": "Import participant Coles",
                        "logo": "https://dev-cdn.shping.com/2020/9/18/bb4f9033-ca16-4c95-a820-276373660680.png"
                    },
                    "image": [
                        {
                            "url": "https://dev-cdn.shping.com/2019/5/15/8433fe51-f003-49c8-8b26-d76c7d80c784"
                        }
                    ],
                    "type": "price",
                    "price_per_unit": {
                        "price": 14,
                        "quantity": 100,
                        "unit": "ml"
                    }
                }
            ],
            "highlited": true
        },
        {
            "product_id": "00080480001162",
            "product_name": "Jim Beam Bourbon Whisky",
            "prices": [
                {
                    "currency": "SGD",
                    "currency_label": "$",
                    "value": 38.55,
                    "retailer": {
                        "id": "urn:authenticateit:participant:111111111111132",
                        "name": "Import participant FairPrice"
                    },
                    "image": [
                        {
                            "url": "https://dev-cdn.shping.com/2019/10/24/d5a84256-2abd-4fc3-b1be-57b3ed86eb55"
                        },
                        {
                            "url": "https://dev-cdn.shping.com/2019/10/24/5061585d-4150-4d04-8b4d-39b8b88ccad2"
                        },
                        {
                            "url": "https://dev-cdn.shping.com/2019/10/24/f32f870f-5c19-40fc-81ef-db05784ffe05"
                        }
                    ],
                    "type": "price"
                }
            ],
            "highlited": true
        },
        {
            "product_id": "00080686003243",
            "product_name": "Jim Beam Black Extra-aged Bourbon Mixed With Cola 10 X 375ml Cans",
            "price_per_unit": {
                "price": 1.23,
                "quantity": 100,
                "unit": "ml"
            },
            "prices": [
                {
                    "currency": "AUD",
                    "currency_label": "$",
                    "value": 46,
                    "retailer": {
                        "id": "urn:authenticateit:participant:111111111111115",
                        "name": "Import participant Coles",
                        "logo": "https://dev-cdn.shping.com/2020/9/18/bb4f9033-ca16-4c95-a820-276373660680.png"
                    },
                    "image": [],
                    "type": "price",
                    "price_per_unit": {
                        "price": 1.23,
                        "quantity": 100,
                        "unit": "ml"
                    }
                }
            ]
        },
        {
            "product_id": "00080686003038",
            "product_name": "JIM BEAM BLACK LABEL BOURBON WHISKEY FULL BOTTLE SPIRIT 700 ML",
            "price_per_unit": {
                "price": 6.29,
                "quantity": 100,
                "unit": "ml"
            },
            "prices": [
                {
                    "currency": "AUD",
                    "currency_label": "$",
                    "value": 45,
                    "retailer": {
                        "id": "urn:authenticateit:participant:111111111111115",
                        "name": "Import participant Coles",
                        "logo": "https://dev-cdn.shping.com/2020/9/18/bb4f9033-ca16-4c95-a820-276373660680.png"
                    },
                    "image": [
                        {
                            "url": "https://dev-cdn.shping.com/2019/5/15/b9357837-b875-4f30-9dd5-d0a99c15fc6c"
                        }
                    ],
                    "type": "price"
                },
                {
                    "currency": "AUD",
                    "currency_label": "$",
                    "value": 44,
                    "retailer": {
                        "id": "urn:authenticateit:participant:111111111111115",
                        "name": "Import participant Coles",
                        "logo": "https://dev-cdn.shping.com/2020/9/18/bb4f9033-ca16-4c95-a820-276373660680.png"
                    },
                    "image": [
                        {
                            "url": "https://dev-cdn.shping.com/2019/5/15/b9357837-b875-4f30-9dd5-d0a99c15fc6c"
                        }
                    ],
                    "type": "discount_price",
                    "price_per_unit": {
                        "price": 6.29,
                        "quantity": 100,
                        "unit": "ml"
                    }
                }
            ]
        },
        {
            "product_id": "00080686003496",
            "product_name": "JIM BEAM BLACK LABEL BOURBON WHISKEY FULL BOTTLE SPIRIT 700 ML",
            "price_per_unit": {
                "price": 6.29,
                "quantity": 100,
                "unit": "ml"
            },
            "prices": [
                {
                    "currency": "AUD",
                    "currency_label": "$",
                    "value": 45,
                    "retailer": {
                        "id": "urn:authenticateit:participant:111111111111115",
                        "name": "Import participant Coles",
                        "logo": "https://dev-cdn.shping.com/2020/9/18/bb4f9033-ca16-4c95-a820-276373660680.png"
                    },
                    "image": [
                        {
                            "url": "https://dev-cdn.shping.com/2019/5/15/b9357837-b875-4f30-9dd5-d0a99c15fc6c"
                        }
                    ],
                    "type": "price"
                },
                {
                    "currency": "AUD",
                    "currency_label": "$",
                    "value": 44,
                    "retailer": {
                        "id": "urn:authenticateit:participant:111111111111115",
                        "name": "Import participant Coles",
                        "logo": "https://dev-cdn.shping.com/2020/9/18/bb4f9033-ca16-4c95-a820-276373660680.png"
                    },
                    "image": [
                        {
                            "url": "https://dev-cdn.shping.com/2019/5/15/b9357837-b875-4f30-9dd5-d0a99c15fc6c"
                        }
                    ],
                    "type": "discount_price",
                    "price_per_unit": {
                        "price": 6.29,
                        "quantity": 100,
                        "unit": "ml"
                    }
                }
            ]
        },
        {
            "product_id": "00080686001409",
            "product_name": "Jim Beam Bourbon Whisky",
            "prices": [
                {
                    "currency": "SGD",
                    "currency_label": "$",
                    "value": 61.4,
                    "retailer": {
                        "id": "urn:authenticateit:participant:111111111111132",
                        "name": "Import participant FairPrice"
                    },
                    "image": [
                        {
                            "url": "https://dev-cdn.shping.com/2019/11/1/535c9d5e-66f9-4775-b3d2-3b81ae4860c3"
                        },
                        {
                            "url": "https://dev-cdn.shping.com/2019/11/1/d6f21145-518b-4502-99ce-a31c84001898"
                        }
                    ],
                    "type": "price"
                },
                {
                    "currency": "SGD",
                    "currency_label": "$",
                    "value": 48,
                    "retailer": {
                        "id": "urn:authenticateit:participant:111111111111132",
                        "name": "Import participant FairPrice"
                    },
                    "image": [
                        {
                            "url": "https://dev-cdn.shping.com/2019/11/1/535c9d5e-66f9-4775-b3d2-3b81ae4860c3"
                        },
                        {
                            "url": "https://dev-cdn.shping.com/2019/11/1/d6f21145-518b-4502-99ce-a31c84001898"
                        }
                    ],
                    "type": "discount_price"
                }
            ]
        },
        {
            "product_id": "00080686005186",
            "product_name": "Jim Beam Devil's Cut Kentucky Straight Bourbon Whiskey 700ml",
            "prices": [
                {
                    "currency": "AUD",
                    "currency_label": "$",
                    "value": 54,
                    "retailer": {
                        "id": "urn:authenticateit:participant:111111111111111",
                        "name": "Import participant Woolworts",
                        "logo": "https://dev-cdn.shping.com/2020/9/18/8479df1a-b943-4045-883f-c63ef4432979.jpg"
                    },
                    "image": [
                        {
                            "url": "https://dev-cdn.shping.com/2019/5/25/8370c925-58e2-4674-9cb2-6b7c46a1276e"
                        },
                        {
                            "url": "https://dev-cdn.shping.com/2019/6/19/430694c7-eedd-426f-a289-e253bc6ed304"
                        }
                    ],
                    "type": "price"
                }
            ]
        },
        {
            "product_id": "00080686013891",
            "product_name": "Jim Beam Double Serve 6.7%",
            "prices": [
                {
                    "currency": "AUD",
                    "currency_label": "$",
                    "value": 26,
                    "retailer": {
                        "id": "urn:authenticateit:participant:111111111111111",
                        "name": "Import participant Woolworts",
                        "logo": "https://dev-cdn.shping.com/2020/9/18/8479df1a-b943-4045-883f-c63ef4432979.jpg"
                    },
                    "image": [
                        {
                            "url": "https://dev-cdn.shping.com/2019/6/19/0d3e3c51-af35-4a1f-92f6-eb3c55d6044e"
                        },
                        {
                            "url": "https://dev-cdn.shping.com/2019/6/19/98d54c20-07e6-47c2-8b1e-6877aa8fc452"
                        },
                        {
                            "url": "https://dev-cdn.shping.com/2019/6/19/64b86b36-1cb1-4048-b618-2fe1e2e87265"
                        },
                        {
                            "url": "https://dev-cdn.shping.com/2019/6/19/f044bc10-4098-4251-b539-04f0a9f132ab"
                        },
                        {
                            "url": "https://dev-cdn.shping.com/2019/6/19/c55ed638-053c-43ff-81f2-0ea13223b880"
                        },
                        {
                            "url": "https://dev-cdn.shping.com/2019/6/19/d851a3d1-a33f-4f91-88a5-42452c28bca6"
                        }
                    ],
                    "type": "price"
                },
                {
                    "currency": "AUD",
                    "currency_label": "$",
                    "value": 25,
                    "retailer": {
                        "id": "urn:authenticateit:participant:111111111111115",
                        "name": "Import participant Coles",
                        "logo": "https://dev-cdn.shping.com/2020/9/18/bb4f9033-ca16-4c95-a820-276373660680.png"
                    },
                    "image": [],
                    "type": "price"
                }
            ]
        }
    ]
}

Global search without special sorting rules

Search products in entire database.

POST /shoppinglists-service/user/shoppinglist/searchV2
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
search_string string Required: string for matching product names
Example body
{
    "search_string": "Aboard"
}

Returns query execution time and list of products. If products array is empty it means that selected products have no prices docs in dev couchDB.

Example Response
{
    "time": 306,
    "highlited_products": [
        {
            "product_id": "00013051266974",
            "product_name": "All Aboard Thomas & Friends Jumbo Add An Age Banner Blue, Green, Red & Yellow",
            "prices": [
                {
                    "currency": "AUD",
                    "currency_label": "$",
                    "value": 8.5,
                    "retailer": {
                        "id": "urn:authenticateit:participant:111111111111122",
                        "name": "Import participant Spotlight"
                    },
                    "image": [
                        {
                            "url": "https://dev-cdn.shping.com/2019/6/23/61b15068-f495-4eef-8b53-cad7401cdf29"
                        }
                    ],
                    "type": "price"
                }
            ]
        },
        {
            "product_id": "00013051716844",
            "product_name": "All Aboard Thomas & Friends Jumbo Add An Age Banner Blue, Green, Red & Yellow",
            "prices": [
                {
                    "currency": "AUD",
                    "currency_label": "$",
                    "value": 9,
                    "retailer": {
                        "id": "urn:authenticateit:participant:111111111111122",
                        "name": "Import participant Spotlight"
                    },
                    "image": [
                        {
                            "url": "https://dev-cdn.shping.com/2019/6/23/61b15068-f495-4eef-8b53-cad7401cdf29"
                        }
                    ],
                    "type": "price"
                }
            ]
        },
        {
            "product_id": "00013051298395",
            "product_name": "All Aboard Thomas Blowouts 8 Pack Blue, Green, Red & Yellow",
            "prices": [
                {
                    "currency": "AUD",
                    "currency_label": "$",
                    "value": 4,
                    "retailer": {
                        "id": "urn:authenticateit:participant:111111111111122",
                        "name": "Import participant Spotlight"
                    },
                    "image": [
                        {
                            "url": "https://dev-cdn.shping.com/2019/6/23/3492926d-89ac-4272-9132-ccbb918f97a0"
                        },
                        {
                            "url": "https://dev-cdn.shping.com/2019/6/23/dd134669-5ad6-404d-9007-9891dd173d6b"
                        },
                        {
                            "url": "https://dev-cdn.shping.com/2019/6/23/7e7feecc-33b0-4536-b476-7d70adcf28f4"
                        },
                        {
                            "url": "https://dev-cdn.shping.com/2019/6/23/f7eb89b2-6001-41df-bf73-71f387d1e886"
                        }
                    ],
                    "type": "price"
                }
            ]
        }
    ],
    "products": [
        {
            "product_id": "00013051716912",
            "product_name": "All Aboard Thomas Blowouts 8 Pack Blue, Green, Red & Yellow",
            "prices": [
                {
                    "currency": "AUD",
                    "currency_label": "$",
                    "value": 4.5,
                    "retailer": {
                        "id": "urn:authenticateit:participant:111111111111122",
                        "name": "Import participant Spotlight"
                    },
                    "image": [
                        {
                            "url": "https://dev-cdn.shping.com/2019/6/23/48b94cd7-78e6-4a61-99dc-12ae1c3455a4"
                        },
                        {
                            "url": "https://dev-cdn.shping.com/2019/6/23/112f9b80-0613-4015-8121-b5d537b13e57"
                        },
                        {
                            "url": "https://dev-cdn.shping.com/2019/6/23/7e7feecc-33b0-4536-b476-7d70adcf28f4"
                        },
                        {
                            "url": "https://dev-cdn.shping.com/2019/6/23/f7eb89b2-6001-41df-bf73-71f387d1e886"
                        }
                    ],
                    "type": "price"
                }
            ]
        },
        {
            "product_id": "00013051716998",
            "product_name": "All Aboard Thomas Bubble Favours 12 Pack Blue, Green, Red & Yellow",
            "prices": [
                {
                    "currency": "AUD",
                    "currency_label": "$",
                    "value": 8,
                    "retailer": {
                        "id": "urn:authenticateit:participant:111111111111122",
                        "name": "Import participant Spotlight"
                    },
                    "image": [
                        {
                            "url": "https://dev-cdn.shping.com/2019/6/23/cd76e0cf-42de-4430-9340-bb9ea7845f84"
                        }
                    ],
                    "type": "price"
                }
            ]
        }
    ]
}

Adjust number of units of product

Adjust number of units of product in shoppinglist.

PUT /shoppinglists-service/user/shoppinglist/product/amount
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
list_id string Required: shoppinglist id (uuid)
product_id string Required: product id
amount string Required: number of units of product
Example body
{
    "product_id": "00817579012811",
    "list_id": "e2af5961-e74d-41ca-a998-a782a7a90807",
    "amount": "5"
}
Example Response
{
    "result": "Product amount has been changed"
}

If there are no product_id in shoppinglist with list_id it returns error.

{
    "error": "There are no this product in this shoppinglist",
    "error_data": null,
    "error_id": "shoppinglists-ChangeProductAmount",
    "error_object": null
}

Change purchase frequency of product

A user can change purchase frequency from default (for this task Weekly is default value)

PUT /shoppinglists-service/user/shoppinglist/product/purchase-frequency
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
list_id string Required: shoppinglist id (uuid)
product_id string Required: product id
purchase_frequency string Required: purchase frequency of product (one of: "weekly", "occasional_buys", "scheduled")
Example body
{
    "user_id": "ikleeen@gmail.com",
    "list_id": "e2af5961-e74d-41ca-a998-a782a7a90807",
    "purchase_frequency": "scheduled"
}
Example Response
{
    "result": "Purchase frequency has been changed"
}

If there are no product_id in shoppinglist with list_id it returns error.

{
    "error": "There are no this product in this shopping list",
    "error_data": null,
    "error_id": "shoppinglists-changePurchaseFrequency",
    "error_object": null
}

Get attributes

Get list of attributes of products.

GET /shoppinglists-service/attributes
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Response
{
    "result": [
        {
            "name": "Organic",
            "id": "aac11b66-807c-49e7-a27e-939969855751"
        },
        {
            "name": "Low Fat",
            "id": "44781039-af2d-4986-be2d-afac2c363bf3"
        },
        {
            "name": "Lactose free",
            "id": "be7194dc-06e3-4bd1-91db-5eb04be9a8b5"
        },
        {
            "name": "Australian made",
            "id": "86e9e12f-aed1-476c-a62e-2fd19bbce713"
        },
        {
            "name": "Free range",
            "id": "8f42ece8-8853-4052-a85b-92df163c7004"
        },
        {
            "name": "Halal",
            "id": "f15fc677-faa9-41d6-85b9-0a7d8d133dfb"
        }
    ]
}

Get categories

Get list of categories of products.

GET /shoppinglists-service/categories
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
category_id string(get param) Optional: category id
Example body
{
    "category_id": "80584457-5e7e-4021-adfa-9f7ef071d373"
}

If "category_id" field was not passed to the request, a list of first level categories is returned

Example Response
{
    "result": [
        {
            "name": "Bread & Bakery",
            "id": "80584457-5e7e-4021-adfa-9f7ef071d373"
        },
        {
            "name": "Meat, Seafood & Deli",
            "id": "e3058cbb-ec46-4dea-acef-4dc658576947"
        },
        {
            "name": "Fruit & Veg",
            "id": "9c6358b1-5719-487a-88bc-b823b36b02fa"
        },
        {
            "name": "Dairy & Eggs",
            "id": "d50dc365-b34c-4d8d-a38a-483551f0054c"
        },
        {
            "name": "Drinks",
            "id": "21d94b4f-d76e-46a2-befd-503e6b08ab39"
        }
    ]
}

If "category_id" field was passed to the request, an object of category with list of it's sub categories is returned

Example Response
{
    "result": [
        {
            "id": "dafb471a-9793-4c9b-9fc7-adbc31791213",
            "name": "Instore bakery"
        },
        {
            "id": "46eb270e-5107-4564-bca1-7d080303a71f",
            "name": "Packaged"
        }
    ]
}

Add categories

Assign categories to product.

POST /shoppinglists-service/categories/product

Category can be assigned by id or by name.

Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
gtin string Required: gtin
category_id string Optional: category id
category_name string Optional: category name
Example body
{
    "gtin": "06713910111127",
    "category_name": "Free range"
}

One of "category_id" or "category_name" fields has to be passed to the request.

Example Response
{
    "result": "Category has been added"
}

Delete categories

Delete categories from product.

DELETE /shoppinglists-service/categories/product

Category can be deleted by id or by name.

Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
gtin string Required: gtin
category_id string Optional: category id
category_name string Optional: category name
Example body
{
    "gtin": "06713910111127",
    "category_name": "Free range"
}

One of "category_id" or "category_name" fields has to be passed to the request.

Example Response
{
    "result": "Category has been deleted"
}

Get products by category

Get list of products by category

GET /shoppinglists-service/categories/product
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
category_id string (get param) Required: category id
Example Response
{
    "result": [
        {
            "product_id": "09329982016849",
            "product_name": "Somersby Apple Cider Premium European Cider 4.5% 6 X 330ml",
            "price_per_unit": {
                "price": 1.01,
                "quantity": 100,
                "unit": "ml"
            },
            "prices": [
                {
                    "currency": "AUD",
                    "currency_label": "$",
                    "value": 21.5,
                    "retailer": {
                        "id": "urn:authenticateit:participant:735879621218609",
                        "name": "Иван Васильев",
                        "logo": "https://dev-cdn.shping.com/2019/3/28/5e1eb1a7-7d38-4d09-bace-a586cb0fc326.png"
                    },
                    "image": [
                        {
                            "url": "https://dev-cdn.shping.com/2019/5/25/f5c806af-502c-468b-bd4f-bbf2369d9478"
                        }
                    ],
                    "type": "price"
                },
                {
                    "currency": "AUD",
                    "currency_label": "$",
                    "value": 16,
                    "retailer": {
                        "id": "urn:authenticateit:participant:735879621218609",
                        "name": "Иван Васильев",
                        "logo": "https://dev-cdn.shping.com/2019/3/28/5e1eb1a7-7d38-4d09-bace-a586cb0fc326.png"
                    },
                    "image": [
                        {
                            "url": "https://dev-cdn.shping.com/2019/5/25/f5c806af-502c-468b-bd4f-bbf2369d9478"
                        }
                    ],
                    "type": "discount_price"
                },
                {
                    "currency": "AUD",
                    "currency_label": "$",
                    "value": 20,
                    "retailer": {},
                    "image": [],
                    "type": "price"
                }
            ]
        }
    ]
}

Get products by purchase frequency

Get list of products by purchase frequency

GET /shoppinglists-service/user/shoppinglist/products
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
list_id string (get param) Required: shopping list id
type string (get param) Required: purchase frequency type (scheduled or occasional_buys)
Example Response
{
    "result": {
        "products": [
            {
                "product_id": "09329982016849",
                "product_name": "Somersby Apple Cider Premium European Cider 4.5% 6 X 330ml",
                "price_per_unit": {
                    "price": 1.01,
                    "quantity": 100,
                    "unit": "ml"
                },
                "prices": [
                    {
                        "currency": "AUD",
                        "currency_label": "$",
                        "value": 21.5,
                        "retailer": {
                            "id": "urn:authenticateit:participant:735879621218609",
                            "name": "Иван Васильев",
                            "logo": "https://dev-cdn.shping.com/2019/3/28/5e1eb1a7-7d38-4d09-bace-a586cb0fc326.png"
                        },
                        "image": [
                            {
                                "url": "https://dev-cdn.shping.com/2019/5/25/f5c806af-502c-468b-bd4f-bbf2369d9478"
                            }
                        ],
                        "type": "price"
                    },
                    {
                        "currency": "AUD",
                        "currency_label": "$",
                        "value": 16,
                        "retailer": {
                            "id": "urn:authenticateit:participant:735879621218609",
                            "name": "Иван Васильев",
                            "logo": "https://dev-cdn.shping.com/2019/3/28/5e1eb1a7-7d38-4d09-bace-a586cb0fc326.png"
                        },
                        "image": [
                            {
                                "url": "https://dev-cdn.shping.com/2019/5/25/f5c806af-502c-468b-bd4f-bbf2369d9478"
                            }
                        ],
                        "type": "discount_price"
                    },
                    {
                        "currency": "AUD",
                        "currency_label": "$",
                        "value": 20,
                        "retailer": {},
                        "image": [],
                        "type": "price",
                        "price_per_unit": {
                            "price": 1.01,
                            "quantity": 100,
                            "unit": "ml"
                        }
                    }
                ],
                "amount": 1,
                "purchase_frequency": "scheduled",
                "added_by": "urn:authenticateit:user:email:system@authenticateit.com"
            }
        ]
    }
}

Get products in shopping list

Get list of products in shopping list

GET /shoppinglists-service/user/shoppinglist/product-list
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
list_id string (get param) Required: shopping list id
Example Response
{
    "result": {
        "products": [
            {
                "product_id": "09329982016849",
                "product_name": "Somersby Apple Cider Premium European Cider 4.5% 6 X 330ml",
                "prices": [
                    {
                        "currency": "AUD",
                        "currency_label": "$",
                        "value": 21.5,
                        "retailer": {
                            "id": "urn:authenticateit:participant:735879621218609",
                            "name": "Иван Васильев",
                            "logo": "https://dev-cdn.shping.com/2019/3/28/5e1eb1a7-7d38-4d09-bace-a586cb0fc326.png"
                        },
                        "image": [
                            {
                                "url": "https://dev-cdn.shping.com/2019/5/25/f5c806af-502c-468b-bd4f-bbf2369d9478"
                            }
                        ],
                        "type": "price"
                    },
                    {
                        "currency": "AUD",
                        "currency_label": "$",
                        "value": 16,
                        "retailer": {
                            "id": "urn:authenticateit:participant:735879621218609",
                            "name": "Иван Васильев",
                            "logo": "https://dev-cdn.shping.com/2019/3/28/5e1eb1a7-7d38-4d09-bace-a586cb0fc326.png"
                        },
                        "image": [
                            {
                                "url": "https://dev-cdn.shping.com/2019/5/25/f5c806af-502c-468b-bd4f-bbf2369d9478"
                            }
                        ],
                        "type": "discount_price"
                    },
                    {
                        "currency": "AUD",
                        "currency_label": "$",
                        "value": 20,
                        "retailer": {},
                        "image": [],
                        "type": "price",
                        "price_per_unit": {
                            "price": 1.01,
                            "quantity": 100,
                            "unit": "ml"
                        }
                    }
                ],
                "price_per_unit": {
                    "price": 1.01,
                    "quantity": 100,
                    "unit": "ml"
                },
                "amount": 1,
                "purchase_frequency": "scheduled",
                "added_by": "urn:authenticateit:user:email:system@authenticateit.com"
            }
        ],
        "categories": [
            {
                "name": "Bread & Bakery",
                "id": "fdb66a4a-19a9-4ad6-a767-f7e487afd18a"
            },
            {
                "name": "Meat, Seafood & Deli",
                "id": "0ca7636a-5ced-4eea-a807-37eab2a341dd"
            },
            {
                "name": "Fruit & Veg",
                "id": "b90c0f02-b264-4ce0-b952-f1068f298493"
            },
            {
                "name": "Dairy & Eggs",
                "id": "8d264c76-4b11-4f76-9e4d-d6576fa64da1"
            },
            {
                "name": "Drinks",
                "id": "1e7fb3d0-cd18-4898-ae57-fe11ab7c04f5"
            }
        ],
        "attributes": [
            {
                "name": "Organic",
                "id": "aac11b66-807c-49e7-a27e-939969855751"
            },
            {
                "name": "Low Fat",
                "id": "44781039-af2d-4986-be2d-afac2c363bf3"
            },
            {
                "name": "Lactose free",
                "id": "be7194dc-06e3-4bd1-91db-5eb04be9a8b5"
            },
            {
                "name": "Australian made",
                "id": "86e9e12f-aed1-476c-a62e-2fd19bbce713"
            },
            {
                "name": "Free range",
                "id": "8f42ece8-8853-4052-a85b-92df163c7004"
            },
            {
                "name": "Halal",
                "id": "f15fc677-faa9-41d6-85b9-0a7d8d133dfb"
            }
        ]
    }
}

Add attribute

Assign attribute to product.

POST /shoppinglists-service/attributes/product

Attribute can be assigned by id or by name.

Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
gtin string Required: gtin
attribute_id string Optional: attribute id
attribute_name string Optional: attribute name
Example body
{
    "gtin": "06713910111127",
    "attribute_id": "21d94b4f-d76e-46a2-befd-503e6b08ab39"
}

One of "attribute_id" or "attribute_name" fields has to be passed to the request.

Example Response
{
    "result": "Attribute has been added"
}

Delete attribute

Delete attribute from product.

DELETE /shoppinglists-service/attributes/product

Attribute can be deleted by id or by name.

Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
gtin string Required: gtin
attribute_id string Optional: attribute id
attribute_name string Optional: attribute name
Example body
{
    "gtin": "06713910111127",
    "attribute_id": "21d94b4f-d76e-46a2-befd-503e6b08ab39"
}

One of "attribute_id" or "attribute_name" fields has to be passed to the request.

Example Response
{
    "result": "Attribute has been deleted"
}

Get recenly used products

Get recenly used products.

GET /shoppinglists-service/user/shoppinglist/products/recently-used
Parameters
Name Type Description
authenticateit_identity_ticket header Required: Session's ticket
Example Response
{
    "result": [
        {
            "product_id": "09329982016849",
            "product_name": "Somersby Apple Cider Premium European Cider 4.5% 6 X 330ml",
            "price_per_unit": {
                "price": 1.01,
                "quantity": 100,
                "unit": "ml"
            },
            "prices": [
                {
                    "currency": "AUD",
                    "currency_label": "$",
                    "value": 21.5,
                    "retailer": {
                        "id": "urn:authenticateit:participant:735879621218609",
                        "name": "Иван Васильев",
                        "logo": "https://dev-cdn.shping.com/2019/3/28/5e1eb1a7-7d38-4d09-bace-a586cb0fc326.png"
                    },
                    "image": [
                        {
                            "url": "https://dev-cdn.shping.com/2019/5/25/f5c806af-502c-468b-bd4f-bbf2369d9478"
                        }
                    ],
                    "type": "price"
                },
                {
                    "currency": "AUD",
                    "currency_label": "$",
                    "value": 16,
                    "retailer": {
                        "id": "urn:authenticateit:participant:735879621218609",
                        "name": "Иван Васильев",
                        "logo": "https://dev-cdn.shping.com/2019/3/28/5e1eb1a7-7d38-4d09-bace-a586cb0fc326.png"
                    },
                    "image": [
                        {
                            "url": "https://dev-cdn.shping.com/2019/5/25/f5c806af-502c-468b-bd4f-bbf2369d9478"
                        }
                    ],
                    "type": "discount_price"
                }
            ]
        }
    ]
}

results matching ""

    No results matching ""