CustomCollections
Query, insert, update, or delete information regarding different custom collections.
Table-Specific Information
Select
The cmdlet uses the Shopify API to process search criteria that refer to the Id, ProductId, Title, Handle, PublishedStatus, UpdatedAt, and PublishedAt columns. The supported SQL operators are 'IN' for Id and Handle, '=' for the ProductId, Title and PublishedStatus columns, '>' and '<' for UpdatedAt and PublishedAt. The cmdlet processes other filters client-side within the cmdlet.For example, the following queries are processed server-side.
SELECT * FROM CustomCollections WHERE Id = '123'
SELECT * FROM CustomCollections WHERE Id IN ('123', '456')
SELECT * FROM CustomCollections WHERE ProductId = '123'
SELECT * FROM CustomCollections WHERE Title = 'Ducks'
SELECT * FROM CustomCollections WHERE Handle = 'frontpage'
SELECT * FROM CustomCollections WHERE Handle IN ('frontpage', 'lastpage')
SELECT * FROM CustomCollections WHERE PublishedStatus = 'published'
SELECT * FROM CustomCollections WHERE UpdatedAt > '2018-05-02'
SELECT * FROM CustomCollections WHERE PublishedAt < '2017-08-15'
Insert
You must specify the Title to create a custom collection.
INSERT INTO CustomCollections (Title) VALUES ('Macbooks')
INSERT INTO CustomCollections (Title, Published) VALUES ('Macbooks', false)
Update
You must specify the custom collection Id to update a custom collection. For example:
UPDATE CustomCollections SET Title = 'Updated title' WHERE Id = '123'
Delete
You must specify the Id of the custom collection to delete it.
DELETE FROM CustomCollections WHERE Id = '123'
Columns
Name | Type | ReadOnly | References | Description |
Id [KEY] | Long | True |
A unique numeric identifier for the custom collection. | |
Title | String | False |
The title of the custom collection. | |
BodyHtml | String | False |
The body/description of the custom collection. | |
Image | String | False |
A JSON aggregate with information regarding the image of custom collection. | |
Metafields | String | False |
Attaches additional metadata to a shop's resources: key: An identifier for the metafield. (maximum: 30 characters), namespace: A container for a set of metadata. Namespaces help distinguish between metadata created by different apps. (maximum: 20 characters), value: Information to be stored as metadata, value_type: The information type being stored. Valid values: string or integer, description (optional): Additional information about the metafield . | |
Handle | String | False |
A human-friendly unique string for the custom collection automatically generated from its title. | |
SortOrder | String | False |
The order in which products in the custom collection appear. | |
TemplateSuffix | String | False |
The suffix of the liquid template being used. | |
PublishedScope | String | False |
The sales channels in which the custom collection is visible. | |
UpdatedAt | Datetime | True |
The date and time when the custom collection was last modified. | |
PublishedAt | Datetime | True |
The date and time when the custom collection was published to the Online Store channel. | |
ProductId | String | False |
Show custom collections that include a given product. | |
PublishedStatus | String | False |
Show custom collection with a given published status: published: show only published custom collections, unpublished: show only unpublished custom collections, any: show custom collections of any published status. (default: any). |