Retrieve IDs

How to retrieve IDs

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

Through URL or web

To retrieve a Product ID, navigate to the “All Products” section, locate the product you need, and click into its details. You will find the Product ID in two places:

  • Next to the “Basic Information” section.
  • Within the product’s URL in your browser’s address bar.

For other entities like Orders or Customers, the ID can similarly be found.

  • In the URL when you view the entity’s details.
  • On the specific entity’s detailed information page within the interface.

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 to retrieve the product ID. This method also works for "Customers", "Orders" and so on.