publishablePublishToCurrentChannel
mutation
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
The resource for which to create or update a publication.
Return
The object representing the user's store.
A list of errors that occurred during execution.
Status and error codes
For detailed information about common codes, see Status and error codes.
Example
Publish resources to the current channel
Code
mutation PublishablePublishToCurrentChannel {
publishablePublishToCurrentChannel(
id: "gid://shopline/Product/16055271775622479314742093"
) {
userErrors {
field
message
}
}
}
Response
{
"data": {
"publishablePublishToCurrentChannel": {
"userErrors": []
}
}
}
Was this article helpful to you?