Dosu LogoDosu Logo
Ask
Join our Discord
Organization avatar
BAWES UniversePublic
BAWES Universe
DocumentsBAWES Universe
Plugn Store Data & Item API
Plugn Store Data & Item API
Type
Document
Status
Published
Created
Nov 11, 2025
Updated
Nov 11, 2025
Updated by
Dosu Bot

1. Storage & Backend#

plugn uses a Yii2 backend with MySQL in production. The main store table and model is restaurant, keyed by restaurant_uuid. All shop types, including non-restaurant stores, use the Restaurant model as the central entity for store data. The Restaurant model manages store attributes, relationships to items and categories, and is responsible for store-specific operations and validation.

2. Public Read Endpoints#

List Store Items#

GET https://api.plugn.io/v2/item/items?restaurant_uuid={REST_UUID}&expand=options,itemImage&page=1

This endpoint returns a paginated list of items for a specific store. It is public and does not require authentication.

Important fields in the response include:

  • item_uuid: Unique identifier for the item.
  • restaurant_uuid: Store identifier.
  • item_name: Name of the item (English).
  • item_name_ar: Name of the item (Arabic).
  • item_description: Description (English).
  • item_description_ar: Description (Arabic).
  • item_price: Price of the item.
  • stock_qty: Quantity in stock.
  • item_status: Status of the item (e.g., published).
  • slug: URL-friendly identifier.
  • itemImage.product_file_name: Image file name for the product.

Example request:

GET https://api.plugn.io/v2/item/items?restaurant_uuid=rest_abc123&expand=options,itemImage&page=1

List Store Categories#

GET https://api.plugn.io/v2/item/category-items?restaurant_uuid={REST_UUID}

This endpoint returns the available categories for a store. It is public and does not require authentication. The category_id values from this response are required when creating new items.

Example request:

GET https://api.plugn.io/v2/item/category-items?restaurant_uuid=rest_abc123

3. Write/CRUD Endpoints#

Create Item#

Items are created using:

POST https://api.plugn.io/v2/item

Note: The endpoint is singular (item) because the URL rule has pluralize = false for v2/item.

Authentication is required. Include Authorization: Bearer <token> in the request headers.

Required fields for item creation:

  • restaurant_uuid: The store's unique identifier.
  • item_name: Name of the item (English).
  • items_category: Category ID (from the categories endpoint).
  • prep_time_unit: Preparation time unit (min, hrs, or day).
  • prep_time: Preparation time value (integer).
  • item_price: Price of the item (decimal).
  • If track_quantity is set to 1, then stock_qty (integer) is also required.

Example JSON payload:

{
  "restaurant_uuid": "rest_abc123",
  "item_name": "Classic Burger",
  "items_category": 42,
  "prep_time_unit": "min",
  "prep_time": 15,
  "item_price": 3.99,
  "track_quantity": 1,
  "stock_qty": 50
}

If track_quantity is omitted or set to 0, stock_qty is not required.

Update and Delete Item#

  • Update: PUT or PATCH /v2/item/{item_uuid}
  • Delete: DELETE /v2/item/{item_uuid}

Both endpoints require authentication via Authorization: Bearer <token>.

4. Exporting Products#

Because the GET /v2/item/items endpoint is public, you can export products for a specific store without direct database access. Page through the results using the page parameter (page=1, page=2, etc.), collect the JSON responses, and convert them to CSV for use in migrations (for example, importing into Shopify).

When exporting, note that Arabic text fields (item_name_ar, item_description_ar) may not render correctly in Excel by default. However, if you import the CSV as UTF-8, all characters—including Arabic—will be preserved.


No undocumented endpoints are described here. All information is based on the available API and backend structure.

Documents
Studenthub
API Contracts by Portal (Endpoints + Payloads + Error Codes)
API Contracts – Staff + Candidate Portals (Endpoints + Payload Pointers + Error Handling)
Auth Verification Email Flow – /v1/auth/resend-verification-email
Backend Codebase Tour (studenthub)
Candidate Signup & Email Verification – Frontend to Backend Flow
Database & Domain Model Reference (ERD + Status State Machines)
Email Sending, From Addresses & Providers (StudentHub Backend)
Production Operations & Deployments Runbook
Quickstart (Local Development)
Security, Auth & Permissions (RBAC + Tenant Scoping)
StudentHub Architecture Overview
StudentHub Overview
StudentHub – Complete Services & Infrastructure Map (Org-wide)”
Civil ID Upload Flow
DB, API endpoint, S3, Slack, and payment keys
Plugn Documentation Index (Updated)
Plugn Integrations
Plugn Quickstart (Day 1)
Plugn Repositories – Priority & Status
Plugn Store Data & Item API
Plugn – System Overview & Onboarding
plugn backend – local setup
plugn guide
plugn-dashboard-ionic – Setup & API Config