publishablePublish
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 a specified channel. Should the resource be a product, it will only be visible in the channel when its status is active.Products sold by subscription only (requiresSellingPlan: true) can only be published to the online store.
Arguments
The resource for which to create or update the publication.
Input fields required to specify the resource to be published.
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 channels
Code
mutation PublishablePublish {
publishablePublish(
id: "gid://shopline/Product/16055271775622479314742093"
input: [
{ publicationId: "gid://shopline/Publication/57843853" }
{ publicationId: "gid://shopline/Publication/57843853" }
]
) {
userErrors {
field
message
}
}
}
Response
{
"data": {
"publicationUpdate": {
"userErrors": []
}
}
}
Was this article helpful to you?