Shop Details

The Shop Details API allows developers to fetch comprehensive information about a shop by using its unique identifier and configurable query parameters. This endpoint supports retrieving specific fields based on the user’s request. For instance, users can request key shop attributes such as id, name, and email.

This API is especially useful for:
1. Retrieving store metadata like name, owner details, and operational settings.
2. Customizing query results by specifying required fields.
3. Verifying shop details through its unique domain prefix (shopdomain).

Example: If the shop’s domain is https://store123.myshoplazza.com, the shopdomain would be store123.

🔒

Requires read_shop access scope. For more access scope

Public Request Parameters

Parameter NameTypeRequiredParameter LocationParameter ValueDescription
Access-TokenStringYesHeaderBx-_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-TypeStringYesHeaderapplication
/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 NameTypeMandatoryParameter LocationExample ValueDescription
errorStringNoResponse 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" }.
errorsArrayNoResponse Body{ "errors"["No Context"] }A list of errors that occurred during the request processing. Example: { "errors": [ "No Context" ] }.
Request-IdStringYesHeaderBx-_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 Parameter

Query Parameters

ParameterTypeRequiredExampleDescription
fieldsStringNoid,name,emailSpecifies which fields to include in the response. Use commas to separate multiple fields.

Response Parameters

Successful Response

FieldTypeExampleDescription
shop.accountString[email protected]Email address of the shop account.
shop.address1Stringaddress1Primary address of the shop.
shop.cityStringcityCity where the shop is located.
shop.country_codeStringCNCountry code of the shop's location.
shop.created_atString2023-11-08T11:51:39ZISO timestamp when the shop was created.
shop.currencyStringUSDDefault currency used by the shop.
shop.emailString[email protected]Contact email address of the shop owner.
shop.idInteger633130Unique identifier for the shop.
shop.nameStringtest-shoplazzaName of the shop.
shop.stateStringavailableCurrent operational state of the shop.
shop.timezoneString+0800Timezone offset for the shop location.

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.

FieldTypeExampleDescription
errorsArray["Context"]A list of errors encountered during the request processing.
FieldTypeExampleDescription
errorString "store is not active"Indicates an error encountered during the process.

Request Examples

curl --request GET \
     --url https://developer.myshoplaza.com/openapi/2022-01/shop?fields=id' \
     --header 'accept: application/json' \
     --header 'access-token: WPMSdB6M8Cpum4X1GoMYOKZpiESd8d2x7dZW8d79ZeQ'
const url = 'https://developer.myshoplaza.com/openapi/2022-01/shop?fields=id';
const options = {
  method: 'GET',
  headers: {
    accept: 'application/json',
    'access-token': 'WPMSdB6M8Cpum4X1GoMYOKZpiESd8d2x7dZW8d79ZeQ'
  }
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));

Success Response Example

{
  "shop": {
    "account": "[email protected]",
    "address1": "address1",
    "address2": "",
    "city": "city",
    "country_code": "CN",
    "created_at": "2023-11-08T11:51:39Z",
    "currency": "USD",
    "customer_email": "[email protected]",
    "domain": "test-shoplazza.stg.myshoplaza.com",
    "email": "[email protected]",
    "icon": {
      "alt": "",
      "path": "55f1a60e47d1462c7d88dec3844369f0.png",
      "src": "http://img.staticdj.com/55f1a60e47d1462c7d88dec3844369f0.png"
    },
    "id": 633130,
    "name": "test-shoplazza",
    "phone": "15014471143",
    "primary_locale": "en-US",
    "province_code": "CN-GD",
    "root_url": "",
    "shop_owner": "test-shoplazza",
    "state": "available",
    "system_domain": "test-shoplazza.stg.myshoplaza.com",
    "timezone": "+0800",
    "updated_at": "2024-04-29T09:18:01Z",
    "zip": "515300"
  }
}

Error Response Example

{
  "errors": [
    "No Context"
  ]
}
{
  "error": "store is not active"
}

Error Detail

HTTP Status CodeError MessageDescription
400Bad RequestThe request is malformed or contains invalid parameters.
401UnauthorizedErrorMissing or invalid authentication credentials.
404store is not activeThe requested store is inactive or unavailable.
500Response message parsing errorInternal server error caused by a failure in parsing the response message.
520No contextThe request lacks sufficient context to process successfully.
Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!