接口访问需要令牌,具体如何获取令牌请参考:身份认证
查询店铺的信息。你可以使用该接口查询店铺 ID、店铺名称、结算币种等信息。
Return
contactEmail ● String!non-null
商家的邮箱,用于与顾客联系。
name ● String!non-null
店铺的名称。
handle ● String!non-null
店铺的唯一标识符,值为店铺域名的前缀。例如,域名为 open001.myshopline.com 的店铺,其 handleopen001
id ● ID!non-null
店铺的唯一 ID。
currencyCode ● CurrencyCode!non-null
店铺与顾客结算的货币。该字段值为三位币种码,遵循 ISO 4217 标准,例如 CNY
More
ianaTimezone ● String!non-null
店铺配置的时区。
allProductCategories ● [ProductCategory!]non-null
店铺商品的标准类型列表。
最大个数限制:1000。
More
features ● ShopFeatures!non-null
店铺功能的可用情况。例如,giftCards 返回 true 表示允许在商店中创建礼品卡。
More
resourceLimits ● ShopResourceLimits!non-null
店铺下特定资源的限制情况。
More
uploadedImagesByIds ● [Image!]non-null
上传到商店的图像列表。
More
productTypes ● StringConnection!non-null
店铺商品已添的自定义商品类型列表。
More
productTags ● StringConnection!non-null
店铺商品已添加到商品标签列表。
More
productVendors ● StringConnection!non-null
店铺商品已添加到商品供应商列表。
More
错误码
关于更多通用错误码说明,参考:状态码和错误码
Example
查询店铺名称、ID、联系邮箱、币种、handle、时区、可用功能信息。
query Shop {
shop {
contactEmail
name
handle
id
currencyCode
ianaTimezone
allProductCategories {
productTaxonomyNode {
isRoot
name
fullName
id
isLeaf
}
}
features {
giftCards
shopId
}
resourceLimits {
maxProductOptions
maxProductVariants
shopId
}
}
}
Response
{
"data": {
"shop": {
"handle": "openapiceshidianpu",
"allProductCategories": [
{
"productTaxonomyNode": {
"isLeaf": true,
"isRoot": false,
"name": "Gift Cards & Certificates",
"fullName": "Gift Giving < Party & Celebration < Arts & Entertainment < Gift Cards & Certificates",
"id": "gid://shopline/ProductTaxonomyNode/53"
}
}
],
"currencyCode": "USD",
"name": "OpenAPI 测试店铺",
"ianaTimezone": "Asia/Shanghai",
"id": "1672369729606",
"resourceLimits": {
"maxProductOptions": 5,
"maxProductVariants": 500,
"shopId": "1672369729606"
},
"contactEmail": "ssc56474@gmail.com",
"features": {
"shopId": "1672369729606",
"giftCards": true
}
}
},
"extensions": {
"cost": {
"actualQueryCost": 6,
"requestedQueryCost": 6,
"throttleStatus": {
"currentlyAvailable": 4994,
"maximumAvailable": 5000,
"restoreRate": 5000
}
}
}
}
这篇文章对你有帮助吗?