Requires write_publications access scope.
An access token is required to call this API. Refer to Authorization for more information about how to obtain the token.
Publish a resource to the current channel. When the resource is a product, it becomes visible in the channel only when marked as active. Products sold exclusively by subscription (requiresSellingPlan: true) can only be published to the online store.
Arguments
id ● ID!non-null
The resource for which to create or update a publication.
Return
shop ● Shop!non-null
The object representing the user's store.
More
userErrors ● [UserError!]!non-null
A list of errors that occurred during execution.
More
Status and error codes
For detailed information about common codes, see Status and error codes.
Example
Publish resources to the current channel
mutation PublishablePublishToCurrentChannel {
publishablePublishToCurrentChannel(
id: "gid://shopline/Product/16055271775622479314742093"
) {
userErrors {
field
message
}
}
}
Response
{
"data": {
"publishablePublishToCurrentChannel": {
"userErrors": []
}
}
}
Was this article helpful to you?