How to retrieve IDs

In Shoplazza Admin API, there are two easy ways you can retrieve item IDs

  1. Through URL or web:

    Taking Product ID in this exmaple, you will simply just need to go to "All products" and find the product you want to retrieve the ID, and click into it, you will find the related product ID in besides "Basic information" also in the URL, for other terms such as "Orders", "Customers", you can find the ID either in the URL or in the webpages by navigating to the detail info page.

  2. Through List API:

    {
    "cursor": "MjAyMS0wNy0wOVQwMToxNzowNFojN2JiMWUwMTUtMDVhMi00Yzk0LWIxNDktMTE1MDEzYmEwODEz",
    "pre_cursor": "MjAyMy0wNS0zMFQwNzozNzoyNVojYmIyZjJhMDgtYzdkNi00MTMzLTkzNmYtNWIzMDgxOGNhYmUz",
    "products": [
     {
       "id": "c1d5b2a3-fab1-4e26-8582-75d3b2677042",
       "title": "aasd",
       "brief": "asd",
       "description": "asd",
       "published": false,
       "requires_shipping": false,
       "taxable": false,
       "tags": "",
       "vendor": "asd",
       "vendor_url": "asd",
       "inventory_quantity": 123,
       "published_at": null,
       "created_at": "2022-01-10T06:11:45Z",
       "updated_at": "2022-01-10T06:11:45Z",
       "note": "asd",
       "seo_title": "asd",
       "seo_description": "asd",
       "seo_keywords": "asd",
       "handle": "asd-bkpq",
       "has_only_default_variant": false,
       "inventory_tracking": false,
       "inventory_policy": "continue",
       "need_variant_image": false,
       "spu": "asd",
       "fake_sales": 123,
       "display_fake_sales": false,
       "image": {
         "src": "//cdn.shoplazza.com/shirt.png",
         "width": 100,
         "height": 100,
         "alt": "",
         "path": "shirt.png"
       },
       "images": [
         {
           "id": "fe0ae4b6-cb7b-4d1c-a7f0-727750b73d16",
           "product_id": "c1d5b2a3-fab1-4e26-8582-75d3b2677042",
           "position": 1,
           "src": "//cdn.shoplazza.com/shirt.png",
           "width": 100,
           "height": 100,
           "alt": "",
           "created_at": "2022-01-10T06:11:45Z",
           "updated_at": "2022-01-10T06:11:45Z"
         }
       ],
       "options": [
         {
           "id": "b5109277-0daa-42f5-afa3-1bb609d13199",
           "product_id": "c1d5b2a3-fab1-4e26-8582-75d3b2677042",
           "position": 1,
           "name": "qwe",
           "values": [
             "qwe"
           ]
         }
       ],
       "variants": [
         {
           "id": "8ecc0550-fb48-4860-9bb3-9b85e3c2b44a",
           "product_id": "c1d5b2a3-fab1-4e26-8582-75d3b2677042",
           "image_id": "",
           "created_at": "2022-01-10T06:11:45Z",
           "updated_at": "2022-01-10T06:11:45Z",
           "title": "qwe",
           "option1": "qwe",
           "option2": "",
           "option3": "",
           "image": null,
           "position": 1,
           "compare_at_price": "132.00",
           "price": "123.00",
           "sku": "asd",
           "barcode": "asd",
           "note": "asd",
           "inventory_quantity": 123,
           "weight": "123",
           "weight_unit": "kg",
           "cost_price": "120.00"
         }
       ]
     }
    ]
    }
    

    Retrieving IDs from various list API is always an Option, in this case, we use Product List API (https://www.shoplazza.dev/reference/product_list) to retrieve the product ID. This method also works for "Customers", "Orders" and so on.