Wocart
Wocart API

Store Pages

Server

List store pages

GET
https://api.wocart.store
/api/store-pages
X-API-Key (header)

Every page — the 4 seeded legal pages plus any custom pages — with per-locale title, source (template/merchant), and last-updated time.

List store pages › Responses

200

List of store pages

success
​boolean · required
​StorePageSummary[] · required
count
​integer · required

Create a custom page

POST
https://api.wocart.store
/api/store-pages
X-API-Key (header)

Create a merchant-authored page (kind=custom) in one locale. Starts as a draft — publish it via PATCH. A taken slug returns 409.

Create a custom page › Request Body

slug
​string · minLength: 3 · maxLength: 60 · pattern: ^[a-z0-9]+(?:-[a-z0-… · required
locale
​string · enum · required
Enum values:
ar
fr
en
title
​string · minLength: 1 · maxLength: 200 · required
bodyHtml
​string · minLength: 1 · required
metaTitle
​string | null · maxLength: 200
metaDescription
​string | null · maxLength: 300
showInFooter
​boolean
position
​integer · min: 0

Create a custom page › Responses

Custom page created (draft)

success
​boolean · required
​StorePageDetail · required

GET
https://api.wocart.store
/api/store-pages/legal-profile
X-API-Key (header)

The merchant facts (RC/NIF, contact, return and delivery windows) substituted into the legal templates. Never null-guarded on the client — an unset store returns an all-null row shape.

200

The legal profile, or null if never set

success
​boolean · required
data
​StoreLegalProfile · required

PUT
https://api.wocart.store
/api/store-pages/legal-profile
X-API-Key (header)

Partial update — send only the fields you want to change. Filling in a fact here does NOT retroactively edit already-seeded pages; use the reset endpoint per page to re-apply the template with the new facts.

legalName
​string | null · maxLength: 200
rcNumber
​string | null · maxLength: 60
nif
​string | null · maxLength: 60
address
​string | null · maxLength: 500
contactEmail
​string | null · email · maxLength: 200
contactPhone
​string | null · maxLength: 40
returnWindowDays
​integer · min: 0 · max: 90
deliveryMinDays
​integer · min: 0 · max: 60
deliveryMaxDays
​integer · min: 0 · max: 60
200

Saved legal profile

success
​boolean · required
data
​StoreLegalProfile · required

POST
https://api.wocart.store
/api/store-pages/seed-defaults
X-API-Key (header)

Creates whichever of Terms/Privacy/Refund/Shipping this store does not already have. Idempotent — safe to call repeatedly; returns which kinds were newly created (empty array when all 4 already exist).

200

Which kinds were created

success
​boolean · required
​object · required

Get store page

GET
https://api.wocart.store
/api/store-pages/{id}
X-API-Key (header)

Full page detail: settings and the complete body for every locale that has been saved.

Get store page › path Parameters

id
​string · required

Store Page UUID

Store Page UUID

Get store page › Responses

200

Store page detail

success
​boolean · required
​StorePageDetail · required

Update store page settings

PATCH
https://api.wocart.store
/api/store-pages/{id}
X-API-Key (header)

Partial update of slug, publish status, footer visibility, and footer position. To edit the page's words, use the translation endpoints. A taken slug returns 409.

Update store page settings › path Parameters

id
​string · required

Store Page UUID

Store Page UUID

Update store page settings › Request Body

slug
​string · minLength: 3 · maxLength: 60 · pattern: ^[a-z0-9]+(?:-[a-z0-…
status
​string · enum
Enum values:
published
draft
showInFooter
​boolean
position
​integer · min: 0

Update store page settings › Responses

200

Store page updated

success
​boolean · required
​StorePageDetail · required

Delete a custom page

DELETE
https://api.wocart.store
/api/store-pages/{id}
X-API-Key (header)

Permanently delete a custom page. A legal page (terms/privacy/refund/shipping) cannot be deleted — unpublish it instead (PATCH status=draft). Refused with STORE_PAGE_CANNOT_DELETE_LEGAL otherwise.

Delete a custom page › path Parameters

id
​string · required

Store Page UUID

Store Page UUID

Delete a custom page › Responses

Page deleted

success
​boolean · required

Save a page's translation

PUT
https://api.wocart.store
/api/store-pages/{id}/translations/{locale}
X-API-Key (header)

Save this page's title and body in one locale. The body is sanitised server-side (the same allow-list used for product descriptions) before it is stored — this is the only way to write a page's content. Marks this locale as merchant-reviewed (source=merchant).

Save a page's translation › path Parameters

id
​string · required

Store Page UUID

Store Page UUID

locale
​string · enum · required
Enum values:
ar
fr
en

Save a page's translation › Request Body

title
​string · minLength: 1 · maxLength: 200 · required
bodyHtml
​string · minLength: 1 · required
metaTitle
​string | null · maxLength: 200
metaDescription
​string | null · maxLength: 300

Save a page's translation › Responses

200

Saved translation

success
​boolean · required
​StorePageTranslationBody · required

Reset a translation to the Wocart template

POST
https://api.wocart.store
/api/store-pages/{id}/translations/{locale}/reset
X-API-Key (header)

Discards whatever is currently saved for this locale and re-renders it from the current legal template and this store's legal profile. Only legal kinds have a template — called on a custom page it is refused with STORE_PAGE_NOT_LEGAL.

Reset a translation to the Wocart template › path Parameters

id
​string · required

Store Page UUID

Store Page UUID

locale
​string · enum · required
Enum values:
ar
fr
en

Reset a translation to the Wocart template › Responses

Re-seeded translation

success
​boolean · required
​StorePageTranslationBody · required