Publish and add to marketplace
Product publication is a two-step process:
- Publishing - Capture a snapshot of the product and create a stable copy for distribution.
- Adding to the marketplace - Distribute products to a channel such as a marketplace catalog for listing and sale.
You can do this using the two APIs described below.
Publish
important
If you would like to use the product capabilities described here, contact your AppDirect technical representative.
Product publication involves capturing a snapshot of a product at a particular time period, and creating a copy that can be distributed and sold in a marketplace. The publication is an asynchronous process where you first need to trigger the process to get a publication process ID and then query to see the status. After the process is complete, you can add your recently published product to the marketplace.
Trigger publication
Mutation
mutation {
triggerProductPublicationProcess(input: {productIds: ["06ea7f9d-4a1b-4a00-810f-089ac43972e2"]}) {
productPublicationProcesses {
id
productId
}
}
}
Response
{
"data": {
"productPublicationProcesses": {[{
"id": "ce0a5582-2601-4080-b969-99f949492982",
"productId": "06ea7f9d-4a1b-4a00-810f-089ac43972e2"
}]
}
}
}
Publication process status
Query
query {
productPublicationProcess(id: "ce0a5582-2601-4080-b969-99f949492982") {
completedOn
errors {
... on DuplicatePublicationTriggeredError {
__typename
message
}
... on EditionIdMismatchError {
__typename
message
}
}
id
productId
startedOn
status
triggeredOn
}
}
Response
{
"data": {
"productPublicationProcess": {
"completedOn": "2023-09-12T10:00:00Z",
"errors": null,
"id": "ce0a5582-2601-4080-b969-99f949492982",
"productId": "06ea7f9d-4a1b-4a00-810f-089ac43972e2",
"startedOn": "2023-09-12T09:00:00Z",
"status": "PUBLISHED",
"triggeredOn": "2023-09-12T09:00:00Z"
}
}
}