Selling cash on delivery
Store content
The store's details, its policies, content and landing pages, and the checkout order form.
These endpoints need content:read to read and content:write to change.
Store details
PATCH /v1/store changes what Settings → General holds: name, contact (email, phone), address (region, city, street), language (the storefront's: ar, ar-ltr, fr or en), timezone and order_prefix (the start of order numbers, for orders created from now on). GET /v1/store shows them.
Policies
Four policies: returns, shipping, terms and privacy. PUT /v1/policies/{kind} sets one; body is plain text: blank lines separate paragraphs, lines starting with "- " make a list and "## " a heading. A policy with an empty body is never published.
Pages
Content pages (About, Contact, Size guide…) have a body written the same way as a policy. POST /v1/pages creates one as a draft; PATCH with status: "published" puts it live at url. The handle is made from the title when left out, and made unique if it is taken.
Landing pages are designed in the dashboard's page builder. Through the API you can list them, publish or unpublish, rename, change the handle, SEO and footer link, duplicate (a draft copy) and delete them; their body is null.
Order form
GET /v1/order_form lists the checkout form's fields (name, phone, region, city, address, note, email, second phone…), its buttons (cash_on_delivery, pay_card, add_to_cart; pay_card only shows on the storefront while the store has card payment on) and general settings (title, appearance, WhatsApp button…). PATCH changes fields and buttons by id:
{ "fields": [ { "id": "email", "visible": true, "label": "Email" } ], "general": { "appearance": "popup" } }Name, phone, region and city stay visible and required, and one order button (cash_on_delivery or pay_card) stays visible. Delivery choices are in Delivery setup.
