Publish
Publish built campaigns and pages to make them live on your storefront. Requires a prior successful build.
Returns the currently published version of an offer, add-on, or discount. Responds with 404 if the item is not currently published. Use this to check whether an item is live and which version is published before publishing again.
OAuth 2.0 Bearer token for authenticated API access. Required for order submission, object management, and administrative operations.
Obtain a token via the OAuth flow described in OAuth Bearer Token.
Pass the token in the Authorization header: Bearer <token>
The type of catalog item to publish. Publishable types are offers (offers), add-ons (add_ons), discounts (discounts), and agents (agents). Note the URL segment for offers is offers, while the offer's catalog path uses the /offers2/ prefix (see the request body below).
offersPossible values: The catalog item's unique id (the id field on the offer, add-on, or discount).
abcxyz123456The published version record for the item.
No content
Unauthorized: the request lacks valid authentication credentials. This response is returned by the API gateway before the request reaches the application. Verify your Bearer token is correct and has not expired.
The item is not currently published.
GET /api/objects/limio/{path_type}/{id}/published HTTP/1.1
Host: your-environment.prod.limio.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Publishes an offer, add-on, or discount directly, making the new version immediately live in Limio for Salesforce, upgrade and downgrade options, cross-sells and upsells, and purchase links. (Shop pages still require a page rebuild and republish for changes to appear.)
If you do not hold the id, GET /api/catalog_items answers it for every item of a record type.
There are two ways to publish:
Recommended — publish from the catalog. Send
path(the item's catalog path) together withexpectedVersion(the version you last saved). Limio reads the item from the catalog atpath, checks it still matchesexpectedVersion, and publishes exactly that content. If the item changed since you saved it (someone else saved in between), the request fails with409so you never publish content you have not reviewed.Publish a known version directly. Send
versionalone to publish an existing version record whose content you already vouch for.
Provide either path + expectedVersion, or version — not both.
OAuth 2.0 Bearer token for authenticated API access. Required for order submission, object management, and administrative operations.
Obtain a token via the OAuth flow described in OAuth Bearer Token.
Pass the token in the Authorization header: Bearer <token>
The type of catalog item to publish. Publishable types are offers (offers), add-ons (add_ons), discounts (discounts), and agents (agents). Note the URL segment for offers is offers, while the offer's catalog path uses the /offers2/ prefix (see the request body below).
offersPossible values: The catalog item's unique id (the id field on the offer, add-on, or discount).
abcxyz123456The catalog path of the item to publish. Offers use the /offers2/ prefix, add-ons /add_ons/, and discounts /discounts/. Must be sent together with expectedVersion.
/offers2/UK Annual MembershipThe version (content hash) you last saved. The publish fails with 409 if the item's current version no longer matches. Required when path is provided.
4dd34671f26fdbbf240560b78f7f2f54654cde72Publish an existing version record directly, by its version hash. Use this instead of path + expectedVersion.
4dd34671f26fdbbf240560b78f7f2f54654cde72The item was published.
Indicates whether the publish or unpublish operation succeeded.
trueBad request — for example the item at path does not have the given id, is not the expected type, or a publish rule failed (for instance a discount whose linked Stripe coupon is out of sync).
Unauthorized: the request lacks valid authentication credentials. This response is returned by the API gateway before the request reaches the application. Verify your Bearer token is correct and has not expired.
The item changed since it was last saved. Reload it, review the changes, and save before publishing.
Bad Gateway — an upstream service returned an unexpected response. This typically indicates an issue with the request payload (e.g. invalid field values, missing required fields) or a transient infrastructure error. Retry the request, and if the issue persists, verify the request body matches the expected schema.
PUT /api/objects/limio/{path_type}/{id}/published HTTP/1.1
Host: your-environment.prod.limio.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 154
{
"path": "/offers2/UK Annual Membership",
"expectedVersion": "4dd34671f26fdbbf240560b78f7f2f54654cde72",
"version": "4dd34671f26fdbbf240560b78f7f2f54654cde72"
}{
"success": true
}Unpublishes an offer, add-on, or discount, removing its published version so it is no longer live.
OAuth 2.0 Bearer token for authenticated API access. Required for order submission, object management, and administrative operations.
Obtain a token via the OAuth flow described in OAuth Bearer Token.
Pass the token in the Authorization header: Bearer <token>
The type of catalog item to publish. Publishable types are offers (offers), add-ons (add_ons), discounts (discounts), and agents (agents). Note the URL segment for offers is offers, while the offer's catalog path uses the /offers2/ prefix (see the request body below).
offersPossible values: The catalog item's unique id (the id field on the offer, add-on, or discount).
abcxyz123456The item was unpublished.
Indicates whether the publish or unpublish operation succeeded.
trueUnauthorized: the request lacks valid authentication credentials. This response is returned by the API gateway before the request reaches the application. Verify your Bearer token is correct and has not expired.
Bad Gateway — an upstream service returned an unexpected response. This typically indicates an issue with the request payload (e.g. invalid field values, missing required fields) or a transient infrastructure error. Retry the request, and if the issue persists, verify the request body matches the expected schema.
DELETE /api/objects/limio/{path_type}/{id}/published HTTP/1.1
Host: your-environment.prod.limio.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"success": true
}This API allows you to publish campaigns and pages in Limio. You can use this API to publish campaigns and pages to make them live on your website. This can be useful for activities such as launching new products, promoting sales, or creating seasonal campaigns.
OAuth 2.0 Bearer token for authenticated API access. Required for order submission, object management, and administrative operations.
Obtain a token via the OAuth flow described in OAuth Bearer Token.
Pass the token in the Authorization header: Bearer <token>
The list of campaigns and pages to publish
["/tags/uk-uk/default"]The build ID of the campaigns and pages to publish
build-shard-shop:b83ee127-2301-4358-b993-cb3d7f009718The name of one of the campaigns / pages to be published
DefaultOK
Indicates whether the operation was successful
trueBad Request - the body is missing one of the required properties tags, buildId or name
Unauthorized: the request lacks valid authentication credentials. This response is returned by the API gateway before the request reaches the application. Verify your Bearer token is correct and has not expired.
Bad Gateway — an upstream service returned an unexpected response. This typically indicates an issue with the request payload (e.g. invalid field values, missing required fields) or a transient infrastructure error. Retry the request, and if the issue persists, verify the request body matches the expected schema.
POST /api/publish HTTP/1.1
Host: your-environment.prod.limio.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 115
{
"tags": [
"/tags/uk-uk/default"
],
"buildId": "build-shard-shop:b83ee127-2301-4358-b993-cb3d7f009718",
"name": "Default"
}{
"success": true,
"publishedData": {
"pages": {
"/default/": [
{
"path": "/default/",
"isDefault": true,
"pathPrefix": "/__v/956ec1a_1712754608",
"type": "page",
"codebuildId": "build-shard-shop:b83ee127-2301-4358-b993-cb3d7f009718",
"buildDate": "2024-04-10T13:11:05.534Z",
"name": "Campaign",
"publishedDate": "2024-04-10T13:13:05.081Z",
"userName": "user@limio.com"
}
],
"/checkout/": [
{
"path": "/checkout/",
"isDefault": false,
"pathPrefix": "/__v/4b09596_1712311159",
"type": "page",
"codebuildId": "build-shard-shop:b83ee127-2301-4358-b993-cb3d7f009718",
"buildDate": "2024-04-05T10:00:39.455Z",
"name": "Checkout",
"publishedDate": "2024-04-05T10:01:07.401Z",
"userName": "user@limio.com"
}
]
}
},
"ommitedWithError": {
"pages": {}
}
}Last updated
Was this helpful?

