Returns all policies for the current store (e.g., return policy, privacy policy, terms of service). Policies are managed in Spree Admin and contain rich text content.
import { createClient } from '@spree/sdk'
const client = createClient({
baseUrl: 'https://your-store.com',
publishableKey: '<api-key>',
})
const policies = await client.policies.list(){
"data": [
{
"id": "pol_gbHJdmfrXB",
"name": "Privacy Policy",
"slug": "privacy-policy",
"body": "",
"body_html": ""
},
{
"id": "pol_OIJLhNcSbf",
"name": "Privacy Policy",
"slug": "privacy-policy-e900c731-47af-4aef-b495-58ca93b269c0",
"body": "We respect your privacy.",
"body_html": "<div class=\"trix-content\">\n We respect your privacy.\n</div>\n"
},
{
"id": "pol_uw2YK1rnl0",
"name": "Return Policy",
"slug": "return-policy",
"body": "You can return items within 30 days.",
"body_html": "<div class=\"trix-content\">\n You can return items within 30 days.\n</div>\n"
},
{
"id": "pol_EfhxLZ9ck8",
"name": "Returns Policy",
"slug": "returns-policy",
"body": "",
"body_html": ""
},
{
"id": "pol_VqXmZF31wY",
"name": "Shipping Policy",
"slug": "shipping-policy",
"body": "",
"body_html": ""
},
{
"id": "pol_UkLWZg9DAJ",
"name": "Terms of Service",
"slug": "terms-of-service",
"body": "",
"body_html": ""
}
],
"meta": {
"page": 1,
"limit": 25,
"count": 6,
"pages": 1,
"from": 1,
"to": 6,
"in": 6,
"previous": null,
"next": null
}
}Publishable API key for store access
Comma-separated list of fields to include (e.g., name,slug). id is always included.
policies listed
Show child attributes
Was this page helpful?
import { createClient } from '@spree/sdk'
const client = createClient({
baseUrl: 'https://your-store.com',
publishableKey: '<api-key>',
})
const policies = await client.policies.list(){
"data": [
{
"id": "pol_gbHJdmfrXB",
"name": "Privacy Policy",
"slug": "privacy-policy",
"body": "",
"body_html": ""
},
{
"id": "pol_OIJLhNcSbf",
"name": "Privacy Policy",
"slug": "privacy-policy-e900c731-47af-4aef-b495-58ca93b269c0",
"body": "We respect your privacy.",
"body_html": "<div class=\"trix-content\">\n We respect your privacy.\n</div>\n"
},
{
"id": "pol_uw2YK1rnl0",
"name": "Return Policy",
"slug": "return-policy",
"body": "You can return items within 30 days.",
"body_html": "<div class=\"trix-content\">\n You can return items within 30 days.\n</div>\n"
},
{
"id": "pol_EfhxLZ9ck8",
"name": "Returns Policy",
"slug": "returns-policy",
"body": "",
"body_html": ""
},
{
"id": "pol_VqXmZF31wY",
"name": "Shipping Policy",
"slug": "shipping-policy",
"body": "",
"body_html": ""
},
{
"id": "pol_UkLWZg9DAJ",
"name": "Terms of Service",
"slug": "terms-of-service",
"body": "",
"body_html": ""
}
],
"meta": {
"page": 1,
"limit": 25,
"count": 6,
"pages": 1,
"from": 1,
"to": 6,
"in": 6,
"previous": null,
"next": null
}
}