Refresh the promotions cache
POST
/api/v3/promotions/actions/refresh-cache
const url = 'https://api.tryletterhead.com/api/v3/promotions/actions/refresh-cache?api=true';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"companyId":1234}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://api.tryletterhead.com/api/v3/promotions/actions/refresh-cache?api=true' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "companyId": 1234 }'Force a refresh of the internal promotions cache that List promotions by date reads from.
On a shared (multi-tenant) deployment, a super admin must pass companyId to target a specific
virtual company; a company admin refreshing their own company’s cache omits it.
v3 endpoints expect a company API key.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” api
required
boolean
When set to true, the endpoint accepts authorization with your API Key.
Request Body
Section titled “Request Body ” Media type application/json
object
companyId
Shared-tenant only. The virtual company to refresh. Required for a super admin; omit to refresh your own company’s cache.
integer
Example
{ "companyId": 1234}Responses
Section titled “ Responses ”200 OK
Media type application/json
object
items
object
message
string
message
string
total
integer
Example
{ "items": { "message": "Company promotions cache refreshed" }, "message": "Company promotions cache refreshed", "total": 10}Still can’t find what you need? Contact support.