- Customers
- Customer Address
- Retrieves a list of addresses for a customer
- Creates a new address for a customer
- Retrieves details for a single customer address
- Updates an existing customer address
- Removes an address from a customer’s address list
- Performs bulk operations for multiple customer addresses
- Sets the default address for a customer
- CustomerSavedSearch
- Customer
- Retrieves a list of customers
- Creates a customer
- Searches for customers that match a supplied query
- Retrieves a single customer
- Updates a customer
- Deletes a customer
- Creates an account activation URL for a customer
- Sends an account invite to a customer
- Retrieves a count of customers
- Retrieves all orders that belong to a customer
- Sales channels
- Checkout
- CollectionListing
- Retrieve collection listings that are published to your app
- Retrieve product_ids that are published to a collection_id
- Retrieve a specific collection listing that is published to your app
- Create a collection listing to publish a collection to your app
- Delete a collection listing to unpublish a collection from your app
- Product ResourceFeedback
- MobilePlatformApplication
- ProductListing
- Retrieve product listings that are published to your app
- Retrieve product_ids that are published to your app
- Retrieve a count of products that are published to your app
- Retrieve a specific product listing that is published to your app
- Create a product listing to publish a product to your app
- Delete a product listing to unpublish a product from your app
- ResourceFeedback
- Payment
- Products
- Collect
- Collection
- CustomCollection
- Product
- Product Image
- Product Variant
- SmartCollection
- Orders
- Access
- Billing
- Online store
- Asset
- Blog
- Article
- Retrieves a list of all articles from a blog
- Creates an article for a blog
- Retrieves a count of all articles from a blog
- Receive a single Article
- Updates an article
- Deletes an article
- Retrieves a list of all article authors
- Retrieves a list of all article tags
- Retrieves a list of all article tags from a specific blog
- Redirect
- Comment
- ScriptTag
- Page
- Theme
- Shipping and fulfillment
- CancellationRequest
- CarrierService
- AssignedFulfillmentOrder
- FulfillmentEvent
- Fulfillment
- Retrieves fulfillments associated with an order
- Retrieves fulfillments associated with a fulfillment order
- Retrieves a count of fulfillments associated with a specific order
- Receive a single Fulfillment
- Creates a fulfillment for one or many fulfillment orders
- Updates the tracking information for a fulfillment
- Cancels a fulfillment
- FulfillmentOrder
- Retrieves a list of fulfillment orders for a specific order
- Retrieves a specific fulfillment order
- Cancel a fulfillment order
- Marks a fulfillment order as incomplete
- Moves a fulfillment order to a new location
- Marks the fulfillment order as open
- Reschedules the fulfill_at time of a scheduled fulfillment order
- Applies a fulfillment hold on an open fulfillment order
- Sets deadline for fulfillment orders
- Releases the fulfillment hold on a fulfillment order
- LocationsForMove
- FulfillmentRequest
- FulfillmentService
- Shopify Payments
- Analytics
- Deprecated API calls
- Discounts
- DiscountCode
- Creates a discount code
- Retrieves a list of discount codes
- Updates an existing discount code
- Retrieves a single discount code
- Deletes a discount code
- Retrieves the location of a discount code
- Retrieves a count of discount codes for a shop
- Creates a discount code creation job
- Retrieves a discount code creation job
- Retrieves a list of discount codes for a discount code creation job
- PriceRule
- DiscountCode
- Inventory
- Events
- MarketingEvent
- Metafield
- Plus
- Store properties
- TenderTransaction
Retrieves a single asset for a theme
GET
/admin/api/{api_version}/themes/{theme_id}/assets.json
asset[key]=#{asset_key}
as a request parameter. For example, to retrieve the asset with a key of templates/index.liquid
, the request might be /admin/themes/828155753/assets.json?asset[key]=templates/index.liquid
.key
property, refer to Asset properties.请求参数
Path 参数
api_version
string
必需
theme_id
string
必需
Query 参数
asset[key]
string
必需
fields
string
可选
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request GET 'https://demo.myshopify.com//admin/api//themes//assets.json?asset[key]='
返回响应
🟢200Retrieves a single asset for a theme
application/json
Body
asset
object
可选
key
string
可选
public_url
null
可选
value
string
可选
created_at
string
可选
updated_at
string
可选
content_type
string
可选
size
number
可选
checksum
null
可选
theme_id
number
可选
示例
{
"asset": {
"key": "templates/index.liquid",
"public_url": null,
"value": "<!-- LIST 3 PER ROW -->\n<h2>Featured Products</h2>\n<table id=\"products\" cellspacing=\"0\" cellpadding=\"0\">\n {% tablerow product in collections.frontpage.products cols:3 %}\n <a href=\"{{product.url}}\">{{ product.featured_image | product_img_url: 'small' | img_tag }}</a>\n <h3><a href=\"{{product.url}}\">{{product.title}}</a></h3>\n <ul class=\"attributes\">\n <li><span class=\"money\">{{product.price_min | money}}</span></li>\n </ul>\n {% endtablerow %}\n</table>\n<!-- /LIST 3 PER ROW -->\n\n{{ content_for_index }}\n\n<div id=\"articles\">\n {% assign article = pages.frontpage %}\n <div class=\"article\">\n {% if article.content != \"\" %}\n <h3>{{ article.title }}</h3>\n <div class=\"article-body textile\">\n {{ article.content }}\n </div>\n {% else %}\n <div class=\"article-body textile\">\n In <em>Admin > Blogs & Pages</em>, create a page with the handle <strong><code>frontpage</code></strong> and it will show up here.\n <br />\n {{ \"Learn more about handles\" | link_to \"http://wiki.shopify.com/Handle\" }}\n </div>\n {% endif %}\n </div>\n</div>\n",
"created_at": "2010-07-12T15:31:50-04:00",
"updated_at": "2010-07-12T15:31:50-04:00",
"content_type": "application/x-liquid",
"size": 1068,
"checksum": null,
"theme_id": 828155753
}
}
修改于 2023-01-29 12:00:32