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
id ● ID!non-null
The resource for which to create or update the publication.
input ● [PublicationInput!]!non-null
Input fields required to specify the resource to be published.
More
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 channels
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?