Requires
read_product
access scope. For more access scope
The Shop Details API allows developers to fetch comprehensive information about a shop by using its unique domain prefix (shopdomain) and configurable query parameters. This endpoint supports retrieving specific fields based on the user’s request. For example, users can request key shop attributes such as id, name, and email.This API is especially useful for:
-
Retrieving store metadata like name, owner details, and operational settings.
-
Customizing query results by specifying required fields.
Note: The operation is scoped to a specific shop, identified by its unique domain prefix (shopdomain), ensuring all updates are applied to the correct store.
Public Request Parameters
Parameter Name | Type | Required | Parameter Location | Parameter Value | Description |
---|---|---|---|---|---|
Access-Token | String | Yes | Header | Bx-_5aV eXNwl-4AB98s5xLV yg0fNzGf MuTpqtlBA | Used to authenticate API requests. Obtain an access token from the Access Token Guide. Pass it in the Authorization header for every request. |
Content-Type | String | Yes | Header | application /json | Indicates the media type of the request body. It tells the server how to parse the request and the client how to interpret the response. For more details, visit Content-Type. |
Public Response Parameters
Parameter Name | Type | Mandatory | Parameter Location | Example Value | Description |
---|---|---|---|---|---|
error | String | No | Response Body | { "error": "store is not active" } | Indicates an error encountered during the process. This field typically appears when the Access Token is missing or invalid. Example: { "error": "store is not active" } . |
errors | Array | No | Response Body | { "errors"["No Context"] } | A list of errors that occurred during the request processing. Example: { "errors": [ "No Context" ] } . |
Request-Id | String | Yes | Header | Bx-_5aV eXNwl-4AB98s5xLV yg0fNzGf MuTpqtlBA | A unique identifier for each request. It helps in identifying and debugging specific requests. |
Error and Errors Clarification:
Added explanation that the error and errors fields are currently dependent on the API implementation, with plans for future unification.
Request Parameters
Path Parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
product_id | string | Yes | 9fb9f3c6-2300-42c1-8593-d9008d7cfc09 | The unique identifier for the product. |
Response Explanation
Successful Response
Field | Type | Example | Description |
---|---|---|---|
product | object | The product details object containing all related information. | |
product.brief | string | "shirt" | A brief description or summary of the product. |
product.created_at | string (ISO8601) | "2024-04-17T02:15:18Z" | The timestamp when the product was created. |
product.description | string | "<p>Desc</p>" | The detailed description of the product. |
product.display_fake_sales | boolean | true | Indicates whether fake sales are displayed for the product. |
product.fake_sales | integer | 10 | The number of fake sales displayed for the product. |
product.handle | string | "shirt" | The URL-friendly handle of the product. |
product.has_only_default_variant | boolean | false | Indicates whether the product has only a default variant. |
product.id | string (UUID) | "a1a88be0- a1d4-47e4-a2f2 -ba6e131cf447" | The unique identifier for the product. |
product.image | object | The main image object for the product. | |
product.image.src | string | "//cdn.shoplazza.com /image.jpeg" | The URL of the main image. |
product.image.width | integer | 174 | The width of the main image in pixels. |
product.image.height | integer | 180 | The height of the main image in pixels. |
product.image.path | string | "ea0d6bfe40c.jpeg" | The file path of the main image. |
product.image.alt | string | "" | The alt text for the main image. |
product.category | object | Category Object | The category information of the product. |
product.category.id | integer | 368313940138040900 | The unique identifier for the product category. |
product.category.name | string | "3" | The name of the category. |
product.category.google_id | integer | 0 | The Google ID of the category. |
product.category.level | integer | 3 | The level of the category. |
product.category.path | string | "368313940138008142, 368313940138024526, 368313940138040910" | The hierarchical path of the category. |
product.images | array | array of image object | An array of additional images associated with the product. |
product.images[ ].id | string (UUID) | "8ef098c5-5a08- 44b4-b5fb-89214bb507dc" | The unique identifier for the image. |
product.images[ ].src | string | "//cdn.shoplazza.com /image.jpeg" | The URL of the additional image. |
product.images[ ].width | integer | 174 | The width of the additional image in pixels. |
product.images[ ].height | integer | 180 | The height of the additional image in pixels. |
product.images[ ].alt | string | "" | The alt text for the additional image. |
product.images[ ].created_at | string (ISO8601) | "2024-04-17T02:15:18Z" | The timestamp when the image was created. |
product.images[ ].updated_at | string (ISO8601) | "2024-04-17T02:15:35Z" | The timestamp when the image was last updated. |
product.variants | array | Array of Variants Object | An array of variants for the product. |
product.variants[ ].id | string (UUID) | "88e68830-4ef5- 4125-bf7d-aef8047176b2" | The unique identifier for the variant. |
product.variants[ ].product_id | string (UUID) | "a1a88be0- a1d4-47e4-a2f2- ba6e131cf447" | The product ID associated with the variant. |
product.variants[ ].image_id | string (UUID) | "8ef098c5- 5a08-44b4-b5fb- 89214bb507dc" | The image ID associated with the variant. |
product.variants[ ].created_at | string (ISO8601) | "2024-04-17T02:15:18Z" | The timestamp when the variant was created. |
product.variants[ ].updated_at | string (ISO8601) | "2024-04-17T02:15:35Z" | The timestamp when the variant was last updated. |
product.variants[ ].title | string | "S-blue-T" | The title of the variant. |
product.variants[ ].option1 | string | "S" | The first option value for the variant (e.g., size). |
product.variants[ ].option2 | string | "blue" | The second option value for the variant (e.g., color). |
product.variants[ ].option3 | string | "T" | The third option value for the variant (if applicable). |
product.variants[ ].position | integer | 1 | The position of the variant in the list. |
product.variants[ ].compare_at_price | string | "12.10" | The compare-at price for the variant. |
product.variants[ ].price | string | "10.10" | The price of the variant. |
product.variants[ ].sku | string | "T-M-S-blue-T-A001004" | The Stock Keeping Unit (SKU) for the variant. |
product.variants[ ].barcode | string | "6929000212340" | The barcode for the variant. |
product.variants[ ].note | string | "node" | Notes associated with the variant. |
product.variants[ ].inventory_quantity | integer | 10 | The inventory quantity of the variant. |
product.variants[ ].weight | string | "1.10" | The weight of the variant. |
product.variants[ ].weight_unit | string | "kg" | The unit of weight for the variant. |
product.variants[ ].cost_price | string | "1.10" | The cost price of the variant. |
product.variants[ ].wholesale_price | array | Array of wholesale price | An array of wholesale pricing for the variant. |
product.variants[ ].wholesale_price[ ].price | string | "10.10" | The wholesale price of the variant. |
product.variants[ ]. wholesale_price[ ].min_quantity | integer | 1 | The minimum quantity for wholesale pricing. |
product.variants[ ]. extend | object | Array of Extend Object | Additional information about the variant. |
product.variants[ ]. extend.length | integer | 10 | The length of the variant's package. |
product.variants[ ]. extend.width | integer | 10 | The width of the variant's package. |
product.variants[ ]. extend.height | integer | 10 | The height of the variant's package. |
product.variants[ ]. extend.dimension_unit | string | "in" | The unit of dimensions for the variant. |
product.variants[ ]. extend.origin_country_code | string | "AG" | The country code of origin for the variant. |
product.variants[ ]. extend.hs_code | string | "62114390" | The HS code for the variant. |
product.vendor | string | "shoplazza" | The vendor of the product. |
product.vendor_url | string | "https://shoplazza.com" | The URL of the vendor's website. |
Error Response
Error responses in the API can be represented using two different fields: errors
and error
. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.
Field | Type | Example | Description |
---|---|---|---|
errors | Array | ["Context"] | A list of errors encountered during the request processing. |
Field | Type | Example | Description |
---|---|---|---|
error | Array | "store is not active" | Indicates an error encountered during the process. |
Request Examples
curl --request GET \
--url https://shopdomain.myshoplaza.com/openapi/2022-01/products/a1a88be0-a1d4-47e4-a2f2-ba6e131cf447 \
--header 'accept: application/json' \
--header 'access-token: WPMSdB6M8Cpum4X1GoMYOKZpiESd8d2x7dZW8d79ZeQ'
Success Response Example
{
"product": {
"brief": "shirt",
"created_at": "2024-04-17T02:15:18Z",
"description": "<p>Desc</p>",
"display_fake_sales": true,
"fake_sales": 10,
"handle": "shirt",
"has_only_default_variant": false,
"id": "a1a88be0-a1d4-47e4-a2f2-ba6e131cf447",
"image": {
"src": "//cdn.shoplazza.com/ccf0794c594bad32a320eea0d6bfe40c.jpeg",
"width": 174,
"height": 180,
"path": "ccf0794c594bad32a320eea0d6bfe40c.jpeg",
"alt": ""
},
"category": {
"id": 368313940138040900,
"name": "3",
"google_id": 0,
"level": 3,
"path": "368313940138008142,368313940138024526,368313940138040910"
},
"images": [
{
"id": "8ef098c5-5a08-44b4-b5fb-89214bb507dc",
"product_id": "a1a88be0-a1d4-47e4-a2f2-ba6e131cf447",
"position": 1,
"src": "//cdn.shoplazza.com/ccf0794c594bad32a320eea0d6bfe40c.jpeg",
"width": 174,
"height": 180,
"alt": "",
"created_at": "2024-04-17T02:15:18Z",
"updated_at": "2024-04-17T02:15:35Z"
}
Error Response Example
{
"errors": [
"productId has an invalid UUID"
]
}
{
"error": "store is not active"
}
Error Details
Status Code | Message | Possible Reason | Example Response |
---|---|---|---|
422 | productId has an invalid UUID | The product_id provided is invalid. | {"errors": ["productId has an invalid UUID"]} |