Venddor API - Pages

Content Pages Management

Pages are an essential part of any e-commerce platform, allowing you to create and manage various types of content such as "About Us," "Terms and Conditions," "Privacy Policy," and more. The Pages API allows you to create, retrieve, update, and delete content pages in your Venddor store.

Key Features:

Available Endpoints

GET /pages

Retrieves a list of all content pages in the store.

Query Parameters

Parameter Type Required Description
page_type string No Filter pages by type (e.g., "T" for text pages, "F" for form builder pages, "L" for link pages)
status string No Filter pages by status (e.g., "A" for active, "D" for disabled, "H" for hidden)
q string No Search for pages by name or content
items_per_page integer No Number of items to return per page (default: 10)
page integer No Page number for pagination (default: 1)
{
  "pages": [
    {
      "page_id": "10",
      "company_id": "1",
      "parent_id": "0",
      "page_type": "T",
      "status": "A",
      "position": "0",
      "timestamp": "1617789245",
      "page": "about",
      "page_title": "About Us",
      "description": "Learn more about our company and mission"
    },
    {
      "page_id": "12",
      "company_id": "1",
      "parent_id": "0",
      "page_type": "T",
      "status": "A",
      "position": "10",
      "timestamp": "1617789300",
      "page": "terms",
      "page_title": "Terms and Conditions",
      "description": "Our store terms and conditions"
    }
  ]
}
GET /pages/{page_id}

Retrieves details of a specific content page.

Path Parameters

Parameter Type Required Description
page_id* integer Yes The unique identifier of the page to retrieve
POST /pages

Creates a new content page in the store.

Request Parameters

Parameter Type Required Description
page_title* string Yes The title of the page
page string No The URL-friendly identifier for the page (auto-generated from title if not provided)
page_type string No The type of page: "T" for text (default), "F" for form builder, "L" for link
parent_id integer No ID of the parent page (for hierarchical structure, 0 for top-level)
status string No Page status: "A" for active (default), "D" for disabled, "H" for hidden
description string No Page meta description (for SEO)
content string No HTML content of the page
Request Example
Response Example
{
  "page_title": "Shipping & Delivery",
  "page": "shipping-delivery",
  "page_type": "T",
  "parent_id": "0",
  "status": "A",
  "description": "Information about our shipping and delivery policies",
  "content": "<h1>Shipping & Delivery Policies</h1>\n<p>Our standard shipping time is 2-3 business days...</p>"
}
{
  "page_id": "15",
  "company_id": "1",
  "parent_id": "0",
  "page_type": "T",
  "status": "A",
  "position": "0",
  "timestamp": "1617790100",
  "page": "shipping-delivery",
  "page_title": "Shipping & Delivery",
  "description": "Information about our shipping and delivery policies"
}
PUT /pages/{page_id}

Updates an existing content page.

Path Parameters

Parameter Type Required Description
page_id* integer Yes The unique identifier of the page to update

Request Parameters

You can update any of the page properties. Only include the fields you want to update.

Tip: When updating a page, you only need to include the fields you want to change. Other fields will maintain their existing values.
DELETE /pages/{page_id}

Deletes a content page from the store.

Path Parameters

Parameter Type Required Description
page_id* integer Yes The unique identifier of the page to delete
Caution: Deleting a page is permanent and cannot be undone. Consider setting the page status to "Disabled" instead if you want to temporarily remove it from public view.

Page Types

The following page types are supported:

Type Code Type Name Description
T Text Standard content page with HTML content
F Form Builder Page with an embedded form (requires Form Builder add-on)
L Link External link page that redirects to another URL
B Blog Blog index page (requires Blog add-on)

Page Statuses

The following page statuses are available:

Status Code Status Name Description
A Active Page is active and publicly visible
D Disabled Page is disabled and not visible to customers
H Hidden Page is active but not shown in navigation menus