Publishes a catalog
Publishes a catalog. You must publish a catalog before you can retrieve that catalog in an organization or store. The hierarchies, live products, and prices associated with a published catalog are in read-only mode. If you make a change to these resources, for example, a change to your price book or hierarchies, you need to republish the catalog.
You can get a catalog release to retrieve a published catalog. A new catalog keeps two published releases. Set max_published_releases to 1, 2, or 3. A catalog that has never stored max_published_releases keeps the current release and two releases prior to the current release.
You can see the differences between the last 2 consecutive catalog releases. This is useful if want to understand how your products have changed in your catalog, ensuring your site search integration is kept up-to-date.
Once a catalog release has completed publishing, the delta relationship links to the delta document.
The delta links are signed and only valid for 1 hour. Re-reading a catalog release, for example, using Getting a release of a catalog returns a fresh a link.
You can use the is_full_delta attribute returned from the get a release of a catalog endpoint to determine if you need to refresh the data in your company system before injecting fresh data in a delta link. The is_full_delta attribute tells you if this is a full publish of the catalog. Using a search service as an example, if the is_full_delta attribute is true, you should remove all data about that catalog from the search service before injecting fresh data from the delta file. If the is_full_delta attribute is false, then data from the previous catalog overlays the existing data in the delta file. To publish a catalog and inject fresh data in a delta link, set export_full_delta to true.
If a previous catalog publish date is greater than 90 days, then a full catalog publish is automatically performed. If you publish your catalogs infrequently, Commerce may perform a full publish when you are expecting a delta publish.
:::caution
Generating a full delta is resource intensive and slows down the publishing process and so should only be performed in certain circumstances, for example, when initializing an integration with a service like Algolia.
:::
The is_full_delta attribute is always true the first time a catalog is published. The information is stored in a collection of json documents in a compressed file. You can either manually check the file or, for example, use them to automatically update another company system you may have.
- Delta files are only available for 30 days.
- Delta files are removed when a catalog release is deleted.
Each document has a delta_type with one of the following values, depending on whether a product has been deleted, updated or created in a catalog release.
- delete describes products deleted from this release of a catalog.
- createupdate describes products updated in this release of a catalog.
Multi-Store Management Solutions
In a multi-store management solution.
- You can create organization catalogs. Your organization catalogs are available for your stores to use.
- Your stores can create their own catalogs.
- Your stores can create catalogs that have a combination of organization products and store products.
If you are publishing a catalog in a store that contains resources from an organization, in Commerce Manager, you must enable the Include Organization Resources in Catalog Publishes checkbox.
- Go to SYSTEM > Store Settings.
- Click General Settings.
- Select PXM from the list.
- Select the Include Organization Resources in Catalog Publishes checkbox.
Request
- Base URLhttps://euwest.api.elasticpath.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
The catalog ID.
Request body
Response
Publishes a catalog release with the following attributes.
Example response
{
"data": {
"id": "8dbb35b2-ef04-477e-974d-e5f3abe6faae",
"attributes": {
"name": "Clothing",
"published_at": "1970-01-01T00:00:00.000",
"catalog_id": "0194f54d-f2a1-4e33-9a6e-9ec366152490",
"description": "Catalog for Store 123",
"hierarchies": [
{
"id": "65477ce0-fcb8-436b-a120-3d57979421dd",
"label": "category",
"name": "Formal dresswear"
}
]
},
"meta": {
"created_at": "1970-01-01T00:00:00.000",
"started_at": "1970-01-01T00:00:00.000",
"updated_at": "1970-01-01T00:00:00.000",
"language": "en-GB"
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.