{ "openapi": "3.2.0", "info": { "title": "Bagisto Admin API", "description": "Bagisto Admin API - Administrative operations for store management and configuration.", "contact": { "name": "", "url": "", "email": "" }, "license": { "name": "", "url": "" }, "version": "2.4.10" }, "servers": [ { "url": "{url}/api/admin", "description": "Bagisto Admin API", "variables": { "url": { "default": "http://localhost:8000", "description": "Base URL of your Bagisto installation." } } } ], "paths": { "/appearance/sections/reorder": { "post": { "operationId": "api_apiadminappearancesectionsreorder_post", "tags": [ "Admin Appearance: Sections" ], "responses": { "200": { "description": "Order staged.", "content": { "application/json": { "example": { "sectionIds": [ 5, 3, 2 ], "hasDraft": { "5": true, "3": true, "2": true }, "message": "Section order staged successfully." } } } }, "422": { "description": "Missing or unknown section IDs.", "links": [] }, "201": { "description": "AdminAppearanceSectionReorder resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminAppearanceSectionReorder" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminAppearanceSectionReorder.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Stage a new section order", "description": "Stage a new section order", "parameters": [], "requestBody": { "description": "Every section of the theme and channel, in the order they should render. A partial list is rejected, because the sections left out would be renumbered over the ones sent. Read the current set from GET /appearance/themes/{code}/sections first. The footer is pinned last whatever position it is given.", "content": { "application/json": { "schema": { "type": "object", "required": [ "sectionIds" ], "properties": { "sectionIds": { "type": "array", "items": { "type": "integer" }, "description": "Every section id of the theme and channel." } } }, "example": { "sectionIds": [ 5, 3, 2, 1, 4, 6 ] } } }, "required": true } } }, "/appearance/sections/{id}": { "get": { "operationId": "api_apiadminappearancesections_id_get", "tags": [ "Admin Appearance: Sections" ], "responses": { "200": { "description": "The section.", "content": { "application/json": { "example": { "id": 3, "name": "Categories Collections", "type": "category_carousel", "themeCode": "default", "channelId": 1, "sortOrder": 3, "status": 1, "draftStatus": null, "draftSortOrder": null, "hasDraft": false, "isPinned": false, "createdAt": "2024-04-16T21:44:15+05:30", "updatedAt": "2026-08-21T18:05:39+05:30", "translations": [ { "locale": "en", "options": { "filters": { "sort": "asc", "limit": "10" } }, "draftOptions": null } ], "message": null } } } }, "404": { "description": "Section not found." } }, "summary": "Get a section", "description": "Get a section", "parameters": [ { "name": "id", "in": "path", "description": "Section ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadminappearancesections_id_put", "tags": [ "Admin Appearance: Sections" ], "responses": { "200": { "description": "Section updated.", "content": { "application/json": { "example": { "id": 12, "name": "Summer Banner", "type": "image_carousel", "themeCode": "default", "channelId": 1, "sortOrder": 2, "status": 1, "draftStatus": true, "draftSortOrder": null, "hasDraft": false, "isPinned": false, "createdAt": "2026-08-21T18:05:39+05:30", "updatedAt": "2026-08-21T18:05:39+05:30", "translations": [ { "locale": "en", "options": { "images": [] }, "draftOptions": null } ], "message": "Section updated successfully." } } }, "links": [] }, "404": { "description": "Section not found." }, "422": { "description": "Invalid payload, or a second footer links section.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Update a section", "description": "Writes the published values of a section. Send `options` with `?locale=` to write that locale's published content; use the draft endpoint to stage edits instead.", "parameters": [ { "name": "id", "in": "path", "description": "Section ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false }, { "name": "locale", "in": "query", "description": "Locale the options belong to", "required": false, "deprecated": false, "schema": { "type": "string", "example": "en" }, "style": "form", "explode": true } ], "requestBody": { "description": "The updated AdminAppearanceSection resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "name", "type", "sortOrder", "channelId", "themeCode" ], "properties": { "name": { "type": "string", "example": "Summer Banner" }, "type": { "type": "string", "enum": [ "image_carousel", "product_carousel", "category_carousel", "footer_links", "static_content", "services_content" ], "example": "image_carousel" }, "sortOrder": { "type": "integer", "example": 2 }, "channelId": { "type": "integer", "example": 1 }, "themeCode": { "type": "string", "example": "default" }, "status": { "type": "boolean", "example": true }, "options": { "type": "object", "example": { "images": [] } } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminappearancesections_id_delete", "tags": [ "Admin Appearance: Sections" ], "responses": { "204": { "description": "Section deleted." }, "404": { "description": "Section not found." } }, "summary": "Delete a section", "description": "Delete a section", "parameters": [ { "name": "id", "in": "path", "description": "Section ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ] } }, "/appearance/sections/{id}/draft": { "post": { "operationId": "api_apiadminappearancesections_iddraft_post", "tags": [ "Admin Appearance: Sections" ], "responses": { "200": { "description": "Draft saved.", "content": { "application/json": { "example": { "sectionId": 3, "locale": "en", "hasDraft": true } } } }, "404": { "description": "Section not found." }, "422": { "description": "Options missing.", "links": [] }, "201": { "description": "AdminAppearanceSectionDraft resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminAppearanceSectionDraft" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminAppearanceSectionDraft.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Stage edits for a section", "description": "Holds the options as an unpublished draft for the locale. The storefront keeps drawing the published values until the theme is published.", "parameters": [ { "name": "id", "in": "path", "description": "Section ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false }, { "name": "locale", "in": "query", "description": "Locale the options belong to", "required": false, "deprecated": false, "schema": { "type": "string", "example": "en" }, "style": "form", "explode": true } ], "requestBody": { "description": "The new AdminAppearanceSectionDraft resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "options" ], "properties": { "options": { "type": "object", "example": { "title": "Summer Sale" } } } } } }, "required": true } } }, "/appearance/sections/{id}/duplicate": { "post": { "operationId": "api_apiadminappearancesections_idduplicate_post", "tags": [ "Admin Appearance: Sections" ], "responses": { "200": { "description": "Section copied.", "content": { "application/json": { "example": { "sourceId": 3, "sectionId": 12, "name": "Categories Collections (copy)", "type": "category_carousel", "message": "Section copied successfully." } } } }, "404": { "description": "Section not found." }, "201": { "description": "AdminAppearanceSectionDuplicate resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminAppearanceSectionDuplicate" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminAppearanceSectionDuplicate.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Copy a section", "description": "Copies a section and its content into the same theme and channel. The copy is created switched off. Read the copy back with the section endpoint.", "parameters": [ { "name": "id", "in": "path", "description": "Section ID to copy", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ], "requestBody": { "description": "No fields. The section to copy is the one in the path.", "content": { "application/json": { "schema": { "type": "object", "properties": [] } } }, "required": false } } }, "/appearance/sections/{id}/fields": { "get": { "operationId": "api_apiadminappearancesections_idfields_get", "tags": [ "Admin Appearance: Sections" ], "responses": { "200": { "description": "Schema and current options.", "content": { "application/json": { "example": { "sectionId": 3, "type": "category_carousel", "locale": "en", "schema": [ { "name": "title", "type": "text", "label": "Title" } ], "options": { "title": "Shop by category" } } } } }, "404": { "description": "Section not found." } }, "summary": "Get the editable fields of a section", "description": "Returns the schema for the section's type and the options it currently holds — staged edits when there are any, otherwise the published values.", "parameters": [ { "name": "id", "in": "path", "description": "Section ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false }, { "name": "locale", "in": "query", "description": "Locale the options are read in", "required": false, "deprecated": false, "schema": { "type": "string", "example": "en" }, "style": "form", "explode": true } ] } }, "/appearance/sections/{id}/media": { "post": { "operationId": "api_apiadminappearancesections_idmedia_post", "tags": [ "Admin Appearance: Sections" ], "responses": { "201": { "description": "Media stored.", "content": { "application/json": { "example": { "sectionId": 3, "path": "storage/theme/3/banner.webp", "type": "image" } } }, "links": [] }, "404": { "description": "Section not found." }, "422": { "description": "No file supplied.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Upload media for a section", "description": "Stores one image or video against the section and returns the path to record in its options.", "parameters": [ { "name": "id", "in": "path", "description": "Section ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminAppearanceSectionMedia resource", "content": { "multipart/form-data": { "schema": { "type": "object", "required": [ "file" ], "properties": { "file": { "type": "string", "format": "binary" } } } } }, "required": true } } }, "/appearance/sections/{id}/status": { "post": { "operationId": "api_apiadminappearancesections_idstatus_post", "tags": [ "Admin Appearance: Sections" ], "responses": { "200": { "description": "Status staged.", "content": { "application/json": { "example": { "sectionId": 3, "draftStatus": true, "hasDraft": true } } } }, "404": { "description": "Section not found." }, "201": { "description": "AdminAppearanceSectionStatus resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminAppearanceSectionStatus" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminAppearanceSectionStatus.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Stage a section on/off", "description": "Stage a section on/off", "parameters": [ { "name": "id", "in": "path", "description": "Section ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminAppearanceSectionStatus resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "status" ], "properties": { "status": { "type": "boolean", "example": true } } } } }, "required": true } } }, "/appearance/themes/{code}/sections": { "get": { "operationId": "api_apiadminappearancethemes_codesections_get_collection", "tags": [ "Admin Appearance: Sections" ], "responses": { "200": { "description": "Sections of the theme.", "content": { "application/json": { "example": { "data": [ { "id": 3, "name": "Categories Collections", "type": "category_carousel", "themeCode": "default", "channelId": 1, "sortOrder": 3, "status": 1, "draftStatus": null, "draftSortOrder": null, "hasDraft": false, "isPinned": false, "createdAt": "2024-04-16T21:44:15+05:30", "updatedAt": "2026-08-21T18:05:39+05:30", "translations": [ { "locale": "en", "options": { "filters": { "sort": "asc", "limit": "10" } }, "draftOptions": null } ] } ], "meta": { "total": 1 } } } } }, "404": { "description": "Theme not installed." } }, "summary": "List the sections of a theme", "description": "Sections of the given theme for one channel, in render order with footer links pinned last. Scope with `?channel=` and `?locale=`; both fall back the way the appearance editor does.", "parameters": [ { "name": "code", "in": "path", "description": "Theme code", "required": true, "deprecated": false, "schema": { "type": "string", "example": "default" }, "style": "simple", "explode": false }, { "name": "channel", "in": "query", "description": "Channel ID (defaults to the current channel)", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "locale", "in": "query", "description": "Locale code the options are read in", "required": false, "deprecated": false, "schema": { "type": "string", "example": "en" }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadminappearancethemes_codesections_post", "tags": [ "Admin Appearance: Sections" ], "responses": { "201": { "description": "Section created.", "content": { "application/json": { "example": { "id": 12, "name": "Summer Banner", "type": "image_carousel", "themeCode": "default", "channelId": 1, "sortOrder": 4, "status": 0, "draftStatus": true, "draftSortOrder": null, "hasDraft": true, "isPinned": false, "createdAt": "2026-08-21T18:05:39+05:30", "updatedAt": "2026-08-21T18:05:39+05:30", "translations": [ { "locale": "en", "options": { "images": [] }, "draftOptions": null } ], "message": "Section created successfully." } } }, "links": [] }, "422": { "description": "Invalid type, or the channel already has a footer links section.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create a section", "description": "Creates a section against the theme and channel the request is scoped to. It is created switched off with a pending status draft, exactly as the appearance editor does, so an empty section is never put in front of shoppers before it is built.", "parameters": [ { "name": "code", "in": "path", "description": "Theme code", "required": true, "deprecated": false, "schema": { "type": "string", "example": "default" }, "style": "simple", "explode": false }, { "name": "channel", "in": "query", "description": "Channel ID (defaults to the current channel)", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true } ], "requestBody": { "description": "The new AdminAppearanceSection resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "name", "type" ], "properties": { "name": { "type": "string", "example": "Summer Banner" }, "type": { "type": "string", "enum": [ "image_carousel", "product_carousel", "category_carousel", "footer_links", "static_content", "services_content" ], "example": "image_carousel" } } } } }, "required": true } } }, "/appearance/themes/{code}/sections/discard": { "post": { "operationId": "api_apiadminappearancethemes_codesectionsdiscard_post", "tags": [ "Admin Appearance: Sections" ], "responses": { "200": { "description": "Staged edits discarded.", "content": { "application/json": { "example": { "themeCode": "default", "channelId": 1, "sectionIds": [ 3, 5 ], "message": "Section changes discarded successfully." } } } }, "404": { "description": "Theme not installed." }, "201": { "description": "AdminAppearanceSectionDiscard resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminAppearanceSectionDiscard" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminAppearanceSectionDiscard.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Discard staged section edits", "description": "Discard staged section edits", "parameters": [ { "name": "code", "in": "path", "description": "Theme code", "required": true, "deprecated": false, "schema": { "type": "string", "example": "default" }, "style": "simple", "explode": false }, { "name": "channel", "in": "query", "description": "Channel ID (defaults to the current channel)", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true } ], "requestBody": { "description": "Optional. The channel to act on; the current channel is used when it is omitted.", "content": { "application/json": { "schema": { "type": "object", "properties": { "channel": { "type": "integer", "example": 1 } } }, "example": { "channel": 1 } } }, "required": false } } }, "/appearance/themes/{code}/sections/preview": { "get": { "operationId": "api_apiadminappearancethemes_codesectionspreview_get", "tags": [ "Admin Appearance: Sections" ], "responses": { "200": { "description": "The drafted sections.", "content": { "application/json": { "example": { "themeCode": "default", "channelId": 1, "locale": "en", "sections": [ { "id": 3, "name": "Categories Collections", "type": "category_carousel", "sortOrder": 1, "status": true, "hasDraft": true, "options": { "title": "Shop by category" } } ] } } } }, "404": { "description": "Theme not installed." } }, "summary": "Preview a theme with staged edits applied", "description": "The sections a channel would draw if the staged edits were published: draft options replace published ones, draft status and order are applied, sections switched off are left out, and footer links stay last.", "parameters": [ { "name": "code", "in": "path", "description": "Theme code", "required": true, "deprecated": false, "schema": { "type": "string", "example": "default" }, "style": "simple", "explode": false }, { "name": "channel", "in": "query", "description": "Channel ID (defaults to the current channel)", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "locale", "in": "query", "description": "Locale the options are read in", "required": false, "deprecated": false, "schema": { "type": "string", "example": "en" }, "style": "form", "explode": true } ] } }, "/appearance/themes/{code}/sections/publish": { "post": { "operationId": "api_apiadminappearancethemes_codesectionspublish_post", "tags": [ "Admin Appearance: Sections" ], "responses": { "200": { "description": "Staged edits published.", "content": { "application/json": { "example": { "themeCode": "default", "channelId": 1, "sectionIds": [ 3, 5 ], "message": "Section changes published successfully." } } } }, "404": { "description": "Theme not installed." }, "201": { "description": "AdminAppearanceSectionPublish resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminAppearanceSectionPublish" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminAppearanceSectionPublish.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Publish staged section edits", "description": "Publish staged section edits", "parameters": [ { "name": "code", "in": "path", "description": "Theme code", "required": true, "deprecated": false, "schema": { "type": "string", "example": "default" }, "style": "simple", "explode": false }, { "name": "channel", "in": "query", "description": "Channel ID (defaults to the current channel)", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true } ], "requestBody": { "description": "Optional. The channel to act on; the current channel is used when it is omitted.", "content": { "application/json": { "schema": { "type": "object", "properties": { "channel": { "type": "integer", "example": 1 } } }, "example": { "channel": 1 } } }, "required": false } } }, "/appearance/themes": { "get": { "operationId": "api_apiadminappearancethemes_get_collection", "tags": [ "Admin Appearance: Themes" ], "responses": { "200": { "description": "The theme gallery.", "content": { "application/json": { "example": [ { "code": "default", "name": "Default", "author": "Bagisto", "version": "2.4.10", "url": null, "demoUrl": null, "screenshot": "http://localhost:8000/themes/admin/default/images/default.png", "rating": null, "tags": [], "description": "The theme Bagisto ships with.", "isInstalled": true, "status": "active", "activeOn": [ { "id": 1, "name": "Default" } ] } ] } } } }, "summary": "List themes", "description": "Every theme this installation knows about — installed ones and the ones available to install — with the channels each is active on. Active themes come first.", "parameters": [] } }, "/appearance/themes/{code}": { "get": { "operationId": "api_apiadminappearancethemes_code_get", "tags": [ "Admin Appearance: Themes" ], "responses": { "200": { "description": "The theme.", "content": { "application/json": { "example": { "code": "default", "name": "Default", "author": "Bagisto", "version": "2.4.10", "url": null, "demoUrl": null, "screenshot": "http://localhost:8000/themes/admin/default/images/default.png", "rating": null, "tags": [], "description": "The theme Bagisto ships with.", "isInstalled": true, "status": "active", "activeOn": [ { "id": 1, "name": "Default" } ] } } } }, "404": { "description": "Theme not found." } }, "summary": "Get a theme", "description": "Get a theme", "parameters": [ { "name": "code", "in": "path", "description": "Theme code", "required": true, "deprecated": false, "schema": { "type": "string", "example": "default" }, "style": "simple", "explode": false } ] } }, "/appearance/themes/{code}/activate": { "post": { "operationId": "api_apiadminappearancethemes_codeactivate_post", "tags": [ "Admin Appearance: Themes" ], "responses": { "200": { "description": "Theme activated.", "content": { "application/json": { "example": { "code": "default", "activatedOn": [ { "id": 1, "name": "Default" } ], "message": "Theme activated successfully." } } } }, "404": { "description": "Theme not found or not installed." }, "422": { "description": "Missing or unknown channel IDs.", "links": [] }, "201": { "description": "AdminAppearanceThemeActivate resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminAppearanceThemeActivate" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminAppearanceThemeActivate.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Activate a theme on channels", "description": "Points the given channels at the theme. Sections belonging to a channel's previous theme are left in place but stop being drawn — call the impact endpoint first to see what that affects.", "parameters": [ { "name": "code", "in": "path", "description": "Theme code", "required": true, "deprecated": false, "schema": { "type": "string", "example": "default" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminAppearanceThemeActivate resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "channelIds" ], "properties": { "channelIds": { "type": "array", "items": { "type": "integer" }, "example": [ 1 ] } } } } }, "required": true } } }, "/appearance/themes/{code}/impact": { "get": { "operationId": "api_apiadminappearancethemes_codeimpact_get", "tags": [ "Admin Appearance: Themes" ], "responses": { "200": { "description": "The impact report.", "content": { "application/json": { "example": { "code": "velocity", "impact": [ { "channelId": 1, "channel": "Default", "currentTheme": "Default", "customizations": 6 } ] } } } }, "404": { "description": "Theme not found." }, "422": { "description": "Missing or unknown channel IDs." } }, "summary": "Report what activating a theme would leave behind", "description": "Lists the channels that already hold sections built for their current theme, with how many. A channel whose sections would survive is not listed.", "parameters": [ { "name": "code", "in": "path", "description": "Theme code being activated", "required": true, "deprecated": false, "schema": { "type": "string", "example": "default" }, "style": "simple", "explode": false }, { "name": "channel_ids[]", "in": "query", "description": "Channel IDs the theme would be applied to", "required": true, "deprecated": false, "schema": { "type": "array", "items": { "type": "integer" } }, "style": "form", "explode": true } ] } }, "/account": { "put": { "operationId": "api_apiadminaccount_put", "tags": [ "Admin Authentication" ], "responses": { "200": { "description": "The updated profile.", "content": { "application/json": { "example": { "id": "1", "name": "Example Admin", "email": "admin@example.com", "image": null, "imageUrl": null, "status": "1", "roleId": 1, "roleName": "Administrator", "success": true, "message": "Account updated successfully." } } }, "links": [] }, "401": { "description": "Missing or invalid admin token." }, "422": { "description": "Validation failed, or the current password is wrong.", "links": [] }, "400": { "description": "Invalid input", "links": [] }, "404": { "description": "Not found", "links": [] } }, "summary": "Update my account", "description": "Updates the authenticated admin's name, email and, optionally, password. `current_password` is required for every change. Send `password` with a matching `password_confirmation` to change the password. The avatar is managed by `POST /account/image` and `DELETE /account/image`.", "parameters": [], "requestBody": { "description": "The updated AdminProfile resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "name", "current_password" ], "properties": { "name": { "type": "string" }, "email": { "type": "string", "format": "email" }, "password": { "type": "string", "minLength": 6 }, "password_confirmation": { "type": "string" }, "current_password": { "type": "string", "minLength": 6 } } }, "example": { "name": "Example Admin", "email": "admin@example.com", "password": "new-secret", "password_confirmation": "new-secret", "current_password": "admin123" } } }, "required": true } } }, "/account/image": { "post": { "operationId": "api_apiadminaccountimage_post", "tags": [ "Admin Authentication" ], "responses": { "200": { "description": "The updated profile.", "content": { "application/json": { "example": { "id": "1", "name": "Example Admin", "email": "admin@example.com", "image": "admins/1/avatar.png", "imageUrl": "https://example.com/storage/admins/1/avatar.png", "status": "1", "roleId": 1, "roleName": "Administrator", "success": true, "message": "Account updated successfully." } } }, "links": [] }, "401": { "description": "Missing or invalid admin token." }, "422": { "description": "Validation failed, or the current password is wrong.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Upload my avatar", "description": "Uploads (or replaces) the authenticated admin's avatar. Multipart fields: `image` (bmp, jpeg, jpg, png or webp), `current_password`, and an optional `file_name`.", "parameters": [], "requestBody": { "description": "The new AdminProfile resource", "content": { "multipart/form-data": { "schema": { "type": "object", "required": [ "image", "current_password" ], "properties": { "image": { "type": "string", "format": "binary" }, "current_password": { "type": "string" }, "file_name": { "type": "string", "maxLength": 150 } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminaccountimage_delete", "tags": [ "Admin Authentication" ], "responses": { "200": { "description": "The updated profile, with `image` null." }, "401": { "description": "Missing or invalid admin token." }, "422": { "description": "The current password is missing or wrong." }, "404": { "description": "Not found", "links": [] } }, "summary": "Remove my avatar", "description": "Removes the authenticated admin's avatar. Send `current_password` in the JSON body.", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "current_password" ], "properties": { "current_password": { "type": "string" } } }, "example": { "current_password": "admin123" } } }, "required": true } } }, "/account/two-factor": { "get": { "operationId": "api_apiadminaccounttwo-factor_get_collection", "tags": [ "Admin Authentication" ], "responses": { "200": { "description": "Setup data.", "content": { "application/json": { "example": [ { "id": 1, "enabled": false, "qrCodeSvg": "", "qrCodeUrl": "otpauth://totp/Bagisto:admin%40example.com?secret=JBSWY3DPEHPK3PXP&issuer=Bagisto", "backupCodes": null, "message": null } ] } } }, "401": { "description": "Missing or invalid admin token." }, "422": { "description": "Two-factor authentication is already enabled." } }, "summary": "Two-factor setup", "description": "Returns the QR code (SVG and otpauth URL) to scan into an authenticator app. The secret is generated on the first call and reused until two-factor authentication is disabled. Refused once two-factor authentication is enabled.", "parameters": [] } }, "/account/two-factor/disable": { "post": { "operationId": "api_apiadminaccounttwo-factordisable_post", "tags": [ "Admin Authentication" ], "responses": { "200": { "description": "Disabled.", "content": { "application/json": { "example": { "enabled": false, "backupCodes": null, "message": "Two-Factor Authentication has been disabled." } } }, "links": [] }, "401": { "description": "Missing or invalid admin token." }, "422": { "description": "Missing or invalid code.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Disable two-factor authentication", "description": "Turns two-factor authentication off and clears the secret and backup codes. While it is enabled, `code` must carry a current authenticator code or an unused backup code.", "parameters": [], "requestBody": { "description": "The new AdminTwoFactor resource", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string" } } }, "example": { "code": "123456" } } }, "required": false } } }, "/account/two-factor/enable": { "post": { "operationId": "api_apiadminaccounttwo-factorenable_post", "tags": [ "Admin Authentication" ], "responses": { "200": { "description": "Enabled.", "content": { "application/json": { "example": { "enabled": true, "backupCodes": [ "204871", "553019", "760342", "118265", "931577", "402968", "687120", "015443" ], "message": "Two-Factor Authentication enabled successfully." } } }, "links": [] }, "401": { "description": "Missing or invalid admin token." }, "422": { "description": "Invalid code, or setup was not run first.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Enable two-factor authentication", "description": "Verifies a six-digit code from the authenticator app against the setup secret and turns two-factor authentication on. Returns eight one-time backup codes, shown only here and emailed to the admin.", "parameters": [], "requestBody": { "description": "The new AdminTwoFactor resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "code" ], "properties": { "code": { "type": "string", "pattern": "^\\d{6}$" } } }, "example": { "code": "123456" } } }, "required": true } } }, "/get": { "get": { "operationId": "api_apiadminget_get_collection", "tags": [ "Admin Authentication" ], "responses": { "200": { "description": "The authenticated admin's profile.", "content": { "application/json": { "example": [ { "id": "1", "name": "Example Admin", "email": "admin@example.com", "image": null, "imageUrl": null, "status": "1", "roleId": 1, "roleName": "Administrator", "success": true, "message": null } ] } } } }, "summary": "Get logged-in admin user's details", "description": "Returns the profile of the currently authenticated admin. Requires a Bearer token.", "parameters": [] } }, "/cms/pages": { "get": { "operationId": "api_apiadmincmspages_get_collection", "tags": [ "Admin CMS" ], "responses": { "200": { "description": "Paginated list of CMS page rows in the { data, meta } envelope.", "content": { "application/json": { "example": { "data": [ { "id": 7, "urlKey": "about-us", "pageTitle": "About Us", "channel": "default", "locale": "en", "createdAt": "2026-01-12T08:15:00+00:00" } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 3, "total": 24, "from": 1, "to": 10 } } } } } }, "summary": "List CMS pages (datagrid parity)", "description": "Paginated, filterable, sortable CMS pages list mirroring the admin CMS → Pages datagrid.", "parameters": [ { "name": "page", "in": "query", "description": "Page number (1-based).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "id", "in": "query", "description": "Filter by CMS page ID.", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 7 }, "style": "form", "explode": true }, { "name": "page_title", "in": "query", "description": "Partial page title match.", "required": false, "deprecated": false, "schema": { "type": "string", "example": "About" }, "style": "form", "explode": true }, { "name": "url_key", "in": "query", "description": "Partial url_key match.", "required": false, "deprecated": false, "schema": { "type": "string", "example": "about" }, "style": "form", "explode": true }, { "name": "channel", "in": "query", "description": "Filter by channel ID.", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "locale", "in": "query", "description": "Locale code for translation resolution.", "required": false, "deprecated": false, "schema": { "type": "string", "example": "en" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort column.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "page_title", "url_key", "created_at" ], "example": "id" }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "example": "desc" }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadmincmspages_post", "tags": [ "Admin CMS" ], "responses": { "201": { "description": "Page created. Returns the same shape as GET /cms/pages/{id}.", "content": { "application/json": { "example": { "id": 7, "urlKey": "about-us", "pageTitle": "About Us", "htmlContent": "
Welcome.
", "metaTitle": "About Us", "metaKeywords": "about,us,company", "metaDescription": "Learn more about our company.", "locale": "en", "translations": [ { "locale": "en", "url_key": "about-us", "page_title": "About Us", "html_content": "Welcome.
", "meta_title": "About Us", "meta_keywords": "about,us,company", "meta_description": "Learn more about our company." } ], "channels": [ { "id": 1, "code": "default", "name": "Default" } ] } } }, "links": [] }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create a new CMS page", "description": "Mirrors Bagisto admin CMS → Pages → Create. Top-level translated fields (page_title, html_content, etc.) are broadcast to every locale by the PageRepository. Validates url_key (required + unique on cms_page_translations + slug regex), page_title, html_content, and channels (non-empty array of existing channel ids).", "parameters": [], "requestBody": { "description": "The new AdminCmsPage resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "url_key", "page_title", "html_content", "channels" ], "properties": { "url_key": { "type": "string", "example": "about-us" }, "page_title": { "type": "string", "example": "About Us" }, "html_content": { "type": "string", "example": "Welcome.
" }, "channels": { "type": "array", "items": { "type": "integer" }, "example": [ 1 ] }, "meta_title": { "type": "string", "example": "About Us" }, "meta_keywords": { "type": "string", "example": "about,us,company" }, "meta_description": { "type": "string", "example": "Learn more about our company." } } } } }, "required": true } } }, "/cms/pages/export": { "get": { "operationId": "api_apiadmincmspagesexport_get", "tags": [ "Admin CMS" ], "responses": { "200": { "description": "The CMS pages export file is downloaded as an attachment.", "content": { "text/csv": { "schema": { "type": "string", "format": "binary" } }, "application/vnd.ms-excel": { "schema": { "type": "string", "format": "binary" } }, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { "schema": { "type": "string", "format": "binary" } } } }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks permission." }, "422": { "description": "Unsupported format (csv, xls and xlsx only)." }, "404": { "description": "Not found", "links": [] } }, "summary": "Export CMS pages as csv, xls or xlsx", "description": "Downloads the CMS Pages datagrid as a csv, xls or xlsx file — the same data the admin CMS → Pages \"view\" listing shows (ID, Page Title, URL Key, Channel, Locale). Honours the same filters as the listing (`id`, `page_title`, `url_key`, `channel`, `locale`). The response is a binary download, not JSON.", "parameters": [ { "name": "format", "in": "query", "description": "Export format: `csv`, `xls` or `xlsx`. Defaults to `csv`.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "csv", "xls", "xlsx" ], "default": "csv" }, "style": "form", "explode": true }, { "name": "id", "in": "query", "description": "Filter by CMS page ID.", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "page_title", "in": "query", "description": "Partial page title match.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "url_key", "in": "query", "description": "Partial url_key match.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "channel", "in": "query", "description": "Filter by channel ID.", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "locale", "in": "query", "description": "Locale code for translation resolution.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true } ] } }, "/cms/pages/mass-delete": { "post": { "operationId": "api_apiadmincmspagesmass-delete_post", "tags": [ "Admin CMS" ], "responses": { "200": { "description": "CMS pages deleted.", "content": { "application/json": { "example": { "deleted": [ 12, 18 ], "message": "CMS pages deleted successfully." } } }, "links": [] }, "422": { "description": "Validation failure (empty/missing indices).", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Mass delete CMS pages", "description": "Deletes a batch of CMS pages. Non-existent IDs are silently skipped (mirrors monolith).", "parameters": [], "requestBody": { "description": "The new AdminCmsPageMassDelete resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 12, 18 ] } } } } }, "required": true } } }, "/cms/pages/{id}": { "get": { "operationId": "api_apiadmincmspages_id_get", "tags": [ "Admin CMS" ], "responses": { "200": { "description": "Single CMS page with translations and channels inlined.", "content": { "application/json": { "example": { "id": 7, "urlKey": "about-us", "pageTitle": "About Us", "htmlContent": "Welcome back.
", "meta_title": "About Us", "meta_keywords": "about,us,company", "meta_description": "Updated description." } } } } } }, "required": true } }, "delete": { "operationId": "api_apiadmincmspages_id_delete", "tags": [ "Admin CMS" ], "responses": { "204": { "description": "Page deleted." }, "404": { "description": "Page not found." } }, "summary": "Delete a CMS page", "description": "Delete a CMS page", "parameters": [ { "name": "id", "in": "path", "description": "CMS page ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 7 }, "style": "simple", "explode": false } ] } }, "/catalog/families": { "get": { "operationId": "api_apiadmincatalogfamilies_get_collection", "tags": [ "Admin Catalog: Attribute Families" ], "responses": { "200": { "description": "Paginated list of attribute family rows in the { data, meta } envelope.", "content": { "application/json": { "example": { "data": [ { "id": 1, "code": "default", "name": "Default" }, { "id": 3, "code": "apparel", "name": "Apparel" } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 1, "total": 2, "from": 1, "to": 2 } } } } } }, "summary": "List attribute families (datagrid parity)", "description": "Paginated, filterable, sortable attribute family list mirroring the admin Catalog → Families datagrid.", "parameters": [ { "name": "page", "in": "query", "description": "Page number (1-based).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "id", "in": "query", "description": "Filter by family ID — single integer or comma-separated list.", "required": false, "deprecated": false, "schema": { "type": "string", "example": "1" }, "style": "form", "explode": true }, { "name": "code", "in": "query", "description": "Partial family code match (SQL LIKE).", "required": false, "deprecated": false, "schema": { "type": "string", "example": "default" }, "style": "form", "explode": true }, { "name": "name", "in": "query", "description": "Partial family name match (SQL LIKE).", "required": false, "deprecated": false, "schema": { "type": "string", "example": "Default" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Column to sort by.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "code", "name" ], "example": "id" }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "example": "desc" }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadmincatalogfamilies_post", "tags": [ "Admin Catalog: Attribute Families" ], "responses": { "201": { "description": "Family created. Returns the same shape as GET /catalog/families/{id}.", "content": { "application/json": { "example": { "id": 4, "code": "electronics", "name": "Electronics", "attributeGroups": [ { "id": 11, "code": "general", "name": "General", "column": 1, "position": 1, "attributes": [] } ] } } }, "links": [] }, "422": { "description": "Validation failure.", "content": { "application/json": { "example": { "type": "/errors/422", "status": 422, "detail": "The code field is required." } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create a new attribute family", "description": "Creates an attribute family with optional nested attribute groups and per-group custom_attributes. `code` must be unique and pass the Code rule.", "parameters": [], "requestBody": { "description": "The new AdminAttributeFamily resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "code", "name" ], "properties": { "code": { "type": "string", "example": "electronics" }, "name": { "type": "string", "example": "Electronics" }, "attribute_groups": { "type": "array", "items": { "type": "object" }, "example": [ { "code": "general", "name": "General", "column": 1, "position": 1, "custom_attributes": [ { "id": 1 }, { "id": 2 } ] } ] } } } } }, "required": true } } }, "/catalog/families/{id}": { "get": { "operationId": "api_apiadmincatalogfamilies_id_get", "tags": [ "Admin Catalog: Attribute Families" ], "responses": { "200": { "description": "Attribute family detail with groups and attributes.", "content": { "application/json": { "example": { "id": 1, "code": "default", "name": "Default", "attributeGroups": [ { "id": 1, "code": "general", "name": "General", "column": 1, "position": 1, "attributes": [ { "id": 1, "code": "sku", "type": "text", "isRequired": 1, "column": 1, "position": 1 }, { "id": 2, "code": "name", "type": "text", "isRequired": 1, "column": 1, "position": 2 } ] } ] } } } }, "404": { "description": "Attribute family not found.", "content": { "application/json": { "example": { "type": "/errors/404", "title": "An error occurred", "status": 404, "detail": "Attribute family not found." } } } } }, "summary": "Attribute family detail with attribute groups and attributes", "description": "Returns one attribute family with all attribute groups and their associated attributes (including pivot position).", "parameters": [ { "name": "id", "in": "path", "description": "Attribute family ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadmincatalogfamilies_id_put", "tags": [ "Admin Catalog: Attribute Families" ], "responses": { "200": { "description": "Family updated.", "content": { "application/json": { "example": { "id": 4, "code": "electronics", "name": "Electronics (updated)" } } }, "links": [] }, "422": { "description": "Validation failure.", "content": { "application/json": { "example": { "type": "/errors/422", "status": 422, "detail": "The code has already been taken." } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "404": { "description": "Not found", "links": [] } }, "summary": "Update an attribute family", "description": "Updates an attribute family. Inside `attribute_groups`, items keyed by numeric id update existing groups; items keyed by `group_*` create new groups; omitted existing ids are deleted.", "parameters": [ { "name": "id", "in": "path", "description": "Family ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 4 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminAttributeFamily resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "code", "name" ], "properties": { "code": { "type": "string", "example": "electronics" }, "name": { "type": "string", "example": "Electronics (updated)" }, "attribute_groups": { "type": "object", "example": { "11": { "code": "general", "name": "General", "column": 1, "position": 1, "custom_attributes": [ { "id": 1, "position": 1 } ] }, "group_new_1": { "code": "pricing", "name": "Pricing", "column": 2, "position": 2, "custom_attributes": [ { "id": 11, "position": 1 } ] } } } } } } }, "required": true } }, "delete": { "operationId": "api_apiadmincatalogfamilies_id_delete", "tags": [ "Admin Catalog: Attribute Families" ], "responses": { "200": { "description": "Family deleted.", "content": { "application/json": { "example": { "message": "Attribute family deleted successfully." } } } }, "400": { "description": "Cannot delete — the default family, or products attached.", "content": { "application/json": { "example": { "type": "/errors/400", "status": 400, "detail": "At least one attribute family is required." } } } }, "404": { "description": "Family not found.", "content": { "application/json": { "example": { "type": "/errors/404", "status": 404, "detail": "Attribute family not found." } } } } }, "summary": "Delete an attribute family", "description": "Refuses the default family (HTTP 400), which backs every product form, and any family a product is using (HTTP 400).", "parameters": [ { "name": "id", "in": "path", "description": "Family ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 4 }, "style": "simple", "explode": false } ] } }, "/catalog/attributes": { "get": { "operationId": "api_apiadmincatalogattributes_get_collection", "tags": [ "Admin Catalog: Attributes" ], "responses": { "200": { "description": "Paginated list of attribute rows in the { data, meta } envelope.", "content": { "application/json": { "example": { "data": [ { "id": 1, "code": "sku", "type": "text", "adminName": "SKU", "isRequired": 1, "isUnique": 1, "valuePerLocale": 0, "valuePerChannel": 0, "isFilterable": 0, "isConfigurable": 0, "isVisibleOnFront": 0, "isUserDefined": 0, "swatchType": null, "position": 1, "locale": "en", "createdAt": "2024-01-01T00:00:00+00:00", "updatedAt": "2024-01-01T00:00:00+00:00", "translations": null, "options": null, "validation": null, "defaultValue": null } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 5, "total": 47, "from": 1, "to": 10 } } } } } }, "summary": "List attributes (datagrid parity)", "description": "Paginated, filterable, sortable attribute list mirroring the admin Catalog → Attributes datagrid.", "parameters": [ { "name": "page", "in": "query", "description": "Page number (1-based).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "id", "in": "query", "description": "Filter by attribute ID — single integer or comma-separated list (e.g. \"1\" or \"1,2\").", "required": false, "deprecated": false, "schema": { "type": "string", "example": "1" }, "style": "form", "explode": true }, { "name": "code", "in": "query", "description": "Partial attribute code match (SQL LIKE).", "required": false, "deprecated": false, "schema": { "type": "string", "example": "color" }, "style": "form", "explode": true }, { "name": "type", "in": "query", "description": "Exact attribute type filter.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "text", "textarea", "price", "boolean", "select", "multiselect", "datetime", "date", "image", "file", "checkbox" ], "example": "select" }, "style": "form", "explode": true }, { "name": "admin_name", "in": "query", "description": "Partial admin name match (SQL LIKE).", "required": false, "deprecated": false, "schema": { "type": "string", "example": "Color" }, "style": "form", "explode": true }, { "name": "is_required", "in": "query", "description": "Filter by is_required (0 or 1).", "required": false, "deprecated": false, "schema": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "style": "form", "explode": true }, { "name": "is_unique", "in": "query", "description": "Filter by is_unique (0 or 1).", "required": false, "deprecated": false, "schema": { "type": "integer", "enum": [ 0, 1 ], "example": 0 }, "style": "form", "explode": true }, { "name": "is_filterable", "in": "query", "description": "Filter by is_filterable (0 or 1).", "required": false, "deprecated": false, "schema": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "style": "form", "explode": true }, { "name": "is_configurable", "in": "query", "description": "Filter by is_configurable (0 or 1).", "required": false, "deprecated": false, "schema": { "type": "integer", "enum": [ 0, 1 ], "example": 0 }, "style": "form", "explode": true }, { "name": "is_visible_on_front", "in": "query", "description": "Filter by is_visible_on_front (0 or 1).", "required": false, "deprecated": false, "schema": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "style": "form", "explode": true }, { "name": "is_user_defined", "in": "query", "description": "Filter by is_user_defined (0 or 1).", "required": false, "deprecated": false, "schema": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "style": "form", "explode": true }, { "name": "value_per_locale", "in": "query", "description": "Filter by value_per_locale (0 or 1).", "required": false, "deprecated": false, "schema": { "type": "integer", "enum": [ 0, 1 ], "example": 0 }, "style": "form", "explode": true }, { "name": "value_per_channel", "in": "query", "description": "Filter by value_per_channel (0 or 1).", "required": false, "deprecated": false, "schema": { "type": "integer", "enum": [ 0, 1 ], "example": 0 }, "style": "form", "explode": true }, { "name": "locale", "in": "query", "description": "Locale code for translation resolution (e.g. \"en\").", "required": false, "deprecated": false, "schema": { "type": "string", "example": "en" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Column to sort by.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "code", "admin_name", "type", "position" ], "example": "id" }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "example": "desc" }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadmincatalogattributes_post", "tags": [ "Admin Catalog: Attributes" ], "responses": { "201": { "description": "Attribute created successfully. Returns the full attribute detail.", "content": { "application/json": { "example": { "id": 50, "code": "material", "type": "select", "adminName": "Material", "isRequired": 0, "isUnique": 0, "valuePerLocale": 0, "valuePerChannel": 0, "isFilterable": 1, "isConfigurable": 0, "isVisibleOnFront": 1, "isUserDefined": 1, "swatchType": "text", "position": 10, "locale": "en", "createdAt": "2026-05-22T10:00:00+00:00", "updatedAt": "2026-05-22T10:00:00+00:00", "validation": null, "defaultValue": null, "isComparable": 0, "enableWysiwyg": 0, "regex": null, "translations": [ { "locale": "en", "name": "Material" }, { "locale": "fr", "name": "Matière" } ], "options": [ { "id": 101, "adminName": "Cotton", "sortOrder": 1, "swatchValue": null, "swatchValueUrl": null, "translations": [ { "locale": "en", "label": "Cotton" }, { "locale": "fr", "label": "Coton" } ] } ] } } }, "links": [] }, "422": { "description": "Validation failure.", "content": { "application/json": { "example": { "type": "/errors/422", "status": 422, "detail": "The code field is required." } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create a new attribute", "description": "Creates an attribute with optional translations and options (for select/multiselect/checkbox types). The `code` must be unique, pass the Code rule (letters/digits/underscore), and not be a reserved word (`type`, `attribute_family_id`).", "parameters": [], "requestBody": { "description": "The new AdminAttribute resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "code", "admin_name", "type" ], "properties": { "code": { "type": "string", "example": "material" }, "admin_name": { "type": "string", "example": "Material" }, "type": { "type": "string", "example": "select", "enum": [ "text", "textarea", "price", "boolean", "select", "multiselect", "checkbox", "date", "datetime", "image", "file" ] }, "swatch_type": { "type": "string", "nullable": true, "example": "text" }, "is_required": { "type": "boolean", "example": false }, "is_unique": { "type": "boolean", "example": false }, "is_filterable": { "type": "boolean", "example": true }, "is_configurable": { "type": "boolean", "example": false }, "is_visible_on_front": { "type": "boolean", "example": true }, "is_comparable": { "type": "boolean", "example": false }, "value_per_locale": { "type": "boolean", "example": false }, "value_per_channel": { "type": "boolean", "example": false }, "enable_wysiwyg": { "type": "boolean", "example": false }, "validation": { "type": "string", "nullable": true, "example": null }, "default_value": { "type": "string", "nullable": true, "example": null }, "position": { "type": "integer", "example": 10 }, "translations": { "type": "object", "example": { "en": { "name": "Material" }, "fr": { "name": "Matière" } } }, "options": { "type": "array", "items": { "type": "object" }, "example": [ { "admin_name": "Cotton", "sort_order": 1, "translations": { "en": { "label": "Cotton" }, "fr": { "label": "Coton" } } } ] } } } } }, "required": true } } }, "/catalog/attributes/mass-delete": { "post": { "operationId": "api_apiadmincatalogattributesmass-delete_post", "tags": [ "Admin Catalog: Attributes" ], "responses": { "200": { "description": "Attributes deleted.", "content": { "application/json": { "example": { "deleted": [ 24, 31 ], "message": "Attributes deleted successfully." } } }, "links": [] }, "422": { "description": "Batch rejected — one or more IDs are system attributes.", "content": { "application/json": { "example": { "type": "/errors/422", "status": 422, "detail": "System attributes cannot be deleted." } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Mass delete attributes", "description": "Deletes a batch of user-defined attributes. If any ID in the batch belongs to a system attribute (`is_user_defined = 0`), the entire batch is rejected with HTTP 422. Non-existent IDs are silently skipped.", "parameters": [], "requestBody": { "description": "The new AdminAttributeMassDelete resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 24, 31 ] } } } } }, "required": true } } }, "/catalog/attributes/{attributeId}/options": { "post": { "operationId": "api_apiadmincatalogattributes_attributeIdoptions_post", "tags": [ "Admin Catalog: Attributes" ], "responses": { "201": { "description": "Option created. Returns the full attribute detail.", "content": { "application/json": { "example": { "id": 12, "code": "material", "type": "select", "options": [ { "id": 45, "adminName": "Wool", "sortOrder": 2 } ] } } }, "links": [] }, "422": { "description": "Attribute type does not support options.", "content": { "application/json": { "example": { "type": "/errors/422", "status": 422, "detail": "This attribute type does not support options." } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Add an option to a select/multiselect/checkbox attribute", "description": "Creates a new option for the given attribute. Only allowed when the attribute type is `select`, `multiselect`, or `checkbox`.", "parameters": [ { "name": "attributeId", "in": "path", "description": "Attribute ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 12 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminAttributeOption resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "admin_name" ], "properties": { "admin_name": { "type": "string", "example": "Wool" }, "sort_order": { "type": "integer", "example": 2 }, "swatch_value": { "type": "string", "nullable": true, "example": null }, "swatch_alt": { "type": "string", "nullable": true, "example": "Wool texture" }, "swatch_file_name": { "type": "string", "nullable": true, "example": "wool" }, "locale": { "type": "string", "example": "en" }, "translations": { "type": "object", "example": { "en": { "label": "Wool" }, "fr": { "label": "Laine" } } } } } } }, "required": true } } }, "/catalog/attributes/{attributeId}/options/{optionId}": { "put": { "operationId": "api_apiadmincatalogattributes_attributeIdoptions_optionId_put", "tags": [ "Admin Catalog: Attributes" ], "responses": { "200": { "description": "Option updated. Returns the full attribute detail.", "content": { "application/json": { "example": { "id": 12, "code": "material", "type": "select" } } }, "links": [] }, "404": { "description": "Attribute or option not found.", "content": { "application/json": { "example": { "type": "/errors/404", "status": 404, "detail": "Attribute option not found." } } } }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Update an attribute option", "description": "Partially updates the given option. Only supplied fields are changed; translations merge per-locale.", "parameters": [ { "name": "attributeId", "in": "path", "description": "Attribute ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 12 }, "style": "simple", "explode": false }, { "name": "optionId", "in": "path", "description": "Option ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 45 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminAttributeOption resource", "content": { "application/json": { "schema": { "type": "object", "properties": { "admin_name": { "type": "string", "example": "Merino Wool" }, "sort_order": { "type": "integer", "example": 1 }, "swatch_value": { "type": "string", "nullable": true, "example": null }, "swatch_alt": { "type": "string", "nullable": true, "example": "Wool texture" }, "swatch_file_name": { "type": "string", "nullable": true, "example": "wool" }, "locale": { "type": "string", "example": "en" }, "translations": { "type": "object", "example": { "en": { "label": "Merino Wool" }, "fr": { "label": "Laine Mérinos" } } } } } } }, "required": true } }, "delete": { "operationId": "api_apiadmincatalogattributes_attributeIdoptions_optionId_delete", "tags": [ "Admin Catalog: Attributes" ], "responses": { "200": { "description": "Option deleted.", "content": { "application/json": { "example": { "message": "Attribute option deleted successfully." } } } }, "409": { "description": "Option is in use by products.", "content": { "application/json": { "example": { "type": "/errors/409", "status": 409, "detail": "This option is used by 3 product(s) and cannot be deleted." } } } }, "404": { "description": "Not found", "links": [] } }, "summary": "Delete an attribute option", "description": "Deletes the given option. Returns HTTP 409 if the option is referenced by any product attribute values.", "parameters": [ { "name": "attributeId", "in": "path", "description": "Attribute ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 12 }, "style": "simple", "explode": false }, { "name": "optionId", "in": "path", "description": "Option ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 45 }, "style": "simple", "explode": false } ] } }, "/catalog/attributes/{attributeId}/options/{optionId}/swatch": { "post": { "operationId": "api_apiadmincatalogattributes_attributeIdoptions_optionIdswatch_post", "tags": [ "Admin Catalog: Attributes" ], "responses": { "200": { "description": "Swatch stored. Returns the full attribute detail.", "content": { "application/json": { "example": { "id": 23, "code": "color", "type": "select", "swatchType": "image", "options": [ { "id": 45, "adminName": "Navy", "sortOrder": 1, "swatchValue": "attribute_option/navy-blue.png", "swatchValueUrl": "https://example.com/cache/small/attribute_option/navy-blue.png", "swatchAlt": "Navy blue fabric", "swatchFileName": "navy-blue" } ] } } }, "links": [] }, "403": { "description": "Missing catalog.attributes.edit permission." }, "404": { "description": "Attribute or option not found." }, "422": { "description": "Missing or invalid file, or the attribute does not use image swatches.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Upload an option swatch image", "description": "Stores the image as the option's swatch value. Only for attributes whose swatch type is `image`. Send multipart/form-data with `swatch_value` (bmp, jpeg, jpg, png, webp). Optional `swatch_file_name` names the stored file and `swatch_alt` is saved for the `locale` sent (or the default locale). Returns the full attribute detail.", "parameters": [ { "name": "attributeId", "in": "path", "description": "Attribute ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 23 }, "style": "simple", "explode": false }, { "name": "optionId", "in": "path", "description": "Option ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 45 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminAttributeOptionSwatch resource", "content": { "multipart/form-data": { "schema": { "type": "object", "required": [ "swatch_value" ], "properties": { "swatch_value": { "type": "string", "format": "binary" }, "swatch_file_name": { "type": "string", "example": "navy-blue" }, "swatch_alt": { "type": "string", "example": "Navy blue fabric" }, "locale": { "type": "string", "example": "en" } } } } }, "required": true } } }, "/catalog/attributes/{id}": { "get": { "operationId": "api_apiadmincatalogattributes_id_get", "tags": [ "Admin Catalog: Attributes" ], "responses": { "200": { "description": "Attribute detail with all translations and options.", "content": { "application/json": { "example": { "id": 12, "code": "color", "type": "select", "adminName": "Color", "isRequired": 0, "isUnique": 0, "valuePerLocale": 0, "valuePerChannel": 0, "isFilterable": 1, "isConfigurable": 1, "isVisibleOnFront": 1, "isUserDefined": 1, "swatchType": "color", "position": 5, "locale": "en", "createdAt": "2026-01-12T08:15:00+00:00", "updatedAt": "2026-04-30T14:20:09+00:00", "validation": null, "defaultValue": null, "isComparable": 0, "enableWysiwyg": 0, "regex": null, "translations": [ { "locale": "en", "name": "Color" }, { "locale": "fr", "name": "Couleur" } ], "options": [ { "id": 33, "adminName": "Red", "sortOrder": 1, "swatchValue": "#FF0000", "swatchValueUrl": null, "translations": [ { "locale": "en", "label": "Red" }, { "locale": "fr", "label": "Rouge" } ] }, { "id": 34, "adminName": "Blue", "sortOrder": 2, "swatchValue": "#0000FF", "swatchValueUrl": null, "translations": [ { "locale": "en", "label": "Blue" }, { "locale": "fr", "label": "Bleu" } ] } ] } } } }, "404": { "description": "Attribute not found.", "content": { "application/json": { "example": { "type": "/errors/404", "title": "An error occurred", "status": 404, "detail": "Attribute not found" } } } } }, "summary": "Attribute detail with translations and options", "description": "Returns one attribute with all locale translations and all options (each option also includes its own translations). For `select`, `multiselect`, and `checkbox` types, the `options` array is fully populated; for all other types it is `null`.", "parameters": [ { "name": "id", "in": "path", "description": "Attribute ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 12 }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadmincatalogattributes_id_put", "tags": [ "Admin Catalog: Attributes" ], "responses": { "200": { "description": "Attribute updated. Returns the full attribute detail.", "content": { "application/json": { "example": { "id": 50, "code": "material", "adminName": "Material (updated)", "type": "select" } } }, "links": [] }, "422": { "description": "Code change refused or type immutable.", "content": { "application/json": { "example": { "type": "/errors/422", "status": 422, "detail": "Attribute code cannot be changed." } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "404": { "description": "Not found", "links": [] } }, "summary": "Update an attribute", "description": "Updates an attribute. The `code` field cannot be changed (returns 422 if a different code is supplied). Changing `type` is refused when product attribute values exist.", "parameters": [ { "name": "id", "in": "path", "description": "Attribute ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 50 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminAttribute resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "code", "admin_name", "type" ], "properties": { "code": { "type": "string", "example": "material" }, "admin_name": { "type": "string", "example": "Material (updated)" }, "type": { "type": "string", "example": "select" }, "is_filterable": { "type": "boolean", "example": true }, "translations": { "type": "object", "example": { "en": { "name": "Material (updated)" }, "fr": { "name": "Matière (mis à jour)" } } }, "options": { "type": "array", "items": { "type": "object" }, "description": "Full replacement list. Items with id are updated; without id are inserted; omitted ids are deleted." } } } } }, "required": true } }, "delete": { "operationId": "api_apiadmincatalogattributes_id_delete", "tags": [ "Admin Catalog: Attributes" ], "responses": { "200": { "description": "Attribute deleted.", "content": { "application/json": { "example": { "message": "Attribute deleted successfully." } } } }, "403": { "description": "System attribute — cannot delete.", "content": { "application/json": { "example": { "type": "/errors/403", "status": 403, "detail": "System attributes cannot be deleted." } } } }, "409": { "description": "Attribute is part of one or more attribute families.", "content": { "application/json": { "example": { "type": "/errors/409", "status": 409, "detail": "Attribute is part of one or more attribute families. Remove it from those families first." } } } }, "404": { "description": "Not found", "links": [] } }, "summary": "Delete an attribute", "description": "Deletes a user-defined attribute. Returns HTTP 403 for system attributes, HTTP 409 if the attribute is used in attribute families.", "parameters": [ { "name": "id", "in": "path", "description": "Attribute ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 50 }, "style": "simple", "explode": false } ] } }, "/catalog/categories": { "get": { "operationId": "api_apiadmincatalogcategories_get_collection", "tags": [ "Admin Catalog: Categories" ], "responses": { "200": { "description": "Paginated list of category rows in the { data, meta } envelope.", "content": { "application/json": { "example": { "data": [ { "id": 7, "position": 1, "status": 1, "parentId": 1, "displayMode": "products_and_description", "logoUrl": null, "bannerUrl": null, "name": "Apparel", "slug": "apparel", "description": "Men's and women's apparel", "locale": "en", "createdAt": "2026-01-12T08:15:00+00:00", "updatedAt": "2026-04-30T14:20:09+00:00", "translations": null, "filterableAttributeIds": null } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 5, "total": 47, "from": 1, "to": 10 } } } } } }, "summary": "List categories (datagrid parity)", "description": "Paginated, filterable, sortable category list mirroring the admin Catalog → Categories datagrid.", "parameters": [ { "name": "page", "in": "query", "description": "Page number (1-based).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "category_id", "in": "query", "description": "Filter by category ID — single integer or comma-separated list (e.g. \"12\" or \"12,18\").", "required": false, "deprecated": false, "schema": { "type": "string", "example": "12" }, "style": "form", "explode": true }, { "name": "name", "in": "query", "description": "Partial category name match (SQL LIKE).", "required": false, "deprecated": false, "schema": { "type": "string", "example": "Apparel" }, "style": "form", "explode": true }, { "name": "position", "in": "query", "description": "Exact position filter.", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "status", "in": "query", "description": "Filter by status (0 = disabled, 1 = enabled).", "required": false, "deprecated": false, "schema": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "style": "form", "explode": true }, { "name": "parent_id", "in": "query", "description": "Filter by parent category ID.", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "locale", "in": "query", "description": "Locale code for translation resolution (e.g. \"en\").", "required": false, "deprecated": false, "schema": { "type": "string", "example": "en" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Column to sort by.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "name", "position", "status" ], "example": "id" }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "example": "desc" }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadmincatalogcategories_post", "tags": [ "Admin Catalog: Categories" ], "responses": { "201": { "description": "Category created. Returns the same shape as GET /catalog/categories/{id}.", "content": { "application/json": { "example": { "id": 7, "position": 1, "status": 1, "parentId": 1, "displayMode": "products_and_description", "name": "Apparel", "slug": "apparel", "description": "Men's and women's apparel", "locale": "en" } } }, "links": [] }, "422": { "description": "Validation failure.", "content": { "application/json": { "example": { "type": "/errors/422", "status": 422, "detail": "The slug field is required." } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create a new category", "description": "Mirrors Bagisto admin Catalog → Categories → Create. Validates slug (unique), name, position, attributes. `description` required when `display_mode` is `description_only` or `products_and_description`. File-upload for `logo_path` / `banner_path` is NOT supported in v1.", "parameters": [], "requestBody": { "description": "The new AdminCategory resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "slug", "name", "position", "attributes" ], "properties": { "slug": { "type": "string", "example": "apparel" }, "name": { "type": "string", "example": "Apparel" }, "description": { "type": "string", "example": "Men's and women's apparel" }, "position": { "type": "integer", "example": 1 }, "attributes": { "type": "array", "items": { "type": "integer" }, "example": [ 11, 23 ] }, "parent_id": { "type": "integer", "nullable": true, "example": 1 }, "display_mode": { "type": "string", "enum": [ "products_and_description", "products_only", "description_only" ], "example": "products_and_description" }, "status": { "type": "integer", "example": 1 }, "locale": { "type": "string", "example": "en" }, "meta_title": { "type": "string", "example": "Apparel" } } } } }, "required": true } } }, "/catalog/categories/mass-delete": { "post": { "operationId": "api_apiadmincatalogcategoriesmass-delete_post", "tags": [ "Admin Catalog: Categories" ], "responses": { "200": { "description": "Categories deleted.", "content": { "application/json": { "example": { "deleted": [ 12, 18 ], "message": "Categories deleted successfully." } } }, "links": [] }, "400": { "description": "Batch rejected — at least one ID is a root category or a channel root.", "content": { "application/json": { "example": { "type": "/errors/400", "status": 400, "detail": "Root and channel-root categories cannot be deleted." } } }, "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Mass delete categories", "description": "Deletes a batch of categories. If any ID is non-deletable (root or a channel root_category_id), the entire batch is rejected with HTTP 400. Non-existent IDs are silently skipped.", "parameters": [], "requestBody": { "description": "The new AdminCategoryMassDelete resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 12, 18 ] } } } } }, "required": true } } }, "/catalog/categories/mass-update-status": { "post": { "operationId": "api_apiadmincatalogcategoriesmass-update-status_post", "tags": [ "Admin Catalog: Categories" ], "responses": { "200": { "description": "Categories updated.", "content": { "application/json": { "example": { "updated": [ 12, 18 ], "message": "Categories status updated successfully." } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Mass update category status", "description": "Sets the status of a batch of categories to the given value (0 or 1).", "parameters": [], "requestBody": { "description": "The new AdminCategoryMassUpdateStatus resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices", "value" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 12, 18 ] }, "value": { "type": "integer", "enum": [ 0, 1 ], "example": 1 } } } } }, "required": true } } }, "/catalog/categories/tree": { "get": { "operationId": "api_apiadmincatalogcategoriestree_get_collection", "tags": [ "Admin Catalog: Categories" ], "responses": { "200": { "description": "Nested category tree in the { data, meta } envelope.", "content": { "application/json": { "example": { "data": [ { "id": 1, "name": "Root Category", "slug": "root", "status": 1, "position": 0, "parentId": null, "displayMode": null, "children": [ { "id": 2, "name": "Apparel", "slug": "apparel", "status": 1, "position": 1, "parentId": 1, "displayMode": null, "children": [] }, { "id": 5, "name": "Electronics", "slug": "electronics", "status": 1, "position": 2, "parentId": 1, "displayMode": null, "children": [] } ] } ], "meta": { "currentPage": 1, "perPage": 50, "lastPage": 1, "total": 1, "from": 1, "to": 1 } } } } } }, "summary": "Category tree (nested)", "description": "Full nested category tree. Supports optional locale, status, and rootId filters. Returns a JSON array of root nodes.", "parameters": [ { "name": "locale", "in": "query", "description": "Locale code for translation resolution (e.g. \"en\").", "required": false, "deprecated": false, "schema": { "type": "string", "example": "en" }, "style": "form", "explode": true }, { "name": "status", "in": "query", "description": "Filter by status (0 = disabled, 1 = enabled). Nodes with no qualifying descendants are pruned.", "required": false, "deprecated": false, "schema": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "style": "form", "explode": true }, { "name": "rootId", "in": "query", "description": "Limit tree to descendants of this category ID (inclusive). Returns empty array if the ID is unknown.", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true } ] } }, "/catalog/categories/{id}": { "get": { "operationId": "api_apiadmincatalogcategories_id_get", "tags": [ "Admin Catalog: Categories" ], "responses": { "200": { "description": "Single category with all locale translations inlined and filterable attribute IDs.", "content": { "application/json": { "example": { "id": 7, "position": 1, "status": 1, "parentId": 1, "displayMode": "products_and_description", "logoUrl": "https://example.com/storage/category/7/logo.webp", "bannerUrl": null, "name": "Apparel", "slug": "apparel", "description": "Men's and women's apparel", "locale": "en", "createdAt": "2026-01-12T08:15:00+00:00", "updatedAt": "2026-04-30T14:20:09+00:00", "translations": [ { "locale": "en", "name": "Apparel", "slug": "apparel", "description": "Men's and women's apparel", "metaTitle": null, "metaDescription": null, "metaKeywords": null }, { "locale": "fr", "name": "Vêtements", "slug": "vetements", "description": null, "metaTitle": null, "metaDescription": null, "metaKeywords": null } ], "filterableAttributeIds": [ 11, 23 ] } } } }, "404": { "description": "Category not found.", "content": { "application/json": { "example": { "type": "/errors/404", "title": "An error occurred", "status": 404, "detail": "Category not found" } } } } }, "summary": "Category detail with all translations", "description": "Returns one category with the full translations array and the list of filterable attribute IDs.", "parameters": [ { "name": "id", "in": "path", "description": "Category ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 7 }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadmincatalogcategories_id_put", "tags": [ "Admin Catalog: Categories" ], "responses": { "200": { "description": "Category updated. Returns the same shape as GET /catalog/categories/{id}.", "content": { "application/json": { "example": { "id": 7, "name": "Apparel", "slug": "apparel", "position": 2 } } }, "links": [] }, "404": { "description": "Category not found." }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Update a category (and/or move it)", "description": "Mirrors Bagisto admin Catalog → Categories → Edit. Validation is LOCALE-NESTED: `A timeless classic watch.
", "description": "Full HTML product description.
", "metaTitle": "Classic Watch", "metaDescription": "Buy the Classic Watch", "metaKeywords": "watch, classic", "weight": 0.25, "featured": false, "new": true, "createdAt": "2026-05-20 10:00:00", "updatedAt": "2026-05-22 14:30:00" } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 62, "total": 616, "from": 1, "to": 10 } } } } } }, "summary": "List catalog products (datagrid parity)", "description": "Paginated, filterable, sortable product list mirroring the admin Catalog → Products datagrid. Routes via Elasticsearch when the admin panel is configured to. Returns a `{ data, meta }` envelope.", "parameters": [ { "name": "page", "in": "query", "description": "Page number (1-based).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "product_id", "in": "query", "description": "Filter by product ID — single integer or comma-separated list (e.g. \"1,2,3\").", "required": false, "deprecated": false, "schema": { "type": "string", "example": "142" }, "style": "form", "explode": true }, { "name": "sku", "in": "query", "description": "Partial SKU match (SQL LIKE).", "required": false, "deprecated": false, "schema": { "type": "string", "example": "SP-001" }, "style": "form", "explode": true }, { "name": "name", "in": "query", "description": "Partial product name match (SQL LIKE).", "required": false, "deprecated": false, "schema": { "type": "string", "example": "Classic Watch" }, "style": "form", "explode": true }, { "name": "type", "in": "query", "description": "Filter by product type.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "simple", "configurable", "bundle", "grouped", "downloadable", "virtual", "booking" ], "example": "simple" }, "style": "form", "explode": true }, { "name": "status", "in": "query", "description": "Filter by status (0 = disabled, 1 = enabled).", "required": false, "deprecated": false, "schema": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "style": "form", "explode": true }, { "name": "attribute_family", "in": "query", "description": "Filter by attribute family ID.", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "channel", "in": "query", "description": "Channel code for value resolution (e.g. \"default\").", "required": false, "deprecated": false, "schema": { "type": "string", "example": "default" }, "style": "form", "explode": true }, { "name": "locale", "in": "query", "description": "Locale code for value resolution (e.g. \"en\").", "required": false, "deprecated": false, "schema": { "type": "string", "example": "en" }, "style": "form", "explode": true }, { "name": "price_from", "in": "query", "description": "Minimum price filter (inclusive).", "required": false, "deprecated": false, "schema": { "type": "number", "format": "float", "example": 10 }, "style": "form", "explode": true }, { "name": "price_to", "in": "query", "description": "Maximum price filter (inclusive).", "required": false, "deprecated": false, "schema": { "type": "number", "format": "float", "example": 500 }, "style": "form", "explode": true }, { "name": "price", "in": "query", "description": "Price range shorthand — \"min,max\" (e.g. \"10,500\"). Overridden by price_from / price_to when both are present.", "required": false, "deprecated": false, "schema": { "type": "string", "example": "10,500" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Column to sort by.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "name", "sku", "attribute_family", "price", "quantity", "product_id", "status", "type", "channel" ], "example": "product_id" }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "example": "desc" }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadmincatalogproducts_post", "tags": [ "Admin Catalog: Products" ], "responses": { "201": { "description": "Product created. Returns the full AdminCatalogProduct payload (most fields null at this point — step 2 update populates them).", "content": { "application/json": { "example": { "id": 43, "sku": "sp-001", "type": "simple", "attributeFamilyId": 1, "attributeFamilyName": "Default", "name": null, "status": null, "price": null } } }, "links": [] }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks catalog.products.create." }, "422": { "description": "Validation failed (missing sku / family / unsupported type / duplicate sku / invalid slug / unknown family / missing or invalid super_attributes for configurable).", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create a catalog product (step 1 — all 7 types)", "description": "Mirrors the Bagisto admin Create-Product wizard step 1: only sku + attribute_family_id + type are submitted (plus super_attributes when type=configurable). Name, description, price, inventories, etc. are added in the step-2 update endpoint (Phase 5.9). Accepts type ∈ {simple, virtual, downloadable, grouped, bundle, configurable, booking}. For type=configurable, super_attributes is required and must be a non-empty map of attribute code (or id) → option_ids — the core repository generates the full Cartesian-product of variants. For booking, the 5 sub-types (default/appointment/event/rental/table) are configured during step-2 update. Returns the full AdminCatalogProduct detail payload — most fields will be null because only sku/type/family are populated yet. Fires catalog.product.create.before and catalog.product.create.after.", "parameters": [], "requestBody": { "description": "The new AdminCatalogProduct resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "sku", "attribute_family_id" ], "properties": { "sku": { "type": "string", "example": "sp-001" }, "attribute_family_id": { "type": "integer", "example": 1 }, "type": { "type": "string", "enum": [ "simple", "virtual", "downloadable", "grouped", "bundle", "configurable", "booking" ], "example": "simple" }, "super_attributes": { "type": "object", "description": "Required when type=configurable. Map of attribute code (or id) to non-empty list of option_ids.", "example": { "color": [ 1, 2 ], "size": [ 6, 7 ] } } } }, "examples": { "simple": { "summary": "Simple product", "value": { "sku": "sp-001", "attribute_family_id": 1, "type": "simple" } }, "configurable": { "summary": "Configurable product (with super_attributes)", "value": { "sku": "cf-001", "attribute_family_id": 1, "type": "configurable", "super_attributes": { "color": [ 1, 2 ], "size": [ 6, 7 ] } } }, "bundle": { "summary": "Bundle product", "value": { "sku": "bn-001", "attribute_family_id": 1, "type": "bundle" } }, "grouped": { "summary": "Grouped product", "value": { "sku": "gp-001", "attribute_family_id": 1, "type": "grouped" } }, "virtual": { "summary": "Virtual product", "value": { "sku": "vr-001", "attribute_family_id": 1, "type": "virtual" } }, "downloadable": { "summary": "Downloadable product", "value": { "sku": "dl-001", "attribute_family_id": 1, "type": "downloadable" } }, "booking": { "summary": "Booking product (sub-type set in step 2)", "value": { "sku": "bk-001", "attribute_family_id": 1, "type": "booking" } } } } }, "required": true } } }, "/catalog/products/export": { "get": { "operationId": "api_apiadmincatalogproductsexport_get", "tags": [ "Admin Catalog: Products" ], "responses": { "200": { "description": "Export file downloaded as an attachment.", "content": { "text/csv": { "schema": { "type": "string", "format": "binary" } }, "application/vnd.ms-excel": { "schema": { "type": "string", "format": "binary" } }, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { "schema": { "type": "string", "format": "binary" } } } }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks the view permission." }, "422": { "description": "Unsupported format (csv, xls and xlsx only)." }, "404": { "description": "Not found", "links": [] } }, "summary": "Export products as csv, xls or xlsx", "description": "Downloads the products datagrid as a csv, xls or xlsx file — the same data the admin Catalog → Products Export button produces. Honours the same filters as the listing and exports every matching row, not just the current page. Binary download, not JSON. Pick the file type with ?format=csv|xls|xlsx (default csv).", "parameters": [ { "name": "format", "in": "query", "description": "Export format: csv, xls or xlsx. Defaults to csv.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "csv", "xls", "xlsx" ], "default": "csv" }, "style": "form", "explode": true } ] } }, "/catalog/products/mass-delete": { "post": { "operationId": "api_apiadmincatalogproductsmass-delete_post", "tags": [ "Admin Catalog: Products" ], "responses": { "200": { "description": "Products deleted.", "content": { "application/json": { "example": { "deleted": [ 12, 18 ], "message": "Products deleted successfully." } } }, "links": [] }, "400": { "description": "Empty or malformed indices.", "links": [] }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks catalog.products.delete." }, "500": { "description": "Underlying delete threw an exception (mirrors monolith behaviour)." }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Mass delete catalog products", "description": "Deletes a batch of products. Non-existent IDs are silently skipped. If any single delete throws an exception, the endpoint returns 500 with the underlying message — matching the Bagisto monolith ProductController::massDestroy behaviour.", "parameters": [], "requestBody": { "description": "The new AdminCatalogProductMassDelete resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 12, 18 ] } } } } }, "required": true } } }, "/catalog/products/mass-update-status": { "post": { "operationId": "api_apiadmincatalogproductsmass-update-status_post", "tags": [ "Admin Catalog: Products" ], "responses": { "200": { "description": "Products updated.", "content": { "application/json": { "example": { "updated": [ 12, 18 ], "message": "Products status updated successfully." } } }, "links": [] }, "400": { "description": "Empty or malformed indices, or value not 0/1.", "links": [] }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks catalog.products.edit." }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Mass update catalog product status", "description": "Sets the status of a batch of products to the given value (0 or 1). Mirrors Bagisto monolith ProductController::massUpdate — best-effort, fires catalog.product.update.{before,after} per ID.", "parameters": [], "requestBody": { "description": "The new AdminCatalogProductMassUpdateStatus resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices", "value" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 12, 18 ] }, "value": { "type": "integer", "enum": [ 0, 1 ], "example": 1 } } } } }, "required": true } } }, "/catalog/products/{id}": { "get": { "operationId": "api_apiadmincatalogproducts_id_get", "tags": [ "Admin Catalog: Products" ], "responses": { "200": { "description": "Single catalog product with all detail fields inlined.", "content": { "application/json": { "example": { "id": 42, "sku": "SP-001", "name": "Classic Watch", "type": "simple", "status": 1, "price": "99.9900", "formattedPrice": "$99.99", "quantity": 42, "baseImageUrl": "http://localhost:8000/storage/product/42/image.webp", "imagesCount": 3, "categoryId": 5, "categoryName": "Accessories", "channel": "default", "locale": "en", "attributeFamilyId": 1, "attributeFamilyName": "Default", "urlKey": "classic-watch", "visibleIndividually": true, "shortDescription": "A premium timepiece.", "description": "Full HTML description.", "metaTitle": null, "metaDescription": null, "metaKeywords": null, "weight": 0.5, "taxCategoryId": null, "manageStock": true, "inStock": true, "featured": false, "new": true, "createdAt": "2026-01-12T08:15:00+00:00", "updatedAt": "2026-04-30T14:20:09+00:00", "translations": [ { "locale": "en", "name": "Classic Watch", "description": "Full HTML description.", "shortDescription": "A premium timepiece.", "urlKey": "classic-watch", "metaTitle": null, "metaDescription": null, "metaKeywords": null } ], "images": [ { "id": 1, "path": "product/42/img1.webp", "url": "http://localhost/storage/product/42/img1.webp", "sortOrder": 0 } ], "categories": [ { "id": 5, "name": "Accessories", "slug": "accessories" } ], "inventories": [ { "sourceId": 1, "sourceCode": "default", "qty": 42 } ], "customerGroupPrices": [], "superAttributes": null, "variants": null, "bundleOptions": null, "linkedProducts": null, "downloadableLinks": null, "downloadableSamples": null, "channels": [ { "id": 1, "code": "default", "name": "Default Channel", "assigned": true }, { "id": 2, "code": "mobile", "name": "Mobile Channel", "assigned": false } ], "attributes": [ { "id": 1, "code": "sku", "adminName": "SKU", "type": "text", "isRequired": true, "valuePerChannel": false, "valuePerLocale": false, "groupCode": "general", "groupName": "General", "value": "SP-001", "options": null }, { "id": 23, "code": "color", "adminName": "Color", "type": "select", "isRequired": false, "valuePerChannel": false, "valuePerLocale": false, "groupCode": "general", "groupName": "General", "value": null, "options": [ { "id": 1, "adminName": "Red", "swatchValue": "#ff0000", "sortOrder": 1 } ] }, { "id": 25, "code": "meta_title", "adminName": "Meta Title", "type": "textarea", "isRequired": false, "valuePerChannel": true, "valuePerLocale": true, "groupCode": "meta_description", "groupName": "Meta Description", "value": null, "options": null } ] } } } }, "404": { "description": "Product not found.", "content": { "application/json": { "example": { "type": "/errors/404", "title": "An error occurred", "status": 404, "detail": "Product not found" } } } } }, "summary": "Catalog product detail (type-aware)", "description": "Returns a single catalog product with all detail-level fields populated. `channels` lists every available channel, each flagged `assigned` for this product. `attributes` mirrors the admin edit screen field-for-field — every attribute the product's family defines (code, adminName, type, value, options, per-channel/locale flags), with empty fields present (value null). Type-specific blocks (superAttributes/variants, bundleOptions, linkedProducts, downloadableLinks/downloadableSamples) are populated only for the matching product type; all others are null.", "parameters": [ { "name": "id", "in": "path", "description": "Product ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 42 }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadmincatalogproducts_id_put", "tags": [ "Admin Catalog: Products" ], "responses": { "200": { "description": "Product updated. Returns the full AdminCatalogProduct payload, plus _warnings (array of strings) if any sub-resource fields were stripped from the payload.", "content": { "application/json": { "example": { "id": 42, "sku": "sp-001", "name": "Classic Watch", "type": "simple", "status": 1, "price": "99.9900", "formattedPrice": "$99.99", "warnings": [ "Images must be managed via POST /api/admin/catalog/products/{id}/images." ] } } }, "links": [] }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks catalog.products.edit." }, "404": { "description": "Product not found." }, "422": { "description": "Validation failure (sku duplicate, url_key duplicate, invalid boolean field, special_price ≥ price, invalid date range).", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Update a catalog product (any type)", "description": "Partial update (PATCH-style): send only the fields you want to change — every attribute on the product's family is editable by its code (sku, name, url_key, short_description, description, meta_title, color, size, brand, price, weight, status, …). Translatable fields are written to the requested locale; pass `?locale=fr&channel=default` to target a specific locale/channel (defaults to the store default). Omitted fields keep their current value. Type-structure keys are accepted for the matching type: `variants` (configurable), `bundle_options` (bundle), `links` (grouped), `downloadable_links`/`downloadable_samples` (downloadable), `booking` (booking). `categories`/`channels`/`related_products`/`up_sells`/`cross_sells` replace the current set when sent (omit to keep). Sub-resources `images`/`videos`/`inventories`/`customer_group_prices` have dedicated endpoints and are ignored here (noted in `_warnings`). Returns the full product detail (same shape as GET /catalog/products/{id}).", "parameters": [ { "name": "id", "in": "path", "description": "Product ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 42 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminCatalogProduct resource", "content": { "application/json": { "schema": { "type": "object", "description": "Every field on the product edit form is editable by its attribute code. Send only what you change. Pick a product type from the Examples dropdown to see the full edit-form body for that type.", "properties": { "sku": { "type": "string", "example": "sp-001" }, "name": { "type": "string", "example": "Arctic Beanie" }, "product_number": { "type": "string", "example": "PN-1001" }, "url_key": { "type": "string", "example": "arctic-beanie" }, "status": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "visible_individually": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "guest_checkout": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "new": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "featured": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "manage_stock": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "price": { "type": "string", "example": "99.99" }, "cost": { "type": "string", "example": "40.00" }, "special_price": { "type": "string", "example": "79.99" }, "special_price_from": { "type": "string", "format": "date", "example": "2026-08-01" }, "special_price_to": { "type": "string", "format": "date", "example": "2026-08-31" }, "GST": { "type": "string", "example": "5.00" }, "weight": { "type": "string", "example": "0.5" }, "length": { "type": "string", "example": "10" }, "width": { "type": "string", "example": "5" }, "height": { "type": "string", "example": "3" }, "tax_category_id": { "type": "integer", "example": 2 }, "color": { "type": "integer", "description": "Attribute option id.", "example": 1 }, "size": { "type": "integer", "description": "Attribute option id.", "example": 6 }, "brand": { "type": "integer", "description": "Attribute option id.", "example": 10 }, "short_description": { "type": "string", "example": "Warm knit beanie." }, "description": { "type": "string", "example": "Full HTML description." }, "meta_title": { "type": "string", "example": "Arctic Beanie" }, "meta_keywords": { "type": "string", "example": "beanie, winter" }, "meta_description": { "type": "string", "example": "Buy the Arctic Beanie." }, "categories": { "type": "array", "items": { "type": "integer" }, "example": [ 1, 8 ] }, "channels": { "type": "array", "items": { "type": "integer" }, "example": [ 1 ] }, "up_sells": { "type": "array", "items": { "type": "integer" }, "example": [ 2 ] }, "cross_sells": { "type": "array", "items": { "type": "integer" }, "example": [ 3 ] }, "related_products": { "type": "array", "items": { "type": "integer" }, "example": [ 2 ] }, "customizable_options": { "type": "object", "description": "Custom options (simple & virtual only). Keyed option_*; each option may carry a prices map keyed price_*." }, "super_attributes": { "type": "object", "description": "Configurable only. Map of attribute code to option-id list." }, "variants": { "type": "object", "description": "Configurable only. Per-variant fields keyed by variant product id." }, "bundle_options": { "type": "object", "description": "Bundle only. Option groups keyed option_*; products keyed product_*." }, "links": { "type": "object", "description": "Grouped only. Associated products keyed link_*." }, "downloadable_links": { "type": "object", "description": "Downloadable only. Links keyed link_*." }, "downloadable_samples": { "type": "object", "description": "Downloadable only. Samples keyed sample_*." }, "booking": { "type": "object", "description": "Booking only. type ∈ default/appointment/event/rental/table." }, "translations": { "type": "object", "description": "Optional locale-keyed override. Top-level codes already write to the request locale (?locale=).", "example": { "fr": { "name": "Bonnet Arctique" } } } } }, "examples": { "simple": { "summary": "Simple — every edit-form field", "value": { "sku": "sp-001", "name": "Arctic Beanie", "product_number": "PN-1001", "url_key": "arctic-beanie", "status": 1, "visible_individually": 1, "guest_checkout": 1, "new": 1, "featured": 1, "manage_stock": 1, "tax_category_id": 2, "color": 1, "size": 6, "brand": 10, "price": "99.99", "cost": "40.00", "special_price": "79.99", "special_price_from": "2026-08-01", "special_price_to": "2026-08-31", "GST": "5.00", "short_description": "Warm knit beanie.", "description": "Full HTML description.", "length": "10", "width": "5", "height": "3", "weight": "0.5", "meta_title": "Arctic Beanie", "meta_keywords": "beanie, winter", "meta_description": "Buy the Arctic Beanie.", "categories": [ 1, 8 ], "channels": [ 1 ], "up_sells": [ 2 ], "cross_sells": [ 3 ], "related_products": [ 2 ], "customizable_options": { "option_1": { "en": { "label": "Engraving text" }, "type": "text", "is_required": "1", "max_characters": "30", "sort_order": "1", "price": "5.00" }, "option_2": { "en": { "label": "Gift wrap" }, "type": "checkbox", "is_required": "0", "sort_order": "2", "prices": { "price_1": { "en": { "label": "Standard" }, "price": "3.00", "sort_order": "1" }, "price_2": { "en": { "label": "Premium" }, "price": "6.00", "sort_order": "2" } } } } } }, "virtual": { "summary": "Virtual — same fields as simple (no shipping needed; dimensions optional)", "value": { "sku": "vr-001", "name": "Online Gift Wrap", "url_key": "online-gift-wrap", "status": 1, "visible_individually": 1, "guest_checkout": 1, "manage_stock": 1, "tax_category_id": 2, "price": "9.99", "cost": "3.00", "GST": "5.00", "short_description": "Virtual add-on.", "description": "No shipping required.", "meta_title": "Gift Wrap", "categories": [ 1 ], "channels": [ 1 ], "customizable_options": { "option_1": { "en": { "label": "Message" }, "type": "textarea", "is_required": "0", "sort_order": "1", "price": "0.00" } } } }, "downloadable": { "summary": "Downloadable — common fields + links & samples", "value": { "sku": "dl-001", "name": "E-Book Bundle", "url_key": "ebook-bundle", "status": 1, "visible_individually": 1, "guest_checkout": 1, "manage_stock": 1, "tax_category_id": 2, "price": "15.00", "cost": "4.00", "GST": "5.00", "short_description": "Downloadable e-book.", "description": "Instant download.", "meta_title": "E-Book", "categories": [ 1 ], "channels": [ 1 ], "up_sells": [ 2 ], "cross_sells": [ 3 ], "related_products": [ 2 ], "downloadable_links": { "link_1": { "en": { "title": "Chapter 1 PDF" }, "price": "5.00", "downloads": "3", "sort_order": "1", "type": "url", "url": "https://example.com/ch1.pdf", "sample_type": "url", "sample_url": "https://example.com/sample.pdf" } }, "downloadable_samples": { "sample_1": { "title": "Preview", "sort_order": "1", "type": "url", "url": "https://example.com/preview.pdf" } } } }, "grouped": { "summary": "Grouped — common fields + linked products (no own price)", "value": { "sku": "gr-001", "name": "Starter Pack", "url_key": "starter-pack", "status": 1, "visible_individually": 1, "guest_checkout": 1, "tax_category_id": 2, "GST": "5.00", "weight": "0.5", "short_description": "A bundle of essentials.", "description": "Buy the set.", "meta_title": "Starter Pack", "categories": [ 1, 8 ], "channels": [ 1 ], "up_sells": [ 2 ], "cross_sells": [ 3 ], "related_products": [ 2 ], "links": { "link_1": { "associated_product_id": 1, "qty": "2", "sort_order": "1" }, "link_2": { "associated_product_id": 2, "qty": "1", "sort_order": "2" } } } }, "bundle": { "summary": "Bundle — common fields + option groups (dynamic price, no special_price)", "value": { "sku": "bn-001", "name": "Build Your Kit", "url_key": "build-your-kit", "status": 1, "visible_individually": 1, "guest_checkout": 1, "price": "0", "tax_category_id": 2, "GST": "5.00", "weight": "0.5", "short_description": "Pick your parts.", "description": "Custom kit.", "meta_title": "Build Your Kit", "categories": [ 1, 8 ], "channels": [ 1 ], "bundle_options": { "option_1": { "en": { "label": "Choose accessory" }, "type": "radio", "is_required": "1", "sort_order": "1", "products": { "product_1": { "product_id": 1, "qty": "1", "is_default": "1", "sort_order": "1" }, "product_2": { "product_id": 2, "qty": "1", "is_default": "0", "sort_order": "2" } } } } } }, "configurable": { "summary": "Configurable — common fields + per-variant fields (color/size set per variant)", "value": { "sku": "cf-001", "name": "Wool Beanie", "url_key": "wool-beanie", "status": 1, "visible_individually": 1, "guest_checkout": 1, "tax_category_id": 2, "GST": "5.00", "short_description": "Choose colour & size.", "description": "Configurable beanie.", "meta_title": "Wool Beanie", "categories": [ 1, 8 ], "channels": [ 1 ], "variants": { "2872": { "sku": "BEANIE-RED-S", "name": "Red / Small", "price": "29.99", "cost": "8.00", "weight": "0.3", "status": "1", "color": 1, "size": 6 }, "2873": { "sku": "BEANIE-BLUE-S", "name": "Blue / Small", "price": "29.99", "cost": "8.00", "weight": "0.3", "status": "1", "color": 2, "size": 6 } } } }, "booking": { "summary": "Booking — common fields + booking block (type: default/appointment/event/rental/table)", "value": { "sku": "bk-001", "name": "Studio Session", "url_key": "studio-session", "status": 1, "visible_individually": 1, "guest_checkout": 1, "tax_category_id": 2, "GST": "5.00", "price": "99.99", "weight": "0.5", "short_description": "Book a slot.", "description": "Recurring weekly slots.", "meta_title": "Studio Session", "categories": [ 1 ], "channels": [ 1 ], "booking": { "type": "default", "qty": "1", "location": "Studio A", "available_every_week": "1", "booking_type": "many", "duration": "60", "break_time": "10", "slots": [ { "from": "09:00", "to": "17:00" } ] } } } } } }, "required": true } }, "delete": { "operationId": "api_apiadmincatalogproducts_id_delete", "tags": [ "Admin Catalog: Products" ], "responses": { "204": { "description": "Product deleted." }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks catalog.products.delete." }, "404": { "description": "Product not found." } }, "summary": "Delete a catalog product", "description": "Deletes a catalog product. For configurable products, all variants cascade. No \"refuse if in non-completed order\" guard (mirrors Bagisto admin behaviour). Fires catalog.product.delete.before / catalog.product.delete.after. Returns 204 on success.", "parameters": [ { "name": "id", "in": "path", "description": "Product ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 42 }, "style": "simple", "explode": false } ] } }, "/catalog/products/{productId}/customer-group-prices": { "get": { "operationId": "api_apiadmincatalogproducts_productIdcustomer-group-prices_get_collection", "tags": [ "Admin Catalog: Products" ], "responses": { "200": { "description": "Customer-group prices listed.", "content": { "application/json": { "example": { "data": [ { "id": 12, "qty": 1, "valueType": "fixed", "value": 19.99, "customerGroupId": 2, "customerGroupName": "Wholesale", "productId": 1 } ], "meta": { "currentPage": 1, "perPage": 1, "lastPage": 1, "total": 1, "from": 1, "to": 1 } } } } } }, "summary": "List customer-group (tier) prices for a product", "description": "Returns every customer-group price row attached to the product, wrapped in the standard admin `{ data, meta }` envelope.", "parameters": [ { "name": "productId", "in": "path", "description": "Product ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "simple", "explode": false } ] }, "post": { "operationId": "api_apiadmincatalogproducts_productIdcustomer-group-prices_post", "tags": [ "Admin Catalog: Products" ], "responses": { "201": { "description": "Tier-price row created.", "content": { "application/json": { "example": { "id": 12, "qty": 10, "valueType": "discount", "value": 15, "customerGroupId": 2, "productId": 1 } } }, "links": [] }, "422": { "description": "Validation failed (e.g. duplicate qty/customer-group, unknown group, qty < 1).", "links": [] }, "404": { "description": "Product not found." }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Add a customer-group price to a product", "description": "Creates a new tier-price row. `customer_group_id: null` makes the price apply to every customer group. The combination `(qty, customer_group_id)` must be unique per product.", "parameters": [ { "name": "productId", "in": "path", "description": "Product ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminCatalogProductCustomerGroupPrice resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "qty", "value_type", "value" ], "properties": { "qty": { "type": "integer", "minimum": 1, "example": 10 }, "value_type": { "type": "string", "enum": [ "fixed", "discount" ], "example": "discount" }, "value": { "type": "number", "example": 15 }, "customer_group_id": { "type": "integer", "nullable": true, "example": 2 } } } } }, "required": true } } }, "/catalog/products/{productId}/customer-group-prices/{id}": { "put": { "operationId": "api_apiadmincatalogproducts_productIdcustomer-group-prices_id_put", "tags": [ "Admin Catalog: Products" ], "responses": { "200": { "description": "Tier-price row updated.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminCatalogProductCustomerGroupPrice" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminCatalogProductCustomerGroupPrice.html" } } }, "links": [] }, "404": { "description": "Product or row not found, or row does not belong to product." }, "422": { "description": "Validation failed.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Update a customer-group price row", "description": "Partially updates the given tier-price row. The new `(qty, customer_group_id)` combination must remain unique for the product.", "parameters": [ { "name": "productId", "in": "path", "description": "Product ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "simple", "explode": false }, { "name": "id", "in": "path", "description": "Customer-group-price row ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 12 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminCatalogProductCustomerGroupPrice resource", "content": { "application/json": { "schema": { "type": "object", "properties": { "qty": { "type": "integer", "minimum": 1, "example": 5 }, "value_type": { "type": "string", "enum": [ "fixed", "discount" ], "example": "fixed" }, "value": { "type": "number", "example": 17.5 }, "customer_group_id": { "type": "integer", "nullable": true, "example": null } } } } }, "required": true } }, "delete": { "operationId": "api_apiadmincatalogproducts_productIdcustomer-group-prices_id_delete", "tags": [ "Admin Catalog: Products" ], "responses": { "200": { "description": "Tier-price row deleted.", "content": { "application/json": { "example": { "message": "Customer-group price deleted successfully." } } } }, "404": { "description": "Row not found or does not belong to product." } }, "summary": "Delete a customer-group price row", "description": "Delete a customer-group price row", "parameters": [ { "name": "productId", "in": "path", "description": "Product ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "simple", "explode": false }, { "name": "id", "in": "path", "description": "Customer-group-price row ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 12 }, "style": "simple", "explode": false } ] } }, "/catalog/products/{productId}/downloadable-links/upload": { "post": { "operationId": "api_apiadmincatalogproducts_productIddownloadable-linksupload_post", "tags": [ "Admin Catalog: Products" ], "responses": { "201": { "description": "File stored. Use `path` on the product update.", "content": { "application/json": { "example": { "type": "link", "path": "product_downloadable_links/12/abc123.zip", "name": "user-manual.zip", "url": "/storage/product_downloadable_links/12/abc123.zip" } } }, "links": [] }, "422": { "description": "Missing or invalid file.", "links": [] }, "404": { "description": "Product not found." }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Upload a downloadable link file", "description": "Uploads the binary file for a file-type downloadable link and returns its stored path. Send as multipart/form-data with `file`. The returned `path` is what you then set on the link via the product update (`downloadable_links[link_x][file] = path`, `type = file`). URL-type links do not need this — set their `url` directly on update.", "parameters": [ { "name": "productId", "in": "path", "description": "Parent product ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 12 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminCatalogProductDownloadableFile resource", "content": { "multipart/form-data": { "schema": { "type": "object", "required": [ "file" ], "properties": { "file": { "type": "string", "format": "binary" } } } } }, "required": true } } }, "/catalog/products/{productId}/downloadable-samples/upload": { "post": { "operationId": "api_apiadmincatalogproducts_productIddownloadable-samplesupload_post", "tags": [ "Admin Catalog: Products" ], "responses": { "201": { "description": "File stored. Use `path` on the product update.", "content": { "application/json": { "example": { "type": "sample", "path": "product_downloadable_samples/12/def456.zip", "name": "preview.zip", "url": "/storage/product_downloadable_samples/12/def456.zip" } } }, "links": [] }, "422": { "description": "Missing or invalid file.", "links": [] }, "404": { "description": "Product not found." }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Upload a downloadable sample file", "description": "Uploads the binary file for a file-type downloadable sample and returns its stored path. Send as multipart/form-data with `file`. The returned `path` is what you then set on the sample via the product update (`downloadable_samples[sample_x][file] = path`, `type = file`).", "parameters": [ { "name": "productId", "in": "path", "description": "Parent product ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 12 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminCatalogProductDownloadableFile resource", "content": { "multipart/form-data": { "schema": { "type": "object", "required": [ "file" ], "properties": { "file": { "type": "string", "format": "binary" } } } } }, "required": true } } }, "/catalog/products/{productId}/downloadable/{attributeId}/download": { "get": { "operationId": "api_apiadmincatalogproducts_productIddownloadable_attributeIddownload_get", "tags": [ "Admin Catalog: Products" ], "responses": { "200": { "description": "File streamed (application/octet-stream attachment).", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "404": { "description": "No stored file for the product / attribute." }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks catalog.products." } }, "summary": "Download a stored downloadable file", "description": "Streams the stored file for the given product attribute (a downloadable product's file/sample attribute) as a binary attachment. Send `Accept: application/octet-stream`. Binary download, not JSON.", "parameters": [ { "name": "productId", "in": "path", "description": "Product ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 12 }, "style": "simple", "explode": false }, { "name": "attributeId", "in": "path", "description": "Attribute ID whose stored file path should be streamed.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 26 }, "style": "simple", "explode": false } ] } }, "/catalog/products/{productId}/images": { "post": { "operationId": "api_apiadmincatalogproducts_productIdimages_post", "tags": [ "Admin Catalog: Products" ], "responses": { "201": { "description": "Image uploaded.", "content": { "application/json": { "example": { "id": 47, "productId": 12, "path": "product/12/abc123.webp", "position": 1, "url": "/storage/product/12/abc123.webp", "altText": "Blue running shoe, side view" } } }, "links": [] }, "422": { "description": "Validation failure (missing file, invalid mime, too large).", "links": [] }, "404": { "description": "Product not found." }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Upload a product image", "description": "Uploads a new image for the given product. Send as multipart/form-data with `image` containing the file (allowed mime types: bmp, jpeg, jpg, png, webp). Optional `alt_text` is stored for every locale the request covers.", "parameters": [ { "name": "productId", "in": "path", "description": "Parent product ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 12 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminCatalogProductImage resource", "content": { "multipart/form-data": { "schema": { "type": "object", "required": [ "image" ], "properties": { "image": { "type": "string", "format": "binary" }, "position": { "type": "integer", "example": 1 }, "alt_text": { "type": "string", "example": "Blue running shoe, side view" } } } } }, "required": true } } }, "/catalog/products/{productId}/images/reorder": { "put": { "operationId": "api_apiadmincatalogproducts_productIdimagesreorder_put", "tags": [ "Admin Catalog: Products" ], "responses": { "200": { "description": "Images reordered. Returns the updated list ordered by position.", "content": { "application/json": { "example": { "success": true, "message": "Product images reordered successfully.", "images": [ { "id": 48, "productId": 12, "path": "product/12/xyz.webp", "position": 1, "url": "/storage/product/12/xyz.webp" }, { "id": 47, "productId": 12, "path": "product/12/abc.webp", "position": 2, "url": "/storage/product/12/abc.webp" } ] } } }, "links": [] }, "422": { "description": "Image id does not belong to the product, or order payload invalid.", "links": [] }, "400": { "description": "Invalid input", "links": [] }, "404": { "description": "Not found", "links": [] } }, "summary": "Reorder product images", "description": "Updates the position of one or more existing images for the given product. Each image id must belong to the product; otherwise the call is rejected.", "parameters": [ { "name": "productId", "in": "path", "description": "Parent product ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 12 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminCatalogProductImage resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "order" ], "properties": { "order": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "position": { "type": "integer" } } }, "example": [ { "id": 47, "position": 2 }, { "id": 48, "position": 1 } ] } } } } }, "required": true } } }, "/catalog/products/{productId}/images/{id}": { "put": { "operationId": "api_apiadmincatalogproducts_productIdimages_id_put", "tags": [ "Admin Catalog: Products" ], "responses": { "200": { "description": "Image updated.", "content": { "application/json": { "example": { "id": 47, "productId": 12, "path": "product/12/abc123.webp", "position": 2, "url": "/storage/product/12/abc123.webp", "altText": "Blue running shoe, side view" } } }, "links": [] }, "404": { "description": "Image (or its parent product) not found." }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Update a product image", "description": "Edits what is stored alongside an uploaded image — its alt text and its position. The file itself is replaced by uploading a new image and deleting this one.", "parameters": [ { "name": "productId", "in": "path", "description": "Parent product ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 12 }, "style": "simple", "explode": false }, { "name": "id", "in": "path", "description": "Image ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 47 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminCatalogProductImage resource", "content": { "application/json": { "schema": { "type": "object", "properties": { "alt_text": { "type": "string", "example": "Blue running shoe, side view" }, "position": { "type": "integer", "example": 2 } } } } }, "required": true } }, "delete": { "operationId": "api_apiadmincatalogproducts_productIdimages_id_delete", "tags": [ "Admin Catalog: Products" ], "responses": { "200": { "description": "Image deleted.", "content": { "application/json": { "example": { "success": true, "message": "Product image deleted successfully." } } } }, "404": { "description": "Image (or its parent product) not found." } }, "summary": "Delete a product image", "description": "Deletes the DB row and removes the file from public storage.", "parameters": [ { "name": "productId", "in": "path", "description": "Parent product ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 12 }, "style": "simple", "explode": false }, { "name": "id", "in": "path", "description": "Image ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 47 }, "style": "simple", "explode": false } ] } }, "/catalog/products/{productId}/inventories": { "get": { "operationId": "api_apiadmincatalogproducts_productIdinventories_get_collection", "tags": [ "Admin Catalog: Products" ], "responses": { "200": { "description": "Inventory rows for the product.", "content": { "application/json": { "example": { "data": [ { "id": 14, "sourceId": 1, "sourceCode": "default", "sourceName": "Default", "qty": 25 } ], "meta": { "currentPage": 1, "perPage": 1, "lastPage": 1, "total": 1, "from": 1, "to": 1, "totalQty": 25 } } } } }, "401": { "description": "Missing or invalid admin token." }, "404": { "description": "Product not found." } }, "summary": "List per-source inventory rows for a product", "description": "Returns one row per inventory_source that has a product_inventories entry for this product. The envelope meta carries totalQty — the sum across all sources.", "parameters": [ { "name": "productId", "in": "path", "description": "Product ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadmincatalogproducts_productIdinventories_put", "tags": [ "Admin Catalog: Products" ], "responses": { "200": { "description": "Inventories saved. Returns the refreshed listing payload.", "content": { "application/json": { "example": { "data": [ { "id": 14, "sourceId": 1, "sourceCode": "default", "sourceName": "Default", "qty": 25 } ], "meta": { "currentPage": 1, "perPage": 1, "lastPage": 1, "total": 1, "from": 1, "to": 1, "totalQty": 25 } } } }, "links": [] }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks catalog.products.edit." }, "404": { "description": "Product not found." }, "422": { "description": "Validation failed — missing inventories, unknown inventory_source_id, or negative quantity.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Bulk-update a product's per-source inventory quantities", "description": "Mirrors Bagisto monolith ProductController::updateInventories. Fires catalog.product.update.before / catalog.product.update.after. Returns the updated listing payload — same shape as GET.", "parameters": [ { "name": "productId", "in": "path", "description": "Product ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminCatalogProductInventory resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "inventories" ], "properties": { "inventories": { "type": "object", "description": "Map of inventory_source_id → quantity. Use 0 to zero-out a source.", "additionalProperties": { "type": "integer", "minimum": 0 } } } }, "example": { "inventories": { "1": 25, "2": 0 } } } }, "required": true } } }, "/catalog/products/{productId}/videos": { "post": { "operationId": "api_apiadmincatalogproducts_productIdvideos_post", "tags": [ "Admin Catalog: Products" ], "responses": { "201": { "description": "Video uploaded.", "content": { "application/json": { "example": { "id": 8, "productId": 12, "path": "product/12/xyz789.mp4", "position": 1, "url": "/storage/product/12/xyz789.mp4" } } }, "links": [] }, "422": { "description": "Validation failure (missing file, invalid type, too large).", "links": [] }, "404": { "description": "Product not found." }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Upload a product video", "description": "Uploads a new video for the given product. Send as multipart/form-data with `video` containing the file (mp4, webm, ogg). Optional `position`.", "parameters": [ { "name": "productId", "in": "path", "description": "Parent product ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 12 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminCatalogProductVideo resource", "content": { "multipart/form-data": { "schema": { "type": "object", "required": [ "video" ], "properties": { "video": { "type": "string", "format": "binary" }, "position": { "type": "integer", "example": 1 } } } } }, "required": true } } }, "/catalog/products/{productId}/videos/reorder": { "put": { "operationId": "api_apiadmincatalogproducts_productIdvideosreorder_put", "tags": [ "Admin Catalog: Products" ], "responses": { "200": { "description": "Videos reordered. Returns the updated list ordered by position.", "content": { "application/json": { "example": { "success": true, "message": "Product videos reordered successfully.", "videos": [ { "id": 9, "productId": 12, "path": "product/12/def456.mp4", "position": 1, "url": "/storage/product/12/def456.mp4" }, { "id": 8, "productId": 12, "path": "product/12/xyz789.mp4", "position": 2, "url": "/storage/product/12/xyz789.mp4" } ] } } }, "links": [] }, "404": { "description": "Product not found." }, "422": { "description": "Video id does not belong to the product, or order payload invalid.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Reorder product videos", "description": "Updates the position of one or more existing videos for the given product. Each video id must belong to the product; otherwise the call is rejected.", "parameters": [ { "name": "productId", "in": "path", "description": "Parent product ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 12 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminCatalogProductVideo resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "order" ], "properties": { "order": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "position": { "type": "integer" } } }, "example": [ { "id": 8, "position": 2 }, { "id": 9, "position": 1 } ] } } } } }, "required": true } } }, "/catalog/products/{productId}/videos/{id}": { "delete": { "operationId": "api_apiadmincatalogproducts_productIdvideos_id_delete", "tags": [ "Admin Catalog: Products" ], "responses": { "200": { "description": "Video deleted.", "content": { "application/json": { "example": { "success": true, "message": "Product video deleted successfully." } } } }, "404": { "description": "Video (or its parent product) not found." } }, "summary": "Delete a product video", "description": "Deletes the DB row and removes the file from public storage.", "parameters": [ { "name": "productId", "in": "path", "description": "Parent product ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 12 }, "style": "simple", "explode": false }, { "name": "id", "in": "path", "description": "Video ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 8 }, "style": "simple", "explode": false } ] } }, "/catalog/products/{sourceId}/copy": { "post": { "operationId": "api_apiadmincatalogproducts_sourceIdcopy_post", "tags": [ "Admin Catalog: Products" ], "responses": { "200": { "description": "Product copied successfully.", "content": { "application/json": { "example": { "id": 43, "sourceId": 12, "sku": "SKU-001-copy-1", "type": "simple", "name": "Test SKU-001 (Copy)", "success": true, "message": "Product copied successfully." } } }, "links": [] }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks catalog.products.create." }, "404": { "description": "Source product not found." }, "422": { "description": "Source product is a configurable variant (parent_id is set) — variants cannot be copied.", "links": [] }, "500": { "description": "Underlying copy threw an exception." }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Copy a catalog product", "description": "Duplicates an existing product across all attribute_values, images, inventories, categories and customer_group_prices. Refuses variants (parent_id != null) with HTTP 422. Mirrors Bagisto monolith ProductController::copy. Fires catalog.product.create.before and catalog.product.create.after.", "parameters": [ { "name": "sourceId", "in": "path", "description": "ID of the product to copy", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminCatalogProductCopy resource", "content": { "application/json": { "schema": { "type": "object" }, "example": [] } }, "required": false } } }, "/configuration": { "get": { "operationId": "api_apiadminconfiguration_get_collection", "tags": [ "Admin Configuration" ], "responses": { "200": { "description": "Effective values.", "content": { "application/json": { "example": [ { "slug": "sales.order_settings", "channel": "default", "locale": "en", "values": { "sales.order_settings.reorder.admin": "1", "sales.order_settings.reorder.shop": "1", "sales.order_settings.minimum_order.enable": "0" } } ] } } }, "404": { "description": "Slug not found." }, "422": { "description": "Slug query parameter missing." }, "401": { "description": "Unauthenticated." } }, "summary": "Configuration values for one slug", "description": "Returns the flat `key → string` map of effective values for every field under the given slug. Falls back to per-field defaults when no `core_config` row exists.", "parameters": [ { "name": "slug", "in": "query", "description": "Required. `Welcome to our store!
", "createdAt": "2026-05-28T10:57:33+05:30", "updatedAt": "2026-05-28T10:57:33+05:30" } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 1, "total": 4, "from": 1, "to": 4 } } } } } }, "summary": "List email templates", "description": "Filters: name (LIKE), status. Sort: id (default desc), name.", "parameters": [ { "name": "page", "in": "query", "description": "Page number.", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "name", "in": "query", "description": "Partial name match.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "status", "in": "query", "description": "Status filter.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "active", "inactive", "draft" ] }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort column.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "name" ] }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadminmarketingtemplates_post", "tags": [ "Admin Marketing: Communications" ], "responses": { "201": { "description": "Template created.", "content": { "application/json": { "example": { "id": 21, "name": "Welcome Email", "status": "active", "content": "Welcome to our store!
", "createdAt": "2026-05-28T10:57:33+05:30", "updatedAt": "2026-05-28T10:57:33+05:30" } } }, "links": [] }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create an email template", "description": "Create an email template", "parameters": [], "requestBody": { "description": "The new AdminMarketingTemplate resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "name", "status", "content" ], "properties": { "name": { "type": "string", "example": "Welcome Email" }, "status": { "type": "string", "enum": [ "active", "inactive", "draft" ], "example": "active" }, "content": { "type": "string", "example": "Welcome to our store!
" } } } } }, "required": true } } }, "/marketing/templates/{id}": { "get": { "operationId": "api_apiadminmarketingtemplates_id_get", "tags": [ "Admin Marketing: Communications" ], "responses": { "200": { "description": "Single template with content.", "content": { "application/json": { "example": { "id": 21, "name": "Welcome Email", "status": "active", "content": "Welcome to our store!
", "createdAt": "2026-05-28T10:57:33+05:30", "updatedAt": "2026-05-28T10:57:33+05:30" } } } }, "404": { "description": "Template not found." } }, "summary": "Email template detail", "description": "Email template detail", "parameters": [ { "name": "id", "in": "path", "description": "Marketing template ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadminmarketingtemplates_id_put", "tags": [ "Admin Marketing: Communications" ], "responses": { "200": { "description": "Template updated; returns the updated detail.", "content": { "application/json": { "example": { "id": 21, "name": "Welcome Email", "status": "active", "content": "Welcome to our store!
", "createdAt": "2026-05-28T10:57:33+05:30", "updatedAt": "2026-05-28T10:57:33+05:30" } } }, "links": [] }, "404": { "description": "Template not found." }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Update an email template", "description": "Update an email template", "parameters": [ { "name": "id", "in": "path", "description": "Marketing template ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminMarketingTemplate resource", "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "example": "Welcome Email" }, "status": { "type": "string", "enum": [ "active", "inactive", "draft" ], "example": "active" }, "content": { "type": "string", "example": "Welcome to our store!
" } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminmarketingtemplates_id_delete", "tags": [ "Admin Marketing: Communications" ], "responses": { "200": { "description": "Deleted.", "content": { "application/json": { "example": { "message": "Email template deleted." } } } }, "404": { "description": "Template not found." } }, "summary": "Delete an email template", "description": "Delete an email template", "parameters": [ { "name": "id", "in": "path", "description": "Marketing template ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] } }, "/marketing/cart-rules": { "get": { "operationId": "api_apiadminmarketingcart-rules_get_collection", "tags": [ "Admin Marketing: Promotions" ], "responses": { "200": { "description": "Paginated list in the { data, meta } envelope. conditions / channels / customerGroups are detail-only and null on list rows.", "content": { "application/json": { "example": { "data": [ { "id": 17, "name": "10% off summer", "description": "Sitewide 10% off summer collection", "startsFrom": "2026-06-01T00:00:00+05:30", "endsTill": "2026-08-31T23:59:59+05:30", "status": 1, "couponType": 1, "useAutoGeneration": 0, "usagePerCustomer": 1, "usesPerCoupon": 100, "timesUsed": 0, "conditionType": 1, "conditions": null, "actionType": "by_percent", "discountAmount": 10, "discountQuantity": 1, "discountStep": "0", "applyToShipping": 0, "freeShipping": 0, "endOtherRules": 0, "usesAttributeConditions": 0, "sortOrder": 0, "couponCode": "SUMMER10", "channels": null, "customerGroups": null, "createdAt": "2026-06-09T13:48:29+05:30", "updatedAt": "2026-06-09T13:48:29+05:30" } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 1, "total": 1, "from": 1, "to": 1 } } } } } }, "summary": "List cart rules", "description": "Paginated, filterable, sortable list. Returns the standard { data, meta } admin envelope.", "parameters": [ { "name": "page", "in": "query", "description": "Page number.", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "id", "in": "query", "description": "Filter by ID (single or comma-separated).", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "name", "in": "query", "description": "Filter by name (partial match).", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "coupon_code", "in": "query", "description": "Filter by coupon code (partial match).", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "status", "in": "query", "description": "Filter by status (0/1).", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "coupon_type", "in": "query", "description": "Filter by coupon_type (1/2).", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "sort_order", "in": "query", "description": "Filter by priority (sort_order, exact).", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "starts_from_from", "in": "query", "description": "Start date >= (ISO 8601).", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date-time" }, "style": "form", "explode": true }, { "name": "starts_from_to", "in": "query", "description": "Start date <= (ISO 8601).", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date-time" }, "style": "form", "explode": true }, { "name": "ends_till_from", "in": "query", "description": "End date >= (ISO 8601).", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date-time" }, "style": "form", "explode": true }, { "name": "ends_till_to", "in": "query", "description": "End date <= (ISO 8601).", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date-time" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort column.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "name", "sort_order" ] }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadminmarketingcart-rules_post", "tags": [ "Admin Marketing: Promotions" ], "responses": { "201": { "description": "Cart rule created.", "content": { "application/json": { "example": { "id": 17, "name": "10% off summer", "description": "Sitewide 10% off summer collection", "startsFrom": "2026-06-01T00:00:00+05:30", "endsTill": "2026-08-31T23:59:59+05:30", "status": 1, "couponType": 1, "useAutoGeneration": 0, "usagePerCustomer": 1, "usesPerCoupon": 100, "timesUsed": 0, "conditionType": 1, "conditions": [ { "attribute": "cart|base_sub_total", "operator": ">=", "value": "100", "attribute_type": "price" } ], "actionType": "by_percent", "discountAmount": 10, "discountQuantity": 1, "discountStep": "0", "applyToShipping": 0, "freeShipping": 0, "endOtherRules": 0, "usesAttributeConditions": 0, "sortOrder": 0, "couponCode": "SUMMER10", "channels": [ { "id": 1, "code": "default", "name": "Default" } ], "customerGroups": [ { "id": 1, "code": "guest", "name": "Guest" }, { "id": 2, "code": "general", "name": "General" } ], "createdAt": "2026-06-09T13:48:29+05:30", "updatedAt": "2026-06-09T13:48:29+05:30" } } }, "links": [] }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create a new cart rule", "description": "Create a new cart rule", "parameters": [], "requestBody": { "description": "The new AdminMarketingCartRule resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "name", "channels", "customer_groups", "coupon_type", "action_type", "discount_amount" ], "properties": { "name": { "type": "string", "example": "10% off summer" }, "description": { "type": "string", "example": "Sitewide 10% off summer collection" }, "channels": { "type": "array", "items": { "type": "integer" }, "description": "Assigned channel ids (request stays id-based; the response returns objects).", "example": [ 1 ] }, "customer_groups": { "type": "array", "items": { "type": "integer" }, "description": "Assigned customer-group ids (request stays id-based; the response returns objects).", "example": [ 1, 2, 3 ] }, "coupon_type": { "type": "integer", "enum": [ 0, 1 ], "description": "0 = no coupon (auto-applied), 1 = specific coupon.", "example": 1 }, "use_auto_generation": { "type": "integer", "enum": [ 0, 1 ], "description": "When coupon_type=1: 1 = auto-generate codes, 0 = use the supplied coupon_code.", "example": 0 }, "coupon_code": { "type": "string", "description": "Required when coupon_type=1 and use_auto_generation=0; must be unique.", "example": "SUMMER10" }, "uses_per_coupon": { "type": "integer", "description": "Total redemptions allowed per coupon (0 = unlimited).", "example": 100 }, "usage_per_customer": { "type": "integer", "description": "Redemptions allowed per customer (0 = unlimited).", "example": 1 }, "condition_type": { "type": "integer", "enum": [ 1, 2 ], "description": "1 = all conditions true, 2 = any condition true.", "example": 1 }, "conditions": { "type": "array", "items": { "type": "object" }, "description": "Condition rows: { attribute, operator, value, attribute_type }.", "example": [ { "attribute": "cart|base_sub_total", "operator": ">=", "value": "100", "attribute_type": "price" } ] }, "action_type": { "type": "string", "enum": [ "by_percent", "by_fixed", "cart_fixed", "buy_x_get_y" ], "example": "by_percent" }, "discount_amount": { "type": "number", "description": "0-100 when action_type=by_percent.", "example": 10 }, "discount_quantity": { "type": "integer", "description": "Max quantity discounted (buy_x_get_y).", "example": 1 }, "discount_step": { "type": "integer", "description": "Buy-X step (buy_x_get_y).", "example": 0 }, "apply_to_shipping": { "type": "integer", "enum": [ 0, 1 ], "description": "Apply the discount to shipping too.", "example": 0 }, "free_shipping": { "type": "integer", "enum": [ 0, 1 ], "example": 0 }, "end_other_rules": { "type": "integer", "enum": [ 0, 1 ], "description": "Stop processing further rules when this one matches.", "example": 0 }, "sort_order": { "type": "integer", "description": "Priority (lower runs first).", "example": 0 }, "starts_from": { "type": "string", "format": "date-time", "example": "2026-06-01 00:00:00" }, "ends_till": { "type": "string", "format": "date-time", "example": "2026-08-31 23:59:59" }, "status": { "type": "integer", "enum": [ 0, 1 ], "example": 1 } } } } }, "required": true } } }, "/marketing/cart-rules/condition-attributes": { "get": { "operationId": "api_apiadminmarketingcart-rulescondition-attributes_get_collection", "tags": [ "Admin Marketing: Promotions" ], "responses": { "200": { "description": "Condition attributes and operators.", "content": { "application/json": { "example": [ { "attributes": [ { "key": "product", "label": "Product Attribute", "children": [ { "key": "product|attribute_family_id", "type": "select", "label": "Attribute Family", "options": [ { "id": 1, "admin_name": "Default" } ] } ] } ], "operators": { "select": [ { "operator": "==", "label": "Is equal to" }, { "operator": "!=", "label": "Is not equal to" } ] } } ] } } }, "401": { "description": "Unauthenticated." }, "403": { "description": "No permission." } }, "summary": "Cart rule condition attributes", "description": "Every attribute a condition can test, grouped as on the admin form, each with its `type` and selectable `options`, plus the operators each type accepts. Build `conditions` entries as `{ attribute: key, operator, value, attribute_type: type }`.", "parameters": [] } }, "/marketing/cart-rules/mass-delete": { "post": { "operationId": "api_apiadminmarketingcart-rulesmass-delete_post", "tags": [ "Admin Marketing: Promotions" ], "responses": { "200": { "description": "Cart rules deleted.", "content": { "application/json": { "example": { "deleted": [ 12, 18 ], "skipped": [], "message": "Cart rules deleted." } } }, "links": [] }, "422": { "description": "Empty indices.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Mass delete cart rules", "description": "Deletes a batch of cart rules. Non-existent IDs are silently skipped.", "parameters": [], "requestBody": { "description": "The new AdminMarketingCartRuleMassDelete resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 3, 5 ] } } } } }, "required": true } } }, "/marketing/cart-rules/{cartRuleId}/coupons": { "get": { "operationId": "api_apiadminmarketingcart-rules_cartRuleIdcoupons_get_collection", "tags": [ "Admin Marketing: Promotions" ], "responses": { "200": { "description": "Coupons for the cart rule.", "content": { "application/json": { "example": { "data": [ { "id": 22, "cartRuleId": 47, "code": "SUMMER10", "usageLimit": 100, "usagePerCustomer": 1, "timesUsed": 0, "type": 1, "isPrimary": false, "expiredAt": "2026-12-31", "createdAt": "2026-06-09T13:48:29+05:30", "updatedAt": "2026-06-09T13:48:29+05:30" } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 1, "total": 1, "from": 1, "to": 1 } } } } }, "404": { "description": "Cart rule not found." } }, "summary": "List coupons for a cart rule", "description": "List coupons for a cart rule", "parameters": [ { "name": "cartRuleId", "in": "path", "description": "Parent cart rule ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ] }, "post": { "operationId": "api_apiadminmarketingcart-rules_cartRuleIdcoupons_post", "tags": [ "Admin Marketing: Promotions" ], "responses": { "201": { "description": "Coupon created.", "content": { "application/json": { "example": { "id": 22, "cartRuleId": 47, "code": "SUMMER10", "usageLimit": 100, "usagePerCustomer": 1, "timesUsed": 0, "type": 1, "isPrimary": false, "expiredAt": "2026-12-31", "createdAt": "2026-06-09T13:48:29+05:30", "updatedAt": "2026-06-09T13:48:29+05:30" } } }, "links": [] }, "404": { "description": "Cart rule not found." }, "422": { "description": "Validation failed (e.g. code missing or already in use).", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create a single coupon code for a cart rule", "description": "Create a single coupon code for a cart rule", "parameters": [ { "name": "cartRuleId", "in": "path", "description": "Parent cart rule ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminMarketingCartRuleCoupon resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "code" ], "properties": { "code": { "type": "string", "example": "WELCOME10" }, "usage_limit": { "type": "integer", "example": 100, "nullable": true }, "usage_per_customer": { "type": "integer", "example": 1, "nullable": true }, "expired_at": { "type": "string", "format": "date", "nullable": true, "example": "2027-12-31" } } } } }, "required": true } } }, "/marketing/cart-rules/{cartRuleId}/coupons/export": { "get": { "operationId": "api_apiadminmarketingcart-rules_cartRuleIdcouponsexport_get", "tags": [ "Admin Marketing: Promotions" ], "responses": { "200": { "description": "Export file downloaded as an attachment.", "content": { "text/csv": { "schema": { "type": "string", "format": "binary" } }, "application/vnd.ms-excel": { "schema": { "type": "string", "format": "binary" } }, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { "schema": { "type": "string", "format": "binary" } } } }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks marketing.promotions.cart_rules." }, "404": { "description": "Cart rule not found." }, "422": { "description": "Unsupported format (csv, xls and xlsx only)." } }, "summary": "Export cart rule coupons as csv, xls or xlsx", "description": "Downloads the coupons datagrid shown on the cart rule edit screen — ID, Coupon Code, Times Used, Created Date, Expiration Date — for this cart rule only. Binary download, not JSON. Requires `marketing.promotions.cart_rules`.", "parameters": [ { "name": "format", "in": "query", "description": "Export format: csv, xls or xlsx. Defaults to csv.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "csv", "xls", "xlsx" ], "default": "csv" }, "style": "form", "explode": true }, { "name": "cartRuleId", "in": "path", "description": "Parent cart rule ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ] } }, "/marketing/cart-rules/{cartRuleId}/coupons/generate": { "post": { "operationId": "api_apiadminmarketingcart-rules_cartRuleIdcouponsgenerate_post", "tags": [ "Admin Marketing: Promotions" ], "responses": { "201": { "description": "Coupons generated.", "content": { "application/json": { "example": { "generated": 3, "coupons": [ { "id": 23, "cartRuleId": 47, "code": "SUMMER-AB12", "usageLimit": 100, "usagePerCustomer": 1, "timesUsed": 0, "type": 1, "isPrimary": false, "expiredAt": "2026-12-31", "createdAt": "2026-06-10T09:00:00+05:30", "updatedAt": "2026-06-10T09:00:00+05:30" } ] } } }, "links": [] }, "404": { "description": "Parent cart rule not found." }, "422": { "description": "Validation failed (invalid length, format, or coupon_qty).", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Bulk-generate coupons for a cart rule", "description": "Generates `coupon_qty` random codes of the given format and length, optionally with prefix/suffix. Inherits usage_limit/usage_per_customer/expired_at from the parent cart rule.", "parameters": [ { "name": "cartRuleId", "in": "path", "description": "Parent cart rule ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminMarketingCartRuleCouponGenerate resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "length", "format", "coupon_qty" ], "properties": { "length": { "type": "integer", "minimum": 4, "maximum": 30, "example": 10 }, "format": { "type": "string", "enum": [ "alphabetic", "alphanumeric", "numeric" ], "example": "alphanumeric" }, "prefix": { "type": "string", "nullable": true, "example": "SAVE-" }, "suffix": { "type": "string", "nullable": true, "example": "-2026" }, "coupon_qty": { "type": "integer", "minimum": 1, "maximum": 100, "example": 5 } } } } }, "required": true } } }, "/marketing/cart-rules/{cartRuleId}/coupons/mass-delete": { "post": { "operationId": "api_apiadminmarketingcart-rules_cartRuleIdcouponsmass-delete_post", "tags": [ "Admin Marketing: Promotions" ], "responses": { "200": { "description": "Coupons deleted", "content": { "application/json": { "example": { "deleted": [ 23, 24 ], "skipped": [], "message": "Coupons deleted." } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Mass-delete coupons for a cart rule", "description": "Mass-delete coupons for a cart rule", "parameters": [ { "name": "cartRuleId", "in": "path", "description": "Parent cart rule ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminMarketingCartRuleCouponMassDelete resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 12, 13, 14 ] } } } } }, "required": true } } }, "/marketing/cart-rules/{cartRuleId}/coupons/{id}": { "delete": { "operationId": "api_apiadminmarketingcart-rules_cartRuleIdcoupons_id_delete", "tags": [ "Admin Marketing: Promotions" ], "responses": { "200": { "description": "Coupon deleted.", "content": { "application/json": { "example": { "message": "Coupon deleted." } } } }, "404": { "description": "Coupon not found, or it does not belong to this cart rule." } }, "summary": "Delete a coupon", "description": "Delete a coupon", "parameters": [ { "name": "cartRuleId", "in": "path", "description": "Parent cart rule ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false }, { "name": "id", "in": "path", "description": "Coupon ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ] } }, "/marketing/cart-rules/{id}": { "get": { "operationId": "api_apiadminmarketingcart-rules_id_get", "tags": [ "Admin Marketing: Promotions" ], "responses": { "200": { "description": "Single cart rule with conditions, channels and customerGroups (object arrays) resolved.", "content": { "application/json": { "example": { "id": 17, "name": "10% off summer", "description": "Sitewide 10% off summer collection", "startsFrom": "2026-06-01T00:00:00+05:30", "endsTill": "2026-08-31T23:59:59+05:30", "status": 1, "couponType": 1, "useAutoGeneration": 0, "usagePerCustomer": 1, "usesPerCoupon": 100, "timesUsed": 0, "conditionType": 1, "conditions": [ { "attribute": "cart|base_sub_total", "operator": ">=", "value": "100", "attribute_type": "price" } ], "actionType": "by_percent", "discountAmount": 10, "discountQuantity": 1, "discountStep": "0", "applyToShipping": 0, "freeShipping": 0, "endOtherRules": 0, "usesAttributeConditions": 0, "sortOrder": 0, "couponCode": "SUMMER10", "channels": [ { "id": 1, "code": "default", "name": "Default" } ], "customerGroups": [ { "id": 2, "code": "general", "name": "General" } ], "createdAt": "2026-06-09T13:48:29+05:30", "updatedAt": "2026-06-09T13:48:29+05:30" } } } }, "404": { "description": "Cart rule not found." } }, "summary": "Cart rule detail", "description": "Cart rule detail", "parameters": [ { "name": "id", "in": "path", "description": "Cart rule ID.", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadminmarketingcart-rules_id_put", "tags": [ "Admin Marketing: Promotions" ], "responses": { "200": { "description": "Cart rule updated; returns the updated detail.", "content": { "application/json": { "example": { "id": 17, "name": "15% off summer", "description": "Updated description", "startsFrom": "2026-06-01T00:00:00+05:30", "endsTill": "2026-08-31T23:59:59+05:30", "status": 1, "couponType": 1, "useAutoGeneration": 0, "usagePerCustomer": 1, "usesPerCoupon": 100, "timesUsed": 0, "conditionType": 1, "conditions": [ { "attribute": "cart|base_sub_total", "operator": ">=", "value": "100", "attribute_type": "price" } ], "actionType": "by_percent", "discountAmount": 15, "discountQuantity": 1, "discountStep": "0", "applyToShipping": 0, "freeShipping": 0, "endOtherRules": 0, "usesAttributeConditions": 0, "sortOrder": 0, "couponCode": "SUMMER15", "channels": [ { "id": 1, "code": "default", "name": "Default" } ], "customerGroups": [ { "id": 1, "code": "guest", "name": "Guest" }, { "id": 2, "code": "general", "name": "General" } ], "createdAt": "2026-06-09T13:48:29+05:30", "updatedAt": "2026-06-10T09:20:11+05:30" } } }, "links": [] }, "404": { "description": "Cart rule not found." }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Update a cart rule", "description": "Partial update — send only the fields you change. channels / customer_groups, when supplied, fully replace the current set.", "parameters": [ { "name": "id", "in": "path", "description": "Cart rule ID.", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminMarketingCartRule resource", "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "example": "15% off summer" }, "description": { "type": "string", "example": "Updated description" }, "channels": { "type": "array", "items": { "type": "integer" }, "example": [ 1 ] }, "customer_groups": { "type": "array", "items": { "type": "integer" }, "example": [ 1, 2, 3 ] }, "coupon_type": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "use_auto_generation": { "type": "integer", "enum": [ 0, 1 ], "example": 0 }, "coupon_code": { "type": "string", "example": "SUMMER15" }, "uses_per_coupon": { "type": "integer", "example": 100 }, "usage_per_customer": { "type": "integer", "example": 1 }, "condition_type": { "type": "integer", "enum": [ 1, 2 ], "example": 1 }, "conditions": { "type": "array", "items": { "type": "object" }, "example": [ { "attribute": "cart|base_sub_total", "operator": ">=", "value": "100", "attribute_type": "price" } ] }, "action_type": { "type": "string", "enum": [ "by_percent", "by_fixed", "cart_fixed", "buy_x_get_y" ], "example": "by_percent" }, "discount_amount": { "type": "number", "example": 15 }, "discount_quantity": { "type": "integer", "example": 1 }, "discount_step": { "type": "integer", "example": 0 }, "apply_to_shipping": { "type": "integer", "enum": [ 0, 1 ], "example": 0 }, "free_shipping": { "type": "integer", "enum": [ 0, 1 ], "example": 0 }, "end_other_rules": { "type": "integer", "enum": [ 0, 1 ], "example": 0 }, "sort_order": { "type": "integer", "example": 0 }, "starts_from": { "type": "string", "format": "date-time", "example": "2026-06-01 00:00:00" }, "ends_till": { "type": "string", "format": "date-time", "example": "2026-08-31 23:59:59" }, "status": { "type": "integer", "enum": [ 0, 1 ], "example": 1 } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminmarketingcart-rules_id_delete", "tags": [ "Admin Marketing: Promotions" ], "responses": { "200": { "description": "Deleted.", "content": { "application/json": { "example": { "message": "Cart rule deleted." } } } }, "404": { "description": "Not found." } }, "summary": "Delete a cart rule", "description": "Delete a cart rule", "parameters": [ { "name": "id", "in": "path", "description": "Cart rule ID.", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ] } }, "/marketing/cart-rules/{id}/copy": { "post": { "operationId": "api_apiadminmarketingcart-rules_idcopy_post", "tags": [ "Admin Marketing: Promotions" ], "responses": { "200": { "description": "Cart rule copied; returns the new rule detail.", "content": { "application/json": { "example": { "id": 18, "name": "Copy of 10% off summer", "description": "Sitewide 10% off summer collection", "startsFrom": "2026-06-01T00:00:00+05:30", "endsTill": "2026-08-31T23:59:59+05:30", "status": 0, "couponType": 1, "useAutoGeneration": 0, "usagePerCustomer": 1, "usesPerCoupon": 100, "timesUsed": 0, "conditionType": 1, "conditions": [ { "attribute": "cart|base_sub_total", "operator": ">=", "value": "100", "attribute_type": "price" } ], "actionType": "by_percent", "discountAmount": 10, "discountQuantity": 1, "discountStep": "0", "applyToShipping": 0, "freeShipping": 0, "endOtherRules": 0, "usesAttributeConditions": 0, "sortOrder": 0, "couponCode": null, "channels": [ { "id": 1, "code": "default", "name": "Default" } ], "customerGroups": [ { "id": 1, "code": "guest", "name": "Guest" }, { "id": 2, "code": "general", "name": "General" } ], "createdAt": "2026-06-10T11:05:00+05:30", "updatedAt": "2026-06-10T11:05:00+05:30" } } }, "links": [] }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks marketing.promotions.cart_rules.create." }, "404": { "description": "Source cart rule not found." }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Copy a cart rule", "description": "Duplicates the cart rule with status forced inactive and the name prefixed \"Copy of ...\", copies its channel and customer-group assignments, and returns the new rule's full detail (prefilled for editing). Coupons are not copied. Mirrors the admin datagrid Copy action.", "parameters": [ { "name": "id", "in": "path", "description": "Source cart rule ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 17 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminMarketingCartRule resource", "content": { "application/json": { "schema": { "type": "object" }, "example": [] } }, "required": false } } }, "/marketing/catalog-rules": { "get": { "operationId": "api_apiadminmarketingcatalog-rules_get_collection", "tags": [ "Admin Marketing: Promotions" ], "responses": { "200": { "description": "Paginated list in the { data, meta } envelope. conditions / channels / customerGroups are detail-only and null on list rows.", "content": { "application/json": { "example": { "data": [ { "id": 126, "name": "Summer Collection 10% Off", "description": "Sitewide 10% off the summer collection", "startsFrom": null, "endsTill": null, "status": 1, "sortOrder": 0, "conditionType": 1, "conditions": null, "endOtherRules": 0, "actionType": "by_percent", "discountAmount": 10, "channels": null, "customerGroups": null, "createdAt": "2026-06-17T12:13:15+05:30", "updatedAt": "2026-06-17T12:13:15+05:30" } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 38, "total": 38, "from": 1, "to": 1 } } } } } }, "summary": "List catalog rules", "description": "Filters: name (LIKE), status. Sort: id (default desc), name, sort_order.", "parameters": [ { "name": "page", "in": "query", "description": "Page number.", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "id", "in": "query", "description": "Filter by ID (single or comma-separated).", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "name", "in": "query", "description": "Partial name match.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "status", "in": "query", "description": "Enabled flag (0/1).", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "sort_order", "in": "query", "description": "Filter by priority (sort_order, exact).", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "starts_from_from", "in": "query", "description": "Start date >= (ISO 8601).", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date-time" }, "style": "form", "explode": true }, { "name": "starts_from_to", "in": "query", "description": "Start date <= (ISO 8601).", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date-time" }, "style": "form", "explode": true }, { "name": "ends_till_from", "in": "query", "description": "End date >= (ISO 8601).", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date-time" }, "style": "form", "explode": true }, { "name": "ends_till_to", "in": "query", "description": "End date <= (ISO 8601).", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date-time" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort column.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "name", "sort_order" ] }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadminmarketingcatalog-rules_post", "tags": [ "Admin Marketing: Promotions" ], "responses": { "201": { "description": "Catalog rule created.", "content": { "application/json": { "example": { "id": 126, "name": "Summer Collection 10% Off", "description": "Sitewide 10% off the summer collection", "startsFrom": null, "endsTill": null, "status": 1, "sortOrder": 0, "conditionType": 1, "conditions": [], "endOtherRules": 0, "actionType": "by_percent", "discountAmount": 10, "channels": [ { "id": 1, "code": "default", "name": "Default" } ], "customerGroups": [ { "id": 1, "code": "guest", "name": "Guest" }, { "id": 2, "code": "general", "name": "General" } ], "createdAt": "2026-06-17T12:13:15+05:30", "updatedAt": "2026-06-17T12:13:15+05:30" } } }, "links": [] }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create a catalog rule", "description": "Create a catalog rule", "parameters": [], "requestBody": { "description": "The new AdminMarketingCatalogRule resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "name", "channels", "customer_groups", "action_type", "discount_amount" ], "properties": { "name": { "type": "string", "example": "Summer 10% off" }, "description": { "type": "string", "example": "Sitewide 10% off summer collection" }, "starts_from": { "type": "string", "example": "2026-06-01" }, "ends_till": { "type": "string", "example": "2026-08-31" }, "status": { "type": "integer", "example": 1 }, "sort_order": { "type": "integer", "example": 0 }, "condition_type": { "type": "integer", "example": 1 }, "conditions": { "type": "array", "items": { "type": "object" }, "example": [] }, "end_other_rules": { "type": "integer", "example": 0 }, "action_type": { "type": "string", "example": "by_percent" }, "discount_amount": { "type": "number", "example": 10 }, "channels": { "type": "array", "items": { "type": "integer" }, "description": "Assigned channel ids (request stays id-based; the response returns objects).", "example": [ 1 ] }, "customer_groups": { "type": "array", "items": { "type": "integer" }, "description": "Assigned customer-group ids (request stays id-based; the response returns objects).", "example": [ 1, 2 ] } } } } }, "required": true } } }, "/marketing/catalog-rules/condition-attributes": { "get": { "operationId": "api_apiadminmarketingcatalog-rulescondition-attributes_get_collection", "tags": [ "Admin Marketing: Promotions" ], "responses": { "200": { "description": "Condition attributes and operators.", "content": { "application/json": { "example": [ { "attributes": [ { "key": "product", "label": "Product Attribute", "children": [ { "key": "product|attribute_family_id", "type": "select", "label": "Attribute Family", "options": [ { "id": 1, "admin_name": "Default" } ] } ] } ], "operators": { "select": [ { "operator": "==", "label": "Is equal to" }, { "operator": "!=", "label": "Is not equal to" } ] } } ] } } }, "401": { "description": "Unauthenticated." }, "403": { "description": "No permission." } }, "summary": "Catalog rule condition attributes", "description": "Every attribute a condition can test, grouped as on the admin form, each with its `type` and selectable `options`, plus the operators each type accepts. Build `conditions` entries as `{ attribute: key, operator, value, attribute_type: type }`.", "parameters": [] } }, "/marketing/catalog-rules/mass-delete": { "post": { "operationId": "api_apiadminmarketingcatalog-rulesmass-delete_post", "tags": [ "Admin Marketing: Promotions" ], "responses": { "200": { "description": "Catalog rules deleted.", "content": { "application/json": { "example": { "deleted": [ 12, 18 ], "skipped": [], "message": "Catalog rules deleted." } } }, "links": [] }, "422": { "description": "Empty indices.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Mass delete catalog rules", "description": "Deletes a batch of catalog rules. Non-existent IDs are silently skipped.", "parameters": [], "requestBody": { "description": "The new AdminMarketingCatalogRuleMassDelete resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 12, 18 ] } } } } }, "required": true } } }, "/marketing/catalog-rules/{id}": { "get": { "operationId": "api_apiadminmarketingcatalog-rules_id_get", "tags": [ "Admin Marketing: Promotions" ], "responses": { "200": { "description": "Single catalog rule with channels + customerGroups (object arrays) + conditions.", "content": { "application/json": { "example": { "id": 126, "name": "Summer Collection 10% Off", "description": "Sitewide 10% off the summer collection", "startsFrom": null, "endsTill": null, "status": 1, "sortOrder": 0, "conditionType": 1, "conditions": [], "endOtherRules": 0, "actionType": "by_percent", "discountAmount": 10, "channels": [ { "id": 1, "code": "default", "name": "Default" } ], "customerGroups": [ { "id": 2, "code": "general", "name": "General" } ], "createdAt": "2026-06-17T12:13:15+05:30", "updatedAt": "2026-06-17T12:13:15+05:30" } } } }, "404": { "description": "Catalog rule not found." } }, "summary": "Catalog rule detail", "description": "Catalog rule detail", "parameters": [ { "name": "id", "in": "path", "description": "Marketing catalog rule ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadminmarketingcatalog-rules_id_put", "tags": [ "Admin Marketing: Promotions" ], "responses": { "200": { "description": "Catalog rule updated; returns the updated detail.", "content": { "application/json": { "example": { "id": 126, "name": "Summer 15% off", "description": "Updated description", "startsFrom": null, "endsTill": null, "status": 1, "sortOrder": 0, "conditionType": 1, "conditions": [], "endOtherRules": 0, "actionType": "by_percent", "discountAmount": 15, "channels": [ { "id": 1, "code": "default", "name": "Default" } ], "customerGroups": [ { "id": 1, "code": "guest", "name": "Guest" }, { "id": 2, "code": "general", "name": "General" } ], "createdAt": "2026-06-17T12:13:15+05:30", "updatedAt": "2026-06-17T13:01:42+05:30" } } }, "links": [] }, "404": { "description": "Catalog rule not found." }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Update a catalog rule", "description": "Partial update — send only the fields you change. channels + customer_groups, when supplied, fully replace the current pivots.", "parameters": [ { "name": "id", "in": "path", "description": "Marketing catalog rule ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminMarketingCatalogRule resource", "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "example": "Summer 15% off" }, "description": { "type": "string", "example": "Updated description" }, "channels": { "type": "array", "items": { "type": "integer" }, "example": [ 1 ] }, "customer_groups": { "type": "array", "items": { "type": "integer" }, "example": [ 1, 2 ] }, "condition_type": { "type": "integer", "enum": [ 1, 2 ], "example": 1 }, "conditions": { "type": "array", "items": { "type": "object" }, "example": [ { "attribute": "product|category_ids", "operator": "{}", "value": "5", "attribute_type": "select" } ] }, "end_other_rules": { "type": "integer", "enum": [ 0, 1 ], "example": 0 }, "action_type": { "type": "string", "enum": [ "by_percent", "by_fixed" ], "example": "by_percent" }, "discount_amount": { "type": "number", "example": 15 }, "sort_order": { "type": "integer", "example": 0 }, "starts_from": { "type": "string", "example": "2026-06-01" }, "ends_till": { "type": "string", "example": "2026-08-31" }, "status": { "type": "integer", "enum": [ 0, 1 ], "example": 1 } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminmarketingcatalog-rules_id_delete", "tags": [ "Admin Marketing: Promotions" ], "responses": { "200": { "description": "Catalog rule deleted.", "content": { "application/json": { "example": { "message": "Catalog rule deleted." } } } }, "404": { "description": "Catalog rule not found." } }, "summary": "Delete a catalog rule", "description": "Delete a catalog rule", "parameters": [ { "name": "id", "in": "path", "description": "Marketing catalog rule ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] } }, "/marketing/search-synonyms": { "get": { "operationId": "api_apiadminmarketingsearch-synonyms_get_collection", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "200": { "description": "Paginated list in the { data, meta } envelope.", "content": { "application/json": { "example": { "data": [ { "id": 19, "name": "shirt-group", "terms": "shirt,tshirt,tee", "createdAt": "2026-05-28T10:57:59+05:30", "updatedAt": "2026-05-28T10:57:59+05:30" } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 1, "total": 3, "from": 1, "to": 3 } } } } } }, "summary": "List search synonyms", "description": "Filters: name (LIKE), terms (LIKE). Sort: id (default desc), name.", "parameters": [ { "name": "page", "in": "query", "description": "Page number.", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "name", "in": "query", "description": "Partial name match.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "terms", "in": "query", "description": "Partial terms match.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort column.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "name" ] }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadminmarketingsearch-synonyms_post", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "201": { "description": "Search synonym created.", "content": { "application/json": { "example": { "id": 19, "name": "shirt-group", "terms": "shirt,tshirt,tee", "createdAt": "2026-05-28T10:57:59+05:30", "updatedAt": "2026-05-28T10:57:59+05:30" } } }, "links": [] }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create a search synonym", "description": "Create a search synonym", "parameters": [], "requestBody": { "description": "The new AdminMarketingSearchSynonym resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "name", "terms" ], "properties": { "name": { "type": "string", "example": "shirt-group" }, "terms": { "type": "string", "example": "shirt,tshirt,tee" } } } } }, "required": true } } }, "/marketing/search-synonyms/mass-delete": { "post": { "operationId": "api_apiadminmarketingsearch-synonymsmass-delete_post", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "200": { "description": "Search synonyms deleted.", "content": { "application/json": { "example": { "deleted": [ 12, 18 ], "skipped": [], "message": "Search synonyms deleted." } } }, "links": [] }, "422": { "description": "Validation failure (empty/missing indices).", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Mass delete search synonyms", "description": "Deletes a batch of search synonyms. Non-existent IDs are silently skipped (mirrors monolith).", "parameters": [], "requestBody": { "description": "The new AdminMarketingSearchSynonymMassDelete resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 12, 18 ] } } } } }, "required": true } } }, "/marketing/search-synonyms/{id}": { "get": { "operationId": "api_apiadminmarketingsearch-synonyms_id_get", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "200": { "description": "Single search synonym.", "content": { "application/json": { "example": { "id": 19, "name": "shirt-group", "terms": "shirt,tshirt,tee", "createdAt": "2026-05-28T10:57:59+05:30", "updatedAt": "2026-05-28T10:57:59+05:30" } } } }, "404": { "description": "Search synonym not found." } }, "summary": "Search synonym detail", "description": "Search synonym detail", "parameters": [ { "name": "id", "in": "path", "description": "Marketing search synonym ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadminmarketingsearch-synonyms_id_put", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "200": { "description": "Search synonym updated.", "content": { "application/json": { "example": { "id": 19, "name": "shirt-group", "terms": "shirt,tshirt,tee", "createdAt": "2026-05-28T10:57:59+05:30", "updatedAt": "2026-05-28T10:57:59+05:30" } } }, "links": [] }, "404": { "description": "Search synonym not found." }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Update a search synonym", "description": "Update a search synonym", "parameters": [ { "name": "id", "in": "path", "description": "Marketing search synonym ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminMarketingSearchSynonym resource", "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "example": "shirt-group" }, "terms": { "type": "string", "example": "shirt,tshirt,tee" } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminmarketingsearch-synonyms_id_delete", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "200": { "description": "Search synonym deleted.", "content": { "application/json": { "example": { "message": "Search synonym deleted." } } } }, "404": { "description": "Search synonym not found." } }, "summary": "Delete a search synonym", "description": "Delete a search synonym", "parameters": [ { "name": "id", "in": "path", "description": "Marketing search synonym ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] } }, "/marketing/search-terms": { "get": { "operationId": "api_apiadminmarketingsearch-terms_get_collection", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "200": { "description": "Paginated list in the { data, meta } envelope.", "content": { "application/json": { "example": { "data": [ { "id": 106, "term": "Coastal Breeze QA", "results": 1, "uses": 3, "redirectUrl": "https://example.com/qa", "channel": { "id": 1, "code": "default", "name": "Default" }, "locale": "en", "createdAt": "2026-06-03T13:14:05+05:30", "updatedAt": "2026-06-17T12:14:07+05:30" } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 11, "total": 103, "from": 1, "to": 10 } } } } } }, "summary": "List search terms", "description": "Paginated, filterable, sortable list. Sort by uses desc for popular terms. Returns { data, meta } envelope.", "parameters": [ { "name": "page", "in": "query", "description": "Page number", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "term", "in": "query", "description": "Term LIKE filter", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "channel_id", "in": "query", "description": "Filter by channel id", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "locale", "in": "query", "description": "Filter by locale code", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort column.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "term", "uses", "results" ] }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadminmarketingsearch-terms_post", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "201": { "description": "Search term created; returns the detail.", "content": { "application/json": { "example": { "id": 107, "term": "red shirt", "results": 0, "uses": 0, "redirectUrl": "https://example.com/shirts", "channel": { "id": 1, "code": "default", "name": "Default" }, "locale": "en", "createdAt": "2026-08-14T13:14:05+05:30", "updatedAt": "2026-08-14T13:14:05+05:30" } } }, "links": [] }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create a search term", "description": "Manually create a search term with an optional redirect URL for a channel and locale. Mirrors the admin Search & SEO → Search Terms create form.", "parameters": [], "requestBody": { "description": "The new AdminMarketingSearchTerm resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "term", "channel_id", "locale" ], "properties": { "term": { "type": "string", "example": "red shirt" }, "redirect_url": { "type": "string", "nullable": true, "example": "https://example.com/shirts" }, "channel_id": { "type": "integer", "example": 1 }, "locale": { "type": "string", "example": "en" } } } } }, "required": true } } }, "/marketing/search-terms/mass-delete": { "post": { "operationId": "api_apiadminmarketingsearch-termsmass-delete_post", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "200": { "description": "Search terms deleted.", "content": { "application/json": { "example": { "deleted": [ 12, 18 ], "skipped": [], "message": "Search terms deleted." } } }, "links": [] }, "422": { "description": "Validation failed (e.g. empty indices).", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Mass delete search terms", "description": "Deletes a batch of search terms. Non-existent IDs are silently skipped (mirrors monolith).", "parameters": [], "requestBody": { "description": "The new AdminMarketingSearchTermMassDelete resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 12, 18 ] } } } } }, "required": true } } }, "/marketing/search-terms/{id}": { "get": { "operationId": "api_apiadminmarketingsearch-terms_id_get", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "200": { "description": "Single search term.", "content": { "application/json": { "example": { "id": 106, "term": "Coastal Breeze QA", "results": 1, "uses": 3, "redirectUrl": "https://example.com/qa", "channel": { "id": 1, "code": "default", "name": "Default" }, "locale": "en", "createdAt": "2026-06-03T13:14:05+05:30", "updatedAt": "2026-06-17T12:14:07+05:30" } } } }, "404": { "description": "Search term not found." } }, "summary": "Search term detail", "description": "Search term detail", "parameters": [ { "name": "id", "in": "path", "description": "Search term ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadminmarketingsearch-terms_id_put", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "200": { "description": "Search term updated; returns the updated detail.", "content": { "application/json": { "example": { "id": 106, "term": "Coastal Breeze QA", "results": 1, "uses": 3, "redirectUrl": "https://example.com/qa", "channel": { "id": 1, "code": "default", "name": "Default" }, "locale": "en", "createdAt": "2026-06-03T13:14:05+05:30", "updatedAt": "2026-06-17T12:14:07+05:30" } } }, "links": [] }, "404": { "description": "Search term not found." }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Update a search term", "description": "Admin can edit the term text and optional redirect URL. Counts (uses/results) are not editable.", "parameters": [ { "name": "id", "in": "path", "description": "Search term ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminMarketingSearchTerm resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "term" ], "properties": { "term": { "type": "string", "example": "red shirt" }, "redirect_url": { "type": "string", "nullable": true, "example": "https://example.com/shirts" } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminmarketingsearch-terms_id_delete", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "200": { "description": "Deleted.", "content": { "application/json": { "example": { "message": "Search term deleted." } } } }, "404": { "description": "Not found." } }, "summary": "Delete a search term", "description": "Delete a search term", "parameters": [ { "name": "id", "in": "path", "description": "Search term ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ] } }, "/marketing/sitemaps": { "get": { "operationId": "api_apiadminmarketingsitemaps_get_collection", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "200": { "description": "Paginated list in the { data, meta } envelope. generatedFiles / indexFile / generatedSitemaps are detail-only and null on list rows.", "content": { "application/json": { "example": { "data": [ { "id": 1, "fileName": "sitemap.xml", "path": "/", "channels": [ 1 ], "urls": [ "https://example.com/storage/sitemaps/default/sitemap-1-1.xml" ], "generatedAt": null, "generatedFiles": null, "indexFile": null, "generatedSitemaps": null, "createdAt": "2026-06-20T10:00:00+05:30", "updatedAt": "2026-06-20T10:00:00+05:30" } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 1, "total": 1, "from": 1, "to": 1 } } } } } }, "summary": "List sitemaps", "description": "Filters: file_name (LIKE), channel_id (exact). Sort: id (default desc), file_name.", "parameters": [ { "name": "page", "in": "query", "description": "Page number.", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "file_name", "in": "query", "description": "Partial file_name match.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "channel_id", "in": "query", "description": "Only sitemaps covering this channel.", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort column.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "file_name" ] }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadminmarketingsitemaps_post", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "201": { "description": "Sitemap created. Use POST /generate to build the XML.", "content": { "application/json": { "example": { "id": 1, "fileName": "sitemap.xml", "path": "/", "channels": [ 1 ], "urls": [ "https://example.com/storage/sitemaps/default/sitemap-1-1.xml" ], "generatedAt": null, "generatedFiles": [], "indexFile": null, "generatedSitemaps": [], "createdAt": "2026-06-20T10:00:00+05:30", "updatedAt": "2026-06-20T10:00:00+05:30" } } }, "links": [] }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create a sitemap", "description": "Create a sitemap", "parameters": [], "requestBody": { "description": "The new AdminMarketingSitemap resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "file_name", "path", "channels" ], "properties": { "file_name": { "type": "string", "example": "sitemap.xml" }, "path": { "type": "string", "example": "/" }, "channels": { "type": "array", "items": { "type": "integer" }, "example": [ 1 ] } } } } }, "required": true } } }, "/marketing/sitemaps/{id}": { "get": { "operationId": "api_apiadminmarketingsitemaps_id_get", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "200": { "description": "Sitemap row with generated_at and generated index/sitemap file paths.", "content": { "application/json": { "example": { "id": 1, "fileName": "sitemap.xml", "path": "/", "channels": [ 1 ], "urls": [ "https://example.com/storage/sitemaps/default/sitemap-1-1.xml" ], "generatedAt": "2026-06-23T13:00:00+05:30", "generatedFiles": [ { "channelId": 1, "channelCode": "default", "hostname": "https://example.com", "index": "sitemaps/default/sitemap-1-1.xml", "sitemaps": [ "sitemaps/default/sitemap-1-1-1.xml" ] } ], "indexFile": null, "generatedSitemaps": [], "createdAt": "2026-06-20T10:00:00+05:30", "updatedAt": "2026-06-23T13:05:00+05:30" } } } }, "404": { "description": "Sitemap not found." } }, "summary": "Sitemap detail", "description": "Sitemap detail", "parameters": [ { "name": "id", "in": "path", "description": "Marketing sitemap ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadminmarketingsitemaps_id_put", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "200": { "description": "Sitemap updated.", "content": { "application/json": { "example": { "id": 1, "fileName": "sitemap.xml", "path": "/", "channels": [ 1 ], "urls": [ "https://example.com/storage/sitemaps/default/sitemap-1-1.xml" ], "generatedAt": "2026-06-23T13:00:00+05:30", "generatedFiles": [ { "channelId": 1, "channelCode": "default", "hostname": "https://example.com", "index": "sitemaps/default/sitemap-1-1.xml", "sitemaps": [ "sitemaps/default/sitemap-1-1-1.xml" ] } ], "indexFile": null, "generatedSitemaps": [], "createdAt": "2026-06-20T10:00:00+05:30", "updatedAt": "2026-06-23T13:05:00+05:30" } } }, "links": [] }, "404": { "description": "Sitemap not found." }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Update a sitemap", "description": "Update a sitemap", "parameters": [ { "name": "id", "in": "path", "description": "Marketing sitemap ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminMarketingSitemap resource", "content": { "application/json": { "schema": { "type": "object", "properties": { "file_name": { "type": "string", "example": "sitemap.xml" }, "path": { "type": "string", "example": "/" }, "channels": { "type": "array", "items": { "type": "integer" }, "example": [ 1 ] } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminmarketingsitemaps_id_delete", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "200": { "description": "Sitemap deleted.", "content": { "application/json": { "example": { "message": "Sitemap deleted." } } } }, "404": { "description": "Sitemap not found." } }, "summary": "Delete a sitemap (removes the DB row and generated XML files).", "description": "Delete a sitemap (removes the DB row and generated XML files).", "parameters": [ { "name": "id", "in": "path", "description": "Marketing sitemap ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] } }, "/marketing/sitemaps/{id}/generate": { "post": { "operationId": "api_apiadminmarketingsitemaps_idgenerate_post", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "200": { "description": "Sitemap regenerated.", "content": { "application/json": { "example": { "sitemapId": 1, "generatedFiles": [ { "channelId": 1, "channelCode": "default", "hostname": "https://example.com", "index": "sitemaps/default/sitemap-1-1.xml", "sitemaps": [ "sitemaps/default/sitemap-1-1-1.xml" ] } ], "urls": [ "https://example.com/storage/sitemaps/default/sitemap-1-1.xml" ], "indexFile": null, "generatedSitemaps": [], "generatedAt": "2026-06-23T13:00:00+05:30", "message": "Sitemap generated." } } }, "links": [] }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks marketing.search_seo.sitemaps.edit." }, "404": { "description": "Sitemap not found." }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Regenerate a sitemap", "description": "Walks every public Category / Product / Page and (re)writes the XML files under the public disk.", "parameters": [ { "name": "id", "in": "path", "description": "Marketing sitemap generate ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminMarketingSitemapGenerate resource", "content": { "application/json": { "schema": { "type": "object" }, "example": [] } }, "required": false } } }, "/marketing/url-rewrites": { "get": { "operationId": "api_apiadminmarketingurl-rewrites_get_collection", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "200": { "description": "Paginated list in the { data, meta } envelope.", "content": { "application/json": { "example": { "data": [ { "id": 118, "entityType": "cms_page", "requestPath": "cms-test", "targetPath": "testing", "redirectType": "301", "locale": "en", "createdAt": "2026-06-23T12:32:58+05:30", "updatedAt": "2026-06-23T12:32:58+05:30" } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 8, "total": 78, "from": 1, "to": 10 } } } } } }, "summary": "List URL rewrites", "description": "Filters: entity_type, request_path (LIKE), redirect_type, locale. Sort: id (default desc), entity_type, locale, redirect_type.", "parameters": [ { "name": "page", "in": "query", "description": "Page number.", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "entity_type", "in": "query", "description": "Entity type filter (product|category|cms_page).", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "request_path", "in": "query", "description": "Partial match on request_path.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "redirect_type", "in": "query", "description": "Redirect type filter (301|302).", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "locale", "in": "query", "description": "Locale filter.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort column.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "entity_type", "locale", "redirect_type" ] }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadminmarketingurl-rewrites_post", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "201": { "description": "URL rewrite created.", "content": { "application/json": { "example": { "id": 118, "entityType": "cms_page", "requestPath": "cms-test", "targetPath": "testing", "redirectType": "301", "locale": "en", "createdAt": "2026-06-23T12:32:58+05:30", "updatedAt": "2026-06-23T12:32:58+05:30" } } }, "links": [] }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create a URL rewrite", "description": "Create a URL rewrite", "parameters": [], "requestBody": { "description": "The new AdminMarketingUrlRewrite resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "entity_type", "request_path", "target_path", "redirect_type", "locale" ], "properties": { "entity_type": { "type": "string", "enum": [ "product", "category", "cms_page" ], "example": "product" }, "request_path": { "type": "string", "example": "old-path" }, "target_path": { "type": "string", "example": "new-path" }, "redirect_type": { "type": "string", "enum": [ "301", "302" ], "example": "301" }, "locale": { "type": "string", "example": "en" } } } } }, "required": true } } }, "/marketing/url-rewrites/mass-delete": { "post": { "operationId": "api_apiadminmarketingurl-rewritesmass-delete_post", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "200": { "description": "URL rewrites deleted.", "content": { "application/json": { "example": { "deleted": [ 12, 18 ], "skipped": [], "message": "URL rewrites deleted." } } }, "links": [] }, "422": { "description": "Validation failure (empty/missing indices).", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Mass delete URL rewrites", "description": "Deletes a batch of URL rewrites. Non-existent IDs are silently skipped (mirrors monolith).", "parameters": [], "requestBody": { "description": "The new AdminMarketingUrlRewriteMassDelete resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 12, 18 ] } } } } }, "required": true } } }, "/marketing/url-rewrites/{id}": { "get": { "operationId": "api_apiadminmarketingurl-rewrites_id_get", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "200": { "description": "Single URL rewrite.", "content": { "application/json": { "example": { "id": 118, "entityType": "cms_page", "requestPath": "cms-test", "targetPath": "testing", "redirectType": "301", "locale": "en", "createdAt": "2026-06-23T12:32:58+05:30", "updatedAt": "2026-06-23T12:32:58+05:30" } } } }, "404": { "description": "URL rewrite not found." } }, "summary": "URL rewrite detail", "description": "URL rewrite detail", "parameters": [ { "name": "id", "in": "path", "description": "Marketing url rewrite ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadminmarketingurl-rewrites_id_put", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "200": { "description": "URL rewrite updated.", "content": { "application/json": { "example": { "id": 118, "entityType": "cms_page", "requestPath": "cms-test", "targetPath": "testing", "redirectType": "301", "locale": "en", "createdAt": "2026-06-23T12:32:58+05:30", "updatedAt": "2026-06-23T12:32:58+05:30" } } }, "links": [] }, "404": { "description": "URL rewrite not found." }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Update a URL rewrite", "description": "Update a URL rewrite", "parameters": [ { "name": "id", "in": "path", "description": "Marketing url rewrite ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminMarketingUrlRewrite resource", "content": { "application/json": { "schema": { "type": "object", "properties": { "entity_type": { "type": "string", "enum": [ "product", "category", "cms_page" ], "example": "product" }, "request_path": { "type": "string", "example": "old-path" }, "target_path": { "type": "string", "example": "new-path" }, "redirect_type": { "type": "string", "enum": [ "301", "302" ], "example": "301" }, "locale": { "type": "string", "example": "en" } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminmarketingurl-rewrites_id_delete", "tags": [ "Admin Marketing: Search & SEO" ], "responses": { "200": { "description": "URL rewrite deleted.", "content": { "application/json": { "example": { "message": "URL rewrite deleted." } } } }, "404": { "description": "URL rewrite not found." } }, "summary": "Delete a URL rewrite", "description": "Delete a URL rewrite", "parameters": [ { "name": "id", "in": "path", "description": "Marketing url rewrite ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] } }, "/menu": { "get": { "operationId": "api_apiadminmenu_get_collection", "tags": [ "Admin Menu" ], "responses": { "200": { "description": "The permission-filtered admin menu tree.", "content": { "application/json": { "example": [ { "id": "menu", "tree": [ { "key": "sales", "label": "Sales", "icon": "icon-sales", "sort": 2, "permission": "sales", "apiResource": null, "children": [ { "key": "sales.orders", "label": "Orders", "icon": null, "sort": 1, "permission": "sales.orders", "apiResource": { "rest": "/api/admin/orders", "graphql": "adminOrders" }, "children": [] } ] } ] } ] } } }, "401": { "description": "Missing or invalid admin token." } }, "summary": "Admin navigation menu", "description": "Returns the admin sidebar menu as a nested tree, filtered to what the authenticated token's admin role is allowed to see. Each node carries its label, ACL permission key, hierarchy, and a mapping to the matching API resource (REST path + GraphQL field), or `apiResource: null` for group headers and panel-only screens that have no API endpoint.", "parameters": [] } }, "/permissions": { "get": { "operationId": "api_apiadminpermissions_get_collection", "tags": [ "Admin Menu" ], "responses": { "200": { "description": "The token's effective permissions.", "content": { "application/json": { "example": [ { "id": "permissions", "permissionType": "custom", "permissions": [ "catalog", "catalog.products", "sales.orders" ] } ] } } }, "401": { "description": "Missing or invalid admin token." } }, "summary": "Authenticated admin permissions", "description": "Returns the effective permission set for the authenticated token: `permissionType` (`all` / `custom` / `same_as_web`) and the granted `permissions` keys (capped by the admin's role). `permissionType: \"all\"` returns `permissions: [\"*\"]` (full access). Use this to gate UI actions without trial-and-error 403s.", "parameters": [] } }, "/notifications": { "get": { "operationId": "api_apiadminnotifications_get_collection", "tags": [ "Admin Notifications" ], "responses": { "200": { "description": "Notifications.", "content": { "application/json": { "example": { "data": [ { "id": 12, "orderId": 45, "type": "order", "read": false, "orderIncrementId": "45", "orderStatus": "pending", "orderStatusLabel": "Pending", "createdAt": "2026-10-15T09:12:44+00:00", "updatedAt": "2026-10-15T09:12:44+00:00", "totalUnread": null, "statusCounts": null, "message": null } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 1, "total": 1, "from": 1, "to": 1, "statusCounts": [ { "status": "pending", "statusCount": 1 } ], "totalUnread": 1 } } } } }, "401": { "description": "Missing or invalid admin token." } }, "summary": "List notifications", "description": "Order notifications, newest first, as shown in the admin notification bell and Notifications page. `meta.statusCounts` gives the number of notifications per order status and `meta.totalUnread` the unread total; both ignore the filters.", "parameters": [ { "name": "status", "in": "query", "description": "Order status to filter by (pending, processing, completed, canceled, closed, fraud, pending_payment). `All` or omitted means every status.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "read", "in": "query", "description": "0 for unread only, 1 for read only.", "required": false, "deprecated": false, "schema": { "type": "integer", "enum": [ 0, 1 ] }, "style": "form", "explode": true }, { "name": "page", "in": "query", "description": "Page number.", "required": false, "deprecated": false, "schema": { "type": "integer", "default": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50). `limit` is accepted as an alias.", "required": false, "deprecated": false, "schema": { "type": "integer", "default": 10 }, "style": "form", "explode": true } ] } }, "/notifications/read-all": { "post": { "operationId": "api_apiadminnotificationsread-all_post", "tags": [ "Admin Notifications" ], "responses": { "200": { "description": "All notifications marked as read.", "content": { "application/json": { "example": { "totalUnread": 0, "message": "All notifications have been marked as read" } } }, "links": [] }, "401": { "description": "Missing or invalid admin token." }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Mark all notifications as read", "description": "Mark all notifications as read", "parameters": [], "requestBody": { "description": "The new AdminNotification resource", "content": { "application/json": { "schema": { "type": "object" }, "example": [] } }, "required": false } } }, "/notifications/{orderId}/read": { "post": { "operationId": "api_apiadminnotifications_orderIdread_post", "tags": [ "Admin Notifications" ], "responses": { "200": { "description": "The notification, now read.", "content": { "application/json": { "example": { "id": 12, "orderId": 45, "type": "order", "read": true, "orderIncrementId": "45", "orderStatus": "pending", "orderStatusLabel": "Pending", "createdAt": "2026-10-15T09:12:44+00:00", "updatedAt": "2026-10-16T08:01:02+00:00" } } }, "links": [] }, "401": { "description": "Missing or invalid admin token." }, "404": { "description": "No notification for that order." }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Mark an order notification as read", "description": "Marks the notification of the given order as read, as opening it from the bell does.", "parameters": [], "requestBody": { "description": "The new AdminNotification resource", "content": { "application/json": { "schema": { "type": "object" }, "example": [] } }, "required": false } } }, "/products": { "get": { "operationId": "api_apiadminproducts_get_collection", "tags": [ "Admin Products" ], "responses": { "200": { "description": "Paginated list of admin product rows in the { data, meta } envelope.", "content": { "application/json": { "example": { "data": [ { "id": 142, "sku": "SP-001", "type": "simple", "name": "Classic Watch", "status": 1, "price": 99.99, "formattedPrice": "$99.99", "baseImageUrl": "http://localhost:8000/cache/medium/product/142/image.webp", "isSaleable": true } ], "meta": { "currentPage": 1, "perPage": 30, "lastPage": 8, "total": 231, "from": 1, "to": 30 } } } } } }, "summary": "Search/list products (admin)", "description": "Paginated, filterable product list for admin pickers. Returns ALL statuses (disabled/draft included) unless filtered. Supports booking products. Returns slim rows in a `{ data, meta }` envelope.", "parameters": [ { "name": "page", "in": "query", "description": "Page number", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (max 50, default 30)", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 30 }, "style": "form", "explode": true }, { "name": "query", "in": "query", "description": "Search term — matches product name OR SKU (partial match).", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "sku", "in": "query", "description": "Exact SKU match.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "type", "in": "query", "description": "Filter by product type.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "simple", "configurable", "bundle", "downloadable", "grouped", "virtual", "booking" ] }, "style": "form", "explode": true }, { "name": "status", "in": "query", "description": "Filter by status (0=disabled, 1=enabled).", "required": false, "deprecated": false, "schema": { "type": "integer", "enum": [ 0, 1 ] }, "style": "form", "explode": true }, { "name": "categoryId", "in": "query", "description": "Filter by category ID.", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "exclude_customizable_products", "in": "query", "description": "With `type=simple`, leave out products that carry customizable options (used when linking products to a bundle or grouped product).", "required": false, "deprecated": false, "schema": { "type": "boolean", "example": true }, "style": "form", "explode": true }, { "name": "customerId", "in": "query", "description": "Only products assigned to this customer's channel (used by the Create Order product picker). An unknown customer applies no channel filter.", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 5 }, "style": "form", "explode": true }, { "name": "channel", "in": "query", "description": "Channel code for value resolution.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "locale", "in": "query", "description": "Locale code for value resolution.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort field.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "sku", "created_at", "updated_at" ], "example": "created_at" }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "example": "desc" }, "style": "form", "explode": true } ] } }, "/reporting/customers": { "get": { "operationId": "api_apiadminreportingcustomers_get_collection", "tags": [ "Admin Reporting: Customers" ], "responses": { "200": { "description": "AdminReportingCustomers collection", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingCustomers" } } }, "text/html": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingCustomers.html" } } } } } }, "summary": "Reporting — customers", "description": "Customer reporting stats. `?type=` picks the stat group.", "parameters": [ { "name": "type", "in": "query", "description": "Stat group.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "total-customers", "customers-with-most-sales", "customers-with-most-orders", "customers-with-most-reviews", "top-customer-groups" ] }, "style": "form", "explode": true }, { "name": "start", "in": "query", "description": "Start date.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "end", "in": "query", "description": "End date.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "channel", "in": "query", "description": "Channel code.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true } ] } }, "/reporting/customers/export": { "get": { "operationId": "api_apiadminreportingcustomersexport_get_collection", "tags": [ "Admin Reporting: Customers" ], "responses": { "200": { "description": "AdminReportingCustomers collection", "content": { "text/csv": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingCustomers.csv" } } }, "application/vnd.ms-excel": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingCustomers.xls" } } }, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingCustomers.xlsx" } } } } } }, "summary": "Reporting — customers export (csv, xls, xlsx)", "description": "Streams a customer stat as a csv, xls or xlsx download (the admin Export button). REST only; send the Accept header matching the requested format. `?type=` picks the stat group; `?format=` accepts csv, xls or xlsx (default csv).", "parameters": [ { "name": "type", "in": "query", "description": "Stat group.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "format", "in": "query", "description": "Export format: csv, xls or xlsx. Defaults to csv.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "csv", "xls", "xlsx" ], "example": "csv" }, "style": "form", "explode": true }, { "name": "start", "in": "query", "description": "Start date.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "end", "in": "query", "description": "End date.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "channel", "in": "query", "description": "Channel code.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true } ] } }, "/reporting/customers/view": { "get": { "operationId": "api_apiadminreportingcustomersview_get_collection", "tags": [ "Admin Reporting: Customers" ], "responses": { "200": { "description": "AdminReportingCustomers collection", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingCustomers" } } }, "text/html": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingCustomers.html" } } } } } }, "summary": "Reporting — customers (View Details)", "description": "The detailed table form of a customer stat (the admin \"View Details\" page). `statistics` is `{ columns, records }`. `?type=` picks the stat group.", "parameters": [ { "name": "type", "in": "query", "description": "Stat group.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "total-customers", "customers-with-most-sales", "customers-with-most-orders", "customers-with-most-reviews", "top-customer-groups" ] }, "style": "form", "explode": true }, { "name": "start", "in": "query", "description": "Start date.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "end", "in": "query", "description": "End date.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "channel", "in": "query", "description": "Channel code.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true } ] } }, "/reporting/stats": { "get": { "operationId": "api_apiadminreportingstats_get_collection", "tags": [ "Admin Reporting: Overview" ], "responses": { "200": { "description": "AdminReportingOverview collection", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingOverview" } } }, "text/html": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingOverview.html" } } } } } }, "summary": "Reporting — overview", "description": "Aggregate headline stats across sales/customers/products. Use `?type=` for the stat group; `?start=`, `?end=`, `?channel=` to bound the period.", "parameters": [ { "name": "type", "in": "query", "description": "Stat group: total-sales (default), total-orders, total-customers, top-selling-products-by-revenue.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "start", "in": "query", "description": "Start date (YYYY-MM-DD).", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "end", "in": "query", "description": "End date (YYYY-MM-DD).", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "channel", "in": "query", "description": "Channel code.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true } ] } }, "/reporting/products": { "get": { "operationId": "api_apiadminreportingproducts_get_collection", "tags": [ "Admin Reporting: Products" ], "responses": { "200": { "description": "AdminReportingProducts collection", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingProducts" } } }, "text/html": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingProducts.html" } } } } } }, "summary": "Reporting — products", "description": "Product reporting stats. `?type=` picks the stat group.", "parameters": [ { "name": "type", "in": "query", "description": "Stat group.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "total-sold-quantities", "total-products-added-to-wishlist", "top-selling-products-by-revenue", "top-selling-products-by-quantity", "products-with-most-reviews", "last-search-terms", "top-search-terms" ] }, "style": "form", "explode": true }, { "name": "start", "in": "query", "description": "Start date.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "end", "in": "query", "description": "End date.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "channel", "in": "query", "description": "Channel code.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true } ] } }, "/reporting/products/export": { "get": { "operationId": "api_apiadminreportingproductsexport_get_collection", "tags": [ "Admin Reporting: Products" ], "responses": { "200": { "description": "AdminReportingProducts collection", "content": { "text/csv": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingProducts.csv" } } }, "application/vnd.ms-excel": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingProducts.xls" } } }, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingProducts.xlsx" } } } } } }, "summary": "Reporting — products export (csv, xls, xlsx)", "description": "Streams a product stat as a csv, xls or xlsx download (the admin Export button). REST only; send the Accept header matching the requested format. `?type=` picks the stat group; `?format=` accepts csv, xls or xlsx (default csv).", "parameters": [ { "name": "type", "in": "query", "description": "Stat group.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "format", "in": "query", "description": "Export format: csv, xls or xlsx. Defaults to csv.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "csv", "xls", "xlsx" ], "example": "csv" }, "style": "form", "explode": true }, { "name": "start", "in": "query", "description": "Start date.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "end", "in": "query", "description": "End date.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "channel", "in": "query", "description": "Channel code.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true } ] } }, "/reporting/products/view": { "get": { "operationId": "api_apiadminreportingproductsview_get_collection", "tags": [ "Admin Reporting: Products" ], "responses": { "200": { "description": "AdminReportingProducts collection", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingProducts" } } }, "text/html": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingProducts.html" } } } } } }, "summary": "Reporting — products (View Details)", "description": "The detailed table form of a product stat (the admin \"View Details\" page). `statistics` is `{ columns, records }`. `?type=` picks the stat group.", "parameters": [ { "name": "type", "in": "query", "description": "Stat group.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "total-sold-quantities", "total-products-added-to-wishlist", "top-selling-products-by-revenue", "top-selling-products-by-quantity", "products-with-most-reviews", "last-search-terms", "top-search-terms" ] }, "style": "form", "explode": true }, { "name": "start", "in": "query", "description": "Start date.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "end", "in": "query", "description": "End date.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "channel", "in": "query", "description": "Channel code.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true } ] } }, "/reporting/sales": { "get": { "operationId": "api_apiadminreportingsales_get_collection", "tags": [ "Admin Reporting: Sales" ], "responses": { "200": { "description": "AdminReportingSales collection", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingSales" } } }, "text/html": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingSales.html" } } } } } }, "summary": "Reporting — sales", "description": "Sales reporting stats. `?type=` chooses the stat group.", "parameters": [ { "name": "type", "in": "query", "description": "Stat group.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "total-sales", "average-sales", "total-orders", "purchase-funnel", "abandoned-carts", "refunds", "tax-collected", "shipping-collected", "top-payment-methods", "sales-by-coupon" ] }, "style": "form", "explode": true }, { "name": "start", "in": "query", "description": "Start date.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "end", "in": "query", "description": "End date.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "channel", "in": "query", "description": "Channel code.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true } ] } }, "/reporting/sales/export": { "get": { "operationId": "api_apiadminreportingsalesexport_get_collection", "tags": [ "Admin Reporting: Sales" ], "responses": { "200": { "description": "AdminReportingSales collection", "content": { "text/csv": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingSales.csv" } } }, "application/vnd.ms-excel": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingSales.xls" } } }, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingSales.xlsx" } } } } } }, "summary": "Reporting — sales export (csv, xls, xlsx)", "description": "Streams a sales stat as a csv, xls or xlsx download (the admin Export button). REST only; send the Accept header matching the requested format. `?type=` chooses the stat group; `?format=` accepts csv, xls or xlsx (default csv).", "parameters": [ { "name": "type", "in": "query", "description": "Stat group.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "format", "in": "query", "description": "Export format: csv, xls or xlsx. Defaults to csv.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "csv", "xls", "xlsx" ], "example": "csv" }, "style": "form", "explode": true }, { "name": "start", "in": "query", "description": "Start date.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "end", "in": "query", "description": "End date.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "channel", "in": "query", "description": "Channel code.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true } ] } }, "/reporting/sales/view": { "get": { "operationId": "api_apiadminreportingsalesview_get_collection", "tags": [ "Admin Reporting: Sales" ], "responses": { "200": { "description": "AdminReportingSales collection", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingSales" } } }, "text/html": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminReportingSales.html" } } } } } }, "summary": "Reporting — sales (View Details)", "description": "The detailed table form of a sales stat (the admin \"View Details\" page). `statistics` is `{ columns, records }`. `?type=` chooses the stat group.", "parameters": [ { "name": "type", "in": "query", "description": "Stat group.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "total-sales", "average-sales", "total-orders", "purchase-funnel", "abandoned-carts", "refunds", "tax-collected", "shipping-collected", "top-payment-methods", "sales-by-coupon" ] }, "style": "form", "explode": true }, { "name": "start", "in": "query", "description": "Start date.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "end", "in": "query", "description": "End date.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "channel", "in": "query", "description": "Channel code.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true } ] } }, "/bookings": { "get": { "operationId": "api_apiadminbookings_get_collection", "tags": [ "Admin Sales: Bookings" ], "responses": { "200": { "description": "Paginated bookings in the { data, meta } envelope.", "content": { "application/json": { "example": { "data": [ { "id": 1, "orderId": 8, "orderIncrementId": "00000000008", "orderItemId": 42, "productId": 99, "productSku": "BK-EVENT-01", "productName": "Concert Ticket", "bookingType": "event", "qty": 2, "from": 1716220800, "to": 1716224400, "fromFormatted": "20 May, 2026 12:00PM", "toFormatted": "20 May, 2026 13:00PM", "bookingProductEventTicketId": 5, "order": { "id": 8, "incrementId": "00000000008", "status": "processing", "customerName": "John Doe", "customerEmail": "john.doe@example.com", "grandTotal": 240, "orderCurrencyCode": "USD" }, "orderItem": { "id": 42, "sku": "BK-EVENT-01", "name": "Concert Ticket", "qtyOrdered": 2 }, "createdAt": "2026-05-20 10:00:00" } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 1, "total": 1, "from": 1, "to": 1 } } } } } }, "summary": "List bookings (datagrid parity)", "description": "Paginated bookings listing mirroring the admin Sales → Bookings datagrid. Every booking column plus the linked order / order-item summary is populated on each row. Returns a `{ data, meta }` envelope. Requires `sales.bookings` permission.", "parameters": [ { "name": "page", "in": "query", "description": "Page number.", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "id", "in": "query", "description": "Filter by booking id (integer or comma-list).", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "order_id", "in": "query", "description": "Partial order increment_id.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "qty", "in": "query", "description": "Exact quantity.", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "product_id", "in": "query", "description": "Filter by product id.", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "from_from", "in": "query", "description": "Slot start >= (ISO date).", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "from_to", "in": "query", "description": "Slot start <= (ISO date).", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "to_from", "in": "query", "description": "Slot end >= (ISO date).", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "to_to", "in": "query", "description": "Slot end <= (ISO date).", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "created_at_from", "in": "query", "description": "Order created after.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "created_at_to", "in": "query", "description": "Order created before.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort column.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "order_id", "qty", "from", "to", "created_at" ] }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] }, "style": "form", "explode": true } ] } }, "/bookings/calendar": { "get": { "operationId": "api_apiadminbookingscalendar_get_collection", "tags": [ "Admin Sales: Bookings" ], "responses": { "200": { "description": "The bookings in the window.", "content": { "application/json": { "example": [ { "id": "bookings-calendar", "start": "2026-10-12", "end": "2026-10-18", "bookings": [ { "id": 4, "orderId": 31, "start": "2026-10-14 10:00 AM", "end": "2026-10-14 11:00 AM", "status": "processing", "email": "john@example.com", "fullName": "John Doe", "createdAt": "2026-10-10 09:12:44", "productSku": "BK-APPOINTMENT-01", "productName": "Doctor Appointment", "address": "12 Main Street", "contact": "9876543210", "city": "Austin", "state": "TX", "country": "US", "postcode": "73301", "attributes": [ { "attribute_name": "Booking From", "option_label": "14 Oct, 2026 10:00 AM" }, { "attribute_name": "Booking Till", "option_label": "14 Oct, 2026 11:00 AM" } ] } ] } ] } } }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks sales.bookings." }, "422": { "description": "start or end is not a Y-m-d date." } }, "summary": "Bookings calendar", "description": "Returns every booking whose slot overlaps the window, unpaginated, the way the admin bookings calendar view loads them. The window defaults to the current week. Slot times are formatted in the store timezone and each booking carries the attributes stored on its order item.", "parameters": [ { "name": "start", "in": "query", "description": "Window start (Y-m-d). Defaults to the start of the current week.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date", "example": "2026-10-12" }, "style": "form", "explode": true }, { "name": "end", "in": "query", "description": "Window end (Y-m-d), inclusive. Defaults to the end of the current week.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date", "example": "2026-10-18" }, "style": "form", "explode": true } ] } }, "/bookings/export": { "get": { "operationId": "api_apiadminbookingsexport_get", "tags": [ "Admin Sales: Bookings" ], "responses": { "200": { "description": "Export file downloaded as an attachment.", "content": { "text/csv": { "schema": { "type": "string", "format": "binary" } }, "application/vnd.ms-excel": { "schema": { "type": "string", "format": "binary" } }, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { "schema": { "type": "string", "format": "binary" } } } }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks the view permission." }, "422": { "description": "Unsupported format (csv, xls and xlsx only)." }, "404": { "description": "Not found", "links": [] } }, "summary": "Export bookings as csv, xls or xlsx", "description": "Downloads the bookings datagrid as a csv, xls or xlsx file — the same data the admin Export button produces. Honours the same filters as the listing. Binary download, not JSON. Pick the file type with ?format=csv|xls|xlsx (default csv).", "parameters": [ { "name": "format", "in": "query", "description": "Export format: csv, xls or xlsx. Defaults to csv.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "csv", "xls", "xlsx" ], "default": "csv" }, "style": "form", "explode": true } ] } }, "/bookings/{id}": { "get": { "operationId": "api_apiadminbookings_id_get", "tags": [ "Admin Sales: Bookings" ], "responses": { "200": { "description": "The booking.", "content": { "application/json": { "example": { "id": 1, "orderId": 8, "orderIncrementId": "00000000008", "orderItemId": 42, "productId": 99, "productSku": "BK-EVENT-01", "productName": "Concert Ticket", "bookingType": "event", "qty": 2, "from": 1716220800, "to": 1716224400, "fromFormatted": "20 May, 2026 12:00PM", "toFormatted": "20 May, 2026 13:00PM", "bookingProductEventTicketId": 5, "order": { "id": 8, "incrementId": "00000000008", "status": "processing", "customerName": "John Doe", "customerEmail": "john.doe@example.com", "grandTotal": 240, "orderCurrencyCode": "USD" }, "orderItem": { "id": 42, "sku": "BK-EVENT-01", "name": "Concert Ticket", "qtyOrdered": 2 }, "paymentMethod": "cashondelivery", "paymentTitle": "Cash On Delivery", "shippingMethod": "flatrate_flatrate", "shippingTitle": "Flat Rate - Flat Rate", "billingAddress": { "id": 16, "addressType": "order_billing", "firstName": "John", "lastName": "Doe", "city": "Los Angeles", "country": "US", "postcode": "90001", "email": "john.doe@example.com", "phone": "5551234567" }, "shippingAddress": { "id": 15, "addressType": "order_shipping", "firstName": "John", "lastName": "Doe", "city": "Los Angeles", "country": "US", "postcode": "90001", "email": "john.doe@example.com", "phone": "5551234567" }, "invoices": [ { "id": 503, "incrementId": "503", "state": "paid", "baseGrandTotal": 240, "formattedBaseGrandTotal": "$240.00", "createdAt": "2026-05-20 12:01:00" } ], "shipments": [], "refunds": [], "createdAt": "2026-05-20 10:00:00" } } } }, "404": { "description": "Unknown booking id." }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks sales.bookings." } }, "summary": "Get a booking by id", "description": "Returns a single booking with its booking-product sub-type, the booking window, and the linked order / order-item summary — no follow-up calls required. Requires `sales.bookings` permission.", "parameters": [ { "name": "id", "in": "path", "description": "Booking ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ] } }, "/eu-withdrawals": { "get": { "operationId": "api_apiadmineu-withdrawals_get_collection", "tags": [ "Admin Sales: EU Withdrawal" ], "responses": { "200": { "description": "The withdrawal declarations.", "content": { "application/json": { "example": { "data": [ { "id": 7, "uuid": "b2f1c0de-5a2e-4d7a-9f2e-3c1a2b4d5e6f", "orderId": 12, "orderIncrementId": "000000012", "customerId": 5, "customerName": "Jane Doe", "customerEmail": "jane@example.com", "isGuest": false, "channelId": 1, "channelCode": "default", "locale": "en", "reasonText": "Changed my mind.", "status": "received", "receivedAt": "2026-07-20T09:00:00+00:00", "confirmationSentAt": "2026-07-20T09:00:05+00:00", "finalConfirmationSentAt": null, "confirmationError": null, "declinedAt": null, "declinedReason": null, "declinedByUserId": null, "declinedByName": null, "refundedAt": null, "refundedByUserId": null, "refundedByName": null, "refundNote": null, "message": null, "createdAt": "2026-07-20T09:00:00+00:00", "updatedAt": "2026-07-20T09:00:05+00:00" } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 1, "total": 1, "from": 1, "to": 1 } } } } } }, "summary": "List EU right-of-withdrawal declarations", "description": "Filters: order_increment_id (LIKE), customer_email (LIKE), status (received|refunded|declined), channel_code, received_at_from/to, confirmation_sent_at_from/to. Sort: id (default desc), received_at, status. Permission: sales.eu_withdrawals.", "parameters": [] } }, "/eu-withdrawals/export": { "get": { "operationId": "api_apiadmineu-withdrawalsexport_get", "tags": [ "Admin Sales: EU Withdrawal" ], "responses": { "200": { "description": "Export file downloaded as an attachment.", "content": { "text/csv": { "schema": { "type": "string", "format": "binary" } }, "application/vnd.ms-excel": { "schema": { "type": "string", "format": "binary" } }, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { "schema": { "type": "string", "format": "binary" } } } }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks sales.eu_withdrawals." }, "422": { "description": "Unsupported format (csv, xls and xlsx only)." }, "404": { "description": "Not found", "links": [] } }, "summary": "Export EU withdrawals as csv, xls or xlsx", "description": "Downloads the EU withdrawals datagrid — the same columns the admin Export button produces (Received At, Order, Customer Email, Status, Channel, Confirmation Sent, Reference). Honours the same filters as the listing and exports every matching row. Binary download, not JSON. Requires `sales.eu_withdrawals`.", "parameters": [ { "name": "format", "in": "query", "description": "Export format: csv, xls or xlsx. Defaults to csv.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "csv", "xls", "xlsx" ], "default": "csv" }, "style": "form", "explode": true }, { "name": "order_increment_id", "in": "query", "description": "Partial order number match.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "customer_email", "in": "query", "description": "Partial customer email match.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "status", "in": "query", "description": "Status: received, refunded or declined.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "channel_code", "in": "query", "description": "Channel code.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "received_at_from", "in": "query", "description": "Received on or after (YYYY-MM-DD).", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "received_at_to", "in": "query", "description": "Received on or before (YYYY-MM-DD).", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "confirmation_sent_at_from", "in": "query", "description": "Confirmation sent on or after (YYYY-MM-DD).", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "confirmation_sent_at_to", "in": "query", "description": "Confirmation sent on or before (YYYY-MM-DD).", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true } ] } }, "/eu-withdrawals/{id}": { "get": { "operationId": "api_apiadmineu-withdrawals_id_get", "tags": [ "Admin Sales: EU Withdrawal" ], "responses": { "200": { "description": "The withdrawal declaration with its full evidence timeline.", "content": { "application/json": { "example": { "id": 7, "uuid": "b2f1c0de-5a2e-4d7a-9f2e-3c1a2b4d5e6f", "orderId": 12, "orderIncrementId": "000000012", "customerId": 5, "customerName": "Jane Doe", "customerEmail": "jane@example.com", "isGuest": false, "channelId": 1, "channelCode": "default", "locale": "en", "reasonText": "Changed my mind.", "status": "refunded", "receivedAt": "2026-07-20T09:00:00+00:00", "confirmationSentAt": "2026-07-20T09:00:05+00:00", "finalConfirmationSentAt": "2026-07-21T14:00:00+00:00", "confirmationError": null, "declinedAt": null, "declinedReason": null, "declinedByUserId": null, "declinedByName": null, "refundedAt": "2026-07-21T14:00:00+00:00", "refundedByUserId": 1, "refundedByName": "Example Admin", "refundNote": "Refunded via original payment method.", "message": null, "createdAt": "2026-07-20T09:00:00+00:00", "updatedAt": "2026-07-21T14:00:00+00:00" } } } }, "404": { "description": "Not found", "links": [] } }, "summary": "Get a withdrawal declaration (evidence + timeline)", "description": "Get a withdrawal declaration (evidence + timeline)", "parameters": [ { "name": "id", "in": "path", "description": "Eu withdrawal ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] } }, "/eu-withdrawals/{id}/decline": { "post": { "operationId": "api_apiadmineu-withdrawals_iddecline_post", "tags": [ "Admin Sales: EU Withdrawal" ], "responses": { "200": { "description": "The declined withdrawal declaration.", "content": { "application/json": { "example": { "id": 7, "uuid": "b2f1c0de-5a2e-4d7a-9f2e-3c1a2b4d5e6f", "orderIncrementId": "000000012", "customerEmail": "jane@example.com", "status": "declined", "declinedAt": "2026-07-21T15:00:00+00:00", "declinedReason": "Item was a personalised good, exempt from withdrawal.", "declinedByUserId": 1, "declinedByName": "Example Admin", "refundedAt": null, "refundNote": null, "message": "Withdrawal declined.", "updatedAt": "2026-07-21T15:00:00+00:00" } } } }, "201": { "description": "AdminEuWithdrawal resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminEuWithdrawal" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminEuWithdrawal.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Decline a withdrawal (merchant contests entitlement)", "description": "Sets status=declined and clears any prior refund metadata. Permission: sales.eu_withdrawals.decline.", "parameters": [ { "name": "id", "in": "path", "description": "Eu withdrawal ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminEuWithdrawal resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "declined_reason" ], "properties": { "declined_reason": { "type": "string", "example": "Item was a personalised good, exempt from withdrawal." } } } } }, "required": true } } }, "/eu-withdrawals/{id}/mark-refunded": { "post": { "operationId": "api_apiadmineu-withdrawals_idmark-refunded_post", "tags": [ "Admin Sales: EU Withdrawal" ], "responses": { "200": { "description": "The refunded withdrawal declaration.", "content": { "application/json": { "example": { "id": 7, "uuid": "b2f1c0de-5a2e-4d7a-9f2e-3c1a2b4d5e6f", "orderIncrementId": "000000012", "customerEmail": "jane@example.com", "status": "refunded", "declinedAt": null, "declinedReason": null, "refundedAt": "2026-07-21T14:00:00+00:00", "refundedByUserId": 1, "refundedByName": "Example Admin", "refundNote": "Refunded via original payment method.", "message": "Withdrawal marked as refunded.", "updatedAt": "2026-07-21T14:00:00+00:00" } } } }, "201": { "description": "AdminEuWithdrawal resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminEuWithdrawal" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminEuWithdrawal.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Mark a withdrawal refunded (recorded out-of-band)", "description": "Sets status=refunded and clears any prior decline metadata. Permission: sales.eu_withdrawals.mark_refunded.", "parameters": [ { "name": "id", "in": "path", "description": "Eu withdrawal ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminEuWithdrawal resource", "content": { "application/json": { "schema": { "type": "object", "properties": { "refund_note": { "type": "string", "example": "Refunded via original payment method." } } } } }, "required": false } } }, "/eu-withdrawals/{id}/resend-confirmation": { "post": { "operationId": "api_apiadmineu-withdrawals_idresend-confirmation_post", "tags": [ "Admin Sales: EU Withdrawal" ], "responses": { "200": { "description": "The declaration after the confirmation email was re-sent (confirmationSentAt refreshed).", "content": { "application/json": { "example": { "id": 7, "uuid": "b2f1c0de-5a2e-4d7a-9f2e-3c1a2b4d5e6f", "orderIncrementId": "000000012", "customerEmail": "jane@example.com", "status": "received", "confirmationSentAt": "2026-07-21T16:30:00+00:00", "confirmationError": null, "message": "Confirmation email re-sent.", "updatedAt": "2026-07-21T16:30:00+00:00" } } } }, "201": { "description": "AdminEuWithdrawal resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminEuWithdrawal" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminEuWithdrawal.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Resend the durable-medium confirmation email", "description": "Empty body. Re-sends the confirmation email in the declaration's locale. Permission: sales.eu_withdrawals.resend_confirmation.", "parameters": [ { "name": "id", "in": "path", "description": "Eu withdrawal ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] } }, "/invoices": { "get": { "operationId": "api_apiadmininvoices_get_collection", "tags": [ "Admin Sales: Invoices" ], "responses": { "200": { "description": "AdminInvoice collection", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminInvoice.AdminInvoiceRestDto" } } }, "text/html": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminInvoice.AdminInvoiceRestDto.html" } } } } } }, "summary": "List invoices (datagrid parity)", "description": "Paginated invoices listing. Every invoice column + billing/shipping addresses are populated per row (line items are detail-only). Returns a `{ data, meta }` envelope. Requires `sales.invoices.view`.", "parameters": [ { "name": "page", "in": "query", "description": "Page number (1-based).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "id", "in": "query", "description": "Filter by invoice id (integer or comma-separated list).", "required": false, "deprecated": false, "schema": { "type": "string", "example": "12" }, "style": "form", "explode": true }, { "name": "customer_id", "in": "query", "description": "Only invoices of orders placed by this customer.", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 12 }, "style": "form", "explode": true }, { "name": "order_id", "in": "query", "description": "Partial order increment_id match.", "required": false, "deprecated": false, "schema": { "type": "string", "example": "00000" }, "style": "form", "explode": true }, { "name": "state", "in": "query", "description": "Filter by invoice state.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "pending", "pending_payment", "paid", "overdue" ], "example": "paid" }, "style": "form", "explode": true }, { "name": "base_grand_total_from", "in": "query", "description": "Minimum base grand total.", "required": false, "deprecated": false, "schema": { "type": "number", "example": 0 }, "style": "form", "explode": true }, { "name": "base_grand_total_to", "in": "query", "description": "Maximum base grand total.", "required": false, "deprecated": false, "schema": { "type": "number", "example": 1000 }, "style": "form", "explode": true }, { "name": "created_at_from", "in": "query", "description": "Created after (ISO date).", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date", "example": "2026-01-01" }, "style": "form", "explode": true }, { "name": "created_at_to", "in": "query", "description": "Created before (ISO date).", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date", "example": "2026-12-31" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Column to sort by.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "increment_id", "order_id", "base_grand_total", "state", "created_at" ], "example": "id" }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "example": "desc" }, "style": "form", "explode": true } ] } }, "/invoices/export": { "get": { "operationId": "api_apiadmininvoicesexport_get", "tags": [ "Admin Sales: Invoices" ], "responses": { "200": { "description": "Export file downloaded as an attachment.", "content": { "text/csv": { "schema": { "type": "string", "format": "binary" } }, "application/vnd.ms-excel": { "schema": { "type": "string", "format": "binary" } }, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { "schema": { "type": "string", "format": "binary" } } } }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks the view permission." }, "422": { "description": "Unsupported format (csv, xls and xlsx only)." }, "404": { "description": "Not found", "links": [] } }, "summary": "Export invoices as csv, xls or xlsx", "description": "Downloads the invoices datagrid as a csv, xls or xlsx file — the same data the admin Export button produces. Honours the same filters as the listing. Binary download, not JSON. Pick the file type with ?format=csv|xls|xlsx (default csv).", "parameters": [ { "name": "format", "in": "query", "description": "Export format: csv, xls or xlsx. Defaults to csv.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "csv", "xls", "xlsx" ], "default": "csv" }, "style": "form", "explode": true } ] } }, "/invoices/mass-update-status": { "post": { "operationId": "api_apiadmininvoicesmass-update-status_post", "tags": [ "Admin Sales: Invoices" ], "responses": { "200": { "description": "Invoices updated.", "content": { "application/json": { "example": { "updated": [ 560, 561 ], "message": "Invoice status updated successfully." } } }, "links": [] }, "422": { "description": "Empty indices, or value not one of pending/paid/overdue.", "links": [] }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks sales.invoices.view." }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Mass update invoice status", "description": "Bulk-sets the status of a batch of invoices to pending, paid, or overdue. This is a manual status override — it does not capture or reverse a payment.", "parameters": [], "requestBody": { "description": "The new AdminInvoiceMassUpdateStatus resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices", "value" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 560, 561 ] }, "value": { "type": "string", "enum": [ "pending", "paid", "overdue" ], "example": "paid" } } } } }, "required": true } } }, "/invoices/{id}": { "get": { "operationId": "api_apiadmininvoices_id_get", "tags": [ "Admin Sales: Invoices" ], "responses": { "200": { "description": "Invoice detail.", "content": { "application/json": { "example": { "id": 585, "incrementId": "585", "orderId": 41, "orderIncrementId": "41", "state": "paid", "emailSent": true, "totalQty": 1, "orderCurrencyCode": "USD", "baseCurrencyCode": "USD", "channelCurrencyCode": "USD", "subTotal": 4000, "formattedSubTotal": "$4,000.00", "baseSubTotal": 4000, "formattedBaseSubTotal": "$4,000.00", "subTotalInclTax": 4000, "formattedSubTotalInclTax": "$4,000.00", "baseSubTotalInclTax": 4000, "formattedBaseSubTotalInclTax": "$4,000.00", "grandTotal": 4000, "formattedGrandTotal": "$4,000.00", "baseGrandTotal": 4000, "formattedBaseGrandTotal": "$4,000.00", "taxAmount": 0, "formattedTaxAmount": "$0.00", "baseTaxAmount": 0, "formattedBaseTaxAmount": "$0.00", "discountAmount": 0, "formattedDiscountAmount": "$0.00", "baseDiscountAmount": 0, "formattedBaseDiscountAmount": "$0.00", "shippingAmount": 0, "formattedShippingAmount": "$0.00", "baseShippingAmount": 0, "formattedBaseShippingAmount": "$0.00", "shippingAmountInclTax": 0, "formattedShippingAmountInclTax": "$0.00", "baseShippingAmountInclTax": 0, "formattedBaseShippingAmountInclTax": "$0.00", "shippingTaxAmount": 0, "formattedShippingTaxAmount": "$0.00", "baseShippingTaxAmount": 0, "formattedBaseShippingTaxAmount": "$0.00", "transactionId": null, "reminders": 0, "nextReminderAt": null, "createdAt": "2026-06-04 17:52:47", "updatedAt": "2026-06-04 18:34:43", "orderStatus": "processing", "orderStatusLabel": "Processing", "orderDate": "2024-06-13 17:28:47", "channelName": "bagisto store", "customerName": "webkul pvt ltd", "customerEmail": "abhijit.kumar018@webkul.in", "order": { "id": 41, "addresses": [ { "id": 190, "addressType": "order_billing", "firstName": "webkul", "lastName": "pvt ltd", "companyName": "C. Trades", "address": "noida arv park 63", "city": "Wyoming", "state": "Uttar Pradesh", "country": "IN", "postcode": "456464", "email": "abhijit.kumar018@webkul.in", "phone": "09999999999" }, { "id": 189, "addressType": "order_shipping", "firstName": "webkul", "lastName": "pvt ltd", "companyName": "C. Trades", "address": "noida arv park 63", "city": "Wyoming", "state": "Uttar Pradesh", "country": "IN", "postcode": "456464", "email": "abhijit.kumar018@webkul.in", "phone": "09999999999" } ] }, "items": [ { "id": 860, "orderItemId": 50, "sku": "Head13", "name": "Bagisto Cowboy Hat", "qty": 1, "price": 4000, "formattedPrice": "$4,000.00", "basePrice": 4000, "basePriceInclTax": 4000, "total": 4000, "formattedTotal": "$4,000.00", "baseTotal": 4000, "baseTotalInclTax": 4000, "taxAmount": 0, "formattedTaxAmount": "$0.00", "discountAmount": 0, "formattedDiscountAmount": "$0.00", "productId": 122, "productType": "simple", "baseImageUrl": "http://localhost:8000/storage/product/122/P9n1dbmgM4UOBT3zUAEGCn4wpKi0GjPGhgS1jZe7.webp", "additional": { "locale": "en", "quantity": 1, "product_id": "122", "super_attribute": [], "selected_configurable_option": 122 } } ] } } } }, "404": { "description": "Not found", "links": [] } }, "summary": "Get invoice detail", "description": "Full single-invoice payload — every invoice column, order/customer context, billing & shipping addresses, and embedded line items. Requires `sales.invoices.view`.", "parameters": [ { "name": "id", "in": "path", "description": "Invoice ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ] } }, "/invoices/{id}/print": { "get": { "operationId": "api_apiadmininvoices_idprint_get", "tags": [ "Admin Sales: Invoices" ], "responses": { "200": { "description": "The invoice PDF file is downloaded (application/pdf attachment).", "content": { "application/pdf": { "schema": { "type": "string", "format": "binary" } } } }, "404": { "description": "Not found", "links": [] } }, "summary": "Download an invoice as PDF", "description": "Returns the invoice as a PDF file (`application/pdf` attachment) — the response is a binary download, not JSON. There is no example body; the browser/client downloads `invoice-{id}.pdf`.", "parameters": [ { "name": "id", "in": "path", "description": "Invoice ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ] } }, "/invoices/{id}/send-duplicate": { "post": { "operationId": "api_apiadmininvoices_idsend-duplicate_post", "tags": [ "Admin Sales: Invoices" ], "responses": { "200": { "description": "Invoice email sent.", "content": { "application/json": { "example": { "id": 585, "email": "customer@example.com", "success": true, "message": "Invoice email sent to customer@example.com." } } }, "links": [] }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks sales.invoices.view." }, "404": { "description": "Invoice not found." }, "422": { "description": "Recipient email is invalid.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Send a duplicate invoice email", "description": "Emails a copy of the invoice. `email` is optional — defaults to the order's customer email. Requires `sales.invoices.view`.", "parameters": [ { "name": "id", "in": "path", "description": "Invoice send duplicate ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminInvoiceSendDuplicate resource", "content": { "application/json": { "schema": { "type": "object" }, "example": { "email": "customer@example.com" } } }, "required": false } } }, "/booking-products/{productId}/config": { "get": { "operationId": "api_apiadminbooking-products_productIdconfig_get_collection", "tags": [ "Admin Sales: Orders" ], "responses": { "200": { "description": "Booking configuration.", "content": { "application/json": { "example": [ { "productId": 12, "bookingProductId": 3, "type": "event", "availableEveryWeek": false, "availableFrom": "2026-10-01", "availableTo": "2026-12-31", "calendar": { "valid_weekdays": [ 0, 1, 2, 3, 4, 5, 6 ], "available_every_week": false, "available_from": "2026-10-01", "available_to": "2026-12-31", "prevent_scheduling_before": 0, "disabled_dates": [] }, "rentalSlot": null, "tableSlot": null, "eventTickets": [ { "id": 1, "price": "20.0000", "qty": 100, "name": "Standard", "formatted_price": "$20.00", "formatted_total_price": "$20.00" } ] } ] } } }, "404": { "description": "Not a booking product." }, "401": { "description": "Unauthenticated." } }, "summary": "Booking product configuration for Create Order", "description": "Returns what the admin Create Order booking drawer shows for a booking product. Slots for a date come from `GET /booking-products/{productId}/slots?date=`.", "parameters": [] } }, "/booking-products/{productId}/slots": { "get": { "operationId": "api_apiadminbooking-products_productIdslots_get_collection", "tags": [ "Admin Sales: Orders" ], "responses": { "200": { "description": "Slots for the date.", "content": { "application/json": { "example": [ { "productId": 14, "date": "2026-10-20", "slots": [ { "from": "09:00 AM", "to": "10:00 AM", "timestamp": "1792472400-1792476000", "qty": 10 } ] } ] } } }, "404": { "description": "Not a booking product." }, "422": { "description": "Missing or invalid date." }, "401": { "description": "Unauthenticated." } }, "summary": "Booking slots for a date", "description": "Returns the slots a booking product offers on the given date. Send the chosen slot back as `booking.slot` when adding the product to a draft cart.", "parameters": [ { "name": "date", "in": "query", "description": "Required. Date in `Y-m-d` format.", "required": true, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true } ] } }, "/catalog/products/{productId}/cart-options": { "get": { "operationId": "api_apiadmincatalogproducts_productIdcart-options_get_collection", "tags": [ "Admin Sales: Orders" ], "responses": { "200": { "description": "Cart options for the product.", "content": { "application/json": { "examples": { "grouped": { "value": [ { "productId": 6, "type": "grouped", "initialPrice": null, "options": [ { "id": 7, "name": "Arctic Touchscreen Gloves", "qty": 1, "price": 21, "formatted_price": "$21.00" } ] } ] }, "downloadable": { "value": [ { "productId": 9, "type": "downloadable", "initialPrice": null, "options": [ { "id": 1, "title": "E-book PDF", "price": "5.0000", "formatted_price": "$5.00" } ] } ] }, "simple": { "value": [ { "productId": 1, "type": "simple", "initialPrice": 14, "options": [] } ] } } } } }, "404": { "description": "Product not found." }, "401": { "description": "Unauthenticated." }, "403": { "description": "Missing the catalog.products permission." } }, "summary": "Cart options for a product (Create Order)", "description": "Returns what the admin Create Order drawer shows before adding a product to a draft cart. `options` depends on `type`: configurable returns the attributes, variant index and variant prices; bundle returns the bundle options; grouped returns the saleable associated products; downloadable returns the links; simple and virtual return the customizable options with `initialPrice`. Other types return `options: null` (booking products use `GET /booking-products/{productId}/config`).", "parameters": [ { "name": "productId", "in": "path", "description": "Product ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 6 }, "style": "simple", "explode": false } ] } }, "/orders": { "get": { "operationId": "api_apiadminorders_get_collection", "tags": [ "Admin Sales: Orders" ], "responses": { "200": { "description": "Paginated list of orders in the { data, meta } envelope.", "content": { "application/json": { "example": { "data": [ { "id": 2392, "incrementId": "2392", "status": "processing", "statusLabel": "Processing", "channelId": 1, "channelName": "bagisto store", "isGuest": false, "customerId": 19, "customerEmail": "admin@example.com", "customerName": "Test User", "paymentTitle": "Money Transfer", "couponCode": null, "totalItemCount": 1, "totalQtyOrdered": 1, "orderCurrencyCode": "USD", "grandTotal": 4000, "baseGrandTotal": 4000, "formattedGrandTotal": "$4,000.00", "location": "New York, NY, US", "createdAt": "2026-05-19 13:13:29", "updatedAt": "2026-05-19 13:13:30", "items": [ { "id": 2694, "sku": "test65", "name": "Classic Watch Hand", "qtyOrdered": 1, "productImage": "http://localhost:8000/storage/product/2358/example.webp" } ] } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 62, "total": 616, "from": 1, "to": 10 } } } } } }, "summary": "List orders", "description": "Paginated, filterable list of all orders across every customer. Returns a slim row per order in a `{ data, meta }` envelope; use the order detail and sub-resources for items / invoices / shipments.", "parameters": [ { "name": "page", "in": "query", "description": "Page number", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (max 50)", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "query", "in": "query", "description": "Quick search: matches customer email, status or customer name (partial) or the order increment ID (exact), combined with OR", "required": false, "deprecated": false, "schema": { "type": "string", "example": "john" }, "style": "form", "explode": true }, { "name": "customer_id", "in": "query", "description": "Only orders placed by this customer", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 12 }, "style": "form", "explode": true }, { "name": "order_id", "in": "query", "description": "Filter by order increment ID (partial match)", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "status", "in": "query", "description": "Filter by status", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "pending", "pending_payment", "processing", "completed", "canceled", "closed", "fraud" ] }, "style": "form", "explode": true }, { "name": "grand_total", "in": "query", "description": "Filter by base grand total (exact)", "required": false, "deprecated": false, "schema": { "type": "number" }, "style": "form", "explode": true }, { "name": "grand_total_from", "in": "query", "description": "Filter by base grand total (minimum)", "required": false, "deprecated": false, "schema": { "type": "number" }, "style": "form", "explode": true }, { "name": "grand_total_to", "in": "query", "description": "Filter by base grand total (maximum)", "required": false, "deprecated": false, "schema": { "type": "number" }, "style": "form", "explode": true }, { "name": "channel", "in": "query", "description": "Filter by channel ID", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "customer", "in": "query", "description": "Filter by customer name (partial match)", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "email", "in": "query", "description": "Filter by customer email (partial match)", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "date_range", "in": "query", "description": "Date preset (matches the admin datagrid)", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "today", "yesterday", "this_week", "this_month", "last_month", "last_three_months", "last_six_months", "this_year" ] }, "style": "form", "explode": true }, { "name": "date_from", "in": "query", "description": "Custom range start (Y-m-d)", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "date_to", "in": "query", "description": "Custom range end (Y-m-d)", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort field", "required": false, "deprecated": false, "schema": { "type": "string", "example": "created_at" }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "example": "desc" }, "style": "form", "explode": true } ] } }, "/orders/export": { "get": { "operationId": "api_apiadminordersexport_get", "tags": [ "Admin Sales: Orders" ], "responses": { "200": { "description": "Export file downloaded as an attachment.", "content": { "text/csv": { "schema": { "type": "string", "format": "binary" } }, "application/vnd.ms-excel": { "schema": { "type": "string", "format": "binary" } }, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { "schema": { "type": "string", "format": "binary" } } } }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks the view permission." }, "422": { "description": "Unsupported format (csv, xls and xlsx only)." }, "404": { "description": "Not found", "links": [] } }, "summary": "Export orders as csv, xls or xlsx", "description": "Downloads the orders datagrid as a csv, xls or xlsx file — the same data the admin Export button produces. Honours the same filters as the listing. Binary download, not JSON. Pick the file type with ?format=csv|xls|xlsx (default csv).", "parameters": [ { "name": "format", "in": "query", "description": "Export format: csv, xls or xlsx. Defaults to csv.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "csv", "xls", "xlsx" ], "default": "csv" }, "style": "form", "explode": true } ] } }, "/orders/{id}": { "get": { "operationId": "api_apiadminorders_id_get", "tags": [ "Admin Sales: Orders" ], "responses": { "200": { "description": "AdminOrderDetail resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminOrderDetail.OrderDetailRestDto" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminOrderDetail.OrderDetailRestDto.html" } } } }, "404": { "description": "Not found", "links": [] } }, "summary": "Get order detail", "description": "Full order-view payload — flat order fields plus embedded customer, billing/shipping addresses, items, invoices, shipments, refunds, and comments. Over GraphQL the nested collections are field-selectable connections (items { edges { node } }) and the to-one objects are typed (customer { name }); over REST they are flat arrays/objects.", "parameters": [ { "name": "id", "in": "path", "description": "Order detail ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] } }, "/orders/{id}/cancel": { "post": { "operationId": "api_apiadminorders_idcancel_post", "tags": [ "Admin Sales: Orders" ], "responses": { "200": { "description": "The updated order detail." }, "404": { "description": "Order not found." }, "422": { "description": "Order is closed / fraud / has nothing to cancel, or admin lacks `sales.orders.cancel`.", "links": [] }, "201": { "description": "AdminCancelOrder resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminCancelOrder.OrderDetailRestDto" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminCancelOrder.OrderDetailRestDto.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Cancel an order", "description": "Cancels every cancellable item on the order and returns the updated `OrderDetail`. Gated by the same conditions as the admin UI (open status, qty_to_cancel, `sales.orders.cancel` permission).", "parameters": [ { "name": "id", "in": "path", "description": "Order ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminCancelOrder resource", "content": { "application/json": { "schema": { "type": "object" }, "example": [] } }, "required": false } } }, "/orders/{orderId}/comments": { "get": { "operationId": "api_apiadminorders_orderIdcomments_get_collection", "tags": [ "Admin Sales: Orders" ], "responses": { "200": { "description": "AdminOrderComment collection", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminOrderComment" } } }, "text/html": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminOrderComment.html" } } } } } }, "summary": "List comments on an order", "description": "Returns all comments newest-first in a `{ data, meta }` envelope.", "parameters": [ { "name": "orderId", "in": "path", "description": "Order ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ] }, "post": { "operationId": "api_apiadminorders_orderIdcomments_post", "tags": [ "Admin Sales: Orders" ], "responses": { "201": { "description": "AdminOrderComment resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminOrderComment" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminOrderComment.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Add a comment to an order", "description": "Persists an order comment. When `customerNotified=true` core listeners send the customer email.", "parameters": [ { "name": "orderId", "in": "path", "description": "Order ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminOrderComment resource", "content": { "application/json": { "schema": { "type": "object" }, "example": { "comment": "Customer called to confirm shipping address.", "customerNotified": true } } }, "required": true } } }, "/orders/{orderId}/invoices": { "post": { "operationId": "api_apiadminorders_orderIdinvoices_post", "tags": [ "Admin Sales: Orders" ], "responses": { "201": { "description": "AdminInvoice resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminInvoice.AdminInvoiceRestDto" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminInvoice.AdminInvoiceRestDto.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Create an invoice for an order", "description": "Create an invoice for an order", "parameters": [ { "name": "orderId", "in": "path", "description": "Order ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminInvoice resource", "content": { "application/json": { "schema": { "type": "object" }, "example": { "items": [ { "orderItemId": 42, "quantity": 3 }, { "orderItemId": 43, "quantity": 1 } ], "can_create_transaction": true } } }, "required": true } } }, "/orders/{orderId}/refunds": { "post": { "operationId": "api_apiadminorders_orderIdrefunds_post", "tags": [ "Admin Sales: Orders" ], "responses": { "201": { "description": "AdminRefund resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminRefund" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminRefund.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Create a refund for an order", "description": "Create a refund for an order", "parameters": [ { "name": "orderId", "in": "path", "description": "Order ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminRefund resource", "content": { "application/json": { "schema": { "type": "object" }, "example": { "items": [ { "orderItemId": 42, "quantity": 1 } ], "shipping": 0, "adjustmentRefund": 0, "adjustmentFee": 0 } } }, "required": true } } }, "/orders/{orderId}/refunds/preview": { "post": { "operationId": "api_apiadminorders_orderIdrefundspreview_post", "tags": [ "Admin Sales: Orders" ], "responses": { "201": { "description": "AdminRefund resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminRefund.RefundTotalsSummary" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminRefund.RefundTotalsSummary.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Preview refund totals without saving", "description": "Preview refund totals without saving", "parameters": [ { "name": "orderId", "in": "path", "description": "Order ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminRefund resource", "content": { "application/json": { "schema": { "type": "object" }, "example": { "items": [ { "orderItemId": 42, "quantity": 1 } ], "shipping": 0, "adjustmentRefund": 0, "adjustmentFee": 0 } } }, "required": true } } }, "/orders/{orderId}/shipments": { "post": { "operationId": "api_apiadminorders_orderIdshipments_post", "tags": [ "Admin Sales: Orders" ], "responses": { "201": { "description": "AdminShipment resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminShipment" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminShipment.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Create a shipment for an order", "description": "Create a shipment for an order", "parameters": [ { "name": "orderId", "in": "path", "description": "Order ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminShipment resource", "content": { "application/json": { "schema": { "type": "object" }, "example": { "source": 1, "items": [ { "orderItemId": 42, "inventorySourceId": 1, "quantity": 3 } ], "carrierTitle": "UPS", "trackNumber": "1Z999AA1" } } }, "required": true } } }, "/rma/custom-fields": { "get": { "operationId": "api_apiadminrmacustom-fields_get_collection", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The RMA custom fields. options is populated only for select/multiselect/checkbox/radio types.", "content": { "application/json": { "example": { "data": [ { "id": 4, "code": "preferred_resolution", "label": "Preferred resolution", "type": "select", "isRequired": 1, "position": 1, "inputValidation": null, "status": 1, "options": [ { "id": 11, "name": "Refund", "value": "refund" }, { "id": 12, "name": "Replacement", "value": "replacement" } ], "message": null, "createdAt": "2026-07-20T09:00:00+00:00", "updatedAt": "2026-07-20T09:00:00+00:00" } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 1, "total": 1, "from": 1, "to": 1 } } } } } }, "summary": "List RMA custom fields", "description": "Extra fields the return form collects. Filters: code (LIKE), label (LIKE), type, status. Sort: id (default desc), position, code.", "parameters": [] }, "post": { "operationId": "api_apiadminrmacustom-fields_post", "tags": [ "Admin Sales: RMA" ], "responses": { "201": { "description": "The created RMA custom field.", "content": { "application/json": { "example": { "id": 4, "code": "preferred_resolution", "label": "Preferred resolution", "type": "select", "isRequired": 1, "position": 1, "inputValidation": null, "status": 1, "options": [ { "id": 11, "name": "Refund", "value": "refund" }, { "id": 12, "name": "Replacement", "value": "replacement" } ], "message": null, "createdAt": "2026-07-20T09:00:00+00:00", "updatedAt": "2026-07-20T09:00:00+00:00" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Create an RMA custom field", "description": "`options` is required for select/multiselect/checkbox/radio types. Permission: sales.rma.custom-fields.create.", "parameters": [], "requestBody": { "description": "The new AdminRmaCustomField resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "code", "label", "type" ], "properties": { "code": { "type": "string", "example": "preferred_resolution" }, "label": { "type": "string", "example": "Preferred resolution" }, "type": { "type": "string", "enum": [ "text", "textarea", "select", "multiselect", "checkbox", "radio" ], "example": "select" }, "is_required": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "position": { "type": "integer", "example": 1 }, "input_validation": { "type": "string", "example": null }, "status": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "options": { "type": "array", "description": "Required for select/multiselect/checkbox/radio.", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" } } }, "example": [ { "name": "Refund", "value": "refund" }, { "name": "Replacement", "value": "replacement" } ] } } } } }, "required": true } } }, "/rma/custom-fields/mass-delete": { "post": { "operationId": "api_apiadminrmacustom-fieldsmass-delete_post", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The deleted custom-field ids.", "content": { "application/json": { "example": { "deleted": [ 4, 6 ], "message": "Selected RMA custom fields deleted successfully." } } } }, "201": { "description": "AdminRmaCustomFieldMassDelete resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminRmaCustomFieldMassDelete" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminRmaCustomFieldMassDelete.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Mass-delete RMA custom fields", "description": "Permission: sales.rma.custom-fields.delete.", "parameters": [], "requestBody": { "description": "The new AdminRmaCustomFieldMassDelete resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 4, 6 ] } } } } }, "required": true } } }, "/rma/custom-fields/mass-update-status": { "post": { "operationId": "api_apiadminrmacustom-fieldsmass-update-status_post", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The updated custom-field ids.", "content": { "application/json": { "example": { "updated": [ 4, 6 ], "message": "Selected RMA custom fields updated successfully." } } } }, "201": { "description": "AdminRmaCustomFieldMassUpdateStatus resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminRmaCustomFieldMassUpdateStatus" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminRmaCustomFieldMassUpdateStatus.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Mass-update RMA custom field status", "description": "Permission: sales.rma.custom-fields.edit.", "parameters": [], "requestBody": { "description": "The new AdminRmaCustomFieldMassUpdateStatus resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices", "value" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 4, 6 ] }, "value": { "type": "integer", "enum": [ 0, 1 ], "example": 1 } } } } }, "required": true } } }, "/rma/custom-fields/{id}": { "get": { "operationId": "api_apiadminrmacustom-fields_id_get", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The RMA custom field with its options.", "content": { "application/json": { "example": { "id": 4, "code": "preferred_resolution", "label": "Preferred resolution", "type": "select", "isRequired": 1, "position": 1, "inputValidation": null, "status": 1, "options": [ { "id": 11, "name": "Refund", "value": "refund" }, { "id": 12, "name": "Replacement", "value": "replacement" } ], "message": null, "createdAt": "2026-07-20T09:00:00+00:00", "updatedAt": "2026-07-20T09:00:00+00:00" } } } }, "404": { "description": "Not found", "links": [] } }, "summary": "Get an RMA custom field (with its options)", "description": "Get an RMA custom field (with its options)", "parameters": [ { "name": "id", "in": "path", "description": "Rma custom field ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadminrmacustom-fields_id_put", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The updated RMA custom field.", "content": { "application/json": { "example": { "id": 4, "code": "preferred_resolution", "label": "How should we resolve this?", "type": "select", "isRequired": 0, "position": 2, "inputValidation": null, "status": 1, "options": [ { "id": 13, "name": "Refund", "value": "refund" }, { "id": 14, "name": "Store credit", "value": "store_credit" } ], "message": null, "createdAt": "2026-07-20T09:00:00+00:00", "updatedAt": "2026-07-20T11:00:00+00:00" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] }, "404": { "description": "Not found", "links": [] } }, "summary": "Update an RMA custom field", "description": "Partial update. Sending `options` replaces the full option set. Permission: sales.rma.custom-fields.edit.", "parameters": [ { "name": "id", "in": "path", "description": "Rma custom field ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminRmaCustomField resource", "content": { "application/json": { "schema": { "type": "object", "properties": { "label": { "type": "string", "example": "How should we resolve this?" }, "is_required": { "type": "integer", "enum": [ 0, 1 ], "example": 0 }, "position": { "type": "integer", "example": 2 }, "status": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "options": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" } } }, "example": [ { "name": "Refund", "value": "refund" }, { "name": "Store credit", "value": "store_credit" } ] } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminrmacustom-fields_id_delete", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The RMA custom field was deleted.", "content": { "application/json": { "example": { "message": "RMA custom field deleted successfully." } } } }, "404": { "description": "Not found", "links": [] } }, "summary": "Delete an RMA custom field", "description": "Permission: sales.rma.custom-fields.delete.", "parameters": [ { "name": "id", "in": "path", "description": "Rma custom field ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] } }, "/rma/messages": { "get": { "operationId": "api_apiadminrmamessages_get_collection", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The RMA conversation messages, newest first.", "content": { "application/json": { "example": [ { "id": 90, "rmaId": 12, "message": "We have received your package.", "isAdmin": true, "attachment": null, "attachmentUrl": null, "createdAt": "2026-07-20T11:30:00+00:00" }, { "id": 87, "rmaId": 12, "message": "The hoodie zipper is broken.", "isAdmin": false, "attachment": "rma/12/messages/zipper.jpg", "attachmentUrl": "https://example.com/storage/rma/12/messages/zipper.jpg", "createdAt": "2026-07-20T10:20:00+00:00" } ] } } } }, "summary": "List the conversation messages of an RMA request", "description": "Messages on the RMA named by `?return_id=`, newest first.", "parameters": [ { "name": "return_id", "in": "query", "description": "Return (RMA) id", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadminrmamessages_post", "tags": [ "Admin Sales: RMA" ], "responses": { "201": { "description": "The created admin message.", "content": { "application/json": { "example": { "id": 91, "rmaId": 12, "message": "We have received your package.", "isAdmin": true, "attachment": null, "attachmentUrl": null, "createdAt": "2026-07-20T11:35:00+00:00" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Send an admin message on an RMA request", "description": "Adds an admin message to the RMA conversation and notifies the customer. Body `{ return_id, message }`; optional multipart `file` (REST only). Permission: sales.rma.requests.", "parameters": [], "requestBody": { "description": "The new AdminReturnMessage resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "return_id", "message" ], "properties": { "return_id": { "type": "integer", "example": 12 }, "message": { "type": "string", "example": "We have received your package." } } } } }, "required": true } } }, "/rma/reasons": { "get": { "operationId": "api_apiadminrmareasons_get_collection", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The RMA reasons.", "content": { "application/json": { "example": { "data": [ { "id": 2, "title": "Damaged product", "status": 1, "position": 1, "isAdmin": 0, "resolutionType": [ "return", "cancel_items" ], "message": null, "createdAt": "2026-07-20T09:00:00+00:00", "updatedAt": "2026-07-20T09:00:00+00:00" } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 1, "total": 1, "from": 1, "to": 1 } } } } } }, "summary": "List RMA reasons", "description": "Return/cancel reasons the RMA form offers. Filters: title (LIKE), status. Sort: id (default desc), position, title.", "parameters": [] }, "post": { "operationId": "api_apiadminrmareasons_post", "tags": [ "Admin Sales: RMA" ], "responses": { "201": { "description": "The created RMA reason.", "content": { "application/json": { "example": { "id": 6, "title": "Damaged product", "status": 1, "position": 1, "isAdmin": 0, "resolutionType": [ "return", "cancel_items" ], "message": null, "createdAt": "2026-07-20T09:00:00+00:00", "updatedAt": "2026-07-20T09:00:00+00:00" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Create an RMA reason", "description": "Permission: sales.rma.reasons.create.", "parameters": [], "requestBody": { "description": "The new AdminRmaReason resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "title", "resolution_type" ], "properties": { "title": { "type": "string", "example": "Damaged product" }, "status": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "position": { "type": "integer", "example": 1 }, "resolution_type": { "type": "array", "items": { "type": "string", "enum": [ "return", "cancel_items" ] }, "example": [ "return", "cancel_items" ] } } } } }, "required": true } } }, "/rma/reasons/mass-delete": { "post": { "operationId": "api_apiadminrmareasonsmass-delete_post", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The deleted reason ids.", "content": { "application/json": { "example": { "deleted": [ 2, 3, 4 ], "message": "Selected RMA reasons deleted successfully." } } } }, "201": { "description": "AdminRmaReasonMassDelete resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminRmaReasonMassDelete" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminRmaReasonMassDelete.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Mass-delete RMA reasons", "description": "Permission: sales.rma.reasons.delete.", "parameters": [], "requestBody": { "description": "The new AdminRmaReasonMassDelete resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 2, 3, 4 ] } } } } }, "required": true } } }, "/rma/reasons/mass-update-status": { "post": { "operationId": "api_apiadminrmareasonsmass-update-status_post", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The updated reason ids.", "content": { "application/json": { "example": { "updated": [ 2, 3 ], "message": "Selected RMA reasons updated successfully." } } } }, "201": { "description": "AdminRmaReasonMassUpdateStatus resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminRmaReasonMassUpdateStatus" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminRmaReasonMassUpdateStatus.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Mass-update RMA reason status", "description": "Permission: sales.rma.reasons.edit.", "parameters": [], "requestBody": { "description": "The new AdminRmaReasonMassUpdateStatus resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices", "value" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 2, 3 ] }, "value": { "type": "integer", "enum": [ 0, 1 ], "example": 1 } } } } }, "required": true } } }, "/rma/reasons/{id}": { "get": { "operationId": "api_apiadminrmareasons_id_get", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The RMA reason.", "content": { "application/json": { "example": { "id": 2, "title": "Damaged product", "status": 1, "position": 1, "isAdmin": 0, "resolutionType": [ "return", "cancel_items" ], "message": null, "createdAt": "2026-07-20T09:00:00+00:00", "updatedAt": "2026-07-20T09:00:00+00:00" } } } }, "404": { "description": "Not found", "links": [] } }, "summary": "Get an RMA reason", "description": "Get an RMA reason", "parameters": [ { "name": "id", "in": "path", "description": "Rma reason ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadminrmareasons_id_put", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The updated RMA reason.", "content": { "application/json": { "example": { "id": 2, "title": "Damaged on arrival", "status": 1, "position": 2, "isAdmin": 0, "resolutionType": [ "return" ], "message": null, "createdAt": "2026-07-20T09:00:00+00:00", "updatedAt": "2026-07-20T11:00:00+00:00" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] }, "404": { "description": "Not found", "links": [] } }, "summary": "Update an RMA reason", "description": "Partial update. Permission: sales.rma.reasons.edit.", "parameters": [ { "name": "id", "in": "path", "description": "Rma reason ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminRmaReason resource", "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "example": "Damaged on arrival" }, "status": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "position": { "type": "integer", "example": 2 }, "resolution_type": { "type": "array", "items": { "type": "string", "enum": [ "return", "cancel_items" ] }, "example": [ "return" ] } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminrmareasons_id_delete", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The RMA reason was deleted.", "content": { "application/json": { "example": { "message": "RMA reason deleted successfully." } } } }, "204": { "description": "AdminRmaReason resource deleted" }, "404": { "description": "Not found", "links": [] } }, "summary": "Delete an RMA reason", "description": "Permission: sales.rma.reasons.delete.", "parameters": [ { "name": "id", "in": "path", "description": "Rma reason ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] } }, "/rma/requests": { "get": { "operationId": "api_apiadminrmarequests_get_collection", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "Paginated return requests. Detail-only fields (item/images/availableStatuses/information/messagesCount/canReopen) are null on the listing.", "content": { "application/json": { "example": { "data": [ { "id": 12, "orderId": 45, "orderIncrementId": "000000045", "orderStatus": "processing", "customerName": "Jane Doe", "customerEmail": "jane@example.com", "isGuest": 0, "statusId": 1, "statusTitle": "Pending", "statusColor": "#FDB022", "packageCondition": null, "information": null, "canReopen": null, "item": null, "images": null, "availableStatuses": null, "messagesCount": null, "createdAt": "2026-07-20T10:15:30+00:00", "updatedAt": "2026-07-20T10:15:30+00:00" } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 1, "total": 1, "from": 1, "to": 1 } } } } } }, "summary": "List RMA (return) requests", "description": "Admin listing of every return request (RMADataGrid parity). Filters: id, order_id, status (title), customer_name, created_at range. Sort: id (default desc), order_id, created_at.", "parameters": [] }, "post": { "operationId": "api_apiadminrmarequests_post", "tags": [ "Admin Sales: RMA" ], "responses": { "201": { "description": "The created return request.", "content": { "application/json": { "example": { "id": 12, "orderId": 45, "orderIncrementId": "000000045", "orderStatus": "processing", "customerName": "Jane Doe", "customerEmail": "jane@example.com", "isGuest": 0, "statusId": 1, "statusTitle": "Pending", "statusColor": "#FDB022", "packageCondition": "opened", "information": "Customer reported a defect.", "canReopen": false, "item": { "id": 30, "order_item_id": 78, "sku": "COASTALBREEZEMENSHOODIE", "name": "Coastal Breeze Men's Blue Zipper Hoodie", "quantity": 1, "resolution": "return", "reason_id": 2, "reason": "Damaged product", "variant_id": null }, "images": [], "availableStatuses": [ { "id": 2, "title": "Accept" }, { "id": 3, "title": "Declined" } ], "messagesCount": 0, "createdAt": "2026-07-20T10:15:30+00:00", "updatedAt": "2026-07-20T10:15:30+00:00" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Create an RMA request for a customer order", "description": "Admin-side return creation for any order. `rmaQty` is capped server-side by the item's returnable/cancelable quantity. Optional image files via multipart `images[]` (REST only). Returns the created RMA. Permission: sales.rma.requests.create.", "parameters": [], "requestBody": { "description": "The new AdminReturn resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "order_id", "order_item_id", "rma_qty", "resolution_type", "rma_reason_id" ], "properties": { "order_id": { "type": "integer", "example": 12 }, "order_item_id": { "type": "integer", "example": 45 }, "rma_qty": { "type": "integer", "example": 1 }, "resolution_type": { "type": "string", "enum": [ "return", "cancel_items" ], "example": "return" }, "rma_reason_id": { "type": "integer", "example": 2 }, "information": { "type": "string", "example": "Customer reported a defect." }, "package_condition": { "type": "string", "example": "opened" } } } } }, "required": true } } }, "/rma/requests/order-items": { "get": { "operationId": "api_apiadminrmarequestsorder-items_get_collection", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The returnable items of the order, with server-enforced quantity caps.", "content": { "application/json": { "example": [ { "orderItemId": 78, "productId": 1, "sku": "COASTALBREEZEMENSHOODIE", "name": "Coastal Breeze Men's Blue Zipper Hoodie", "type": "simple", "price": 100, "qtyOrdered": 2, "currentQuantity": 2, "forReturnQuantity": 2, "forCancelQuantity": 0, "rmaQuantity": 0, "rmaReturnPeriod": 30 } ] } } } }, "summary": "List the returnable items of an order (RMA create form)", "description": "Items of the order named by `?order_id=` that can be put on a return, each with the trusted quantity caps (`forReturnQuantity`, `forCancelQuantity`, `currentQuantity`). No customer scope — admin can open a return for any order.", "parameters": [ { "name": "order_id", "in": "query", "description": "Order id", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true } ] } }, "/rma/requests/resolution-reasons": { "get": { "operationId": "api_apiadminrmarequestsresolution-reasons_get_collection", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "Active reasons for the resolution type.", "content": { "application/json": { "example": [ { "id": 2, "title": "Damaged product", "position": 1 }, { "id": 3, "title": "Wrong item delivered", "position": 2 } ] } } } }, "summary": "List active return reasons for a resolution type", "description": "Reasons available when creating a return, filtered by `?resolution_type=return|cancel_items`.", "parameters": [ { "name": "resolution_type", "in": "query", "description": "return | cancel_items", "required": true, "deprecated": false, "schema": { "type": "string", "enum": [ "return", "cancel_items" ] }, "style": "form", "explode": true } ] } }, "/rma/requests/{id}": { "get": { "operationId": "api_apiadminrmarequests_id_get", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The return request detail. availableStatuses lists the status transitions the admin may set next.", "content": { "application/json": { "example": { "id": 12, "orderId": 45, "orderIncrementId": "000000045", "orderStatus": "processing", "customerName": "Jane Doe", "customerEmail": "jane@example.com", "isGuest": 0, "statusId": 1, "statusTitle": "Pending", "statusColor": "#FDB022", "packageCondition": "opened", "information": "Customer reported a defect.", "canReopen": false, "item": { "id": 30, "order_item_id": 78, "sku": "COASTALBREEZEMENSHOODIE", "name": "Coastal Breeze Men's Blue Zipper Hoodie", "quantity": 1, "resolution": "return", "reason_id": 2, "reason": "Damaged product", "variant_id": null }, "images": [ { "id": 5, "path": "rma/12/damage-front.png", "url": "https://example.com/storage/rma/12/damage-front.png" } ], "availableStatuses": [ { "id": 2, "title": "Accept" }, { "id": 3, "title": "Declined" } ], "messagesCount": 2, "createdAt": "2026-07-20T10:15:30+00:00", "updatedAt": "2026-07-20T10:15:30+00:00" } } } }, "404": { "description": "Not found", "links": [] } }, "summary": "Get one RMA request", "description": "Full detail of a single return request — the returned item, images, status, the customer/order context, whether it can be reopened, and the list of status transitions the admin may set next.", "parameters": [ { "name": "id", "in": "path", "description": "Return ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] } }, "/rma/requests/{id}/reopen": { "post": { "operationId": "api_apiadminrmarequests_idreopen_post", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The reopened return request.", "content": { "application/json": { "example": { "id": 12, "orderId": 45, "orderIncrementId": "000000045", "statusId": 1, "statusTitle": "Pending", "statusColor": "#FDB022", "canReopen": false, "availableStatuses": [ { "id": 2, "title": "Accept" }, { "id": 3, "title": "Declined" } ], "messagesCount": 3, "updatedAt": "2026-07-20T11:20:00+00:00" } } } }, "201": { "description": "AdminReturn resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminReturn" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminReturn.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Reopen an RMA request", "description": "Reopens a declined/canceled RMA back to pending when store settings allow it (otherwise 422). Empty body. Returns the updated RMA. Permission: sales.rma.requests.", "parameters": [ { "name": "id", "in": "path", "description": "Return ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminReturn resource", "content": { "application/json": { "schema": { "type": "object" }, "example": [] } }, "required": false } } }, "/rma/requests/{id}/update-status": { "post": { "operationId": "api_apiadminrmarequests_idupdate-status_post", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The updated return request after the status change.", "content": { "application/json": { "example": { "id": 12, "orderId": 45, "orderIncrementId": "000000045", "statusId": 2, "statusTitle": "Accept", "statusColor": "#12B76A", "canReopen": false, "availableStatuses": [ { "id": 5, "title": "Received package" }, { "id": 4, "title": "Dispatched package" } ], "messagesCount": 3, "updatedAt": "2026-07-20T11:00:00+00:00" } } } }, "201": { "description": "AdminReturn resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminReturn" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminReturn.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Update the status of an RMA request", "description": "Sets the RMA status. Status 5 (received package) creates a refund for the returned item (send `shipping` to include shipping); status 8 (item canceled) cancels the order item and restores its inventory; any other status just updates the status. Adds a status note and notifies the customer. Returns the updated RMA. Permission: sales.rma.requests.", "parameters": [ { "name": "id", "in": "path", "description": "Return ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminReturn resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "rma_status_id" ], "properties": { "rma_status_id": { "type": "integer", "example": 2 }, "shipping": { "type": "number", "example": 0 } } } } }, "required": true } } }, "/rma/rules": { "get": { "operationId": "api_apiadminrmarules_get_collection", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The RMA rules.", "content": { "application/json": { "example": { "data": [ { "id": 3, "name": "Apparel 30-day returns", "description": "Return window for all clothing.", "status": 1, "returnPeriod": 30, "default": 0, "message": null, "createdAt": "2026-07-20T09:00:00+00:00", "updatedAt": "2026-07-20T09:00:00+00:00" } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 1, "total": 1, "from": 1, "to": 1 } } } } } }, "summary": "List RMA rules", "description": "Return rules (a rule sets the return window for matching products). Filters: name (LIKE), status. Sort: id (default desc), name.", "parameters": [] }, "post": { "operationId": "api_apiadminrmarules_post", "tags": [ "Admin Sales: RMA" ], "responses": { "201": { "description": "The created RMA rule.", "content": { "application/json": { "example": { "id": 3, "name": "Apparel 30-day returns", "description": "Return window for all clothing.", "status": 1, "returnPeriod": 30, "default": 0, "message": null, "createdAt": "2026-07-20T09:00:00+00:00", "updatedAt": "2026-07-20T09:00:00+00:00" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Create an RMA rule", "description": "Permission: sales.rma.rules.create.", "parameters": [], "requestBody": { "description": "The new AdminRmaRule resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "name", "return_period" ], "properties": { "name": { "type": "string", "example": "Apparel 30-day returns" }, "description": { "type": "string", "example": "Return window for all clothing." }, "status": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "return_period": { "type": "integer", "example": 30 } } } } }, "required": true } } }, "/rma/rules/mass-delete": { "post": { "operationId": "api_apiadminrmarulesmass-delete_post", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The deleted rule ids.", "content": { "application/json": { "example": { "deleted": [ 3, 5 ], "message": "Selected RMA rules deleted successfully." } } } }, "201": { "description": "AdminRmaRuleMassDelete resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminRmaRuleMassDelete" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminRmaRuleMassDelete.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Mass-delete RMA rules", "description": "Permission: sales.rma.rules.delete.", "parameters": [], "requestBody": { "description": "The new AdminRmaRuleMassDelete resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 3, 5 ] } } } } }, "required": true } } }, "/rma/rules/mass-update-status": { "post": { "operationId": "api_apiadminrmarulesmass-update-status_post", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The updated rule ids.", "content": { "application/json": { "example": { "updated": [ 3, 5 ], "message": "Selected RMA rules updated successfully." } } } }, "201": { "description": "AdminRmaRuleMassUpdateStatus resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminRmaRuleMassUpdateStatus" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminRmaRuleMassUpdateStatus.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Mass-update RMA rule status", "description": "Permission: sales.rma.rules.edit.", "parameters": [], "requestBody": { "description": "The new AdminRmaRuleMassUpdateStatus resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices", "value" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 3, 5 ] }, "value": { "type": "integer", "enum": [ 0, 1 ], "example": 1 } } } } }, "required": true } } }, "/rma/rules/{id}": { "get": { "operationId": "api_apiadminrmarules_id_get", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The RMA rule.", "content": { "application/json": { "example": { "id": 3, "name": "Apparel 30-day returns", "description": "Return window for all clothing.", "status": 1, "returnPeriod": 30, "default": 0, "message": null, "createdAt": "2026-07-20T09:00:00+00:00", "updatedAt": "2026-07-20T09:00:00+00:00" } } } }, "404": { "description": "Not found", "links": [] } }, "summary": "Get an RMA rule", "description": "Get an RMA rule", "parameters": [ { "name": "id", "in": "path", "description": "Rma rule ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadminrmarules_id_put", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The updated RMA rule.", "content": { "application/json": { "example": { "id": 3, "name": "Apparel 45-day returns", "description": "Extended window for clothing.", "status": 1, "returnPeriod": 45, "default": 0, "message": null, "createdAt": "2026-07-20T09:00:00+00:00", "updatedAt": "2026-07-20T11:00:00+00:00" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] }, "404": { "description": "Not found", "links": [] } }, "summary": "Update an RMA rule", "description": "Partial update. Permission: sales.rma.rules.edit.", "parameters": [ { "name": "id", "in": "path", "description": "Rma rule ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminRmaRule resource", "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "example": "Apparel 45-day returns" }, "description": { "type": "string", "example": "Extended window for clothing." }, "status": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "return_period": { "type": "integer", "example": 45 } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminrmarules_id_delete", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The RMA rule was deleted.", "content": { "application/json": { "example": { "message": "RMA rule deleted successfully." } } } }, "204": { "description": "AdminRmaRule resource deleted" }, "404": { "description": "Not found", "links": [] } }, "summary": "Delete an RMA rule", "description": "Permission: sales.rma.rules.delete.", "parameters": [ { "name": "id", "in": "path", "description": "Rma rule ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] } }, "/rma/statuses": { "get": { "operationId": "api_apiadminrmastatuses_get_collection", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The RMA statuses.", "content": { "application/json": { "example": { "data": [ { "id": 9, "title": "Awaiting inspection", "status": 1, "color": "#FDB022", "default": 0, "message": null, "createdAt": "2026-07-20T09:00:00+00:00", "updatedAt": "2026-07-20T09:00:00+00:00" } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 1, "total": 1, "from": 1, "to": 1 } } } } } }, "summary": "List RMA statuses", "description": "Custom return statuses. Filters: title (LIKE), status. Sort: id (default desc), title. Default statuses cannot be deleted.", "parameters": [] }, "post": { "operationId": "api_apiadminrmastatuses_post", "tags": [ "Admin Sales: RMA" ], "responses": { "201": { "description": "The created RMA status.", "content": { "application/json": { "example": { "id": 9, "title": "Awaiting inspection", "status": 1, "color": "#FDB022", "default": 0, "message": null, "createdAt": "2026-07-20T09:00:00+00:00", "updatedAt": "2026-07-20T09:00:00+00:00" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Create an RMA status", "description": "Title must be unique. Permission: sales.rma.statuses.create.", "parameters": [], "requestBody": { "description": "The new AdminRmaStatus resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "title" ], "properties": { "title": { "type": "string", "example": "Awaiting inspection" }, "status": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "color": { "type": "string", "example": "#FDB022" } } } } }, "required": true } } }, "/rma/statuses/mass-delete": { "post": { "operationId": "api_apiadminrmastatusesmass-delete_post", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The deleted status ids (default statuses skipped).", "content": { "application/json": { "example": { "deleted": [ 9, 10 ], "message": "Selected RMA statuses deleted successfully." } } } }, "201": { "description": "AdminRmaStatusMassDelete resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminRmaStatusMassDelete" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminRmaStatusMassDelete.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Mass-delete RMA statuses", "description": "Default statuses are skipped. Permission: sales.rma.statuses.delete.", "parameters": [], "requestBody": { "description": "The new AdminRmaStatusMassDelete resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 9, 10 ] } } } } }, "required": true } } }, "/rma/statuses/mass-update-status": { "post": { "operationId": "api_apiadminrmastatusesmass-update-status_post", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The updated status ids.", "content": { "application/json": { "example": { "updated": [ 9, 10 ], "message": "Selected RMA statuses updated successfully." } } } }, "201": { "description": "AdminRmaStatusMassUpdateStatus resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminRmaStatusMassUpdateStatus" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminRmaStatusMassUpdateStatus.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Mass-update RMA status active flag", "description": "Permission: sales.rma.statuses.edit.", "parameters": [], "requestBody": { "description": "The new AdminRmaStatusMassUpdateStatus resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices", "value" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 9, 10 ] }, "value": { "type": "integer", "enum": [ 0, 1 ], "example": 1 } } } } }, "required": true } } }, "/rma/statuses/{id}": { "get": { "operationId": "api_apiadminrmastatuses_id_get", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The RMA status.", "content": { "application/json": { "example": { "id": 9, "title": "Awaiting inspection", "status": 1, "color": "#FDB022", "default": 0, "message": null, "createdAt": "2026-07-20T09:00:00+00:00", "updatedAt": "2026-07-20T09:00:00+00:00" } } } }, "404": { "description": "Not found", "links": [] } }, "summary": "Get an RMA status", "description": "Get an RMA status", "parameters": [ { "name": "id", "in": "path", "description": "Rma status ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadminrmastatuses_id_put", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The updated RMA status.", "content": { "application/json": { "example": { "id": 9, "title": "Inspection complete", "status": 1, "color": "#12B76A", "default": 0, "message": null, "createdAt": "2026-07-20T09:00:00+00:00", "updatedAt": "2026-07-20T11:00:00+00:00" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] }, "404": { "description": "Not found", "links": [] } }, "summary": "Update an RMA status", "description": "Partial update. Permission: sales.rma.statuses.edit.", "parameters": [ { "name": "id", "in": "path", "description": "Rma status ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminRmaStatus resource", "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string", "example": "Inspection complete" }, "status": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "color": { "type": "string", "example": "#12B76A" } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminrmastatuses_id_delete", "tags": [ "Admin Sales: RMA" ], "responses": { "200": { "description": "The RMA status was deleted.", "content": { "application/json": { "example": { "message": "RMA status deleted successfully." } } } }, "204": { "description": "AdminRmaStatus resource deleted" }, "404": { "description": "Not found", "links": [] } }, "summary": "Delete an RMA status", "description": "Only non-default statuses can be deleted (422 otherwise). Permission: sales.rma.statuses.delete.", "parameters": [ { "name": "id", "in": "path", "description": "Rma status ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] } }, "/refunds": { "get": { "operationId": "api_apiadminrefunds_get_collection", "tags": [ "Admin Sales: Refunds" ], "responses": { "200": { "description": "AdminRefund collection", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminRefund" } } }, "text/html": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminRefund.html" } } } } } }, "summary": "List refunds (datagrid parity)", "description": "Paginated refunds listing. Every refund column + billing/shipping addresses are populated per row (line items are detail-only). Returns a `{ data, meta }` envelope. Requires `sales.refunds.view`.", "parameters": [ { "name": "page", "in": "query", "description": "Page number.", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "id", "in": "query", "description": "Filter by refund id (integer or comma-list).", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "order_id", "in": "query", "description": "Partial order increment_id match.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "state", "in": "query", "description": "Refund state.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "base_grand_total_from", "in": "query", "description": "Min refunded amount.", "required": false, "deprecated": false, "schema": { "type": "number" }, "style": "form", "explode": true }, { "name": "base_grand_total_to", "in": "query", "description": "Max refunded amount.", "required": false, "deprecated": false, "schema": { "type": "number" }, "style": "form", "explode": true }, { "name": "billed_to", "in": "query", "description": "Partial billed-to name match.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "created_at_from", "in": "query", "description": "Created after.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "created_at_to", "in": "query", "description": "Created before.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort column.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "order_id", "state", "base_grand_total", "billed_to", "created_at" ] }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] }, "style": "form", "explode": true } ] } }, "/refunds/export": { "get": { "operationId": "api_apiadminrefundsexport_get", "tags": [ "Admin Sales: Refunds" ], "responses": { "200": { "description": "The refunds export file is downloaded as an attachment.", "content": { "text/csv": { "schema": { "type": "string", "format": "binary" } }, "application/vnd.ms-excel": { "schema": { "type": "string", "format": "binary" } }, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { "schema": { "type": "string", "format": "binary" } } } }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks sales.refunds.view." }, "422": { "description": "Unsupported format (csv, xls and xlsx only)." }, "404": { "description": "Not found", "links": [] } }, "summary": "Export refunds as csv, xls or xlsx", "description": "Downloads the refunds datagrid as a csv, xls or xlsx file — the same data the admin Refunds \"Export\" button produces (ID, Order ID, Refunded Amount, Billed To, Refund Date). Honours the same filters as the listing (`id`, `order_id`, `state`, `base_grand_total_from`/`_to`, `billed_to`, `created_at_from`/`_to`). The response is a binary download, not JSON. Requires `sales.refunds.view`.", "parameters": [ { "name": "format", "in": "query", "description": "Export format: `csv`, `xls` or `xlsx`. Defaults to `csv`.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "csv", "xls", "xlsx" ], "default": "csv" }, "style": "form", "explode": true }, { "name": "id", "in": "query", "description": "Filter by refund id (integer or comma-list).", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "order_id", "in": "query", "description": "Partial order increment_id match.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "state", "in": "query", "description": "Refund state.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "base_grand_total_from", "in": "query", "description": "Min refunded amount.", "required": false, "deprecated": false, "schema": { "type": "number" }, "style": "form", "explode": true }, { "name": "base_grand_total_to", "in": "query", "description": "Max refunded amount.", "required": false, "deprecated": false, "schema": { "type": "number" }, "style": "form", "explode": true }, { "name": "billed_to", "in": "query", "description": "Partial billed-to name match.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "created_at_from", "in": "query", "description": "Created after.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "created_at_to", "in": "query", "description": "Created before.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true } ] } }, "/refunds/{id}": { "get": { "operationId": "api_apiadminrefunds_id_get", "tags": [ "Admin Sales: Refunds" ], "responses": { "200": { "description": "Refund detail.", "content": { "application/json": { "example": { "id": 1, "orderId": 105, "orderIncrementId": "105", "state": "refunded", "emailSent": true, "totalQty": 3, "orderCurrencyCode": "USD", "baseCurrencyCode": "USD", "channelCurrencyCode": "USD", "subTotal": 4203, "formattedSubTotal": "$4,203.00", "baseSubTotal": 4203, "formattedBaseSubTotal": "$4,203.00", "subTotalInclTax": 4203, "formattedSubTotalInclTax": "$4,203.00", "baseSubTotalInclTax": 4203, "formattedBaseSubTotalInclTax": "$4,203.00", "grandTotal": 4233, "formattedGrandTotal": "$4,233.00", "baseGrandTotal": 4233, "formattedBaseGrandTotal": "$4,233.00", "taxAmount": 0, "formattedTaxAmount": "$0.00", "baseTaxAmount": 0, "formattedBaseTaxAmount": "$0.00", "discountAmount": 0, "formattedDiscountAmount": "$0.00", "baseDiscountAmount": 0, "formattedBaseDiscountAmount": "$0.00", "shippingAmount": 30, "formattedShippingAmount": "$30.00", "baseShippingAmount": 30, "formattedBaseShippingAmount": "$30.00", "shippingAmountInclTax": 30, "formattedShippingAmountInclTax": "$30.00", "baseShippingAmountInclTax": 30, "formattedBaseShippingAmountInclTax": "$30.00", "shippingTaxAmount": 0, "formattedShippingTaxAmount": "$0.00", "baseShippingTaxAmount": 0, "formattedBaseShippingTaxAmount": "$0.00", "adjustmentRefund": 0, "formattedAdjustmentRefund": "$0.00", "baseAdjustmentRefund": 0, "formattedBaseAdjustmentRefund": "$0.00", "adjustmentFee": 0, "formattedAdjustmentFee": "$0.00", "baseAdjustmentFee": 0, "formattedBaseAdjustmentFee": "$0.00", "createdAt": "2026-05-20 14:00:00", "updatedAt": "2026-05-20 14:00:02", "billedTo": "John Doe", "orderStatus": "closed", "orderStatusLabel": "Closed", "orderDate": "2026-05-19 16:47:17", "channelName": "bagisto store", "customerName": "John Doe", "customerEmail": "john.doe@example.com", "paymentMethod": "cashondelivery", "paymentTitle": "Cash On Delivery", "shippingMethod": "flatrate_flatrate", "shippingTitle": "Flat Rate - Flat Rate", "billingAddress": { "id": 493, "addressType": "order_billing", "firstName": "John", "lastName": "Doe", "companyName": "Acme Trades", "address": "21 Market Street", "city": "Los Angeles", "state": "CA", "country": "US", "postcode": "90001", "email": "john.doe@example.com", "phone": "5551234567" }, "shippingAddress": { "id": 492, "addressType": "order_shipping", "firstName": "John", "lastName": "Doe", "companyName": "Acme Trades", "address": "21 Market Street", "city": "Los Angeles", "state": "CA", "country": "US", "postcode": "90001", "email": "john.doe@example.com", "phone": "5551234567" }, "items": [ { "id": 1, "orderItemId": 119, "sku": "Nike-Shoes", "name": "Nike Shoes", "qty": 1, "price": 123, "formattedPrice": "$123.00", "basePrice": 123, "basePriceInclTax": 123, "total": 123, "formattedTotal": "$123.00", "baseTotal": 123, "baseTotalInclTax": 123, "taxAmount": 0, "formattedTaxAmount": "$0.00", "discountAmount": 0, "formattedDiscountAmount": "$0.00", "productId": 114, "productType": "simple", "baseImageUrl": "https://example.com/storage/product/114/nike-shoes.webp", "additional": { "locale": "en", "quantity": 1, "product_id": "114" } } ] } } } }, "404": { "description": "Not found", "links": [] } }, "summary": "Get refund detail", "description": "Full single-refund payload — every refund column (incl. adjustments), order/customer context, payment info, billing & shipping addresses, and embedded line items. Requires `sales.refunds.view`.", "parameters": [ { "name": "id", "in": "path", "description": "Refund ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ] } }, "/shipments": { "get": { "operationId": "api_apiadminshipments_get_collection", "tags": [ "Admin Sales: Shipments" ], "responses": { "200": { "description": "Paginated list of shipments in the { data, meta } envelope.", "content": { "application/json": { "example": { "data": [ { "id": 7, "orderId": 8, "orderIncrementId": "00000000008", "shippedTo": "John Doe", "orderDate": "2026-05-20 10:00:00", "orderStatus": "processing", "orderStatusLabel": "Processing", "channelName": "Default", "customerName": "John Doe", "customerEmail": "john.doe@example.com", "paymentMethod": "cashondelivery", "paymentTitle": "Cash On Delivery", "orderCurrencyCode": "USD", "shippingMethod": "flatrate_flatrate", "shippingTitle": "Flat Rate - Flat Rate", "baseShippingAmount": 30, "formattedBaseShippingAmount": "$30.00", "status": null, "totalQty": 2, "totalWeight": null, "carrierCode": null, "carrierTitle": "UPS", "trackNumber": "1Z999AA1", "emailSent": false, "inventorySourceId": 1, "inventorySourceName": "Default", "billingAddress": { "id": 16, "addressType": "order_billing", "firstName": "John", "lastName": "Doe", "city": "Los Angeles", "country": "US", "postcode": "90001", "email": "john.doe@example.com", "phone": "5551234567" }, "shippingAddress": { "id": 15, "addressType": "order_shipping", "firstName": "John", "lastName": "Doe", "city": "Los Angeles", "country": "US", "postcode": "90001", "email": "john.doe@example.com", "phone": "5551234567" }, "createdAt": "2026-05-20 12:00:00", "updatedAt": "2026-05-20 12:00:00", "items": [] } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 1, "total": 1, "from": 1, "to": 1 } } } } } }, "summary": "List shipments (datagrid parity)", "description": "Paginated shipments listing mirroring the admin Sales → Shipments datagrid. Every shipment column plus the order/customer context and billing/shipping addresses is populated on each row (line items are detail-only). Returns a `{ data, meta }` envelope. Requires `sales.shipments.view` permission.", "parameters": [ { "name": "page", "in": "query", "description": "Page number (1-based).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "id", "in": "query", "description": "Filter by shipment id (integer or comma-list).", "required": false, "deprecated": false, "schema": { "type": "string", "example": "7" }, "style": "form", "explode": true }, { "name": "order_id", "in": "query", "description": "Partial order increment_id match.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "total_qty", "in": "query", "description": "Exact total quantity.", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "inventory_source_name", "in": "query", "description": "Partial inventory source name.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "shipped_to", "in": "query", "description": "Partial shipped-to name match.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "order_date_from", "in": "query", "description": "Order created after.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "order_date_to", "in": "query", "description": "Order created before.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "created_at_from", "in": "query", "description": "Shipment created after.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "created_at_to", "in": "query", "description": "Shipment created before.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort column.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "order_id", "total_qty", "inventory_source_name", "shipped_to", "order_date", "created_at" ] }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] }, "style": "form", "explode": true } ] } }, "/shipments/export": { "get": { "operationId": "api_apiadminshipmentsexport_get", "tags": [ "Admin Sales: Shipments" ], "responses": { "200": { "description": "Export file downloaded as an attachment.", "content": { "text/csv": { "schema": { "type": "string", "format": "binary" } }, "application/vnd.ms-excel": { "schema": { "type": "string", "format": "binary" } }, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { "schema": { "type": "string", "format": "binary" } } } }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks the view permission." }, "422": { "description": "Unsupported format (csv, xls and xlsx only)." }, "404": { "description": "Not found", "links": [] } }, "summary": "Export shipments as csv, xls or xlsx", "description": "Downloads the shipments datagrid as a csv, xls or xlsx file — the same data the admin Export button produces. Honours the same filters as the listing. Binary download, not JSON. Pick the file type with ?format=csv|xls|xlsx (default csv).", "parameters": [ { "name": "format", "in": "query", "description": "Export format: csv, xls or xlsx. Defaults to csv.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "csv", "xls", "xlsx" ], "default": "csv" }, "style": "form", "explode": true } ] } }, "/shipments/{id}": { "get": { "operationId": "api_apiadminshipments_id_get", "tags": [ "Admin Sales: Shipments" ], "responses": { "200": { "description": "The shipment.", "content": { "application/json": { "example": { "id": 7, "orderId": 8, "orderIncrementId": "00000000008", "shippedTo": "John Doe", "orderDate": "2026-05-20 10:00:00", "orderStatus": "processing", "orderStatusLabel": "Processing", "channelName": "Default", "customerName": "John Doe", "customerEmail": "john.doe@example.com", "paymentMethod": "cashondelivery", "paymentTitle": "Cash On Delivery", "orderCurrencyCode": "USD", "shippingMethod": "flatrate_flatrate", "shippingTitle": "Flat Rate - Flat Rate", "baseShippingAmount": 30, "formattedBaseShippingAmount": "$30.00", "status": null, "totalQty": 2, "totalWeight": null, "carrierCode": null, "carrierTitle": "UPS", "trackNumber": "1Z999AA1", "emailSent": false, "inventorySourceId": 1, "inventorySourceName": "Default", "billingAddress": { "id": 16, "addressType": "order_billing", "firstName": "John", "lastName": "Doe", "city": "Los Angeles", "country": "US", "postcode": "90001", "email": "john.doe@example.com", "phone": "5551234567" }, "shippingAddress": { "id": 15, "addressType": "order_shipping", "firstName": "John", "lastName": "Doe", "city": "Los Angeles", "country": "US", "postcode": "90001", "email": "john.doe@example.com", "phone": "5551234567" }, "createdAt": "2026-05-20 12:00:00", "updatedAt": "2026-05-20 12:00:00", "items": [ { "id": 11, "orderItemId": 42, "sku": "TSHIRT-RED-M", "name": "Red T-Shirt", "qty": 2 } ] } } } }, "404": { "description": "Unknown shipment id." }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks sales.shipments.view." } }, "summary": "Get shipment detail", "description": "Returns a single shipment — every column, the order/customer context, billing & shipping addresses, the inventory source, and the shipped line items. Requires `sales.shipments.view` permission.", "parameters": [ { "name": "id", "in": "path", "description": "Shipment ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ] } }, "/transactions": { "get": { "operationId": "api_apiadmintransactions_get_collection", "tags": [ "Admin Sales: Transactions" ], "responses": { "200": { "description": "Paginated transactions in the { data, meta } envelope.", "content": { "application/json": { "example": { "data": [ { "id": 4, "transactionId": "pi_3PqXyz9aBcD", "invoiceId": 12, "orderId": 8, "orderIncrementId": "00000000008", "amount": 99.99, "formattedAmount": "$99.99", "status": "paid", "type": "capture", "paymentMethod": "cashondelivery", "paymentTitle": "Cash On Delivery", "data": { "gateway": "offline", "captured": true }, "createdAt": "2026-05-20 12:35:00", "updatedAt": "2026-05-20 12:35:00", "order": { "id": 8, "incrementId": "00000000008", "status": "processing", "customerName": "John Doe", "customerEmail": "john.doe@example.com", "grandTotal": 99.99, "orderCurrencyCode": "USD" } } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 1, "total": 1, "from": 1, "to": 1 } } } } } }, "summary": "List order transactions (datagrid parity)", "description": "Paginated transactions listing mirroring the admin Sales → Transactions datagrid. Every transaction column plus the raw gateway `data` blob and the linked order summary is populated on each row. Returns a `{ data, meta }` envelope. Requires `sales.transactions.view` permission.", "parameters": [ { "name": "page", "in": "query", "description": "Page number.", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "id", "in": "query", "description": "Filter by transaction row id (integer or comma-list).", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "transaction_id", "in": "query", "description": "Partial gateway transaction id.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "invoice_id", "in": "query", "description": "Filter by invoice id.", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "order_id", "in": "query", "description": "Partial order increment_id.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "status", "in": "query", "description": "Transaction status.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "paid", "pending", "COMPLETED" ] }, "style": "form", "explode": true }, { "name": "created_at_from", "in": "query", "description": "Created after.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "created_at_to", "in": "query", "description": "Created before.", "required": false, "deprecated": false, "schema": { "type": "string", "format": "date" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort column.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "transaction_id", "amount", "invoice_id", "order_id", "status", "created_at" ] }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadmintransactions_post", "tags": [ "Admin Sales: Transactions" ], "responses": { "201": { "description": "The created transaction.", "content": { "application/json": { "example": { "id": 4, "transactionId": "pi_3PqXyz9aBcD", "invoiceId": 12, "orderId": 8, "orderIncrementId": "00000000008", "amount": 99.99, "formattedAmount": "$99.99", "status": "paid", "type": "capture", "paymentMethod": "cashondelivery", "paymentTitle": "Cash On Delivery", "data": { "gateway": "offline", "captured": true }, "createdAt": "2026-05-20 12:35:00", "updatedAt": "2026-05-20 12:35:00", "order": { "id": 8, "incrementId": "00000000008", "status": "processing", "customerName": "John Doe", "customerEmail": "john.doe@example.com", "grandTotal": 99.99, "orderCurrencyCode": "USD" } } } }, "links": [] }, "400": { "description": "Unknown invoice, invoice already paid, amount ≤ 0, or amount exceeds the invoice grand total.", "links": [] }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks sales.transactions.view." }, "422": { "description": "Missing or non-numeric invoiceId / paymentMethod / amount.", "links": [] } }, "summary": "Record a payment (create transaction)", "description": "Records a manual payment against an invoice — the admin Sales → Transactions \"Record Payment\" action. Inserts a paid `order_transactions` row; when the cumulative payments reach the invoice grand total it marks the invoice paid and advances the order to completed (if a shipment exists) or processing. Returns the created transaction. Requires `sales.transactions.view` permission. Errors: 422 (missing/non-numeric fields), 400 (unknown invoice, invoice already paid, amount ≤ 0, or amount would exceed the invoice grand total).", "parameters": [], "requestBody": { "description": "The new AdminTransaction resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "invoiceId", "paymentMethod", "amount" ], "properties": { "invoiceId": { "type": "integer", "example": 12 }, "paymentMethod": { "type": "string", "example": "cashondelivery" }, "amount": { "type": "number", "example": 99.99 } } }, "example": { "invoiceId": 12, "paymentMethod": "cashondelivery", "amount": 99.99 } } }, "required": true } } }, "/transactions/export": { "get": { "operationId": "api_apiadmintransactionsexport_get", "tags": [ "Admin Sales: Transactions" ], "responses": { "200": { "description": "Export file downloaded as an attachment.", "content": { "text/csv": { "schema": { "type": "string", "format": "binary" } }, "application/vnd.ms-excel": { "schema": { "type": "string", "format": "binary" } }, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { "schema": { "type": "string", "format": "binary" } } } }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks the view permission." }, "422": { "description": "Unsupported format (csv, xls and xlsx only)." }, "404": { "description": "Not found", "links": [] } }, "summary": "Export transactions as csv, xls or xlsx", "description": "Downloads the transactions datagrid as a csv, xls or xlsx file — the same data the admin Export button produces. Honours the same filters as the listing. Binary download, not JSON. Pick the file type with ?format=csv|xls|xlsx (default csv).", "parameters": [ { "name": "format", "in": "query", "description": "Export format: csv, xls or xlsx. Defaults to csv.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "csv", "xls", "xlsx" ], "default": "csv" }, "style": "form", "explode": true } ] } }, "/transactions/{id}": { "get": { "operationId": "api_apiadmintransactions_id_get", "tags": [ "Admin Sales: Transactions" ], "responses": { "200": { "description": "The transaction.", "content": { "application/json": { "example": { "id": 4, "transactionId": "pi_3PqXyz9aBcD", "invoiceId": 12, "orderId": 8, "orderIncrementId": "00000000008", "amount": 99.99, "formattedAmount": "$99.99", "status": "paid", "type": "capture", "paymentMethod": "cashondelivery", "paymentTitle": "Cash On Delivery", "data": { "gateway": "offline", "captured": true }, "createdAt": "2026-05-20 12:35:00", "updatedAt": "2026-05-20 12:35:00", "order": { "id": 8, "incrementId": "00000000008", "status": "processing", "customerName": "John Doe", "customerEmail": "john.doe@example.com", "grandTotal": 99.99, "orderCurrencyCode": "USD" } } } } }, "404": { "description": "Unknown transaction id." }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks sales.transactions.view." } }, "summary": "Get a transaction by id", "description": "Returns a single payment transaction — every column, the raw gateway `data` blob, and a slim summary of the linked order. Requires `sales.transactions.view` permission.", "parameters": [ { "name": "id", "in": "path", "description": "Transaction row ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ] } }, "/settings/channels": { "get": { "operationId": "api_apiadminsettingschannels_get_collection", "tags": [ "Admin Settings: Channels" ], "responses": { "200": { "description": "Paginated channels in the { data, meta } envelope.", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminSettingsChannel.AdminSettingsChannelRestDto" } } }, "text/html": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminSettingsChannel.AdminSettingsChannelRestDto.html" } } } } } }, "summary": "List channels (datagrid parity)", "description": "Paginated, filterable, sortable channels list. Filters: code, name, hostname. Sort: id, code, name.", "parameters": [ { "name": "page", "in": "query", "description": "Page number.", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "code", "in": "query", "description": "Partial code match.", "required": false, "deprecated": false, "schema": { "type": "string", "example": "default" }, "style": "form", "explode": true }, { "name": "name", "in": "query", "description": "Partial name match.", "required": false, "deprecated": false, "schema": { "type": "string", "example": "US" }, "style": "form", "explode": true }, { "name": "hostname", "in": "query", "description": "Partial hostname match.", "required": false, "deprecated": false, "schema": { "type": "string", "example": "example.com" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort column.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "code", "name" ], "example": "id" }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "example": "desc" }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadminsettingschannels_post", "tags": [ "Admin Settings: Channels" ], "responses": { "201": { "description": "Channel created.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsChannel.AdminSettingsChannelRestDto" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsChannel.AdminSettingsChannelRestDto.html" } } }, "links": [] }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create a new channel", "description": "Mirrors Bagisto admin Settings → Channels → Create. Validates code (unique, alpha-dash), hostname (unique), locales/currencies/inventory_sources (non-empty arrays), default_locale_id and base_currency_id (must appear in the respective arrays), root_category_id (must exist).", "parameters": [], "requestBody": { "description": "The new AdminSettingsChannel resource", "content": { "application/json": { "schema": { "type": "object" }, "example": { "code": "us_store", "name": "US Store", "hostname": "us.example.com", "theme": "default", "timezone": "America/New_York", "locales": [ 1 ], "default_locale_id": 1, "currencies": [ 1 ], "base_currency_id": 1, "inventory_sources": [ 1 ], "root_category_id": 1, "seo_title": "Welcome to the US store", "seo_description": "Best products for the US market", "seo_keywords": "shop, us, store", "is_maintenance_on": false } } }, "required": true } } }, "/settings/channels/{id}": { "get": { "operationId": "api_apiadminsettingschannels_id_get", "tags": [ "Admin Settings: Channels" ], "responses": { "200": { "description": "Single channel with translations, locales, currencies, inventory sources (as object arrays) and homeSeo.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsChannel.AdminSettingsChannelRestDto" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsChannel.AdminSettingsChannelRestDto.html" } } } }, "404": { "description": "Channel not found." } }, "summary": "Channel detail", "description": "Channel detail", "parameters": [ { "name": "id", "in": "path", "description": "Channel ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 3 }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadminsettingschannels_id_put", "tags": [ "Admin Settings: Channels" ], "responses": { "200": { "description": "Channel updated.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsChannel.AdminSettingsChannelRestDto" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsChannel.AdminSettingsChannelRestDto.html" } } }, "links": [] }, "404": { "description": "Channel not found." }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Update a channel", "description": "Code/hostname uniqueness excludes the current id. Use the `translations` map for locale-nested attributes (name, description, seo_*, maintenance_mode_text). Top-level scalar fields broadcast to every configured locale via the repository.", "parameters": [ { "name": "id", "in": "path", "description": "Channel ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 3 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminSettingsChannel resource", "content": { "application/json": { "schema": { "type": "object" }, "example": { "code": "us_store", "hostname": "us.example.com", "locales": [ 1 ], "default_locale_id": 1, "currencies": [ 1 ], "base_currency_id": 1, "inventory_sources": [ 1 ], "root_category_id": 1, "translations": { "en": { "name": "US Store", "description": "Our US storefront", "seo_title": "Welcome", "seo_description": "Welcome to our shop", "seo_keywords": "shop, us" } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminsettingschannels_id_delete", "tags": [ "Admin Settings: Channels" ], "responses": { "200": { "description": "Channel deleted." }, "400": { "description": "Cannot delete — last channel or default app channel." }, "404": { "description": "Channel not found." } }, "summary": "Delete a channel", "description": "Refuses with HTTP 400 if this is the only remaining channel OR if its code matches the application-wide default channel (config(\"app.channel\")).", "parameters": [ { "name": "id", "in": "path", "description": "Channel ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 3 }, "style": "simple", "explode": false } ] } }, "/settings/channels/{id}/favicon": { "post": { "operationId": "api_apiadminsettingschannels_idfavicon_post", "tags": [ "Admin Settings: Channels" ], "responses": { "200": { "description": "Stored. Returns the channel detail.", "content": { "application/json": { "example": { "id": 1, "code": "default", "name": "Default", "favicon": "channel/1/favicon.ico", "faviconUrl": "https://example.com/storage/channel/1/favicon.ico" } } }, "links": [] }, "403": { "description": "Missing settings.channels.edit permission." }, "404": { "description": "Channel not found." }, "422": { "description": "Missing or invalid file.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Upload the channel favicon", "description": "Send multipart/form-data with `favicon` (bmp, jpeg, jpg, png, webp, ico). Replaces the current favicon. Optional `file_name` names the stored file. Returns the channel detail.", "parameters": [ { "name": "id", "in": "path", "description": "Channel ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminSettingsChannelMedia resource", "content": { "multipart/form-data": { "schema": { "type": "object", "required": [ "favicon" ], "properties": { "favicon": { "type": "string", "format": "binary" }, "file_name": { "type": "string", "example": "favicon" } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminsettingschannels_idfavicon_delete", "tags": [ "Admin Settings: Channels" ], "responses": { "200": { "description": "Removed. Returns the channel detail.", "content": { "application/json": { "example": { "id": 1, "code": "default", "favicon": null, "faviconUrl": null } } } }, "403": { "description": "Missing settings.channels.edit permission." }, "404": { "description": "Channel not found." } }, "summary": "Remove the channel favicon", "description": "Deletes the stored favicon file and clears it on the channel. Returns the channel detail.", "parameters": [ { "name": "id", "in": "path", "description": "Channel ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "simple", "explode": false } ] } }, "/settings/channels/{id}/logo": { "post": { "operationId": "api_apiadminsettingschannels_idlogo_post", "tags": [ "Admin Settings: Channels" ], "responses": { "200": { "description": "Stored. Returns the channel detail.", "content": { "application/json": { "example": { "id": 1, "code": "default", "name": "Default", "logo": "channel/1/store-logo.png", "logoUrl": "https://example.com/storage/channel/1/store-logo.png" } } }, "links": [] }, "403": { "description": "Missing settings.channels.edit permission." }, "404": { "description": "Channel not found." }, "422": { "description": "Missing or invalid file.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Upload the channel logo", "description": "Send multipart/form-data with `logo` (bmp, jpeg, jpg, png, webp). Replaces the current logo. Optional `file_name` names the stored file and `alt_text` is saved for the `locale` sent (or the default locale). Returns the channel detail.", "parameters": [ { "name": "id", "in": "path", "description": "Channel ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminSettingsChannelMedia resource", "content": { "multipart/form-data": { "schema": { "type": "object", "required": [ "logo" ], "properties": { "logo": { "type": "string", "format": "binary" }, "file_name": { "type": "string", "example": "store-logo" }, "alt_text": { "type": "string", "example": "Acme store logo" }, "locale": { "type": "string", "example": "en" } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminsettingschannels_idlogo_delete", "tags": [ "Admin Settings: Channels" ], "responses": { "200": { "description": "Removed. Returns the channel detail.", "content": { "application/json": { "example": { "id": 1, "code": "default", "logo": null, "logoUrl": null } } } }, "403": { "description": "Missing settings.channels.edit permission." }, "404": { "description": "Channel not found." } }, "summary": "Remove the channel logo", "description": "Deletes the stored logo file and clears it on the channel. Returns the channel detail.", "parameters": [ { "name": "id", "in": "path", "description": "Channel ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "simple", "explode": false } ] } }, "/settings/currencies": { "get": { "operationId": "api_apiadminsettingscurrencies_get_collection", "tags": [ "Admin Settings: Currencies" ], "responses": { "200": { "description": "Paginated list of currency rows in the { data, meta } envelope.", "content": { "application/json": { "example": { "data": [ { "id": 1, "code": "USD", "name": "US Dollar", "symbol": "$", "decimal": 2, "groupSeparator": ",", "decimalSeparator": ".", "currencyPosition": "left", "createdAt": "2026-01-12T08:15:00+00:00", "updatedAt": "2026-04-30T14:20:09+00:00" } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 1, "total": 1, "from": 1, "to": 1 } } } } } }, "summary": "List currencies (datagrid parity)", "description": "Paginated, filterable, sortable currencies list. Filters: code, name, symbol. Sort: id, code, name.", "parameters": [ { "name": "page", "in": "query", "description": "Page number (1-based).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "code", "in": "query", "description": "Partial code match (SQL LIKE).", "required": false, "deprecated": false, "schema": { "type": "string", "example": "EUR" }, "style": "form", "explode": true }, { "name": "name", "in": "query", "description": "Partial name match.", "required": false, "deprecated": false, "schema": { "type": "string", "example": "Euro" }, "style": "form", "explode": true }, { "name": "symbol", "in": "query", "description": "Partial symbol match.", "required": false, "deprecated": false, "schema": { "type": "string", "example": "€" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort column.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "code", "name" ], "example": "id" }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "example": "desc" }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadminsettingscurrencies_post", "tags": [ "Admin Settings: Currencies" ], "responses": { "201": { "description": "Currency created.", "content": { "application/json": { "example": { "id": 5, "code": "EUR", "name": "Euro", "symbol": "€", "decimal": 2, "groupSeparator": ",", "decimalSeparator": ".", "currencyPosition": "left" } } }, "links": [] }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create a new currency", "description": "Mirrors Bagisto admin Settings → Currencies → Create. Validates code (required, alpha, exactly 3 chars, unique), name (required). Code is uppercased by the model mutator.", "parameters": [], "requestBody": { "description": "The new AdminSettingsCurrency resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "code", "name" ], "properties": { "code": { "type": "string", "example": "EUR" }, "name": { "type": "string", "example": "Euro" }, "symbol": { "type": "string", "example": "€" }, "decimal": { "type": "integer", "example": 2 }, "group_separator": { "type": "string", "example": "," }, "decimal_separator": { "type": "string", "example": "." }, "currency_position": { "type": "string", "example": "left" } } } } }, "required": true } } }, "/settings/currencies/mass-delete": { "post": { "operationId": "api_apiadminsettingscurrenciesmass-delete_post", "tags": [ "Admin Settings: Currencies" ], "responses": { "200": { "description": "Currencies deleted.", "content": { "application/json": { "example": { "deleted": [ 2, 3 ], "message": "Currencies deleted successfully." } } }, "links": [] }, "400": { "description": "Batch rejected — last currency or channel base currency.", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Mass delete currencies", "description": "Deletes a batch of currencies. If any ID is a channel base_currency_id, OR the batch would empty the currencies table, the entire batch is rejected with HTTP 400. Non-existent IDs are silently skipped.", "parameters": [], "requestBody": { "description": "The new AdminSettingsCurrencyMassDelete resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 2, 3 ] } } } } }, "required": true } } }, "/settings/currencies/{id}": { "get": { "operationId": "api_apiadminsettingscurrencies_id_get", "tags": [ "Admin Settings: Currencies" ], "responses": { "200": { "description": "Single currency.", "content": { "application/json": { "example": { "id": 5, "code": "EUR", "name": "Euro", "symbol": "€", "decimal": 2, "groupSeparator": ",", "decimalSeparator": ".", "currencyPosition": "left", "createdAt": "2026-01-12T08:15:00+00:00", "updatedAt": "2026-04-30T14:20:09+00:00" } } } }, "404": { "description": "Currency not found." } }, "summary": "Currency detail", "description": "Currency detail", "parameters": [ { "name": "id", "in": "path", "description": "Currency ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 5 }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadminsettingscurrencies_id_put", "tags": [ "Admin Settings: Currencies" ], "responses": { "200": { "description": "Currency updated.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsCurrency" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsCurrency.html" } } }, "links": [] }, "404": { "description": "Currency not found." }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Update a currency", "description": "Validates name (required). Code is immutable in the monolith UI; if sent here it will be ignored by the repository payload filter.", "parameters": [ { "name": "id", "in": "path", "description": "Currency ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 5 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminSettingsCurrency resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "example": "Euro" }, "symbol": { "type": "string", "example": "€" }, "decimal": { "type": "integer", "example": 2 }, "group_separator": { "type": "string", "example": "," }, "decimal_separator": { "type": "string", "example": "." }, "currency_position": { "type": "string", "example": "left" } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminsettingscurrencies_id_delete", "tags": [ "Admin Settings: Currencies" ], "responses": { "200": { "description": "Currency deleted.", "content": { "application/json": { "example": { "message": "Currency deleted successfully." } } } }, "400": { "description": "Cannot delete — last remaining currency or a channel base currency." }, "404": { "description": "Currency not found." } }, "summary": "Delete a currency", "description": "Refuses with HTTP 400 if this is the only remaining currency, or if any channel uses it as its base_currency_id.", "parameters": [ { "name": "id", "in": "path", "description": "Currency ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 5 }, "style": "simple", "explode": false } ] } }, "/settings/data-transfer/imports": { "get": { "operationId": "api_apiadminsettingsdata-transferimports_get_collection", "tags": [ "Admin Settings: Data Transfer" ], "responses": { "200": { "description": "Paginated imports in the { data, meta } envelope.", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminSettingsDataTransferImport" } } }, "text/html": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminSettingsDataTransferImport.html" } } } } } }, "summary": "List imports", "description": "Paginated listing of all imports across entity types and actions. Filters: code (entity type), type (synonym for code), action, state, created_at_from, created_at_to. Sort: id (default desc), state, created_at.", "parameters": [ { "name": "page", "in": "query", "description": "Page number.", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "code", "in": "query", "description": "Filter by entity type (e.g. product, customer).", "required": false, "deprecated": false, "schema": { "type": "string", "example": "product" }, "style": "form", "explode": true }, { "name": "type", "in": "query", "description": "Alias for code (kept for spec compatibility).", "required": false, "deprecated": false, "schema": { "type": "string", "example": "product" }, "style": "form", "explode": true }, { "name": "action", "in": "query", "description": "Filter by action (append / update / delete).", "required": false, "deprecated": false, "schema": { "type": "string", "example": "append" }, "style": "form", "explode": true }, { "name": "state", "in": "query", "description": "Filter by state.", "required": false, "deprecated": false, "schema": { "type": "string", "example": "pending" }, "style": "form", "explode": true }, { "name": "created_at_from", "in": "query", "description": "Filter by created_at >= (ISO date).", "required": false, "deprecated": false, "schema": { "type": "string", "example": "2026-01-01" }, "style": "form", "explode": true }, { "name": "created_at_to", "in": "query", "description": "Filter by created_at <= (ISO date).", "required": false, "deprecated": false, "schema": { "type": "string", "example": "2026-12-31" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort column.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "state", "created_at" ], "example": "id" }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "example": "desc" }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadminsettingsdata-transferimports_post", "tags": [ "Admin Settings: Data Transfer" ], "responses": { "201": { "description": "Import created.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsDataTransferImport" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsDataTransferImport.html" } } }, "links": [] }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks settings.data_transfer.imports.create." }, "422": { "description": "Validation failure (missing file, invalid type/action/strategy).", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create an import", "description": "Creates a new import. Send as multipart/form-data with the binary `file` part plus type / action / validation_strategy / allowed_errors / field_separator. Binary upload is REST-only. Permission: settings.data_transfer.imports.create.", "parameters": [], "requestBody": { "description": "The new AdminSettingsDataTransferImport resource", "content": { "multipart/form-data": { "schema": { "type": "object", "required": [ "type", "action", "validation_strategy", "allowed_errors", "field_separator", "file" ], "properties": { "type": { "type": "string", "example": "products" }, "action": { "type": "string", "enum": [ "append", "delete" ], "example": "append" }, "validation_strategy": { "type": "string", "enum": [ "stop-on-errors", "skip-errors" ], "example": "stop-on-errors" }, "allowed_errors": { "type": "integer", "example": 0 }, "field_separator": { "type": "string", "example": "," }, "process_in_queue": { "type": "boolean", "example": false }, "images_directory_path": { "type": "string", "example": "" }, "image_source": { "type": "string", "enum": [ "url", "upload", "directory" ], "example": "directory" }, "upload_images": { "type": "string", "format": "binary", "description": "ZIP of images, required when image_source is upload." }, "file": { "type": "string", "format": "binary" } } } } }, "required": true } } }, "/settings/data-transfer/imports/sample-images/{type}": { "get": { "operationId": "api_apiadminsettingsdata-transferimportssample-images_type_get", "tags": [ "Admin Settings: Data Transfer" ], "responses": { "200": { "description": "The sample images archive is downloaded.", "content": { "application/octet-stream": { "schema": { "$ref": "#/components/schemas/AdminSettingsDataTransferImportDownload.binary" } } } }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks settings.data_transfer.imports.import." }, "404": { "description": "The importer has no sample images archive." } }, "summary": "Download the sample images archive", "description": "Streams the sample images ZIP for an importer that carries images. It holds exactly the files the sample sheet's `images` column names, so uploading the two together imports cleanly. Send `Accept: application/octet-stream`. 404 for an importer without images.", "parameters": [ { "name": "type", "in": "path", "description": "Importer type, e.g. products.", "required": true, "deprecated": false, "schema": { "type": "string", "example": "products" }, "style": "simple", "explode": false } ] } }, "/settings/data-transfer/imports/sample/{type}/{format}": { "get": { "operationId": "api_apiadminsettingsdata-transferimportssample_type_format_get", "tags": [ "Admin Settings: Data Transfer" ], "responses": { "200": { "description": "The sample file is downloaded.", "content": { "application/octet-stream": { "schema": { "$ref": "#/components/schemas/AdminSettingsDataTransferImportDownload.binary" } } } }, "404": { "description": "Unknown type or missing sample." }, "422": { "description": "Unsupported sample format." } }, "summary": "Download a sample import file", "description": "Streams the configured sample file for the given importer type and format. Send `Accept: application/octet-stream`. 422 for an unsupported format; 404 for an unknown type / missing sample.", "parameters": [ { "name": "type", "in": "path", "description": "Importer type (products / customers / tax_rates).", "required": true, "deprecated": false, "schema": { "type": "string", "example": "products" }, "style": "simple", "explode": false }, { "name": "format", "in": "path", "description": "Sample format (csv / xls / xlsx / xml).", "required": true, "deprecated": false, "schema": { "type": "string", "example": "csv" }, "style": "simple", "explode": false } ] } }, "/settings/data-transfer/imports/{id}": { "get": { "operationId": "api_apiadminsettingsdata-transferimports_id_get", "tags": [ "Admin Settings: Data Transfer" ], "responses": { "200": { "description": "Single import with full state, counts and file info.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsDataTransferImport" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsDataTransferImport.html" } } } }, "401": { "description": "Missing or invalid admin token." }, "404": { "description": "Import not found." } }, "summary": "Import detail", "description": "Import detail", "parameters": [ { "name": "id", "in": "path", "description": "Import ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 3 }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadminsettingsdata-transferimports_id_put", "tags": [ "Admin Settings: Data Transfer" ], "responses": { "200": { "description": "Import updated.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsDataTransferImport" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsDataTransferImport.html" } } }, "links": [] }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks settings.data_transfer.imports.edit." }, "404": { "description": "Import not found." }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Update an import", "description": "Updates an import. Send as multipart/form-data; the `file` part is optional. Re-uploading resets the import state to pending and clears the previous counts / error report. Permission: settings.data_transfer.imports.edit.", "parameters": [ { "name": "id", "in": "path", "description": "Import ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 3 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminSettingsDataTransferImport resource", "content": { "multipart/form-data": { "schema": { "type": "object", "required": [ "type", "action", "validation_strategy", "allowed_errors", "field_separator" ], "properties": { "type": { "type": "string", "example": "products" }, "action": { "type": "string", "enum": [ "append", "delete" ], "example": "append" }, "validation_strategy": { "type": "string", "enum": [ "stop-on-errors", "skip-errors" ], "example": "stop-on-errors" }, "allowed_errors": { "type": "integer", "example": 0 }, "field_separator": { "type": "string", "example": "," }, "file": { "type": "string", "format": "binary" } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminsettingsdata-transferimports_id_delete", "tags": [ "Admin Settings: Data Transfer" ], "responses": { "200": { "description": "Import deleted." }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks settings.data_transfer.imports.delete." }, "404": { "description": "Import not found." } }, "summary": "Delete an import", "description": "Removes the DB row and best-effort deletes the underlying upload file from storage. Permission: settings.data_transfer.imports.delete.", "parameters": [ { "name": "id", "in": "path", "description": "Import ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 3 }, "style": "simple", "explode": false } ] } }, "/settings/data-transfer/imports/{id}/cancel": { "post": { "operationId": "api_apiadminsettingsdata-transferimports_idcancel_post", "tags": [ "Admin Settings: Data Transfer" ], "responses": { "200": { "description": "Import cancelled successfully.", "content": { "application/json": { "example": { "id": 3, "state": "cancelled", "success": true, "message": "Import cancelled successfully." } } }, "links": [] }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks settings.data_transfer.imports.import." }, "404": { "description": "Import not found." }, "422": { "description": "Import is in a terminal state and cannot be cancelled.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Cancel a running or pending import", "description": "Sets state to \"cancelled\". Refuses (422) when the import is in a terminal state (completed / processed / failed / cancelled). Permission: settings.data_transfer.imports.import.", "parameters": [ { "name": "id", "in": "path", "description": "Settings data transfer import cancel ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminSettingsDataTransferImportCancel resource", "content": { "application/json": { "schema": { "type": "object" }, "example": [] } }, "required": false } } }, "/settings/data-transfer/imports/{id}/download": { "get": { "operationId": "api_apiadminsettingsdata-transferimports_iddownload_get", "tags": [ "Admin Settings: Data Transfer" ], "responses": { "200": { "description": "The uploaded file is downloaded.", "content": { "application/octet-stream": { "schema": { "$ref": "#/components/schemas/AdminSettingsDataTransferImportDownload.binary" } } } }, "404": { "description": "Import or file not found." } }, "summary": "Download the uploaded import file", "description": "Streams the original uploaded file as an attachment. Send `Accept: application/octet-stream`. 404 when no file is present.", "parameters": [ { "name": "id", "in": "path", "description": "Import ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 3 }, "style": "simple", "explode": false } ] } }, "/settings/data-transfer/imports/{id}/download-error-report": { "get": { "operationId": "api_apiadminsettingsdata-transferimports_iddownload-error-report_get", "tags": [ "Admin Settings: Data Transfer" ], "responses": { "200": { "description": "The error report is downloaded.", "content": { "application/octet-stream": { "schema": { "$ref": "#/components/schemas/AdminSettingsDataTransferImportDownload.binary" } } } }, "404": { "description": "Import or error report not found." } }, "summary": "Download the import error report", "description": "Streams the generated error report as an attachment. Send `Accept: application/octet-stream`. 404 when no error report exists.", "parameters": [ { "name": "id", "in": "path", "description": "Import ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 3 }, "style": "simple", "explode": false } ] } }, "/settings/data-transfer/imports/{id}/download-images": { "post": { "operationId": "api_apiadminsettingsdata-transferimports_iddownload-images_post", "tags": [ "Admin Settings: Data Transfer" ], "responses": { "200": { "description": "Download progress.", "content": { "application/json": { "example": { "id": 7, "state": "validated", "total": 120, "processed": 20, "progress": 16, "done": false } } }, "links": [] }, "400": { "description": "The download failed.", "links": [] }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks settings.data_transfer.imports.import." }, "404": { "description": "Import not found." }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Download the next wave of import images", "description": "Fetches the next wave of image URLs of a validated `image_source=url` import and returns progress. Call it until `done` is true, then call start. An import without URL images is `done` straight away.", "parameters": [ { "name": "id", "in": "path", "description": "Settings data transfer import images ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminSettingsDataTransferImportImages resource", "content": { "application/json": { "schema": { "type": "object" }, "example": [] } }, "required": false } } }, "/settings/data-transfer/imports/{id}/download-images/queue": { "post": { "operationId": "api_apiadminsettingsdata-transferimports_iddownload-imagesqueue_post", "tags": [ "Admin Settings: Data Transfer" ], "responses": { "200": { "description": "Download dispatched.", "content": { "application/json": { "example": { "id": 7, "state": "downloading", "total": 120, "processed": 0, "progress": 0, "done": false } } }, "links": [] }, "400": { "description": "The download could not be queued.", "links": [] }, "401": { "description": "Missing or invalid admin token." }, "404": { "description": "Import not found." }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Queue the import image download", "description": "Dispatches the whole image download as a background queue batch and returns the image `total`. Poll `GET .../download-images/status` until `done`. A `total` of 0 means there was nothing to fetch.", "parameters": [ { "name": "id", "in": "path", "description": "Settings data transfer import images ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminSettingsDataTransferImportImages resource", "content": { "application/json": { "schema": { "type": "object" }, "example": [] } }, "required": false } } }, "/settings/data-transfer/imports/{id}/download-images/status": { "get": { "operationId": "api_apiadminsettingsdata-transferimports_iddownload-imagesstatus_get", "tags": [ "Admin Settings: Data Transfer" ], "responses": { "200": { "description": "Download progress.", "content": { "application/json": { "example": { "id": 7, "state": "validated", "total": 120, "processed": 120, "progress": 100, "done": true } } } }, "401": { "description": "Missing or invalid admin token." }, "404": { "description": "Import not found." } }, "summary": "Queued image download progress", "description": "Progress of a queued image download.", "parameters": [ { "name": "id", "in": "path", "description": "Settings data transfer import images ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] } }, "/settings/data-transfer/imports/{id}/index": { "post": { "operationId": "api_apiadminsettingsdata-transferimports_idindex_post", "tags": [ "Admin Settings: Data Transfer" ], "responses": { "200": { "description": "Batch indexed; stats + refreshed import.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsDataTransferImportIndex.AdminSettingsDataTransferImport" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsDataTransferImportIndex.AdminSettingsDataTransferImport.html" } } }, "links": [] }, "400": { "description": "Nothing to import / not valid.", "links": [] }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks settings.data_transfer.imports.import." }, "404": { "description": "Import not found." }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Index an import batch", "description": "Indexes the next linked batch and returns stats + the refreshed import. Permission: settings.data_transfer.imports.import.", "parameters": [ { "name": "id", "in": "path", "description": "Settings data transfer import index ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminSettingsDataTransferImportIndex resource", "content": { "application/json": { "schema": { "type": "object" }, "example": [] } }, "required": false } } }, "/settings/data-transfer/imports/{id}/link": { "post": { "operationId": "api_apiadminsettingsdata-transferimports_idlink_post", "tags": [ "Admin Settings: Data Transfer" ], "responses": { "200": { "description": "Batch linked; stats + refreshed import.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsDataTransferImportLink.AdminSettingsDataTransferImport" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsDataTransferImportLink.AdminSettingsDataTransferImport.html" } } }, "links": [] }, "400": { "description": "Nothing to import / not valid.", "links": [] }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks settings.data_transfer.imports.import." }, "404": { "description": "Import not found." }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Link an import batch", "description": "Links the next processed batch and returns stats + the refreshed import. Permission: settings.data_transfer.imports.import.", "parameters": [ { "name": "id", "in": "path", "description": "Settings data transfer import link ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminSettingsDataTransferImportLink resource", "content": { "application/json": { "schema": { "type": "object" }, "example": [] } }, "required": false } } }, "/settings/data-transfer/imports/{id}/start": { "post": { "operationId": "api_apiadminsettingsdata-transferimports_idstart_post", "tags": [ "Admin Settings: Data Transfer" ], "responses": { "200": { "description": "Batch processed; stats + refreshed import.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsDataTransferImportStart.AdminSettingsDataTransferImport" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsDataTransferImportStart.AdminSettingsDataTransferImport.html" } } }, "links": [] }, "400": { "description": "Nothing to import / not valid / queue not configured.", "links": [] }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks settings.data_transfer.imports.import." }, "404": { "description": "Import not found." }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Start an import batch", "description": "Processes the next pending batch (or dispatches the queue). Returns stats + the refreshed import. Permission: settings.data_transfer.imports.import.", "parameters": [ { "name": "id", "in": "path", "description": "Settings data transfer import start ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminSettingsDataTransferImportStart resource", "content": { "application/json": { "schema": { "type": "object" }, "example": [] } }, "required": false } } }, "/settings/data-transfer/imports/{id}/stats": { "get": { "operationId": "api_apiadminsettingsdata-transferimports_idstats_get", "tags": [ "Admin Settings: Data Transfer" ], "responses": { "200": { "description": "Stats + refreshed import.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsDataTransferImportStats.AdminSettingsDataTransferImport" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsDataTransferImportStats.AdminSettingsDataTransferImport.html" } } } }, "401": { "description": "Missing or invalid admin token." }, "404": { "description": "Import not found." } }, "summary": "Import stats", "description": "Returns the per-batch progress + summary for the requested state (default processed) plus the refreshed import.", "parameters": [ { "name": "id", "in": "path", "description": "Import ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 3 }, "style": "simple", "explode": false }, { "name": "state", "in": "query", "description": "Batch state to summarise (default processed).", "required": false, "deprecated": false, "schema": { "type": "string", "example": "processed" }, "style": "form", "explode": true } ] } }, "/settings/data-transfer/imports/{id}/validate": { "post": { "operationId": "api_apiadminsettingsdata-transferimports_idvalidate_post", "tags": [ "Admin Settings: Data Transfer" ], "responses": { "200": { "description": "Validation result + refreshed import.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsDataTransferImportValidate.AdminSettingsDataTransferImport" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsDataTransferImportValidate.AdminSettingsDataTransferImport.html" } } }, "links": [] }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks settings.data_transfer.imports.import." }, "404": { "description": "Import not found." }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Validate an import", "description": "Validates the uploaded file and returns is_valid plus the refreshed import. Permission: settings.data_transfer.imports.import.", "parameters": [ { "name": "id", "in": "path", "description": "Settings data transfer import validate ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminSettingsDataTransferImportValidate resource", "content": { "application/json": { "schema": { "type": "object" }, "example": [] } }, "required": false } } }, "/settings/data-transfer/imports/{id}/validate-chunk": { "post": { "operationId": "api_apiadminsettingsdata-transferimports_idvalidate-chunk_post", "tags": [ "Admin Settings: Data Transfer" ], "responses": { "200": { "description": "Validation progress.", "content": { "application/json": { "example": { "id": 7, "state": "pending", "total": 5000, "processed": 1000, "invalid": 3, "progress": 20, "done": false, "isValid": true, "import": null } } }, "links": [] }, "400": { "description": "The file could not be validated.", "links": [] }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks settings.data_transfer.imports.import." }, "404": { "description": "Import not found." }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Validate the next window of an import file", "description": "Validates the next window of rows of the uploaded file and returns progress, resuming where the previous call left off. Call it until `done` is true; the last call carries `isValid` and the finalised `import`. An importer without windowed validation validates the whole file in one call.", "parameters": [ { "name": "id", "in": "path", "description": "Settings data transfer import validation ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminSettingsDataTransferImportValidation resource", "content": { "application/json": { "schema": { "type": "object" }, "example": [] } }, "required": false } } }, "/settings/data-transfer/imports/{id}/validate/queue": { "post": { "operationId": "api_apiadminsettingsdata-transferimports_idvalidatequeue_post", "tags": [ "Admin Settings: Data Transfer" ], "responses": { "200": { "description": "Validation dispatched.", "content": { "application/json": { "example": { "id": 7, "state": "validating", "total": 5000, "processed": 0, "invalid": null, "progress": 0, "done": false, "isValid": null, "import": null } } }, "links": [] }, "400": { "description": "The validation could not be queued.", "links": [] }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks settings.data_transfer.imports.import." }, "404": { "description": "Import not found." }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Queue the validation of an import", "description": "Dispatches the validation as a background queue batch and returns the row `total`. Poll `GET .../validate/status` until `done`. A `total` of 0 means nothing was fanned out (an empty file or a bad header) and the import was validated straight away.", "parameters": [ { "name": "id", "in": "path", "description": "Settings data transfer import validation ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminSettingsDataTransferImportValidation resource", "content": { "application/json": { "schema": { "type": "object" }, "example": [] } }, "required": false } } }, "/settings/data-transfer/imports/{id}/validate/status": { "get": { "operationId": "api_apiadminsettingsdata-transferimports_idvalidatestatus_get", "tags": [ "Admin Settings: Data Transfer" ], "responses": { "200": { "description": "Validation progress.", "content": { "application/json": { "example": { "id": 7, "state": "validated", "total": 5000, "processed": 5000, "invalid": null, "progress": 100, "done": true, "isValid": true, "import": { "id": 7, "state": "validated", "type": "products", "action": "append", "processed_rows_count": 5000, "invalid_rows_count": 0, "errors_count": 0 } } } } }, "400": { "description": "The progress could not be read." }, "401": { "description": "Missing or invalid admin token." }, "403": { "description": "Admin role lacks settings.data_transfer.imports.import." }, "404": { "description": "Import not found." } }, "summary": "Queued validation progress", "description": "Progress of a queued validation. Once `done`, it carries the verdict `isValid` and the finalised `import`.", "parameters": [ { "name": "id", "in": "path", "description": "Import ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 7 }, "style": "simple", "explode": false } ] } }, "/settings/exchange-rates": { "get": { "operationId": "api_apiadminsettingsexchange-rates_get_collection", "tags": [ "Admin Settings: Exchange Rates" ], "responses": { "200": { "description": "Paginated list in the { data, meta } envelope.", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminSettingsExchangeRate" } } }, "text/html": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminSettingsExchangeRate.html" } } } } } }, "summary": "List exchange rates", "description": "Paginated, filterable, sortable list of currency exchange rates. Returns the standard { data, meta } admin envelope.", "parameters": [ { "name": "page", "in": "query", "description": "Page number (1-based).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "target_currency", "in": "query", "description": "Filter by target currency ID.", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 2 }, "style": "form", "explode": true }, { "name": "rate_from", "in": "query", "description": "Minimum rate (inclusive).", "required": false, "deprecated": false, "schema": { "type": "number", "example": 0.5 }, "style": "form", "explode": true }, { "name": "rate_to", "in": "query", "description": "Maximum rate (inclusive).", "required": false, "deprecated": false, "schema": { "type": "number", "example": 2 }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort column.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "target_currency", "rate" ], "example": "id" }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "example": "desc" }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadminsettingsexchange-rates_post", "tags": [ "Admin Settings: Exchange Rates" ], "responses": { "201": { "description": "Exchange rate created.", "content": { "application/json": { "example": { "id": 4, "targetCurrency": 2, "targetCurrencyCode": "EUR", "targetCurrencyName": "Euro", "rate": 1.085, "createdAt": "2026-05-22T08:15:00+00:00", "updatedAt": "2026-05-22T08:15:00+00:00" } } }, "links": [] }, "422": { "description": "Validation failure (missing fields, unknown currency, duplicate pair, non-positive rate).", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create a new exchange rate", "description": "Creates a target_currency → rate mapping. Composite uniqueness is enforced on target_currency (one exchange rate per currency).", "parameters": [], "requestBody": { "description": "The new AdminSettingsExchangeRate resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "target_currency", "rate" ], "properties": { "target_currency": { "type": "integer", "example": 2, "description": "Currency ID (target)." }, "rate": { "type": "number", "format": "float", "example": 1.085 } } } } }, "required": true } } }, "/settings/exchange-rates/mass-delete": { "post": { "operationId": "api_apiadminsettingsexchange-ratesmass-delete_post", "tags": [ "Admin Settings: Exchange Rates" ], "responses": { "200": { "description": "Exchange rates deleted.", "content": { "application/json": { "example": { "deleted": [ 4, 7 ], "message": "Exchange rates deleted successfully." } } }, "links": [] }, "422": { "description": "Empty indices.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Mass delete exchange rates", "description": "Deletes a batch of exchange rates. Non-existent IDs are silently skipped.", "parameters": [], "requestBody": { "description": "The new AdminSettingsExchangeRateMassDelete resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 4, 7 ] } } } } }, "required": true } } }, "/settings/exchange-rates/update-rates": { "post": { "operationId": "api_apiadminsettingsexchange-ratesupdate-rates_post", "tags": [ "Admin Settings: Exchange Rates" ], "responses": { "200": { "description": "Rates refreshed.", "content": { "application/json": { "example": { "success": true, "updated": 3, "message": "Exchange rates updated successfully." } } }, "links": [] }, "422": { "description": "External provider failure (e.g. missing/invalid API key).", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Update (auto-sync) exchange rates from the external provider", "description": "Refreshes every non-base currency exchange rate from the configured external rate provider (the admin \"Update Rates\" action). Takes no body. Provider/network errors return 422 with the provider message.", "parameters": [], "requestBody": { "description": "The new AdminSettingsExchangeRateUpdateRates resource", "content": { "application/json": { "schema": { "type": "object", "properties": [] }, "example": [] } }, "required": false } } }, "/settings/exchange-rates/{id}": { "get": { "operationId": "api_apiadminsettingsexchange-rates_id_get", "tags": [ "Admin Settings: Exchange Rates" ], "responses": { "200": { "description": "Single exchange rate row.", "content": { "application/json": { "example": { "id": 4, "targetCurrency": 2, "targetCurrencyCode": "EUR", "targetCurrencyName": "Euro", "rate": 1.085, "createdAt": "2026-05-22T08:15:00+00:00", "updatedAt": "2026-05-22T08:15:00+00:00" } } } }, "404": { "description": "Exchange rate not found." } }, "summary": "Exchange rate detail", "description": "Exchange rate detail", "parameters": [ { "name": "id", "in": "path", "description": "Exchange rate ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 4 }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadminsettingsexchange-rates_id_put", "tags": [ "Admin Settings: Exchange Rates" ], "responses": { "200": { "description": "Exchange rate updated.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsExchangeRate" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsExchangeRate.html" } } }, "links": [] }, "404": { "description": "Exchange rate not found." }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Update an exchange rate", "description": "Updates target_currency and/or rate. Composite-uniqueness excludes self.", "parameters": [ { "name": "id", "in": "path", "description": "Exchange rate ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 4 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminSettingsExchangeRate resource", "content": { "application/json": { "schema": { "type": "object", "properties": { "target_currency": { "type": "integer", "example": 2 }, "rate": { "type": "number", "format": "float", "example": 1.09 } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminsettingsexchange-rates_id_delete", "tags": [ "Admin Settings: Exchange Rates" ], "responses": { "200": { "description": "Exchange rate deleted.", "content": { "application/json": { "example": { "message": "Exchange rate deleted successfully." } } } }, "404": { "description": "Exchange rate not found." } }, "summary": "Delete an exchange rate", "description": "Delete an exchange rate", "parameters": [ { "name": "id", "in": "path", "description": "Exchange rate ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 4 }, "style": "simple", "explode": false } ] } }, "/settings/inventory-sources": { "get": { "operationId": "api_apiadminsettingsinventory-sources_get_collection", "tags": [ "Admin Settings: Inventory Sources" ], "responses": { "200": { "description": "Paginated list in the { data, meta } envelope.", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminSettingsInventorySource" } } }, "text/html": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminSettingsInventorySource.html" } } } } } }, "summary": "List inventory sources", "description": "Paginated, filterable, sortable list of inventory sources. Returns the standard { data, meta } admin envelope.", "parameters": [ { "name": "page", "in": "query", "description": "Page number.", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "code", "in": "query", "description": "Filter by code (partial match).", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "name", "in": "query", "description": "Filter by name (partial match).", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "status", "in": "query", "description": "0 or 1.", "required": false, "deprecated": false, "schema": { "type": "integer", "enum": [ 0, 1 ] }, "style": "form", "explode": true }, { "name": "country", "in": "query", "description": "Exact country code.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort column.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "code", "name", "priority", "status" ] }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadminsettingsinventory-sources_post", "tags": [ "Admin Settings: Inventory Sources" ], "responses": { "201": { "description": "Inventory source created.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsInventorySource" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsInventorySource.html" } } }, "links": [] }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create a new inventory source", "description": "Create a new inventory source", "parameters": [], "requestBody": { "description": "The new AdminSettingsInventorySource resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "code", "name", "contact_name", "contact_email", "contact_number", "country", "state", "city", "street", "postcode" ], "properties": { "code": { "type": "string", "example": "warehouse-1" }, "name": { "type": "string", "example": "Warehouse 1" }, "description": { "type": "string", "example": "Primary warehouse." }, "contact_name": { "type": "string", "example": "Jane Doe" }, "contact_email": { "type": "string", "example": "jane@example.com" }, "contact_number": { "type": "string", "example": "1234567890" }, "contact_fax": { "type": "string", "example": null }, "country": { "type": "string", "example": "US" }, "state": { "type": "string", "example": "CA" }, "city": { "type": "string", "example": "Los Angeles" }, "street": { "type": "string", "example": "123 Main St" }, "postcode": { "type": "string", "example": "90001" }, "priority": { "type": "integer", "example": 0 }, "latitude": { "type": "number", "format": "float", "example": 34.05 }, "longitude": { "type": "number", "format": "float", "example": -118.24 }, "status": { "type": "integer", "enum": [ 0, 1 ], "example": 1 } } } } }, "required": true } } }, "/settings/inventory-sources/mass-delete": { "post": { "operationId": "api_apiadminsettingsinventory-sourcesmass-delete_post", "tags": [ "Admin Settings: Inventory Sources" ], "responses": { "200": { "description": "Inventory sources deleted.", "content": { "application/json": { "example": { "deleted": [ 2, 3 ], "message": "Inventory sources deleted successfully." } } }, "links": [] }, "400": { "description": "Would leave zero sources, or one of the IDs is in use.", "links": [] }, "422": { "description": "Empty indices.", "links": [] } }, "summary": "Mass delete inventory sources", "description": "Mass delete inventory sources", "parameters": [], "requestBody": { "description": "The new AdminSettingsInventorySourceMassDelete resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 2, 3 ] } } } } }, "required": true } } }, "/settings/inventory-sources/{id}": { "get": { "operationId": "api_apiadminsettingsinventory-sources_id_get", "tags": [ "Admin Settings: Inventory Sources" ], "responses": { "200": { "description": "Single inventory source.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsInventorySource" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsInventorySource.html" } } } }, "404": { "description": "Inventory source not found." } }, "summary": "Inventory source detail", "description": "Inventory source detail", "parameters": [ { "name": "id", "in": "path", "description": "Inventory source ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadminsettingsinventory-sources_id_put", "tags": [ "Admin Settings: Inventory Sources" ], "responses": { "200": { "description": "Inventory source updated.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsInventorySource" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsInventorySource.html" } } }, "links": [] }, "404": { "description": "Inventory source not found." }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Update an inventory source", "description": "Update an inventory source", "parameters": [ { "name": "id", "in": "path", "description": "Inventory source ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminSettingsInventorySource resource", "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "example": "Warehouse 1 (renamed)" }, "priority": { "type": "integer", "example": 5 }, "status": { "type": "integer", "enum": [ 0, 1 ], "example": 0 } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminsettingsinventory-sources_id_delete", "tags": [ "Admin Settings: Inventory Sources" ], "responses": { "200": { "description": "Inventory source deleted.", "content": { "application/json": { "example": { "message": "Inventory source deleted successfully." } } } }, "400": { "description": "Last remaining source, or referenced by product_inventories." }, "404": { "description": "Inventory source not found." } }, "summary": "Delete an inventory source", "description": "Delete an inventory source", "parameters": [ { "name": "id", "in": "path", "description": "Inventory source ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "simple", "explode": false } ] } }, "/settings/locales": { "get": { "operationId": "api_apiadminsettingslocales_get_collection", "tags": [ "Admin Settings: Locales" ], "responses": { "200": { "description": "Paginated list in the { data, meta } envelope.", "content": { "application/json": { "example": { "data": [ { "id": 1, "code": "en", "name": "English", "direction": "ltr", "logoPath": "locales/en.png", "logoUrl": "https://your-domain.com/storage/locales/en.png", "createdAt": null, "updatedAt": null }, { "id": 10, "code": "ar", "name": "Arabic", "direction": "rtl", "logoPath": null, "logoUrl": null, "createdAt": "2026-05-22T08:15:00+00:00", "updatedAt": "2026-05-22T08:15:00+00:00" } ], "meta": { "currentPage": 1, "perPage": 10, "lastPage": 1, "total": 2, "from": 1, "to": 2 } } } } } }, "summary": "List locales", "description": "Paginated, filterable, sortable list of locales. Returns the standard { data, meta } admin envelope.", "parameters": [ { "name": "page", "in": "query", "description": "Page number (1-based).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "id", "in": "query", "description": "Filter by id (exact). Accepts a single id or a comma-separated list, e.g. 1,10,35.", "required": false, "deprecated": false, "schema": { "type": "string", "example": "1" }, "style": "form", "explode": true }, { "name": "code", "in": "query", "description": "Filter by code (partial match).", "required": false, "deprecated": false, "schema": { "type": "string", "example": "en" }, "style": "form", "explode": true }, { "name": "name", "in": "query", "description": "Filter by name (partial match).", "required": false, "deprecated": false, "schema": { "type": "string", "example": "Eng" }, "style": "form", "explode": true }, { "name": "direction", "in": "query", "description": "Filter by direction (ltr/rtl).", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "ltr", "rtl" ] }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort column.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "code", "name" ], "example": "id" }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "example": "asc" }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadminsettingslocales_post", "tags": [ "Admin Settings: Locales" ], "responses": { "201": { "description": "Locale created.", "content": { "application/json": { "example": { "id": 5, "code": "fr", "name": "French", "direction": "ltr", "logoPath": null, "logoUrl": null, "createdAt": "2026-05-22T08:15:00+00:00", "updatedAt": "2026-05-22T08:15:00+00:00" } } }, "links": [] }, "422": { "description": "Validation failure (missing/duplicate code, invalid direction).", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create a new locale", "description": "Creates a locale. Code must be unique and consist of lowercase letters/digits.", "parameters": [], "requestBody": { "description": "The new AdminSettingsLocale resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "code", "name", "direction" ], "properties": { "code": { "type": "string", "example": "fr" }, "name": { "type": "string", "example": "French" }, "direction": { "type": "string", "enum": [ "ltr", "rtl" ], "example": "ltr" }, "logo_path": { "type": "string", "nullable": true, "example": "locales/fr.png" } } } } }, "required": true } } }, "/settings/locales/mass-delete": { "post": { "operationId": "api_apiadminsettingslocalesmass-delete_post", "tags": [ "Admin Settings: Locales" ], "responses": { "200": { "description": "Locales deleted.", "content": { "application/json": { "example": { "deleted": [ 5, 7 ], "message": "Locales deleted successfully." } } }, "links": [] }, "422": { "description": "Empty indices.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Mass delete locales", "description": "Deletes a batch of locales. Non-existent IDs are silently skipped; locales that are last-remaining or channel defaults are skipped with a reason in the response.", "parameters": [], "requestBody": { "description": "The new AdminSettingsLocaleMassDelete resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "indices" ], "properties": { "indices": { "type": "array", "items": { "type": "integer" }, "example": [ 5, 7 ] } } } } }, "required": true } } }, "/settings/locales/{id}": { "get": { "operationId": "api_apiadminsettingslocales_id_get", "tags": [ "Admin Settings: Locales" ], "responses": { "200": { "description": "Single locale row.", "content": { "application/json": { "example": { "id": 5, "code": "fr", "name": "French", "direction": "ltr", "logoPath": null, "logoUrl": null, "createdAt": "2026-05-22T08:15:00+00:00", "updatedAt": "2026-05-22T08:15:00+00:00" } } } }, "404": { "description": "Locale not found." } }, "summary": "Locale detail", "description": "Locale detail", "parameters": [ { "name": "id", "in": "path", "description": "Locale ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 5 }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadminsettingslocales_id_put", "tags": [ "Admin Settings: Locales" ], "responses": { "200": { "description": "Locale updated.", "content": { "application/json": { "example": { "id": 5, "code": "fr", "name": "French (FR)", "direction": "ltr", "logoPath": "locales/fr.png", "logoUrl": "https://your-domain.com/storage/locales/fr.png", "createdAt": "2026-05-22T08:15:00+00:00", "updatedAt": "2026-05-25T09:30:00+00:00" } } }, "links": [] }, "404": { "description": "Locale not found." }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Update a locale", "description": "Updates a locale. Code uniqueness excludes self.", "parameters": [ { "name": "id", "in": "path", "description": "Locale ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 5 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminSettingsLocale resource", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "string", "example": "fr" }, "name": { "type": "string", "example": "French (FR)" }, "direction": { "type": "string", "enum": [ "ltr", "rtl" ], "example": "ltr" }, "logo_path": { "type": "string", "nullable": true } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminsettingslocales_id_delete", "tags": [ "Admin Settings: Locales" ], "responses": { "200": { "description": "Locale deleted.", "content": { "application/json": { "example": { "message": "Locale deleted successfully." } } } }, "400": { "description": "Refused — last locale or channel default." }, "404": { "description": "Locale not found." } }, "summary": "Delete a locale", "description": "Refuses if this is the only remaining locale or if a channel uses it as its default locale.", "parameters": [ { "name": "id", "in": "path", "description": "Locale ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 5 }, "style": "simple", "explode": false } ] } }, "/settings/locales/{id}/logo": { "post": { "operationId": "api_apiadminsettingslocales_idlogo_post", "tags": [ "Admin Settings: Locales" ], "responses": { "200": { "description": "Logo stored. Returns the locale detail.", "content": { "application/json": { "example": { "id": 2, "code": "fr", "name": "French", "direction": "ltr", "logoPath": "locales/fr.png", "logoUrl": "https://example.com/storage/locales/fr.png" } } }, "links": [] }, "403": { "description": "Missing settings.locales.edit permission." }, "404": { "description": "Locale not found." }, "422": { "description": "Missing or invalid logo.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Upload a locale logo", "description": "Send multipart/form-data with `logo` (an image: jpeg, jpg, png or webp). Stored as locales/{code}.{extension}, replacing the current logo. Returns the locale detail.", "parameters": [ { "name": "id", "in": "path", "description": "Locale ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 2 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminSettingsLocaleLogo resource", "content": { "multipart/form-data": { "schema": { "type": "object", "required": [ "logo" ], "properties": { "logo": { "type": "string", "format": "binary" } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminsettingslocales_idlogo_delete", "tags": [ "Admin Settings: Locales" ], "responses": { "200": { "description": "Logo removed. Returns the locale detail.", "content": { "application/json": { "example": { "id": 2, "code": "fr", "name": "French", "logoPath": null, "logoUrl": null } } } }, "403": { "description": "Missing settings.locales.edit permission." }, "404": { "description": "Locale not found." } }, "summary": "Remove a locale logo", "description": "Clears the locale logo and deletes the stored file. Returns the locale detail.", "parameters": [ { "name": "id", "in": "path", "description": "Locale ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 2 }, "style": "simple", "explode": false } ] } }, "/acl": { "get": { "operationId": "api_apiadminacl_get_collection", "tags": [ "Admin Settings: Roles" ], "responses": { "200": { "description": "The ACL tree.", "content": { "application/json": { "example": [ { "id": "acl", "tree": [ { "key": "dashboard", "name": "Dashboard", "route": "admin.dashboard.index", "sort": 1, "children": [] }, { "key": "sales", "name": "Sales", "route": "admin.sales.orders.index", "sort": 2, "children": [ { "key": "sales.orders", "name": "Orders", "route": "admin.sales.orders.index", "sort": 1, "children": [] } ] } ] } ] } } }, "401": { "description": "Unauthenticated." }, "403": { "description": "Missing the settings.roles permission." } }, "summary": "ACL permission tree", "description": "Returns every permission the admin role screen offers, as a nested tree sorted the same way. Each node carries its `key` (the value to send in a role's `permissions`), its translated `name`, the admin `route` it guards, its `sort` and its `children`.", "parameters": [] } }, "/settings/roles": { "get": { "operationId": "api_apiadminsettingsroles_get_collection", "tags": [ "Admin Settings: Roles" ], "responses": { "200": { "description": "Paginated list in { data, meta } envelope.", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminSettingsRole" } } }, "text/html": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminSettingsRole.html" } } } } } }, "summary": "List roles", "description": "Datagrid-parity listing. Filters: name (LIKE), permission_type. Sort: id (default desc), name.", "parameters": [ { "name": "page", "in": "query", "description": "Page number.", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "name", "in": "query", "description": "Partial name match.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "permission_type", "in": "query", "description": "Filter by permission_type.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "all", "custom" ] }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort column.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "name" ], "example": "id" }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "example": "desc" }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadminsettingsroles_post", "tags": [ "Admin Settings: Roles" ], "responses": { "201": { "description": "Role created.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsRole" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsRole.html" } } }, "links": [] }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create a new role", "description": "Validates name, description, permission_type (all|custom). When permission_type=custom, permissions array is required.", "parameters": [], "requestBody": { "description": "The new AdminSettingsRole resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "name", "description", "permission_type" ], "properties": { "name": { "type": "string", "example": "Catalog Manager" }, "description": { "type": "string", "example": "Can manage catalog only" }, "permission_type": { "type": "string", "enum": [ "all", "custom" ], "example": "custom" }, "permissions": { "type": "array", "items": { "type": "string" }, "example": [ "catalog.products", "catalog.categories" ] } } } } }, "required": true } } }, "/settings/roles/{id}": { "get": { "operationId": "api_apiadminsettingsroles_id_get", "tags": [ "Admin Settings: Roles" ], "responses": { "200": { "description": "Single role.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsRole" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsRole.html" } } } }, "404": { "description": "Role not found." } }, "summary": "Role detail", "description": "Role detail", "parameters": [ { "name": "id", "in": "path", "description": "Role ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 2 }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadminsettingsroles_id_put", "tags": [ "Admin Settings: Roles" ], "responses": { "200": { "description": "Role updated.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsRole" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsRole.html" } } }, "links": [] }, "404": { "description": "Role not found." }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Update a role", "description": "Update a role", "parameters": [ { "name": "id", "in": "path", "description": "Role ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 2 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminSettingsRole resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "name", "description", "permission_type" ], "properties": { "name": { "type": "string", "example": "Catalog Manager" }, "description": { "type": "string", "example": "Updated description" }, "permission_type": { "type": "string", "enum": [ "all", "custom" ], "example": "custom" }, "permissions": { "type": "array", "items": { "type": "string" }, "example": [ "catalog.products" ] } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminsettingsroles_id_delete", "tags": [ "Admin Settings: Roles" ], "responses": { "200": { "description": "Role deleted." }, "400": { "description": "In use or last remaining role." }, "404": { "description": "Role not found." } }, "summary": "Delete a role", "description": "Refuses with HTTP 400 when the role is assigned to any admin (admins.role_id), or when it is the only remaining role.", "parameters": [ { "name": "id", "in": "path", "description": "Role ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 2 }, "style": "simple", "explode": false } ] } }, "/settings/tax-categories": { "get": { "operationId": "api_apiadminsettingstax-categories_get_collection", "tags": [ "Admin Settings: Tax Categories" ], "responses": { "200": { "description": "Paginated list in the { data, meta } envelope.", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminSettingsTaxCategory.AdminSettingsTaxCategoryRestDto" } } }, "text/html": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminSettingsTaxCategory.AdminSettingsTaxCategoryRestDto.html" } } } } } }, "summary": "List tax categories (datagrid parity)", "description": "Paginated, filterable, sortable tax categories list. Filters: code, name (LIKE). Sort: id (default desc), code, name.", "parameters": [ { "name": "page", "in": "query", "description": "Page number (1-based).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "code", "in": "query", "description": "Partial code match.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "name", "in": "query", "description": "Partial name match.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort column.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "code", "name" ] }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadminsettingstax-categories_post", "tags": [ "Admin Settings: Tax Categories" ], "responses": { "201": { "description": "Tax category created.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsTaxCategory.AdminSettingsTaxCategoryRestDto" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsTaxCategory.AdminSettingsTaxCategoryRestDto.html" } } }, "links": [] }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create a tax category", "description": "Create a tax category", "parameters": [], "requestBody": { "description": "The new AdminSettingsTaxCategory resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "code", "name", "description", "taxrates" ], "properties": { "code": { "type": "string", "example": "reduced-rate" }, "name": { "type": "string", "example": "Reduced Rate" }, "description": { "type": "string", "example": "Reduced VAT for essentials" }, "taxrates": { "type": "array", "items": { "type": "integer" }, "example": [ 1, 2 ] } } } } }, "required": true } } }, "/settings/tax-categories/{id}": { "get": { "operationId": "api_apiadminsettingstax-categories_id_get", "tags": [ "Admin Settings: Tax Categories" ], "responses": { "200": { "description": "Single tax category including attached tax_rates.", "content": { "application/json": { "example": { "id": 1, "code": "reduced-rate", "name": "Reduced Rate", "description": "Reduced VAT for essentials", "taxRates": [ { "id": 1, "identifier": "IN-VAT-5", "taxRate": 5 } ], "createdAt": "2026-04-30T14:20:09+00:00", "updatedAt": "2026-04-30T14:20:09+00:00" } } } }, "404": { "description": "Tax category not found." } }, "summary": "Tax category detail", "description": "Tax category detail", "parameters": [ { "name": "id", "in": "path", "description": "Settings tax category ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadminsettingstax-categories_id_put", "tags": [ "Admin Settings: Tax Categories" ], "responses": { "200": { "description": "Tax category updated.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsTaxCategory" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsTaxCategory.html" } } }, "links": [] }, "404": { "description": "Tax category not found." }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Update a tax category", "description": "Code uniqueness excludes the current id. Re-syncs the tax_rates pivot to the supplied taxrates list.", "parameters": [ { "name": "id", "in": "path", "description": "Settings tax category ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminSettingsTaxCategory resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "code", "name", "description", "taxrates" ], "properties": { "code": { "type": "string", "example": "reduced-rate" }, "name": { "type": "string", "example": "Reduced Rate" }, "description": { "type": "string", "example": "Reduced VAT for essentials" }, "taxrates": { "type": "array", "items": { "type": "integer" }, "example": [ 1 ] } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminsettingstax-categories_id_delete", "tags": [ "Admin Settings: Tax Categories" ], "responses": { "200": { "description": "Tax category deleted." }, "400": { "description": "Cannot delete — tax rates still attached." }, "404": { "description": "Tax category not found." } }, "summary": "Delete a tax category", "description": "Mirrors monolith TaxCategoryController::destroy — refuses with HTTP 400 if any tax_rates are still attached to the category.", "parameters": [ { "name": "id", "in": "path", "description": "Settings tax category ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] } }, "/settings/tax-rates": { "get": { "operationId": "api_apiadminsettingstax-rates_get_collection", "tags": [ "Admin Settings: Tax Rates" ], "responses": { "200": { "description": "Paginated list in the { data, meta } envelope.", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminSettingsTaxRate" } } }, "text/html": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminSettingsTaxRate.html" } } } } } }, "summary": "List tax rates", "description": "Paginated, filterable, sortable list. Returns the standard { data, meta } admin envelope.", "parameters": [ { "name": "page", "in": "query", "description": "Page number (1-based).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "identifier", "in": "query", "description": "Partial match on identifier.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "country", "in": "query", "description": "Country code exact.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "state", "in": "query", "description": "State exact.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "tax_rate_from", "in": "query", "description": "Minimum tax rate (inclusive).", "required": false, "deprecated": false, "schema": { "type": "number" }, "style": "form", "explode": true }, { "name": "tax_rate_to", "in": "query", "description": "Maximum tax rate (inclusive).", "required": false, "deprecated": false, "schema": { "type": "number" }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort column.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "identifier", "tax_rate" ] }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ] }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadminsettingstax-rates_post", "tags": [ "Admin Settings: Tax Rates" ], "responses": { "201": { "description": "Tax rate created.", "content": { "application/json": { "example": { "id": 4, "identifier": "US-CA-SF", "isZip": false, "zipCode": "94103", "zipFrom": null, "zipTo": null, "state": "CA", "country": "US", "taxRate": 8.5, "createdAt": "2026-05-25T08:15:00+00:00", "updatedAt": "2026-05-25T08:15:00+00:00" } } }, "links": [] }, "422": { "description": "Validation failure (missing field, duplicate identifier, conditional zip rules).", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create a new tax rate", "description": "Create a new tax rate", "parameters": [], "requestBody": { "description": "The new AdminSettingsTaxRate resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "identifier", "country", "tax_rate", "is_zip" ], "properties": { "identifier": { "type": "string", "example": "US-CA-SF" }, "is_zip": { "type": "boolean", "example": false }, "zip_code": { "type": "string", "example": "94103" }, "zip_from": { "type": "string", "example": "94100" }, "zip_to": { "type": "string", "example": "94199" }, "state": { "type": "string", "example": "CA" }, "country": { "type": "string", "example": "US" }, "tax_rate": { "type": "number", "format": "float", "example": 8.5 } } }, "examples": { "specific-zip": { "summary": "Specific zip (is_zip=false)", "value": { "identifier": "US-CA-SF", "is_zip": false, "zip_code": "94103", "state": "CA", "country": "US", "tax_rate": 8.5 } }, "zip-range": { "summary": "Zip range (is_zip=true)", "value": { "identifier": "US-CA-BAY", "is_zip": true, "zip_from": "94000", "zip_to": "94999", "state": "CA", "country": "US", "tax_rate": 8.25 } } } } }, "required": true } } }, "/settings/tax-rates/export": { "get": { "operationId": "api_apiadminsettingstax-ratesexport_get", "tags": [ "Admin Settings: Tax Rates" ], "responses": { "200": { "description": "Export file downloaded as an attachment (tax-rates.csv, .xls or .xlsx).", "content": { "text/csv": { "schema": { "$ref": "#/components/schemas/AdminSettingsTaxRate.csv" } }, "application/vnd.ms-excel": { "schema": { "$ref": "#/components/schemas/AdminSettingsTaxRate.xls" } }, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { "schema": { "$ref": "#/components/schemas/AdminSettingsTaxRate.xlsx" } } } }, "422": { "description": "Unsupported format (csv, xls and xlsx only)." }, "404": { "description": "Not found", "links": [] } }, "summary": "Export tax rates as csv, xls or xlsx", "description": "Streams the tax-rate datagrid as a csv, xls or xlsx download (the admin Export button). Honours the same filters as the listing. REST only; send the Accept header matching the requested format.", "parameters": [ { "name": "format", "in": "query", "description": "Export format: csv, xls or xlsx. Defaults to csv.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "csv", "xls", "xlsx" ], "example": "csv" }, "style": "form", "explode": true }, { "name": "identifier", "in": "query", "description": "Partial match on identifier.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "country", "in": "query", "description": "Country code exact.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "state", "in": "query", "description": "State exact.", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "tax_rate_from", "in": "query", "description": "Minimum tax rate (inclusive).", "required": false, "deprecated": false, "schema": { "type": "number" }, "style": "form", "explode": true }, { "name": "tax_rate_to", "in": "query", "description": "Maximum tax rate (inclusive).", "required": false, "deprecated": false, "schema": { "type": "number" }, "style": "form", "explode": true } ] } }, "/settings/tax-rates/{id}": { "get": { "operationId": "api_apiadminsettingstax-rates_id_get", "tags": [ "Admin Settings: Tax Rates" ], "responses": { "200": { "description": "Single tax rate row.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsTaxRate" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsTaxRate.html" } } } }, "404": { "description": "Tax rate not found." } }, "summary": "Tax rate detail", "description": "Tax rate detail", "parameters": [ { "name": "id", "in": "path", "description": "Tax rate ID.", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadminsettingstax-rates_id_put", "tags": [ "Admin Settings: Tax Rates" ], "responses": { "200": { "description": "Tax rate updated.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsTaxRate" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsTaxRate.html" } } }, "links": [] }, "404": { "description": "Tax rate not found." }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Update a tax rate", "description": "Partial update; identifier uniqueness excludes self.", "parameters": [ { "name": "id", "in": "path", "description": "Tax rate ID.", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminSettingsTaxRate resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsTaxRate.AdminSettingsTaxRateUpdateInput" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsTaxRate.AdminSettingsTaxRateUpdateInput" } } }, "required": true } }, "delete": { "operationId": "api_apiadminsettingstax-rates_id_delete", "tags": [ "Admin Settings: Tax Rates" ], "responses": { "200": { "description": "Tax rate deleted (pivot to tax_categories cascades).", "content": { "application/json": { "example": { "message": "Tax rate deleted successfully." } } } }, "404": { "description": "Tax rate not found." } }, "summary": "Delete a tax rate", "description": "Delete a tax rate", "parameters": [ { "name": "id", "in": "path", "description": "Tax rate ID.", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ] } }, "/settings/users": { "get": { "operationId": "api_apiadminsettingsusers_get_collection", "tags": [ "Admin Settings: Users" ], "responses": { "200": { "description": "Paginated list in { data, meta } envelope.", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminSettingsUser" } } }, "text/html": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AdminSettingsUser.html" } } } } } }, "summary": "List admin users", "description": "List admin users", "parameters": [ { "name": "page", "in": "query", "description": "Page (1-based).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "Items per page (default 10, max 50).", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 10 }, "style": "form", "explode": true }, { "name": "name", "in": "query", "description": "Filter by name (partial match).", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "email", "in": "query", "description": "Filter by email (partial match).", "required": false, "deprecated": false, "schema": { "type": "string" }, "style": "form", "explode": true }, { "name": "role_id", "in": "query", "description": "Filter by role ID.", "required": false, "deprecated": false, "schema": { "type": "integer" }, "style": "form", "explode": true }, { "name": "status", "in": "query", "description": "Filter by status (0/1).", "required": false, "deprecated": false, "schema": { "type": "integer", "enum": [ 0, 1 ] }, "style": "form", "explode": true }, { "name": "sort", "in": "query", "description": "Sort column.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "id", "name", "email" ], "example": "id" }, "style": "form", "explode": true }, { "name": "order", "in": "query", "description": "Sort direction.", "required": false, "deprecated": false, "schema": { "type": "string", "enum": [ "asc", "desc" ], "example": "desc" }, "style": "form", "explode": true } ] }, "post": { "operationId": "api_apiadminsettingsusers_post", "tags": [ "Admin Settings: Users" ], "responses": { "201": { "description": "Admin created.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsUser" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsUser.html" } } }, "links": [] }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Create a new admin user", "description": "Create a new admin user", "parameters": [], "requestBody": { "description": "The new AdminSettingsUser resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "name", "email", "password", "role_id" ], "properties": { "name": { "type": "string", "example": "Jane Doe" }, "email": { "type": "string", "example": "jane@example.com" }, "password": { "type": "string", "example": "secret123" }, "role_id": { "type": "integer", "example": 1 }, "status": { "type": "integer", "enum": [ 0, 1 ], "example": 1 }, "image": { "type": "string", "nullable": true, "example": "admins/jane.png" } } } } }, "required": true } } }, "/settings/users/delete-self": { "post": { "operationId": "api_apiadminsettingsusersdelete-self_post", "tags": [ "Admin Settings: Users" ], "responses": { "200": { "description": "Account deleted.", "content": { "application/json": { "example": { "success": true, "message": "Your admin account has been deleted." } } }, "links": [] }, "400": { "description": "Last remaining admin cannot be deleted.", "links": [] }, "422": { "description": "Missing or incorrect password.", "links": [] } }, "summary": "Delete your own admin account (password-confirmed)", "description": "Deletes the authenticated admin (the owner of the calling token) after re-confirming their password. Refuses if this is the last remaining admin (400) or the password is wrong (422).", "parameters": [], "requestBody": { "description": "The new AdminSettingsUserDeleteSelf resource", "content": { "application/json": { "schema": { "type": "object", "required": [ "password" ], "properties": { "password": { "type": "string", "example": "current-password" } } } } }, "required": true } } }, "/settings/users/{id}": { "get": { "operationId": "api_apiadminsettingsusers_id_get", "tags": [ "Admin Settings: Users" ], "responses": { "200": { "description": "Single admin row.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsUser" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsUser.html" } } } }, "404": { "description": "Admin not found." } }, "summary": "Admin user detail", "description": "Admin user detail", "parameters": [ { "name": "id", "in": "path", "description": "Admin ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 5 }, "style": "simple", "explode": false } ] }, "put": { "operationId": "api_apiadminsettingsusers_id_put", "tags": [ "Admin Settings: Users" ], "responses": { "200": { "description": "Admin updated.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminSettingsUser" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminSettingsUser.html" } } }, "links": [] }, "404": { "description": "Admin not found." }, "422": { "description": "Validation failure.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Update an admin user", "description": "Update an admin user", "parameters": [ { "name": "id", "in": "path", "description": "Admin ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 5 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminSettingsUser resource", "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "email": { "type": "string" }, "password": { "type": "string", "nullable": true }, "role_id": { "type": "integer" }, "status": { "type": "integer", "enum": [ 0, 1 ] }, "image": { "type": "string", "nullable": true } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminsettingsusers_id_delete", "tags": [ "Admin Settings: Users" ], "responses": { "200": { "description": "Admin deleted." }, "400": { "description": "Refused — self-delete or last admin." }, "404": { "description": "Admin not found." } }, "summary": "Delete an admin user", "description": "Refuses if the caller is deleting themselves or if this is the last admin.", "parameters": [ { "name": "id", "in": "path", "description": "Admin ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 5 }, "style": "simple", "explode": false } ] } }, "/settings/users/{id}/image": { "post": { "operationId": "api_apiadminsettingsusers_idimage_post", "tags": [ "Admin Settings: Users" ], "responses": { "200": { "description": "Avatar stored. Returns the user detail.", "content": { "application/json": { "example": { "id": 3, "name": "Jane Doe", "email": "jane@example.com", "roleId": 1, "roleName": "Administrator", "status": 1, "image": "admins/3/8kXz1mQe.png", "imageUrl": "https://example.com/storage/admins/3/8kXz1mQe.png" } } }, "links": [] }, "403": { "description": "Missing settings.users.edit permission." }, "404": { "description": "Admin user not found." }, "422": { "description": "Missing or invalid image.", "links": [] }, "400": { "description": "Invalid input", "links": [] } }, "summary": "Upload an admin user avatar", "description": "Send multipart/form-data with `image` (jpeg, jpg, png, gif, max 10000 KB). Replaces the current avatar. Returns the user detail.", "parameters": [ { "name": "id", "in": "path", "description": "Admin user ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 3 }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminSettingsUserImage resource", "content": { "multipart/form-data": { "schema": { "type": "object", "required": [ "image" ], "properties": { "image": { "type": "string", "format": "binary" } } } } }, "required": true } }, "delete": { "operationId": "api_apiadminsettingsusers_idimage_delete", "tags": [ "Admin Settings: Users" ], "responses": { "200": { "description": "Avatar removed. Returns the user detail.", "content": { "application/json": { "example": { "id": 3, "name": "Jane Doe", "image": null, "imageUrl": null } } } }, "403": { "description": "Missing settings.users.edit permission." }, "404": { "description": "Admin user not found." } }, "summary": "Remove an admin user avatar", "description": "Clears the avatar and deletes the stored file. Returns the user detail.", "parameters": [ { "name": "id", "in": "path", "description": "Admin user ID.", "required": true, "deprecated": false, "schema": { "type": "integer", "example": 3 }, "style": "simple", "explode": false } ] } }, "/carts/{cartId}/payment-methods": { "get": { "operationId": "api_apiadmincarts_cartIdpayment-methods_get_collection", "tags": [ "Admin: Customer Order creation" ], "responses": { "200": { "description": "Supported payment methods.", "content": { "application/json": { "example": { "data": [ { "method": "cashondelivery", "methodTitle": "Cash On Delivery", "description": "", "sort": 1, "image": null }, { "method": "moneytransfer", "methodTitle": "Money Transfer", "description": "", "sort": 2, "image": null } ], "meta": { "currentPage": 1, "perPage": 2, "lastPage": 1, "total": 2, "from": 1, "to": 2 } } } } } }, "summary": "List supported payment methods for the draft cart", "description": "Returns `Payment::getSupportedPaymentMethods()`. A shipping method must already be selected on the cart (HTTP 409 otherwise).", "parameters": [ { "name": "cartId", "in": "path", "description": "Cart ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ] } }, "/carts/{cartId}/shipping-methods": { "get": { "operationId": "api_apiadmincarts_cartIdshipping-methods_get_collection", "tags": [ "Admin: Customer Order creation" ], "responses": { "200": { "description": "Available shipping rates.", "content": { "application/json": { "example": { "data": [ { "carrierCode": "flatrate", "carrierTitle": "Flat Rate", "method": "flatrate_flatrate", "methodTitle": "Fixed", "price": 10, "formattedPrice": "$10.00", "baseTotal": 10, "formattedBaseTotal": "$10.00" } ], "meta": { "currentPage": 1, "perPage": 1, "lastPage": 1, "total": 1, "from": 1, "to": 1 } } } } } }, "summary": "List available shipping rates for the draft cart", "description": "Calls `Shipping::collectRates()` against the cart and returns the available rates. Requires both billing AND shipping addresses to already be saved — returns HTTP 409 otherwise.", "parameters": [ { "name": "cartId", "in": "path", "description": "Cart ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ] } }, "/carts/{id}": { "get": { "operationId": "api_apiadmincarts_id_get", "tags": [ "Admin: Customer Order creation" ], "responses": { "200": { "description": "AdminCart resource", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminCart" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminCart.html" } } } }, "404": { "description": "Not found", "links": [] } }, "summary": "Get a draft cart", "description": "Returns the admin draft cart with items, totals, addresses, and selected shipping / payment.", "parameters": [ { "name": "id", "in": "path", "description": "Cart ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ] } }, "/carts/{id}/addresses": { "post": { "operationId": "api_apiadmincarts_idaddresses_post", "tags": [ "Admin: Customer Order creation" ], "responses": { "201": { "description": "AdminCart resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminCart" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminCart.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Save billing & shipping addresses", "description": "Saves the billing (and shipping unless `billing.useForShipping` is true) addresses for the draft cart and recollects totals.", "parameters": [ { "name": "id", "in": "path", "description": "Cart ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminCart resource", "content": { "application/json": { "example": { "billing": { "firstName": "Jane", "lastName": "Doe", "email": "jane@example.com", "address": [ "12 Main St" ], "city": "Berlin", "country": "DE", "state": "BE", "postcode": "10115", "phone": "+4930123456", "useForShipping": true } } } }, "required": true } } }, "/carts/{id}/coupon": { "post": { "operationId": "api_apiadmincarts_idcoupon_post", "tags": [ "Admin: Customer Order creation" ], "responses": { "201": { "description": "AdminCart resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminCart" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminCart.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Apply a coupon code", "description": "Applies a coupon code to the draft cart. Returns 404 if the coupon is unknown / inactive; 422 if the same coupon is already applied; 200 on success.", "parameters": [ { "name": "id", "in": "path", "description": "Cart ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminCart resource", "content": { "application/json": { "example": { "code": "WELCOME10" } } }, "required": true } }, "delete": { "operationId": "api_apiadmincarts_idcoupon_delete", "tags": [ "Admin: Customer Order creation" ], "responses": { "200": { "description": "AdminCart resource deleted" }, "404": { "description": "Not found", "links": [] } }, "summary": "Remove the applied coupon", "description": "Removes the currently applied coupon (if any) from the draft cart and recollects totals.", "parameters": [ { "name": "id", "in": "path", "description": "Cart ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] } }, "/carts/{id}/items": { "put": { "operationId": "api_apiadmincarts_iditems_put", "tags": [ "Admin: Customer Order creation" ], "responses": { "200": { "description": "AdminCart resource updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminCart" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminCart.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] }, "404": { "description": "Not found", "links": [] } }, "summary": "Update cart-item quantities", "description": "Bulk-update line-item quantities. `qty` is a map of cart_item_id → new quantity.", "parameters": [ { "name": "id", "in": "path", "description": "Cart ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The updated AdminCart resource", "content": { "application/json": { "example": { "qty": { "12": 3, "13": 1 } } } }, "required": true } }, "post": { "operationId": "api_apiadmincarts_iditems_post", "tags": [ "Admin: Customer Order creation" ], "responses": { "201": { "description": "AdminCart resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminCart" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminCart.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Add a product to the draft cart", "description": "Adds the product to the cart using the shared `Cart::addProduct` flow — supports every product type. Body keys mirror the storefront add-to-cart payload (`productId`, `quantity`, plus type-specific `selectedConfigurableOption`, `superAttribute`, `bundleOptions`, `links`, `qty[]`, and `booking` for booking products, e.g. `{ type, date, slot }`).", "parameters": [ { "name": "id", "in": "path", "description": "Cart ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminCart resource", "content": { "application/json": { "schema": { "type": "object" }, "example": { "productId": 142, "quantity": 1 } } }, "required": true } }, "delete": { "operationId": "api_apiadmincarts_iditems_delete", "tags": [ "Admin: Customer Order creation" ], "responses": { "200": { "description": "AdminCart resource deleted" }, "404": { "description": "Not found", "links": [] } }, "summary": "Remove a single cart item", "description": "Removes the cart item identified by `cartItemId` from the draft cart and recollects totals.", "parameters": [ { "name": "id", "in": "path", "description": "Cart ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "content": { "application/json": { "example": { "cartItemId": 41 } } }, "required": true } } }, "/carts/{id}/payment-methods": { "post": { "operationId": "api_apiadmincarts_idpayment-methods_post", "tags": [ "Admin: Customer Order creation" ], "responses": { "201": { "description": "AdminCart resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminCart" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminCart.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Select a payment method for the draft cart", "description": "Saves the selected payment method on the cart and recollects totals. Requires a shipping method to already be selected (409 if missing).", "parameters": [ { "name": "id", "in": "path", "description": "Cart ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminCart resource", "content": { "application/json": { "example": { "method": "cashondelivery" } } }, "required": true } } }, "/carts/{id}/shipping-methods": { "post": { "operationId": "api_apiadmincarts_idshipping-methods_post", "tags": [ "Admin: Customer Order creation" ], "responses": { "201": { "description": "AdminCart resource created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminCart" } }, "text/html": { "schema": { "$ref": "#/components/schemas/AdminCart.html" } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Select a shipping method for the draft cart", "description": "Saves the selected shipping method on the cart and recollects totals. Requires both billing AND shipping addresses to already be saved (409 if missing).", "parameters": [ { "name": "id", "in": "path", "description": "Cart ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ], "requestBody": { "description": "The new AdminCart resource", "content": { "application/json": { "example": { "shippingMethod": "flatrate_flatrate" } } }, "required": true } } }, "/customers/{customerId}/draft-carts": { "post": { "operationId": "api_apiadmincustomers_customerIddraft-carts_post", "tags": [ "Admin: Customer Order creation" ], "responses": { "201": { "description": "A new empty draft cart was created for the customer.", "content": { "application/json": { "example": { "cartId": 412, "customerId": 7, "success": true, "message": "Draft cart created." } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Create an empty draft cart for a customer", "description": "Bootstraps an empty admin draft cart (`is_active = false`) for the given customer. The returned `cartId` is the handle the admin uses for the rest of the Create-Order flow (`POST /api/admin/carts/{id}/items`, addresses, shipping, payment, place-order).", "parameters": [ { "name": "customerId", "in": "path", "description": "Customer ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ], "requestBody": { "required": false } } }, "/orders/place/{cartId}": { "post": { "operationId": "api_apiadminordersplace_cartId_post", "tags": [ "Admin: Customer Order creation" ], "responses": { "201": { "description": "Order placed.", "content": { "application/json": { "example": { "orderId": 1284, "incrementId": "1000001284", "customerId": 7, "grandTotal": 149.99, "success": true, "message": "Order placed successfully." } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Place an order from a draft cart", "description": "Finalises the given draft cart into an order. Mirrors the monolith `admin.sales.orders.store` flow. Returns 409 if a prerequisite (addresses / shipping / payment method) is missing, and 422 if the payment method is not in `['cashondelivery', 'moneytransfer']`.", "parameters": [ { "name": "cartId", "in": "path", "description": "Draft Cart ID", "required": true, "deprecated": false, "schema": { "type": "integer" }, "style": "simple", "explode": false } ], "requestBody": { "required": false } } }, "/orders/{id}/reorder": { "post": { "operationId": "api_apiadminorders_idreorder_post", "tags": [ "Admin: Customer Order creation" ], "responses": { "201": { "description": "Reorder accepted; a new draft cart was created.", "content": { "application/json": { "example": { "success": true, "message": "Reorder successful. A new draft cart has been created.", "cartId": 314 } } }, "links": [] }, "400": { "description": "Invalid input", "links": [] }, "422": { "description": "Validation Error", "links": [] } }, "summary": "Reorder an order", "description": "Builds a fresh admin draft cart from the given order's items and returns the new cart ID. The admin can then finalise the order in `admin.sales.orders.create`. Returns `success: false` if the order can't be reordered (guest order or any item is no longer saleable).", "parameters": [ { "name": "id", "in": "path", "description": "Reorder ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false } ] } } }, "components": { "schemas": { "AdminAppearanceSectionDiscard": { "type": "object", "description": "Throws away every staged edit of a theme and channel, leaving the published content.", "properties": { "themeCode": { "readOnly": true, "type": [ "string", "null" ] }, "channelId": { "type": [ "integer", "null" ] }, "sectionIds": { "type": "array", "items": { "type": "integer" } }, "message": { "type": [ "string", "null" ] } } }, "AdminAppearanceSectionDiscard.html": { "type": "object", "description": "Throws away every staged edit of a theme and channel, leaving the published content.", "properties": { "themeCode": { "readOnly": true, "type": [ "string", "null" ] }, "channelId": { "type": [ "integer", "null" ] }, "sectionIds": { "type": "array", "items": { "type": "integer" } }, "message": { "type": [ "string", "null" ] } } }, "AdminAppearanceSectionDraft": { "type": "object", "description": "Unpublished edits for one section and locale, held until the theme is published.", "properties": { "sectionId": { "readOnly": true, "type": [ "integer", "null" ] }, "locale": { "type": [ "string", "null" ] }, "hasDraft": { "type": [ "boolean", "null" ] }, "message": { "type": [ "string", "null" ] } } }, "AdminAppearanceSectionDraft.html": { "type": "object", "description": "Unpublished edits for one section and locale, held until the theme is published.", "properties": { "sectionId": { "readOnly": true, "type": [ "integer", "null" ] }, "locale": { "type": [ "string", "null" ] }, "hasDraft": { "type": [ "boolean", "null" ] }, "message": { "type": [ "string", "null" ] } } }, "AdminAppearanceSectionDuplicate": { "type": "object", "properties": { "sectionId": { "readOnly": true, "type": [ "integer", "null" ] }, "sourceId": { "type": [ "integer", "null" ] }, "name": { "type": [ "string", "null" ] }, "type": { "type": [ "string", "null" ] }, "message": { "type": [ "string", "null" ] } } }, "AdminAppearanceSectionDuplicate.html": { "type": "object", "properties": { "sectionId": { "readOnly": true, "type": [ "integer", "null" ] }, "sourceId": { "type": [ "integer", "null" ] }, "name": { "type": [ "string", "null" ] }, "type": { "type": [ "string", "null" ] }, "message": { "type": [ "string", "null" ] } } }, "AdminAppearanceSectionPublish": { "type": "object", "description": "Promotes every staged edit of a theme and channel to what the storefront draws.", "properties": { "themeCode": { "readOnly": true, "type": [ "string", "null" ] }, "channelId": { "type": [ "integer", "null" ] }, "sectionIds": { "type": "array", "items": { "type": "integer" } }, "message": { "type": [ "string", "null" ] } } }, "AdminAppearanceSectionPublish.html": { "type": "object", "description": "Promotes every staged edit of a theme and channel to what the storefront draws.", "properties": { "themeCode": { "readOnly": true, "type": [ "string", "null" ] }, "channelId": { "type": [ "integer", "null" ] }, "sectionIds": { "type": "array", "items": { "type": "integer" } }, "message": { "type": [ "string", "null" ] } } }, "AdminAppearanceSectionReorder": { "type": "object", "description": "Render order is staged like any other edit. Footer links are always drawn last, so\nthey are moved back to the end of whatever order is sent.", "properties": { "id": { "readOnly": true, "type": [ "string", "null" ] }, "sectionIds": { "type": "array", "items": { "type": "integer" } }, "hasDraft": { "type": "object", "additionalProperties": { "type": "boolean" } }, "message": { "type": [ "string", "null" ] } } }, "AdminAppearanceSectionReorder.html": { "type": "object", "description": "Render order is staged like any other edit. Footer links are always drawn last, so\nthey are moved back to the end of whatever order is sent.", "properties": { "id": { "readOnly": true, "type": [ "string", "null" ] }, "sectionIds": { "type": "array", "items": { "type": "integer" } }, "hasDraft": { "type": "object", "additionalProperties": { "type": "boolean" } }, "message": { "type": [ "string", "null" ] } } }, "AdminAppearanceSectionStatus": { "type": "object", "description": "Switching a section on or off is staged like any other edit, so the storefront only\nchanges once the theme is published.", "properties": { "sectionId": { "readOnly": true, "type": [ "integer", "null" ] }, "draftStatus": { "type": [ "boolean", "null" ] }, "hasDraft": { "type": [ "boolean", "null" ] }, "message": { "type": [ "string", "null" ] } } }, "AdminAppearanceSectionStatus.html": { "type": "object", "description": "Switching a section on or off is staged like any other edit, so the storefront only\nchanges once the theme is published.", "properties": { "sectionId": { "readOnly": true, "type": [ "integer", "null" ] }, "draftStatus": { "type": [ "boolean", "null" ] }, "hasDraft": { "type": [ "boolean", "null" ] }, "message": { "type": [ "string", "null" ] } } }, "AdminAppearanceThemeActivate": { "type": "object", "properties": { "code": { "readOnly": true, "type": [ "string", "null" ] }, "activatedOn": { "type": "array", "items": { "type": "object", "additionalProperties": [] } }, "message": { "type": [ "string", "null" ] } } }, "AdminAppearanceThemeActivate.html": { "type": "object", "properties": { "code": { "readOnly": true, "type": [ "string", "null" ] }, "activatedOn": { "type": "array", "items": { "type": "object", "additionalProperties": [] } }, "message": { "type": [ "string", "null" ] } } }, "AdminCancelOrder.OrderDetailRestDto": { "type": "object", "description": "Admin Cancel Order — POST /api/admin/orders/{id}/cancel\n(GraphQL: createAdminCancelOrder).\n\nThe mutation returns the updated `OrderDetail` shape directly so the client\ncan refresh the order-view screen without a follow-up GET.", "properties": { "id": { "readOnly": true, "type": [ "integer", "null" ] }, "incrementId": { "readOnly": true, "type": [ "string", "null" ] }, "status": { "readOnly": true, "type": [ "string", "null" ] }, "statusLabel": { "readOnly": true, "type": [ "string", "null" ] }, "channelName": { "readOnly": true, "type": [ "string", "null" ] }, "isGuest": { "readOnly": true, "type": [ "boolean", "null" ] }, "isGift": { "readOnly": true, "type": [ "boolean", "null" ] }, "customerEmail": { "readOnly": true, "type": [ "string", "null" ] }, "customerFirstName": { "readOnly": true, "type": [ "string", "null" ] }, "customerLastName": { "readOnly": true, "type": [ "string", "null" ] }, "shippingMethod": { "readOnly": true, "type": [ "string", "null" ] }, "shippingTitle": { "readOnly": true, "type": [ "string", "null" ] }, "shippingDescription": { "readOnly": true, "type": [ "string", "null" ] }, "paymentMethod": { "readOnly": true, "type": [ "string", "null" ] }, "paymentTitle": { "readOnly": true, "type": [ "string", "null" ] }, "couponCode": { "readOnly": true, "type": [ "string", "null" ] }, "totalItemCount": { "readOnly": true, "type": [ "integer", "null" ] }, "totalQtyOrdered": { "readOnly": true, "type": [ "integer", "null" ] }, "baseCurrencyCode": { "readOnly": true, "type": [ "string", "null" ] }, "channelCurrencyCode": { "readOnly": true, "type": [ "string", "null" ] }, "orderCurrencyCode": { "readOnly": true, "type": [ "string", "null" ] }, "grandTotal": { "readOnly": true, "type": [ "number", "null" ] }, "baseGrandTotal": { "readOnly": true, "type": [ "number", "null" ] }, "formattedGrandTotal": { "readOnly": true, "type": [ "string", "null" ] }, "grandTotalInvoiced": { "readOnly": true, "type": [ "number", "null" ] }, "formattedGrandTotalInvoiced": { "readOnly": true, "type": [ "string", "null" ] }, "grandTotalRefunded": { "readOnly": true, "type": [ "number", "null" ] }, "formattedGrandTotalRefunded": { "readOnly": true, "type": [ "string", "null" ] }, "subTotal": { "readOnly": true, "type": [ "number", "null" ] }, "baseSubTotal": { "readOnly": true, "type": [ "number", "null" ] }, "formattedSubTotal": { "readOnly": true, "type": [ "string", "null" ] }, "taxAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedTaxAmount": { "readOnly": true, "type": [ "string", "null" ] }, "discountAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedDiscountAmount": { "readOnly": true, "type": [ "string", "null" ] }, "shippingAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedShippingAmount": { "readOnly": true, "type": [ "string", "null" ] }, "totalDue": { "readOnly": true, "type": [ "number", "null" ] }, "baseTotalDue": { "readOnly": true, "type": [ "number", "null" ] }, "formattedTotalDue": { "readOnly": true, "type": [ "string", "null" ] }, "createdAt": { "readOnly": true, "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "type": [ "string", "null" ] }, "customer": { "readOnly": true, "type": [ "array", "null" ], "items": [] }, "addresses": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } }, "items": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } }, "invoices": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } }, "shipments": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } }, "refunds": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } }, "comments": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } } } }, "AdminCancelOrder.OrderDetailRestDto.html": { "type": "object", "description": "Admin Cancel Order — POST /api/admin/orders/{id}/cancel\n(GraphQL: createAdminCancelOrder).\n\nThe mutation returns the updated `OrderDetail` shape directly so the client\ncan refresh the order-view screen without a follow-up GET.", "properties": { "id": { "readOnly": true, "type": [ "integer", "null" ] }, "incrementId": { "readOnly": true, "type": [ "string", "null" ] }, "status": { "readOnly": true, "type": [ "string", "null" ] }, "statusLabel": { "readOnly": true, "type": [ "string", "null" ] }, "channelName": { "readOnly": true, "type": [ "string", "null" ] }, "isGuest": { "readOnly": true, "type": [ "boolean", "null" ] }, "isGift": { "readOnly": true, "type": [ "boolean", "null" ] }, "customerEmail": { "readOnly": true, "type": [ "string", "null" ] }, "customerFirstName": { "readOnly": true, "type": [ "string", "null" ] }, "customerLastName": { "readOnly": true, "type": [ "string", "null" ] }, "shippingMethod": { "readOnly": true, "type": [ "string", "null" ] }, "shippingTitle": { "readOnly": true, "type": [ "string", "null" ] }, "shippingDescription": { "readOnly": true, "type": [ "string", "null" ] }, "paymentMethod": { "readOnly": true, "type": [ "string", "null" ] }, "paymentTitle": { "readOnly": true, "type": [ "string", "null" ] }, "couponCode": { "readOnly": true, "type": [ "string", "null" ] }, "totalItemCount": { "readOnly": true, "type": [ "integer", "null" ] }, "totalQtyOrdered": { "readOnly": true, "type": [ "integer", "null" ] }, "baseCurrencyCode": { "readOnly": true, "type": [ "string", "null" ] }, "channelCurrencyCode": { "readOnly": true, "type": [ "string", "null" ] }, "orderCurrencyCode": { "readOnly": true, "type": [ "string", "null" ] }, "grandTotal": { "readOnly": true, "type": [ "number", "null" ] }, "baseGrandTotal": { "readOnly": true, "type": [ "number", "null" ] }, "formattedGrandTotal": { "readOnly": true, "type": [ "string", "null" ] }, "grandTotalInvoiced": { "readOnly": true, "type": [ "number", "null" ] }, "formattedGrandTotalInvoiced": { "readOnly": true, "type": [ "string", "null" ] }, "grandTotalRefunded": { "readOnly": true, "type": [ "number", "null" ] }, "formattedGrandTotalRefunded": { "readOnly": true, "type": [ "string", "null" ] }, "subTotal": { "readOnly": true, "type": [ "number", "null" ] }, "baseSubTotal": { "readOnly": true, "type": [ "number", "null" ] }, "formattedSubTotal": { "readOnly": true, "type": [ "string", "null" ] }, "taxAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedTaxAmount": { "readOnly": true, "type": [ "string", "null" ] }, "discountAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedDiscountAmount": { "readOnly": true, "type": [ "string", "null" ] }, "shippingAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedShippingAmount": { "readOnly": true, "type": [ "string", "null" ] }, "totalDue": { "readOnly": true, "type": [ "number", "null" ] }, "baseTotalDue": { "readOnly": true, "type": [ "number", "null" ] }, "formattedTotalDue": { "readOnly": true, "type": [ "string", "null" ] }, "createdAt": { "readOnly": true, "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "type": [ "string", "null" ] }, "customer": { "readOnly": true, "type": [ "array", "null" ], "items": [] }, "addresses": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } }, "items": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } }, "invoices": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } }, "shipments": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } }, "refunds": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } }, "comments": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } } } }, "AdminCart": { "type": "object", "properties": { "id": { "readOnly": true, "type": [ "integer", "null" ] }, "customerId": { "type": [ "integer", "null" ] }, "isGuest": { "type": [ "boolean", "null" ] }, "isActive": { "type": [ "boolean", "null" ] }, "itemsCount": { "type": [ "integer", "null" ] }, "itemsQty": { "type": [ "integer", "null" ] }, "subTotal": { "type": [ "number", "null" ] }, "formattedSubTotal": { "type": [ "string", "null" ] }, "grandTotal": { "type": [ "number", "null" ] }, "formattedGrandTotal": { "type": [ "string", "null" ] }, "shippingAmount": { "type": [ "number", "null" ] }, "formattedShippingAmount": { "type": [ "string", "null" ] }, "taxTotal": { "type": [ "number", "null" ] }, "formattedTaxTotal": { "type": [ "string", "null" ] }, "discountAmount": { "type": [ "number", "null" ] }, "formattedDiscountAmount": { "type": [ "string", "null" ] }, "couponCode": { "type": [ "string", "null" ] }, "shippingMethod": { "type": [ "string", "null" ] }, "paymentMethod": { "type": [ "string", "null" ] }, "paymentMethodTitle": { "type": [ "string", "null" ] }, "haveStockableItems": { "type": [ "boolean", "null" ] }, "items": { "type": "array", "items": { "type": "array", "items": [] } }, "billingAddress": { "type": [ "array", "null" ], "items": [] }, "shippingAddress": { "type": [ "array", "null" ], "items": [] }, "success": { "type": [ "boolean", "null" ] }, "message": { "type": [ "string", "null" ] } } }, "AdminCart.html": { "type": "object", "properties": { "id": { "readOnly": true, "type": [ "integer", "null" ] }, "customerId": { "type": [ "integer", "null" ] }, "isGuest": { "type": [ "boolean", "null" ] }, "isActive": { "type": [ "boolean", "null" ] }, "itemsCount": { "type": [ "integer", "null" ] }, "itemsQty": { "type": [ "integer", "null" ] }, "subTotal": { "type": [ "number", "null" ] }, "formattedSubTotal": { "type": [ "string", "null" ] }, "grandTotal": { "type": [ "number", "null" ] }, "formattedGrandTotal": { "type": [ "string", "null" ] }, "shippingAmount": { "type": [ "number", "null" ] }, "formattedShippingAmount": { "type": [ "string", "null" ] }, "taxTotal": { "type": [ "number", "null" ] }, "formattedTaxTotal": { "type": [ "string", "null" ] }, "discountAmount": { "type": [ "number", "null" ] }, "formattedDiscountAmount": { "type": [ "string", "null" ] }, "couponCode": { "type": [ "string", "null" ] }, "shippingMethod": { "type": [ "string", "null" ] }, "paymentMethod": { "type": [ "string", "null" ] }, "paymentMethodTitle": { "type": [ "string", "null" ] }, "haveStockableItems": { "type": [ "boolean", "null" ] }, "items": { "type": "array", "items": { "type": "array", "items": [] } }, "billingAddress": { "type": [ "array", "null" ], "items": [] }, "shippingAddress": { "type": [ "array", "null" ], "items": [] }, "success": { "type": [ "boolean", "null" ] }, "message": { "type": [ "string", "null" ] } } }, "AdminCatalogProductCustomerGroupPrice": { "type": "object", "description": "Admin sub-resource for product customer-group (tier) prices.\n\nREST:\n GET /api/admin/catalog/products/{productId}/customer-group-prices\n POST /api/admin/catalog/products/{productId}/customer-group-prices\n PUT /api/admin/catalog/products/{productId}/customer-group-prices/{id}\n DELETE /api/admin/catalog/products/{productId}/customer-group-prices/{id}\n\nGraphQL:\n adminCatalogProductCustomerGroupPrices(productId:)\n createAdminCatalogProductCustomerGroupPrice\n updateAdminCatalogProductCustomerGroupPrice\n deleteAdminCatalogProductCustomerGroupPrice\n\nNOTE: this is the **fresh** sub-resource that replaces the legacy admin\noperations on `src/Models/ProductCustomerGroupPrice.php`. The legacy file\nstill exists for parity until removed (see CLAUDE.md \"Legacy admin\n * endpoints — to be removed\").", "properties": { "id": { "readOnly": true, "type": [ "integer", "null" ] }, "productId": { "readOnly": true, "type": [ "integer", "null" ] }, "qty": { "readOnly": true, "type": [ "integer", "null" ] }, "valueType": { "readOnly": true, "type": [ "string", "null" ] }, "value": { "readOnly": true, "type": [ "number", "null" ] }, "customerGroupId": { "readOnly": true, "type": [ "integer", "null" ] }, "customerGroupName": { "readOnly": true, "type": [ "string", "null" ] } } }, "AdminCatalogProductCustomerGroupPrice.html": { "type": "object", "description": "Admin sub-resource for product customer-group (tier) prices.\n\nREST:\n GET /api/admin/catalog/products/{productId}/customer-group-prices\n POST /api/admin/catalog/products/{productId}/customer-group-prices\n PUT /api/admin/catalog/products/{productId}/customer-group-prices/{id}\n DELETE /api/admin/catalog/products/{productId}/customer-group-prices/{id}\n\nGraphQL:\n adminCatalogProductCustomerGroupPrices(productId:)\n createAdminCatalogProductCustomerGroupPrice\n updateAdminCatalogProductCustomerGroupPrice\n deleteAdminCatalogProductCustomerGroupPrice\n\nNOTE: this is the **fresh** sub-resource that replaces the legacy admin\noperations on `src/Models/ProductCustomerGroupPrice.php`. The legacy file\nstill exists for parity until removed (see CLAUDE.md \"Legacy admin\n * endpoints — to be removed\").", "properties": { "id": { "readOnly": true, "type": [ "integer", "null" ] }, "productId": { "readOnly": true, "type": [ "integer", "null" ] }, "qty": { "readOnly": true, "type": [ "integer", "null" ] }, "valueType": { "readOnly": true, "type": [ "string", "null" ] }, "value": { "readOnly": true, "type": [ "number", "null" ] }, "customerGroupId": { "readOnly": true, "type": [ "integer", "null" ] }, "customerGroupName": { "readOnly": true, "type": [ "string", "null" ] } } }, "AdminCmsPage.AdminCmsPageDetailDto": { "type": "object", "description": "Admin CMS → Pages endpoints (CMS Phase 1 read-only + CMS Phase 2 CRUD).\n\nStandalone Eloquent model on `cms_pages` following the shop CustomerOrder\npattern: REST operations map to output DTOs (AdminCmsPageListDto /\nAdminCmsPageDetailDto) so the REST payload is byte-identical to the original,\nwhile GraphQL operations return this Eloquent model so the `translations` and\n`channels` relations are field-selectable\n(e.g. `translations { pageTitle urlKey } channels { id code name }`).\n\nProviders gate on GraphQL context to return the model for GraphQL and the\nDTO for REST.\n\nMirrors Webkul\\Admin\\Http\\Controllers\\CMS\\PageController 1:1.", "properties": { "id": { "type": [ "integer", "null" ] }, "urlKey": { "type": [ "string", "null" ] }, "pageTitle": { "type": [ "string", "null" ] }, "htmlContent": { "type": [ "string", "null" ] }, "metaTitle": { "type": [ "string", "null" ] }, "metaKeywords": { "type": [ "string", "null" ] }, "metaDescription": { "type": [ "string", "null" ] }, "layout": { "type": [ "string", "null" ] }, "previewUrl": { "type": [ "string", "null" ] }, "locale": { "type": [ "string", "null" ] }, "channel": { "type": [ "string", "null" ] }, "createdAt": { "type": [ "string", "null" ] }, "updatedAt": { "type": [ "string", "null" ] }, "translations": { "type": [ "array", "null" ], "items": [] }, "channels": { "type": [ "array", "null" ], "items": [] } } }, "AdminCmsPage.AdminCmsPageDetailDto.html": { "type": "object", "description": "Admin CMS → Pages endpoints (CMS Phase 1 read-only + CMS Phase 2 CRUD).\n\nStandalone Eloquent model on `cms_pages` following the shop CustomerOrder\npattern: REST operations map to output DTOs (AdminCmsPageListDto /\nAdminCmsPageDetailDto) so the REST payload is byte-identical to the original,\nwhile GraphQL operations return this Eloquent model so the `translations` and\n`channels` relations are field-selectable\n(e.g. `translations { pageTitle urlKey } channels { id code name }`).\n\nProviders gate on GraphQL context to return the model for GraphQL and the\nDTO for REST.\n\nMirrors Webkul\\Admin\\Http\\Controllers\\CMS\\PageController 1:1.", "properties": { "id": { "type": [ "integer", "null" ] }, "urlKey": { "type": [ "string", "null" ] }, "pageTitle": { "type": [ "string", "null" ] }, "htmlContent": { "type": [ "string", "null" ] }, "metaTitle": { "type": [ "string", "null" ] }, "metaKeywords": { "type": [ "string", "null" ] }, "metaDescription": { "type": [ "string", "null" ] }, "layout": { "type": [ "string", "null" ] }, "previewUrl": { "type": [ "string", "null" ] }, "locale": { "type": [ "string", "null" ] }, "channel": { "type": [ "string", "null" ] }, "createdAt": { "type": [ "string", "null" ] }, "updatedAt": { "type": [ "string", "null" ] }, "translations": { "type": [ "array", "null" ], "items": [] }, "channels": { "type": [ "array", "null" ], "items": [] } } }, "AdminConfigurationDownload.binary": { "type": "object", "description": "Downloads the file stored for a file or image configuration field. REST only, as\nbinary streams are not transportable over GraphQL.", "properties": { "code": { "readOnly": true, "type": [ "string", "null" ] } } }, "AdminEuWithdrawal": { "type": "object", "properties": { "id": { "type": [ "integer", "null" ] }, "uuid": { "type": [ "string", "null" ] }, "orderId": { "type": [ "integer", "null" ] }, "orderIncrementId": { "type": [ "string", "null" ] }, "customerId": { "type": [ "integer", "null" ] }, "customerName": { "type": [ "string", "null" ] }, "customerEmail": { "type": [ "string", "null" ] }, "isGuest": { "type": [ "boolean", "null" ] }, "channelId": { "type": [ "integer", "null" ] }, "channelCode": { "type": [ "string", "null" ] }, "locale": { "type": [ "string", "null" ] }, "reasonText": { "type": [ "string", "null" ] }, "status": { "type": [ "string", "null" ] }, "receivedAt": { "type": [ "string", "null" ] }, "confirmationSentAt": { "type": [ "string", "null" ] }, "finalConfirmationSentAt": { "type": [ "string", "null" ] }, "confirmationError": { "type": [ "string", "null" ] }, "declinedAt": { "type": [ "string", "null" ] }, "declinedReason": { "type": [ "string", "null" ] }, "declinedByUserId": { "type": [ "integer", "null" ] }, "declinedByName": { "type": [ "string", "null" ] }, "refundedAt": { "type": [ "string", "null" ] }, "refundedByUserId": { "type": [ "integer", "null" ] }, "refundedByName": { "type": [ "string", "null" ] }, "refundNote": { "type": [ "string", "null" ] }, "message": { "type": [ "string", "null" ] }, "createdAt": { "type": [ "string", "null" ] }, "updatedAt": { "type": [ "string", "null" ] } } }, "AdminEuWithdrawal.html": { "type": "object", "properties": { "id": { "type": [ "integer", "null" ] }, "uuid": { "type": [ "string", "null" ] }, "orderId": { "type": [ "integer", "null" ] }, "orderIncrementId": { "type": [ "string", "null" ] }, "customerId": { "type": [ "integer", "null" ] }, "customerName": { "type": [ "string", "null" ] }, "customerEmail": { "type": [ "string", "null" ] }, "isGuest": { "type": [ "boolean", "null" ] }, "channelId": { "type": [ "integer", "null" ] }, "channelCode": { "type": [ "string", "null" ] }, "locale": { "type": [ "string", "null" ] }, "reasonText": { "type": [ "string", "null" ] }, "status": { "type": [ "string", "null" ] }, "receivedAt": { "type": [ "string", "null" ] }, "confirmationSentAt": { "type": [ "string", "null" ] }, "finalConfirmationSentAt": { "type": [ "string", "null" ] }, "confirmationError": { "type": [ "string", "null" ] }, "declinedAt": { "type": [ "string", "null" ] }, "declinedReason": { "type": [ "string", "null" ] }, "declinedByUserId": { "type": [ "integer", "null" ] }, "declinedByName": { "type": [ "string", "null" ] }, "refundedAt": { "type": [ "string", "null" ] }, "refundedByUserId": { "type": [ "integer", "null" ] }, "refundedByName": { "type": [ "string", "null" ] }, "refundNote": { "type": [ "string", "null" ] }, "message": { "type": [ "string", "null" ] }, "createdAt": { "type": [ "string", "null" ] }, "updatedAt": { "type": [ "string", "null" ] } } }, "AdminInvoice.AdminInvoiceRestDto": { "type": "object", "properties": { "id": { "readOnly": true, "type": [ "integer", "null" ] }, "incrementId": { "readOnly": true, "type": [ "string", "null" ] }, "orderId": { "readOnly": true, "type": [ "integer", "null" ] }, "orderIncrementId": { "readOnly": true, "type": [ "string", "null" ] }, "state": { "readOnly": true, "type": [ "string", "null" ] }, "emailSent": { "readOnly": true, "type": [ "boolean", "null" ] }, "totalQty": { "readOnly": true, "type": [ "integer", "null" ] }, "orderCurrencyCode": { "readOnly": true, "type": [ "string", "null" ] }, "baseCurrencyCode": { "readOnly": true, "type": [ "string", "null" ] }, "channelCurrencyCode": { "readOnly": true, "type": [ "string", "null" ] }, "subTotal": { "readOnly": true, "type": [ "number", "null" ] }, "formattedSubTotal": { "readOnly": true, "type": [ "string", "null" ] }, "baseSubTotal": { "readOnly": true, "type": [ "number", "null" ] }, "formattedBaseSubTotal": { "readOnly": true, "type": [ "string", "null" ] }, "subTotalInclTax": { "readOnly": true, "type": [ "number", "null" ] }, "formattedSubTotalInclTax": { "readOnly": true, "type": [ "string", "null" ] }, "baseSubTotalInclTax": { "readOnly": true, "type": [ "number", "null" ] }, "formattedBaseSubTotalInclTax": { "readOnly": true, "type": [ "string", "null" ] }, "grandTotal": { "readOnly": true, "type": [ "number", "null" ] }, "formattedGrandTotal": { "readOnly": true, "type": [ "string", "null" ] }, "baseGrandTotal": { "readOnly": true, "type": [ "number", "null" ] }, "formattedBaseGrandTotal": { "readOnly": true, "type": [ "string", "null" ] }, "taxAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedTaxAmount": { "readOnly": true, "type": [ "string", "null" ] }, "baseTaxAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedBaseTaxAmount": { "readOnly": true, "type": [ "string", "null" ] }, "discountAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedDiscountAmount": { "readOnly": true, "type": [ "string", "null" ] }, "baseDiscountAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedBaseDiscountAmount": { "readOnly": true, "type": [ "string", "null" ] }, "shippingAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedShippingAmount": { "readOnly": true, "type": [ "string", "null" ] }, "baseShippingAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedBaseShippingAmount": { "readOnly": true, "type": [ "string", "null" ] }, "shippingAmountInclTax": { "readOnly": true, "type": [ "number", "null" ] }, "formattedShippingAmountInclTax": { "readOnly": true, "type": [ "string", "null" ] }, "baseShippingAmountInclTax": { "readOnly": true, "type": [ "number", "null" ] }, "formattedBaseShippingAmountInclTax": { "readOnly": true, "type": [ "string", "null" ] }, "shippingTaxAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedShippingTaxAmount": { "readOnly": true, "type": [ "string", "null" ] }, "baseShippingTaxAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedBaseShippingTaxAmount": { "readOnly": true, "type": [ "string", "null" ] }, "transactionId": { "readOnly": true, "type": [ "string", "null" ] }, "reminders": { "readOnly": true, "type": [ "integer", "null" ] }, "nextReminderAt": { "readOnly": true, "type": [ "string", "null" ] }, "createdAt": { "readOnly": true, "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "type": [ "string", "null" ] }, "orderStatus": { "readOnly": true, "type": [ "string", "null" ] }, "orderStatusLabel": { "readOnly": true, "type": [ "string", "null" ] }, "orderDate": { "readOnly": true, "type": [ "string", "null" ] }, "channelName": { "readOnly": true, "type": [ "string", "null" ] }, "customerName": { "readOnly": true, "type": [ "string", "null" ] }, "customerEmail": { "readOnly": true, "type": [ "string", "null" ] }, "order": { "readOnly": true, "type": [ "array", "null" ], "items": [] }, "items": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } } } }, "AdminInvoice.AdminInvoiceRestDto.html": { "type": "object", "properties": { "id": { "readOnly": true, "type": [ "integer", "null" ] }, "incrementId": { "readOnly": true, "type": [ "string", "null" ] }, "orderId": { "readOnly": true, "type": [ "integer", "null" ] }, "orderIncrementId": { "readOnly": true, "type": [ "string", "null" ] }, "state": { "readOnly": true, "type": [ "string", "null" ] }, "emailSent": { "readOnly": true, "type": [ "boolean", "null" ] }, "totalQty": { "readOnly": true, "type": [ "integer", "null" ] }, "orderCurrencyCode": { "readOnly": true, "type": [ "string", "null" ] }, "baseCurrencyCode": { "readOnly": true, "type": [ "string", "null" ] }, "channelCurrencyCode": { "readOnly": true, "type": [ "string", "null" ] }, "subTotal": { "readOnly": true, "type": [ "number", "null" ] }, "formattedSubTotal": { "readOnly": true, "type": [ "string", "null" ] }, "baseSubTotal": { "readOnly": true, "type": [ "number", "null" ] }, "formattedBaseSubTotal": { "readOnly": true, "type": [ "string", "null" ] }, "subTotalInclTax": { "readOnly": true, "type": [ "number", "null" ] }, "formattedSubTotalInclTax": { "readOnly": true, "type": [ "string", "null" ] }, "baseSubTotalInclTax": { "readOnly": true, "type": [ "number", "null" ] }, "formattedBaseSubTotalInclTax": { "readOnly": true, "type": [ "string", "null" ] }, "grandTotal": { "readOnly": true, "type": [ "number", "null" ] }, "formattedGrandTotal": { "readOnly": true, "type": [ "string", "null" ] }, "baseGrandTotal": { "readOnly": true, "type": [ "number", "null" ] }, "formattedBaseGrandTotal": { "readOnly": true, "type": [ "string", "null" ] }, "taxAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedTaxAmount": { "readOnly": true, "type": [ "string", "null" ] }, "baseTaxAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedBaseTaxAmount": { "readOnly": true, "type": [ "string", "null" ] }, "discountAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedDiscountAmount": { "readOnly": true, "type": [ "string", "null" ] }, "baseDiscountAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedBaseDiscountAmount": { "readOnly": true, "type": [ "string", "null" ] }, "shippingAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedShippingAmount": { "readOnly": true, "type": [ "string", "null" ] }, "baseShippingAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedBaseShippingAmount": { "readOnly": true, "type": [ "string", "null" ] }, "shippingAmountInclTax": { "readOnly": true, "type": [ "number", "null" ] }, "formattedShippingAmountInclTax": { "readOnly": true, "type": [ "string", "null" ] }, "baseShippingAmountInclTax": { "readOnly": true, "type": [ "number", "null" ] }, "formattedBaseShippingAmountInclTax": { "readOnly": true, "type": [ "string", "null" ] }, "shippingTaxAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedShippingTaxAmount": { "readOnly": true, "type": [ "string", "null" ] }, "baseShippingTaxAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedBaseShippingTaxAmount": { "readOnly": true, "type": [ "string", "null" ] }, "transactionId": { "readOnly": true, "type": [ "string", "null" ] }, "reminders": { "readOnly": true, "type": [ "integer", "null" ] }, "nextReminderAt": { "readOnly": true, "type": [ "string", "null" ] }, "createdAt": { "readOnly": true, "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "type": [ "string", "null" ] }, "orderStatus": { "readOnly": true, "type": [ "string", "null" ] }, "orderStatusLabel": { "readOnly": true, "type": [ "string", "null" ] }, "orderDate": { "readOnly": true, "type": [ "string", "null" ] }, "channelName": { "readOnly": true, "type": [ "string", "null" ] }, "customerName": { "readOnly": true, "type": [ "string", "null" ] }, "customerEmail": { "readOnly": true, "type": [ "string", "null" ] }, "order": { "readOnly": true, "type": [ "array", "null" ], "items": [] }, "items": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } } } }, "AdminOrderComment": { "type": "object", "description": "Admin order comments.\n\nREST : POST /api/admin/orders/{id}/comments (create)\n GET /api/admin/orders/{id}/comments (cursor list, newest first)\nGraphQL: createAdminOrderComment mutation + adminOrderComments query collection.", "properties": { "id": { "readOnly": true, "type": [ "integer", "null" ] }, "orderId": { "readOnly": true, "type": [ "integer", "null" ] }, "comment": { "readOnly": true, "type": [ "string", "null" ] }, "customerNotified": { "readOnly": true, "type": [ "boolean", "null" ] }, "createdAt": { "readOnly": true, "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "type": [ "string", "null" ] } } }, "AdminOrderComment.html": { "type": "object", "description": "Admin order comments.\n\nREST : POST /api/admin/orders/{id}/comments (create)\n GET /api/admin/orders/{id}/comments (cursor list, newest first)\nGraphQL: createAdminOrderComment mutation + adminOrderComments query collection.", "properties": { "id": { "readOnly": true, "type": [ "integer", "null" ] }, "orderId": { "readOnly": true, "type": [ "integer", "null" ] }, "comment": { "readOnly": true, "type": [ "string", "null" ] }, "customerNotified": { "readOnly": true, "type": [ "boolean", "null" ] }, "createdAt": { "readOnly": true, "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "type": [ "string", "null" ] } } }, "AdminOrderDetail.OrderDetailRestDto": { "type": "object", "description": "Admin Order detail — connection-shape resource (2026-06-18).\n\nBare Eloquent model on the `orders` table (NOT extending core Order, which\ncarries morphTo/proxy relations that break API Platform serialization —\nsame reason the shop CustomerOrder is bare). Nested data follows the proven\nAdminReview recipe:\n - to-many (items / invoices / shipments / refunds / comments) → HasMany to\n Eloquent sub-resources → GraphQL connections (`items { edges { node } }`).\n - to-one (customer / billingAddress / shippingAddress) → BelongsTo/HasOne\n to Eloquent sub-resources → typed objects the client sub-selects.\n - top-level scalars + formatted strings resolve via snake_case columns and\n accessors through the central output converter (no AcceptsCamelCaseWrites).\n\nREST keeps the historical flat shape via `output: OrderDetailRestDto` (the\nprovider maps it); GraphQL ops carry no `output:` so they return THIS model\nand serve connections. The provider branches on the GraphQL context.", "properties": { "id": { "readOnly": true, "type": [ "integer", "null" ] }, "incrementId": { "readOnly": true, "type": [ "string", "null" ] }, "status": { "readOnly": true, "type": [ "string", "null" ] }, "statusLabel": { "readOnly": true, "type": [ "string", "null" ] }, "channelName": { "readOnly": true, "type": [ "string", "null" ] }, "isGuest": { "readOnly": true, "type": [ "boolean", "null" ] }, "isGift": { "readOnly": true, "type": [ "boolean", "null" ] }, "customerEmail": { "readOnly": true, "type": [ "string", "null" ] }, "customerFirstName": { "readOnly": true, "type": [ "string", "null" ] }, "customerLastName": { "readOnly": true, "type": [ "string", "null" ] }, "shippingMethod": { "readOnly": true, "type": [ "string", "null" ] }, "shippingTitle": { "readOnly": true, "type": [ "string", "null" ] }, "shippingDescription": { "readOnly": true, "type": [ "string", "null" ] }, "paymentMethod": { "readOnly": true, "type": [ "string", "null" ] }, "paymentTitle": { "readOnly": true, "type": [ "string", "null" ] }, "couponCode": { "readOnly": true, "type": [ "string", "null" ] }, "totalItemCount": { "readOnly": true, "type": [ "integer", "null" ] }, "totalQtyOrdered": { "readOnly": true, "type": [ "integer", "null" ] }, "baseCurrencyCode": { "readOnly": true, "type": [ "string", "null" ] }, "channelCurrencyCode": { "readOnly": true, "type": [ "string", "null" ] }, "orderCurrencyCode": { "readOnly": true, "type": [ "string", "null" ] }, "grandTotal": { "readOnly": true, "type": [ "number", "null" ] }, "baseGrandTotal": { "readOnly": true, "type": [ "number", "null" ] }, "formattedGrandTotal": { "readOnly": true, "type": [ "string", "null" ] }, "grandTotalInvoiced": { "readOnly": true, "type": [ "number", "null" ] }, "formattedGrandTotalInvoiced": { "readOnly": true, "type": [ "string", "null" ] }, "grandTotalRefunded": { "readOnly": true, "type": [ "number", "null" ] }, "formattedGrandTotalRefunded": { "readOnly": true, "type": [ "string", "null" ] }, "subTotal": { "readOnly": true, "type": [ "number", "null" ] }, "baseSubTotal": { "readOnly": true, "type": [ "number", "null" ] }, "formattedSubTotal": { "readOnly": true, "type": [ "string", "null" ] }, "taxAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedTaxAmount": { "readOnly": true, "type": [ "string", "null" ] }, "discountAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedDiscountAmount": { "readOnly": true, "type": [ "string", "null" ] }, "shippingAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedShippingAmount": { "readOnly": true, "type": [ "string", "null" ] }, "totalDue": { "readOnly": true, "type": [ "number", "null" ] }, "baseTotalDue": { "readOnly": true, "type": [ "number", "null" ] }, "formattedTotalDue": { "readOnly": true, "type": [ "string", "null" ] }, "createdAt": { "readOnly": true, "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "type": [ "string", "null" ] }, "customer": { "readOnly": true, "type": [ "array", "null" ], "items": [] }, "addresses": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } }, "items": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } }, "invoices": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } }, "shipments": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } }, "refunds": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } }, "comments": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } } } }, "AdminOrderDetail.OrderDetailRestDto.html": { "type": "object", "description": "Admin Order detail — connection-shape resource (2026-06-18).\n\nBare Eloquent model on the `orders` table (NOT extending core Order, which\ncarries morphTo/proxy relations that break API Platform serialization —\nsame reason the shop CustomerOrder is bare). Nested data follows the proven\nAdminReview recipe:\n - to-many (items / invoices / shipments / refunds / comments) → HasMany to\n Eloquent sub-resources → GraphQL connections (`items { edges { node } }`).\n - to-one (customer / billingAddress / shippingAddress) → BelongsTo/HasOne\n to Eloquent sub-resources → typed objects the client sub-selects.\n - top-level scalars + formatted strings resolve via snake_case columns and\n accessors through the central output converter (no AcceptsCamelCaseWrites).\n\nREST keeps the historical flat shape via `output: OrderDetailRestDto` (the\nprovider maps it); GraphQL ops carry no `output:` so they return THIS model\nand serve connections. The provider branches on the GraphQL context.", "properties": { "id": { "readOnly": true, "type": [ "integer", "null" ] }, "incrementId": { "readOnly": true, "type": [ "string", "null" ] }, "status": { "readOnly": true, "type": [ "string", "null" ] }, "statusLabel": { "readOnly": true, "type": [ "string", "null" ] }, "channelName": { "readOnly": true, "type": [ "string", "null" ] }, "isGuest": { "readOnly": true, "type": [ "boolean", "null" ] }, "isGift": { "readOnly": true, "type": [ "boolean", "null" ] }, "customerEmail": { "readOnly": true, "type": [ "string", "null" ] }, "customerFirstName": { "readOnly": true, "type": [ "string", "null" ] }, "customerLastName": { "readOnly": true, "type": [ "string", "null" ] }, "shippingMethod": { "readOnly": true, "type": [ "string", "null" ] }, "shippingTitle": { "readOnly": true, "type": [ "string", "null" ] }, "shippingDescription": { "readOnly": true, "type": [ "string", "null" ] }, "paymentMethod": { "readOnly": true, "type": [ "string", "null" ] }, "paymentTitle": { "readOnly": true, "type": [ "string", "null" ] }, "couponCode": { "readOnly": true, "type": [ "string", "null" ] }, "totalItemCount": { "readOnly": true, "type": [ "integer", "null" ] }, "totalQtyOrdered": { "readOnly": true, "type": [ "integer", "null" ] }, "baseCurrencyCode": { "readOnly": true, "type": [ "string", "null" ] }, "channelCurrencyCode": { "readOnly": true, "type": [ "string", "null" ] }, "orderCurrencyCode": { "readOnly": true, "type": [ "string", "null" ] }, "grandTotal": { "readOnly": true, "type": [ "number", "null" ] }, "baseGrandTotal": { "readOnly": true, "type": [ "number", "null" ] }, "formattedGrandTotal": { "readOnly": true, "type": [ "string", "null" ] }, "grandTotalInvoiced": { "readOnly": true, "type": [ "number", "null" ] }, "formattedGrandTotalInvoiced": { "readOnly": true, "type": [ "string", "null" ] }, "grandTotalRefunded": { "readOnly": true, "type": [ "number", "null" ] }, "formattedGrandTotalRefunded": { "readOnly": true, "type": [ "string", "null" ] }, "subTotal": { "readOnly": true, "type": [ "number", "null" ] }, "baseSubTotal": { "readOnly": true, "type": [ "number", "null" ] }, "formattedSubTotal": { "readOnly": true, "type": [ "string", "null" ] }, "taxAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedTaxAmount": { "readOnly": true, "type": [ "string", "null" ] }, "discountAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedDiscountAmount": { "readOnly": true, "type": [ "string", "null" ] }, "shippingAmount": { "readOnly": true, "type": [ "number", "null" ] }, "formattedShippingAmount": { "readOnly": true, "type": [ "string", "null" ] }, "totalDue": { "readOnly": true, "type": [ "number", "null" ] }, "baseTotalDue": { "readOnly": true, "type": [ "number", "null" ] }, "formattedTotalDue": { "readOnly": true, "type": [ "string", "null" ] }, "createdAt": { "readOnly": true, "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "type": [ "string", "null" ] }, "customer": { "readOnly": true, "type": [ "array", "null" ], "items": [] }, "addresses": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } }, "items": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } }, "invoices": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } }, "shipments": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } }, "refunds": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } }, "comments": { "readOnly": true, "type": "array", "items": { "type": "object", "additionalProperties": [] } } } }, "AdminRefund": { "type": "object", "properties": { "id": { "readOnly": true, "type": [ "integer", "null" ] }, "orderId": { "type": [ "integer", "null" ] }, "orderIncrementId": { "type": [ "string", "null" ] }, "state": { "type": [ "string", "null" ] }, "emailSent": { "type": [ "boolean", "null" ] }, "totalQty": { "type": [ "integer", "null" ] }, "orderCurrencyCode": { "type": [ "string", "null" ] }, "baseCurrencyCode": { "type": [ "string", "null" ] }, "channelCurrencyCode": { "type": [ "string", "null" ] }, "subTotal": { "type": [ "number", "null" ] }, "formattedSubTotal": { "type": [ "string", "null" ] }, "baseSubTotal": { "type": [ "number", "null" ] }, "formattedBaseSubTotal": { "type": [ "string", "null" ] }, "subTotalInclTax": { "type": [ "number", "null" ] }, "formattedSubTotalInclTax": { "type": [ "string", "null" ] }, "baseSubTotalInclTax": { "type": [ "number", "null" ] }, "formattedBaseSubTotalInclTax": { "type": [ "string", "null" ] }, "grandTotal": { "type": [ "number", "null" ] }, "formattedGrandTotal": { "type": [ "string", "null" ] }, "baseGrandTotal": { "type": [ "number", "null" ] }, "formattedBaseGrandTotal": { "type": [ "string", "null" ] }, "taxAmount": { "type": [ "number", "null" ] }, "formattedTaxAmount": { "type": [ "string", "null" ] }, "baseTaxAmount": { "type": [ "number", "null" ] }, "formattedBaseTaxAmount": { "type": [ "string", "null" ] }, "discountAmount": { "type": [ "number", "null" ] }, "formattedDiscountAmount": { "type": [ "string", "null" ] }, "baseDiscountAmount": { "type": [ "number", "null" ] }, "formattedBaseDiscountAmount": { "type": [ "string", "null" ] }, "shippingAmount": { "type": [ "number", "null" ] }, "formattedShippingAmount": { "type": [ "string", "null" ] }, "baseShippingAmount": { "type": [ "number", "null" ] }, "formattedBaseShippingAmount": { "type": [ "string", "null" ] }, "shippingAmountInclTax": { "type": [ "number", "null" ] }, "formattedShippingAmountInclTax": { "type": [ "string", "null" ] }, "baseShippingAmountInclTax": { "type": [ "number", "null" ] }, "formattedBaseShippingAmountInclTax": { "type": [ "string", "null" ] }, "shippingTaxAmount": { "type": [ "number", "null" ] }, "formattedShippingTaxAmount": { "type": [ "string", "null" ] }, "baseShippingTaxAmount": { "type": [ "number", "null" ] }, "formattedBaseShippingTaxAmount": { "type": [ "string", "null" ] }, "adjustmentRefund": { "type": [ "number", "null" ] }, "formattedAdjustmentRefund": { "type": [ "string", "null" ] }, "baseAdjustmentRefund": { "type": [ "number", "null" ] }, "formattedBaseAdjustmentRefund": { "type": [ "string", "null" ] }, "adjustmentFee": { "type": [ "number", "null" ] }, "formattedAdjustmentFee": { "type": [ "string", "null" ] }, "baseAdjustmentFee": { "type": [ "number", "null" ] }, "formattedBaseAdjustmentFee": { "type": [ "string", "null" ] }, "createdAt": { "type": [ "string", "null" ] }, "updatedAt": { "type": [ "string", "null" ] }, "billedTo": { "type": [ "string", "null" ] }, "orderStatus": { "type": [ "string", "null" ] }, "orderStatusLabel": { "type": [ "string", "null" ] }, "orderDate": { "type": [ "string", "null" ] }, "channelName": { "type": [ "string", "null" ] }, "customerName": { "type": [ "string", "null" ] }, "customerEmail": { "type": [ "string", "null" ] }, "paymentMethod": { "type": [ "string", "null" ] }, "paymentTitle": { "type": [ "string", "null" ] }, "shippingMethod": { "type": [ "string", "null" ] }, "shippingTitle": { "type": [ "string", "null" ] }, "billingAddress": { "type": [ "array", "null" ], "items": [] }, "shippingAddress": { "type": [ "array", "null" ], "items": [] }, "items": { "type": "array", "items": [] } } }, "AdminRefund.RefundTotalsSummary": { "type": "object", "properties": { "orderId": { "type": [ "integer", "null" ] }, "subtotal": { "type": [ "number", "null" ] }, "formattedSubtotal": { "type": [ "string", "null" ] }, "discount": { "type": [ "number", "null" ] }, "formattedDiscount": { "type": [ "string", "null" ] }, "tax": { "type": [ "number", "null" ] }, "formattedTax": { "type": [ "string", "null" ] }, "shipping": { "type": [ "number", "null" ] }, "formattedShipping": { "type": [ "string", "null" ] }, "adjustmentRefund": { "type": [ "number", "null" ] }, "adjustmentFee": { "type": [ "number", "null" ] }, "grandTotal": { "type": [ "number", "null" ] }, "formattedGrandTotal": { "type": [ "string", "null" ] } } }, "AdminRefund.RefundTotalsSummary.html": { "type": "object", "properties": { "orderId": { "type": [ "integer", "null" ] }, "subtotal": { "type": [ "number", "null" ] }, "formattedSubtotal": { "type": [ "string", "null" ] }, "discount": { "type": [ "number", "null" ] }, "formattedDiscount": { "type": [ "string", "null" ] }, "tax": { "type": [ "number", "null" ] }, "formattedTax": { "type": [ "string", "null" ] }, "shipping": { "type": [ "number", "null" ] }, "formattedShipping": { "type": [ "string", "null" ] }, "adjustmentRefund": { "type": [ "number", "null" ] }, "adjustmentFee": { "type": [ "number", "null" ] }, "grandTotal": { "type": [ "number", "null" ] }, "formattedGrandTotal": { "type": [ "string", "null" ] } } }, "AdminRefund.html": { "type": "object", "properties": { "id": { "readOnly": true, "type": [ "integer", "null" ] }, "orderId": { "type": [ "integer", "null" ] }, "orderIncrementId": { "type": [ "string", "null" ] }, "state": { "type": [ "string", "null" ] }, "emailSent": { "type": [ "boolean", "null" ] }, "totalQty": { "type": [ "integer", "null" ] }, "orderCurrencyCode": { "type": [ "string", "null" ] }, "baseCurrencyCode": { "type": [ "string", "null" ] }, "channelCurrencyCode": { "type": [ "string", "null" ] }, "subTotal": { "type": [ "number", "null" ] }, "formattedSubTotal": { "type": [ "string", "null" ] }, "baseSubTotal": { "type": [ "number", "null" ] }, "formattedBaseSubTotal": { "type": [ "string", "null" ] }, "subTotalInclTax": { "type": [ "number", "null" ] }, "formattedSubTotalInclTax": { "type": [ "string", "null" ] }, "baseSubTotalInclTax": { "type": [ "number", "null" ] }, "formattedBaseSubTotalInclTax": { "type": [ "string", "null" ] }, "grandTotal": { "type": [ "number", "null" ] }, "formattedGrandTotal": { "type": [ "string", "null" ] }, "baseGrandTotal": { "type": [ "number", "null" ] }, "formattedBaseGrandTotal": { "type": [ "string", "null" ] }, "taxAmount": { "type": [ "number", "null" ] }, "formattedTaxAmount": { "type": [ "string", "null" ] }, "baseTaxAmount": { "type": [ "number", "null" ] }, "formattedBaseTaxAmount": { "type": [ "string", "null" ] }, "discountAmount": { "type": [ "number", "null" ] }, "formattedDiscountAmount": { "type": [ "string", "null" ] }, "baseDiscountAmount": { "type": [ "number", "null" ] }, "formattedBaseDiscountAmount": { "type": [ "string", "null" ] }, "shippingAmount": { "type": [ "number", "null" ] }, "formattedShippingAmount": { "type": [ "string", "null" ] }, "baseShippingAmount": { "type": [ "number", "null" ] }, "formattedBaseShippingAmount": { "type": [ "string", "null" ] }, "shippingAmountInclTax": { "type": [ "number", "null" ] }, "formattedShippingAmountInclTax": { "type": [ "string", "null" ] }, "baseShippingAmountInclTax": { "type": [ "number", "null" ] }, "formattedBaseShippingAmountInclTax": { "type": [ "string", "null" ] }, "shippingTaxAmount": { "type": [ "number", "null" ] }, "formattedShippingTaxAmount": { "type": [ "string", "null" ] }, "baseShippingTaxAmount": { "type": [ "number", "null" ] }, "formattedBaseShippingTaxAmount": { "type": [ "string", "null" ] }, "adjustmentRefund": { "type": [ "number", "null" ] }, "formattedAdjustmentRefund": { "type": [ "string", "null" ] }, "baseAdjustmentRefund": { "type": [ "number", "null" ] }, "formattedBaseAdjustmentRefund": { "type": [ "string", "null" ] }, "adjustmentFee": { "type": [ "number", "null" ] }, "formattedAdjustmentFee": { "type": [ "string", "null" ] }, "baseAdjustmentFee": { "type": [ "number", "null" ] }, "formattedBaseAdjustmentFee": { "type": [ "string", "null" ] }, "createdAt": { "type": [ "string", "null" ] }, "updatedAt": { "type": [ "string", "null" ] }, "billedTo": { "type": [ "string", "null" ] }, "orderStatus": { "type": [ "string", "null" ] }, "orderStatusLabel": { "type": [ "string", "null" ] }, "orderDate": { "type": [ "string", "null" ] }, "channelName": { "type": [ "string", "null" ] }, "customerName": { "type": [ "string", "null" ] }, "customerEmail": { "type": [ "string", "null" ] }, "paymentMethod": { "type": [ "string", "null" ] }, "paymentTitle": { "type": [ "string", "null" ] }, "shippingMethod": { "type": [ "string", "null" ] }, "shippingTitle": { "type": [ "string", "null" ] }, "billingAddress": { "type": [ "array", "null" ], "items": [] }, "shippingAddress": { "type": [ "array", "null" ], "items": [] }, "items": { "type": "array", "items": [] } } }, "AdminReportingCustomers": { "type": "object", "description": "Admin reporting — customers (read-only).\n\nREST : GET /api/admin/reporting/customers\nGraphQL: adminReportingCustomers query\n\nMirrors `Reporting/CustomerController::stats()`. `?type=`:\n total-customers (default), customers-with-most-sales,\n customers-with-most-orders, customers-with-most-reviews,\n top-customer-groups.", "properties": { "entity": { "readOnly": true, "type": [ "string", "null" ] }, "type": { "readOnly": true, "type": [ "string", "null" ] }, "dateRange": { "readOnly": true, "example": { "previous": "10 Apr 2026 - 10 May 2026", "current": "10 May 2026 - 09 Jun 2026" }, "type": [ "array", "null" ], "items": [] }, "statistics": { "readOnly": true, "example": { "customers": { "previous": 1, "current": 9, "progress": 800 }, "over_time": { "previous": [ { "label": "23 May", "total": 1 } ], "current": [ { "label": "26 May", "total": 9 } ] } }, "type": [ "object", "null" ], "additionalProperties": [] } } }, "AdminReportingCustomers.csv": { "type": "object", "description": "Admin reporting — customers (read-only).\n\nREST : GET /api/admin/reporting/customers\nGraphQL: adminReportingCustomers query\n\nMirrors `Reporting/CustomerController::stats()`. `?type=`:\n total-customers (default), customers-with-most-sales,\n customers-with-most-orders, customers-with-most-reviews,\n top-customer-groups.", "properties": { "entity": { "readOnly": true, "type": [ "string", "null" ] }, "type": { "readOnly": true, "type": [ "string", "null" ] }, "dateRange": { "readOnly": true, "example": { "previous": "10 Apr 2026 - 10 May 2026", "current": "10 May 2026 - 09 Jun 2026" }, "type": [ "array", "null" ], "items": [] }, "statistics": { "readOnly": true, "example": { "customers": { "previous": 1, "current": 9, "progress": 800 }, "over_time": { "previous": [ { "label": "23 May", "total": 1 } ], "current": [ { "label": "26 May", "total": 9 } ] } }, "type": [ "object", "null" ], "additionalProperties": [] } } }, "AdminReportingCustomers.html": { "type": "object", "description": "Admin reporting — customers (read-only).\n\nREST : GET /api/admin/reporting/customers\nGraphQL: adminReportingCustomers query\n\nMirrors `Reporting/CustomerController::stats()`. `?type=`:\n total-customers (default), customers-with-most-sales,\n customers-with-most-orders, customers-with-most-reviews,\n top-customer-groups.", "properties": { "entity": { "readOnly": true, "type": [ "string", "null" ] }, "type": { "readOnly": true, "type": [ "string", "null" ] }, "dateRange": { "readOnly": true, "example": { "previous": "10 Apr 2026 - 10 May 2026", "current": "10 May 2026 - 09 Jun 2026" }, "type": [ "array", "null" ], "items": [] }, "statistics": { "readOnly": true, "example": { "customers": { "previous": 1, "current": 9, "progress": 800 }, "over_time": { "previous": [ { "label": "23 May", "total": 1 } ], "current": [ { "label": "26 May", "total": 9 } ] } }, "type": [ "object", "null" ], "additionalProperties": [] } } }, "AdminReportingCustomers.xls": { "type": "object", "description": "Admin reporting — customers (read-only).\n\nREST : GET /api/admin/reporting/customers\nGraphQL: adminReportingCustomers query\n\nMirrors `Reporting/CustomerController::stats()`. `?type=`:\n total-customers (default), customers-with-most-sales,\n customers-with-most-orders, customers-with-most-reviews,\n top-customer-groups.", "properties": { "entity": { "readOnly": true, "type": [ "string", "null" ] }, "type": { "readOnly": true, "type": [ "string", "null" ] }, "dateRange": { "readOnly": true, "example": { "previous": "10 Apr 2026 - 10 May 2026", "current": "10 May 2026 - 09 Jun 2026" }, "type": [ "array", "null" ], "items": [] }, "statistics": { "readOnly": true, "example": { "customers": { "previous": 1, "current": 9, "progress": 800 }, "over_time": { "previous": [ { "label": "23 May", "total": 1 } ], "current": [ { "label": "26 May", "total": 9 } ] } }, "type": [ "object", "null" ], "additionalProperties": [] } } }, "AdminReportingCustomers.xlsx": { "type": "object", "description": "Admin reporting — customers (read-only).\n\nREST : GET /api/admin/reporting/customers\nGraphQL: adminReportingCustomers query\n\nMirrors `Reporting/CustomerController::stats()`. `?type=`:\n total-customers (default), customers-with-most-sales,\n customers-with-most-orders, customers-with-most-reviews,\n top-customer-groups.", "properties": { "entity": { "readOnly": true, "type": [ "string", "null" ] }, "type": { "readOnly": true, "type": [ "string", "null" ] }, "dateRange": { "readOnly": true, "example": { "previous": "10 Apr 2026 - 10 May 2026", "current": "10 May 2026 - 09 Jun 2026" }, "type": [ "array", "null" ], "items": [] }, "statistics": { "readOnly": true, "example": { "customers": { "previous": 1, "current": 9, "progress": 800 }, "over_time": { "previous": [ { "label": "23 May", "total": 1 } ], "current": [ { "label": "26 May", "total": 9 } ] } }, "type": [ "object", "null" ], "additionalProperties": [] } } }, "AdminReportingOverview": { "type": "object", "description": "Admin reporting overview (read-only).\n\nREST : GET /api/admin/reporting/stats\nGraphQL: adminReportingStats query\n\nMirrors `Webkul\\Admin\\Http\\Controllers\\Reporting\\Controller::stats()`.\nThe `?type=` query param picks one of the overview stat groups:\n total-sales (default), total-orders, total-customers,\n top-selling-products-by-revenue.\n\n`start` / `end` (ISO) + `channel` (code) bound the period.", "properties": { "entity": { "readOnly": true, "type": [ "string", "null" ] }, "type": { "readOnly": true, "type": [ "string", "null" ] }, "dateRange": { "readOnly": true, "example": { "previous": "10 Apr 2026 - 10 May 2026", "current": "10 May 2026 - 09 Jun 2026" }, "type": [ "array", "null" ], "items": [] }, "statistics": { "readOnly": true, "example": { "sales": { "previous": 27178.38, "current": 9697.53, "formatted_total": "$9,697.53", "progress": -64.32 }, "over_time": { "previous": [ { "label": "10 Apr", "total": "8526.82", "count": 12 } ], "current": [ { "label": "10 May", "total": "8500.00", "count": 12 } ] } }, "type": [ "object", "null" ], "additionalProperties": [] } } }, "AdminReportingOverview.html": { "type": "object", "description": "Admin reporting overview (read-only).\n\nREST : GET /api/admin/reporting/stats\nGraphQL: adminReportingStats query\n\nMirrors `Webkul\\Admin\\Http\\Controllers\\Reporting\\Controller::stats()`.\nThe `?type=` query param picks one of the overview stat groups:\n total-sales (default), total-orders, total-customers,\n top-selling-products-by-revenue.\n\n`start` / `end` (ISO) + `channel` (code) bound the period.", "properties": { "entity": { "readOnly": true, "type": [ "string", "null" ] }, "type": { "readOnly": true, "type": [ "string", "null" ] }, "dateRange": { "readOnly": true, "example": { "previous": "10 Apr 2026 - 10 May 2026", "current": "10 May 2026 - 09 Jun 2026" }, "type": [ "array", "null" ], "items": [] }, "statistics": { "readOnly": true, "example": { "sales": { "previous": 27178.38, "current": 9697.53, "formatted_total": "$9,697.53", "progress": -64.32 }, "over_time": { "previous": [ { "label": "10 Apr", "total": "8526.82", "count": 12 } ], "current": [ { "label": "10 May", "total": "8500.00", "count": 12 } ] } }, "type": [ "object", "null" ], "additionalProperties": [] } } }, "AdminReportingProducts": { "type": "object", "description": "Admin reporting — products (read-only).\n\nREST : GET /api/admin/reporting/products\nGraphQL: adminReportingProducts query\n\nMirrors `Reporting/ProductController::stats()`. `?type=`:\n total-sold-quantities (default), total-products-added-to-wishlist,\n top-selling-products-by-revenue, top-selling-products-by-quantity,\n products-with-most-reviews,\n last-search-terms, top-search-terms.", "properties": { "entity": { "readOnly": true, "type": [ "string", "null" ] }, "type": { "readOnly": true, "type": [ "string", "null" ] }, "dateRange": { "readOnly": true, "example": { "previous": "10 Apr 2026 - 10 May 2026", "current": "10 May 2026 - 09 Jun 2026" }, "type": [ "array", "null" ], "items": [] }, "statistics": { "readOnly": true, "example": { "quantities": { "previous": 82, "current": 13, "progress": -84.15 }, "over_time": { "previous": [ { "label": "10 Apr", "total": 21 } ], "current": [ { "label": "10 May", "total": 5 } ] } }, "type": [ "object", "null" ], "additionalProperties": [] } } }, "AdminReportingProducts.csv": { "type": "object", "description": "Admin reporting — products (read-only).\n\nREST : GET /api/admin/reporting/products\nGraphQL: adminReportingProducts query\n\nMirrors `Reporting/ProductController::stats()`. `?type=`:\n total-sold-quantities (default), total-products-added-to-wishlist,\n top-selling-products-by-revenue, top-selling-products-by-quantity,\n products-with-most-reviews,\n last-search-terms, top-search-terms.", "properties": { "entity": { "readOnly": true, "type": [ "string", "null" ] }, "type": { "readOnly": true, "type": [ "string", "null" ] }, "dateRange": { "readOnly": true, "example": { "previous": "10 Apr 2026 - 10 May 2026", "current": "10 May 2026 - 09 Jun 2026" }, "type": [ "array", "null" ], "items": [] }, "statistics": { "readOnly": true, "example": { "quantities": { "previous": 82, "current": 13, "progress": -84.15 }, "over_time": { "previous": [ { "label": "10 Apr", "total": 21 } ], "current": [ { "label": "10 May", "total": 5 } ] } }, "type": [ "object", "null" ], "additionalProperties": [] } } }, "AdminReportingProducts.html": { "type": "object", "description": "Admin reporting — products (read-only).\n\nREST : GET /api/admin/reporting/products\nGraphQL: adminReportingProducts query\n\nMirrors `Reporting/ProductController::stats()`. `?type=`:\n total-sold-quantities (default), total-products-added-to-wishlist,\n top-selling-products-by-revenue, top-selling-products-by-quantity,\n products-with-most-reviews,\n last-search-terms, top-search-terms.", "properties": { "entity": { "readOnly": true, "type": [ "string", "null" ] }, "type": { "readOnly": true, "type": [ "string", "null" ] }, "dateRange": { "readOnly": true, "example": { "previous": "10 Apr 2026 - 10 May 2026", "current": "10 May 2026 - 09 Jun 2026" }, "type": [ "array", "null" ], "items": [] }, "statistics": { "readOnly": true, "example": { "quantities": { "previous": 82, "current": 13, "progress": -84.15 }, "over_time": { "previous": [ { "label": "10 Apr", "total": 21 } ], "current": [ { "label": "10 May", "total": 5 } ] } }, "type": [ "object", "null" ], "additionalProperties": [] } } }, "AdminReportingProducts.xls": { "type": "object", "description": "Admin reporting — products (read-only).\n\nREST : GET /api/admin/reporting/products\nGraphQL: adminReportingProducts query\n\nMirrors `Reporting/ProductController::stats()`. `?type=`:\n total-sold-quantities (default), total-products-added-to-wishlist,\n top-selling-products-by-revenue, top-selling-products-by-quantity,\n products-with-most-reviews,\n last-search-terms, top-search-terms.", "properties": { "entity": { "readOnly": true, "type": [ "string", "null" ] }, "type": { "readOnly": true, "type": [ "string", "null" ] }, "dateRange": { "readOnly": true, "example": { "previous": "10 Apr 2026 - 10 May 2026", "current": "10 May 2026 - 09 Jun 2026" }, "type": [ "array", "null" ], "items": [] }, "statistics": { "readOnly": true, "example": { "quantities": { "previous": 82, "current": 13, "progress": -84.15 }, "over_time": { "previous": [ { "label": "10 Apr", "total": 21 } ], "current": [ { "label": "10 May", "total": 5 } ] } }, "type": [ "object", "null" ], "additionalProperties": [] } } }, "AdminReportingProducts.xlsx": { "type": "object", "description": "Admin reporting — products (read-only).\n\nREST : GET /api/admin/reporting/products\nGraphQL: adminReportingProducts query\n\nMirrors `Reporting/ProductController::stats()`. `?type=`:\n total-sold-quantities (default), total-products-added-to-wishlist,\n top-selling-products-by-revenue, top-selling-products-by-quantity,\n products-with-most-reviews,\n last-search-terms, top-search-terms.", "properties": { "entity": { "readOnly": true, "type": [ "string", "null" ] }, "type": { "readOnly": true, "type": [ "string", "null" ] }, "dateRange": { "readOnly": true, "example": { "previous": "10 Apr 2026 - 10 May 2026", "current": "10 May 2026 - 09 Jun 2026" }, "type": [ "array", "null" ], "items": [] }, "statistics": { "readOnly": true, "example": { "quantities": { "previous": 82, "current": 13, "progress": -84.15 }, "over_time": { "previous": [ { "label": "10 Apr", "total": 21 } ], "current": [ { "label": "10 May", "total": 5 } ] } }, "type": [ "object", "null" ], "additionalProperties": [] } } }, "AdminReportingSales": { "type": "object", "description": "Admin reporting — sales (read-only).\n\nREST : GET /api/admin/reporting/sales\nGraphQL: adminReportingSales query\n\nMirrors `Reporting/SaleController::stats()`. `?type=`:\n total-sales (default), average-sales, total-orders, purchase-funnel,\n abandoned-carts, refunds, tax-collected, shipping-collected,\n top-payment-methods, sales-by-coupon.", "properties": { "entity": { "readOnly": true, "type": [ "string", "null" ] }, "type": { "readOnly": true, "type": [ "string", "null" ] }, "dateRange": { "readOnly": true, "example": { "previous": "10 Apr 2026 - 10 May 2026", "current": "10 May 2026 - 09 Jun 2026" }, "type": [ "array", "null" ], "items": [] }, "statistics": { "readOnly": true, "example": { "sales": { "previous": 27178.38, "current": 9697.53, "formatted_total": "$9,697.53", "progress": -64.32 }, "over_time": { "previous": [ { "label": "10 Apr", "total": "8526.82", "count": 12 } ], "current": [ { "label": "10 May", "total": "8500.00", "count": 12 } ] } }, "type": [ "object", "null" ], "additionalProperties": [] } } }, "AdminReportingSales.csv": { "type": "object", "description": "Admin reporting — sales (read-only).\n\nREST : GET /api/admin/reporting/sales\nGraphQL: adminReportingSales query\n\nMirrors `Reporting/SaleController::stats()`. `?type=`:\n total-sales (default), average-sales, total-orders, purchase-funnel,\n abandoned-carts, refunds, tax-collected, shipping-collected,\n top-payment-methods, sales-by-coupon.", "properties": { "entity": { "readOnly": true, "type": [ "string", "null" ] }, "type": { "readOnly": true, "type": [ "string", "null" ] }, "dateRange": { "readOnly": true, "example": { "previous": "10 Apr 2026 - 10 May 2026", "current": "10 May 2026 - 09 Jun 2026" }, "type": [ "array", "null" ], "items": [] }, "statistics": { "readOnly": true, "example": { "sales": { "previous": 27178.38, "current": 9697.53, "formatted_total": "$9,697.53", "progress": -64.32 }, "over_time": { "previous": [ { "label": "10 Apr", "total": "8526.82", "count": 12 } ], "current": [ { "label": "10 May", "total": "8500.00", "count": 12 } ] } }, "type": [ "object", "null" ], "additionalProperties": [] } } }, "AdminReportingSales.html": { "type": "object", "description": "Admin reporting — sales (read-only).\n\nREST : GET /api/admin/reporting/sales\nGraphQL: adminReportingSales query\n\nMirrors `Reporting/SaleController::stats()`. `?type=`:\n total-sales (default), average-sales, total-orders, purchase-funnel,\n abandoned-carts, refunds, tax-collected, shipping-collected,\n top-payment-methods, sales-by-coupon.", "properties": { "entity": { "readOnly": true, "type": [ "string", "null" ] }, "type": { "readOnly": true, "type": [ "string", "null" ] }, "dateRange": { "readOnly": true, "example": { "previous": "10 Apr 2026 - 10 May 2026", "current": "10 May 2026 - 09 Jun 2026" }, "type": [ "array", "null" ], "items": [] }, "statistics": { "readOnly": true, "example": { "sales": { "previous": 27178.38, "current": 9697.53, "formatted_total": "$9,697.53", "progress": -64.32 }, "over_time": { "previous": [ { "label": "10 Apr", "total": "8526.82", "count": 12 } ], "current": [ { "label": "10 May", "total": "8500.00", "count": 12 } ] } }, "type": [ "object", "null" ], "additionalProperties": [] } } }, "AdminReportingSales.xls": { "type": "object", "description": "Admin reporting — sales (read-only).\n\nREST : GET /api/admin/reporting/sales\nGraphQL: adminReportingSales query\n\nMirrors `Reporting/SaleController::stats()`. `?type=`:\n total-sales (default), average-sales, total-orders, purchase-funnel,\n abandoned-carts, refunds, tax-collected, shipping-collected,\n top-payment-methods, sales-by-coupon.", "properties": { "entity": { "readOnly": true, "type": [ "string", "null" ] }, "type": { "readOnly": true, "type": [ "string", "null" ] }, "dateRange": { "readOnly": true, "example": { "previous": "10 Apr 2026 - 10 May 2026", "current": "10 May 2026 - 09 Jun 2026" }, "type": [ "array", "null" ], "items": [] }, "statistics": { "readOnly": true, "example": { "sales": { "previous": 27178.38, "current": 9697.53, "formatted_total": "$9,697.53", "progress": -64.32 }, "over_time": { "previous": [ { "label": "10 Apr", "total": "8526.82", "count": 12 } ], "current": [ { "label": "10 May", "total": "8500.00", "count": 12 } ] } }, "type": [ "object", "null" ], "additionalProperties": [] } } }, "AdminReportingSales.xlsx": { "type": "object", "description": "Admin reporting — sales (read-only).\n\nREST : GET /api/admin/reporting/sales\nGraphQL: adminReportingSales query\n\nMirrors `Reporting/SaleController::stats()`. `?type=`:\n total-sales (default), average-sales, total-orders, purchase-funnel,\n abandoned-carts, refunds, tax-collected, shipping-collected,\n top-payment-methods, sales-by-coupon.", "properties": { "entity": { "readOnly": true, "type": [ "string", "null" ] }, "type": { "readOnly": true, "type": [ "string", "null" ] }, "dateRange": { "readOnly": true, "example": { "previous": "10 Apr 2026 - 10 May 2026", "current": "10 May 2026 - 09 Jun 2026" }, "type": [ "array", "null" ], "items": [] }, "statistics": { "readOnly": true, "example": { "sales": { "previous": 27178.38, "current": 9697.53, "formatted_total": "$9,697.53", "progress": -64.32 }, "over_time": { "previous": [ { "label": "10 Apr", "total": "8526.82", "count": 12 } ], "current": [ { "label": "10 May", "total": "8500.00", "count": 12 } ] } }, "type": [ "object", "null" ], "additionalProperties": [] } } }, "AdminReturn": { "type": "object", "properties": { "id": { "type": [ "integer", "null" ] }, "orderId": { "type": [ "integer", "null" ] }, "orderIncrementId": { "type": [ "string", "null" ] }, "orderStatus": { "type": [ "string", "null" ] }, "customerName": { "type": [ "string", "null" ] }, "customerEmail": { "type": [ "string", "null" ] }, "isGuest": { "type": [ "integer", "null" ] }, "statusId": { "type": [ "integer", "null" ] }, "statusTitle": { "type": [ "string", "null" ] }, "statusColor": { "type": [ "string", "null" ] }, "packageCondition": { "type": [ "string", "null" ] }, "information": { "type": [ "string", "null" ] }, "canReopen": { "type": [ "boolean", "null" ] }, "item": { "type": "object" }, "images": { "type": "array" }, "availableStatuses": { "type": "array" }, "messagesCount": { "type": [ "integer", "null" ] }, "createdAt": { "type": [ "string", "null" ] }, "updatedAt": { "type": [ "string", "null" ] } } }, "AdminReturn.html": { "type": "object", "properties": { "id": { "type": [ "integer", "null" ] }, "orderId": { "type": [ "integer", "null" ] }, "orderIncrementId": { "type": [ "string", "null" ] }, "orderStatus": { "type": [ "string", "null" ] }, "customerName": { "type": [ "string", "null" ] }, "customerEmail": { "type": [ "string", "null" ] }, "isGuest": { "type": [ "integer", "null" ] }, "statusId": { "type": [ "integer", "null" ] }, "statusTitle": { "type": [ "string", "null" ] }, "statusColor": { "type": [ "string", "null" ] }, "packageCondition": { "type": [ "string", "null" ] }, "information": { "type": [ "string", "null" ] }, "canReopen": { "type": [ "boolean", "null" ] }, "item": { "type": "object" }, "images": { "type": "array" }, "availableStatuses": { "type": "array" }, "messagesCount": { "type": [ "integer", "null" ] }, "createdAt": { "type": [ "string", "null" ] }, "updatedAt": { "type": [ "string", "null" ] } } }, "AdminRmaCustomFieldMassDelete": { "type": "object", "properties": { "id": { "type": [ "integer", "null" ] }, "deleted": { "type": [ "array", "null" ], "items": { "type": "integer" } }, "message": { "type": [ "string", "null" ] } } }, "AdminRmaCustomFieldMassDelete.html": { "type": "object", "properties": { "id": { "type": [ "integer", "null" ] }, "deleted": { "type": [ "array", "null" ], "items": { "type": "integer" } }, "message": { "type": [ "string", "null" ] } } }, "AdminRmaCustomFieldMassUpdateStatus": { "type": "object", "properties": { "id": { "type": [ "integer", "null" ] }, "updated": { "type": [ "array", "null" ], "items": { "type": "integer" } }, "message": { "type": [ "string", "null" ] } } }, "AdminRmaCustomFieldMassUpdateStatus.html": { "type": "object", "properties": { "id": { "type": [ "integer", "null" ] }, "updated": { "type": [ "array", "null" ], "items": { "type": "integer" } }, "message": { "type": [ "string", "null" ] } } }, "AdminRmaReasonMassDelete": { "type": "object", "properties": { "id": { "type": [ "integer", "null" ] }, "deleted": { "type": [ "array", "null" ], "items": { "type": "integer" } }, "message": { "type": [ "string", "null" ] } } }, "AdminRmaReasonMassDelete.html": { "type": "object", "properties": { "id": { "type": [ "integer", "null" ] }, "deleted": { "type": [ "array", "null" ], "items": { "type": "integer" } }, "message": { "type": [ "string", "null" ] } } }, "AdminRmaReasonMassUpdateStatus": { "type": "object", "properties": { "id": { "type": [ "integer", "null" ] }, "updated": { "type": [ "array", "null" ], "items": { "type": "integer" } }, "message": { "type": [ "string", "null" ] } } }, "AdminRmaReasonMassUpdateStatus.html": { "type": "object", "properties": { "id": { "type": [ "integer", "null" ] }, "updated": { "type": [ "array", "null" ], "items": { "type": "integer" } }, "message": { "type": [ "string", "null" ] } } }, "AdminRmaRuleMassDelete": { "type": "object", "properties": { "id": { "type": [ "integer", "null" ] }, "deleted": { "type": [ "array", "null" ], "items": { "type": "integer" } }, "message": { "type": [ "string", "null" ] } } }, "AdminRmaRuleMassDelete.html": { "type": "object", "properties": { "id": { "type": [ "integer", "null" ] }, "deleted": { "type": [ "array", "null" ], "items": { "type": "integer" } }, "message": { "type": [ "string", "null" ] } } }, "AdminRmaRuleMassUpdateStatus": { "type": "object", "properties": { "id": { "type": [ "integer", "null" ] }, "updated": { "type": [ "array", "null" ], "items": { "type": "integer" } }, "message": { "type": [ "string", "null" ] } } }, "AdminRmaRuleMassUpdateStatus.html": { "type": "object", "properties": { "id": { "type": [ "integer", "null" ] }, "updated": { "type": [ "array", "null" ], "items": { "type": "integer" } }, "message": { "type": [ "string", "null" ] } } }, "AdminRmaStatusMassDelete": { "type": "object", "properties": { "id": { "type": [ "integer", "null" ] }, "deleted": { "type": [ "array", "null" ], "items": { "type": "integer" } }, "message": { "type": [ "string", "null" ] } } }, "AdminRmaStatusMassDelete.html": { "type": "object", "properties": { "id": { "type": [ "integer", "null" ] }, "deleted": { "type": [ "array", "null" ], "items": { "type": "integer" } }, "message": { "type": [ "string", "null" ] } } }, "AdminRmaStatusMassUpdateStatus": { "type": "object", "properties": { "id": { "type": [ "integer", "null" ] }, "updated": { "type": [ "array", "null" ], "items": { "type": "integer" } }, "message": { "type": [ "string", "null" ] } } }, "AdminRmaStatusMassUpdateStatus.html": { "type": "object", "properties": { "id": { "type": [ "integer", "null" ] }, "updated": { "type": [ "array", "null" ], "items": { "type": "integer" } }, "message": { "type": [ "string", "null" ] } } }, "AdminSettingsChannel.AdminSettingsChannelRestDto": { "type": "object", "description": "Admin Settings → Channels endpoints (Block B Wave 2; objectified 2026-06-22).\n\nBare Eloquent `#[ApiResource]` parent. Nested data is field-selectable:\n GraphQL → `translations`/`locales`/`currencies`/`inventorySources` Relay\n connections + `homeSeo` typed object.\n REST → the same data as flat arrays of objects (no connections).\n\nREST shape stays flat via `output: AdminSettingsChannelRestDto`; GraphQL ops\ncarry NO output so they return this Eloquent model → connections resolve.\n\nBREAKING (user-approved): the old scalar `localeIds`/`currencyIds`/\n`inventorySourceIds` int arrays are REPLACED by the `locales`/`currencies`/\n`inventorySources` object connections (GraphQL) / object arrays (REST).\n\nREST:\n GET /api/admin/settings/channels — datagrid-parity listing\n GET /api/admin/settings/channels/{id} — detail\n POST /api/admin/settings/channels — create\n PUT /api/admin/settings/channels/{id} — update (translatable via translations map)\n DELETE /api/admin/settings/channels/{id} — delete (guards: last channel, app.channel)\n\nGraphQL:\n adminSettingsChannels / adminSettingsChannel(id:)\n createAdminSettingsChannel / updateAdminSettingsChannel / deleteAdminSettingsChannel\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\ChannelController 1:1.\nImage upload (logo/favicon) is not supported yet; an update keeps the current images.", "properties": { "id": { "readOnly": true, "type": [ "integer", "null" ] }, "code": { "readOnly": true, "type": [ "string", "null" ] }, "name": { "readOnly": true, "type": [ "string", "null" ] }, "description": { "readOnly": true, "type": [ "string", "null" ] }, "hostname": { "readOnly": true, "type": [ "string", "null" ] }, "theme": { "readOnly": true, "type": [ "string", "null" ] }, "timezone": { "readOnly": true, "type": [ "string", "null" ] }, "defaultLocaleId": { "readOnly": true, "type": [ "integer", "null" ] }, "baseCurrencyId": { "readOnly": true, "type": [ "integer", "null" ] }, "rootCategoryId": { "readOnly": true, "type": [ "integer", "null" ] }, "isMaintenanceOn": { "readOnly": true, "type": [ "boolean", "null" ] }, "maintenanceModeText": { "readOnly": true, "type": [ "string", "null" ] }, "allowedIps": { "readOnly": true, "type": [ "array", "null" ], "items": { "type": "string" } }, "logo": { "readOnly": true, "type": [ "string", "null" ] }, "logoUrl": { "readOnly": true, "type": [ "string", "null" ] }, "favicon": { "readOnly": true, "type": [ "string", "null" ] }, "faviconUrl": { "readOnly": true, "type": [ "string", "null" ] }, "locales": { "readOnly": true, "type": [ "array", "null" ], "items": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "integer" }, { "type": "string" }, { "type": "null" } ] } } }, "currencies": { "readOnly": true, "type": [ "array", "null" ], "items": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "integer" }, { "type": "string" }, { "type": "null" } ] } } }, "inventorySources": { "readOnly": true, "type": [ "array", "null" ], "items": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "integer" }, { "type": "string" }, { "type": "null" } ] } } }, "homeSeo": { "readOnly": true, "type": [ "object", "null" ], "additionalProperties": [] }, "translations": { "readOnly": true, "type": [ "array", "null" ], "items": { "type": "object", "additionalProperties": [] } }, "createdAt": { "readOnly": true, "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "type": [ "string", "null" ] } } }, "AdminSettingsChannel.AdminSettingsChannelRestDto.html": { "type": "object", "description": "Admin Settings → Channels endpoints (Block B Wave 2; objectified 2026-06-22).\n\nBare Eloquent `#[ApiResource]` parent. Nested data is field-selectable:\n GraphQL → `translations`/`locales`/`currencies`/`inventorySources` Relay\n connections + `homeSeo` typed object.\n REST → the same data as flat arrays of objects (no connections).\n\nREST shape stays flat via `output: AdminSettingsChannelRestDto`; GraphQL ops\ncarry NO output so they return this Eloquent model → connections resolve.\n\nBREAKING (user-approved): the old scalar `localeIds`/`currencyIds`/\n`inventorySourceIds` int arrays are REPLACED by the `locales`/`currencies`/\n`inventorySources` object connections (GraphQL) / object arrays (REST).\n\nREST:\n GET /api/admin/settings/channels — datagrid-parity listing\n GET /api/admin/settings/channels/{id} — detail\n POST /api/admin/settings/channels — create\n PUT /api/admin/settings/channels/{id} — update (translatable via translations map)\n DELETE /api/admin/settings/channels/{id} — delete (guards: last channel, app.channel)\n\nGraphQL:\n adminSettingsChannels / adminSettingsChannel(id:)\n createAdminSettingsChannel / updateAdminSettingsChannel / deleteAdminSettingsChannel\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\ChannelController 1:1.\nImage upload (logo/favicon) is not supported yet; an update keeps the current images.", "properties": { "id": { "readOnly": true, "type": [ "integer", "null" ] }, "code": { "readOnly": true, "type": [ "string", "null" ] }, "name": { "readOnly": true, "type": [ "string", "null" ] }, "description": { "readOnly": true, "type": [ "string", "null" ] }, "hostname": { "readOnly": true, "type": [ "string", "null" ] }, "theme": { "readOnly": true, "type": [ "string", "null" ] }, "timezone": { "readOnly": true, "type": [ "string", "null" ] }, "defaultLocaleId": { "readOnly": true, "type": [ "integer", "null" ] }, "baseCurrencyId": { "readOnly": true, "type": [ "integer", "null" ] }, "rootCategoryId": { "readOnly": true, "type": [ "integer", "null" ] }, "isMaintenanceOn": { "readOnly": true, "type": [ "boolean", "null" ] }, "maintenanceModeText": { "readOnly": true, "type": [ "string", "null" ] }, "allowedIps": { "readOnly": true, "type": [ "array", "null" ], "items": { "type": "string" } }, "logo": { "readOnly": true, "type": [ "string", "null" ] }, "logoUrl": { "readOnly": true, "type": [ "string", "null" ] }, "favicon": { "readOnly": true, "type": [ "string", "null" ] }, "faviconUrl": { "readOnly": true, "type": [ "string", "null" ] }, "locales": { "readOnly": true, "type": [ "array", "null" ], "items": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "integer" }, { "type": "string" }, { "type": "null" } ] } } }, "currencies": { "readOnly": true, "type": [ "array", "null" ], "items": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "integer" }, { "type": "string" }, { "type": "null" } ] } } }, "inventorySources": { "readOnly": true, "type": [ "array", "null" ], "items": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "integer" }, { "type": "string" }, { "type": "null" } ] } } }, "homeSeo": { "readOnly": true, "type": [ "object", "null" ], "additionalProperties": [] }, "translations": { "readOnly": true, "type": [ "array", "null" ], "items": { "type": "object", "additionalProperties": [] } }, "createdAt": { "readOnly": true, "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "type": [ "string", "null" ] } } }, "AdminSettingsCurrency": { "type": "object", "description": "Admin Settings → Currencies endpoints (Block B Wave 1).\n\nREST:\n GET /api/admin/settings/currencies — datagrid-parity listing\n GET /api/admin/settings/currencies/{id} — detail\n POST /api/admin/settings/currencies — create\n PUT /api/admin/settings/currencies/{id} — update\n DELETE /api/admin/settings/currencies/{id} — delete (guards: last currency, channel base)\n\nGraphQL:\n adminSettingsCurrencies — cursor listing\n adminSettingsCurrency(id:) — detail\n createAdminSettingsCurrency — create\n updateAdminSettingsCurrency — update\n deleteAdminSettingsCurrency — delete\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\CurrencyController 1:1.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "code": { "readOnly": true, "example": "USD", "type": [ "string", "null" ] }, "name": { "readOnly": true, "example": "US Dollar", "type": [ "string", "null" ] }, "symbol": { "readOnly": true, "example": "$", "type": [ "string", "null" ] }, "decimal": { "readOnly": true, "example": 2, "type": [ "integer", "null" ] }, "groupSeparator": { "readOnly": true, "example": ",", "type": [ "string", "null" ] }, "decimalSeparator": { "readOnly": true, "example": ".", "type": [ "string", "null" ] }, "currencyPosition": { "readOnly": true, "example": "left", "type": [ "string", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "message": { "readOnly": true, "example": "Currency deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsCurrency.html": { "type": "object", "description": "Admin Settings → Currencies endpoints (Block B Wave 1).\n\nREST:\n GET /api/admin/settings/currencies — datagrid-parity listing\n GET /api/admin/settings/currencies/{id} — detail\n POST /api/admin/settings/currencies — create\n PUT /api/admin/settings/currencies/{id} — update\n DELETE /api/admin/settings/currencies/{id} — delete (guards: last currency, channel base)\n\nGraphQL:\n adminSettingsCurrencies — cursor listing\n adminSettingsCurrency(id:) — detail\n createAdminSettingsCurrency — create\n updateAdminSettingsCurrency — update\n deleteAdminSettingsCurrency — delete\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\CurrencyController 1:1.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "code": { "readOnly": true, "example": "USD", "type": [ "string", "null" ] }, "name": { "readOnly": true, "example": "US Dollar", "type": [ "string", "null" ] }, "symbol": { "readOnly": true, "example": "$", "type": [ "string", "null" ] }, "decimal": { "readOnly": true, "example": 2, "type": [ "integer", "null" ] }, "groupSeparator": { "readOnly": true, "example": ",", "type": [ "string", "null" ] }, "decimalSeparator": { "readOnly": true, "example": ".", "type": [ "string", "null" ] }, "currencyPosition": { "readOnly": true, "example": "left", "type": [ "string", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "message": { "readOnly": true, "example": "Currency deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsDataTransferImport": { "type": "object", "description": "Admin Settings → Data Transfer Imports (Block B Wave 3).\n\nREST:\n GET /api/admin/settings/data-transfer/imports — listing\n GET /api/admin/settings/data-transfer/imports/{id} — detail\n DELETE /api/admin/settings/data-transfer/imports/{id} — delete (DB row + file)\n\nGraphQL:\n adminSettingsDataTransferImports — cursor listing\n adminSettingsDataTransferImport(id:) — detail\n deleteAdminSettingsDataTransferImport — delete\n\nCancel action lives on the sibling resource AdminSettingsDataTransferImportCancel\n(POST /api/admin/settings/data-transfer/imports/{id}/cancel + cancel mutation).\n\nCreate endpoint deferred — file upload + async queue dispatch will land in a\nfollow-up. Use the Bagisto admin panel for now. Mirrors the deferral pattern\ndocumented for Phase 5.11 product images and the AdminSettingsChannel logo.\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\DataTransfer\\ImportController\nfor listing, detail, cancel and delete actions.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "code": { "readOnly": true, "example": "products", "type": [ "string", "null" ] }, "action": { "readOnly": true, "example": "append", "type": [ "string", "null" ] }, "state": { "readOnly": true, "example": "pending", "type": [ "string", "null" ] }, "processInQueue": { "readOnly": true, "example": false, "type": [ "boolean", "null" ] }, "validationStrategy": { "readOnly": true, "example": "stop-on-errors", "type": [ "string", "null" ] }, "allowedErrors": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "processedRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "invalidRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errorsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errors": { "readOnly": true, "type": [ "array", "null" ], "items": [] }, "fieldSeparator": { "readOnly": true, "example": ",", "type": [ "string", "null" ] }, "filePath": { "readOnly": true, "example": "imports/6f1a_products.csv", "type": [ "string", "null" ] }, "imagesDirectoryPath": { "readOnly": true, "example": "product/images", "type": [ "string", "null" ] }, "imageSource": { "readOnly": true, "description": "Where a product import reads its images from: url, upload or directory.", "type": [ "string", "null" ] }, "imagesArchiveName": { "readOnly": true, "description": "Name of the images archive uploaded for this import, when its images came from an upload.", "type": [ "string", "null" ] }, "errorFilePath": { "readOnly": true, "type": [ "string", "null" ] }, "summary": { "readOnly": true, "example": { "created": 0, "updated": 0, "deleted": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "startedAt": { "readOnly": true, "type": [ "string", "null" ] }, "completedAt": { "readOnly": true, "type": [ "string", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "success": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "isValid": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "stats": { "readOnly": true, "example": { "processed": 120, "total": 120, "invalid": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "message": { "readOnly": true, "example": "Import deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsDataTransferImport.html": { "type": "object", "description": "Admin Settings → Data Transfer Imports (Block B Wave 3).\n\nREST:\n GET /api/admin/settings/data-transfer/imports — listing\n GET /api/admin/settings/data-transfer/imports/{id} — detail\n DELETE /api/admin/settings/data-transfer/imports/{id} — delete (DB row + file)\n\nGraphQL:\n adminSettingsDataTransferImports — cursor listing\n adminSettingsDataTransferImport(id:) — detail\n deleteAdminSettingsDataTransferImport — delete\n\nCancel action lives on the sibling resource AdminSettingsDataTransferImportCancel\n(POST /api/admin/settings/data-transfer/imports/{id}/cancel + cancel mutation).\n\nCreate endpoint deferred — file upload + async queue dispatch will land in a\nfollow-up. Use the Bagisto admin panel for now. Mirrors the deferral pattern\ndocumented for Phase 5.11 product images and the AdminSettingsChannel logo.\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\DataTransfer\\ImportController\nfor listing, detail, cancel and delete actions.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "code": { "readOnly": true, "example": "products", "type": [ "string", "null" ] }, "action": { "readOnly": true, "example": "append", "type": [ "string", "null" ] }, "state": { "readOnly": true, "example": "pending", "type": [ "string", "null" ] }, "processInQueue": { "readOnly": true, "example": false, "type": [ "boolean", "null" ] }, "validationStrategy": { "readOnly": true, "example": "stop-on-errors", "type": [ "string", "null" ] }, "allowedErrors": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "processedRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "invalidRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errorsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errors": { "readOnly": true, "type": [ "array", "null" ], "items": [] }, "fieldSeparator": { "readOnly": true, "example": ",", "type": [ "string", "null" ] }, "filePath": { "readOnly": true, "example": "imports/6f1a_products.csv", "type": [ "string", "null" ] }, "imagesDirectoryPath": { "readOnly": true, "example": "product/images", "type": [ "string", "null" ] }, "imageSource": { "readOnly": true, "description": "Where a product import reads its images from: url, upload or directory.", "type": [ "string", "null" ] }, "imagesArchiveName": { "readOnly": true, "description": "Name of the images archive uploaded for this import, when its images came from an upload.", "type": [ "string", "null" ] }, "errorFilePath": { "readOnly": true, "type": [ "string", "null" ] }, "summary": { "readOnly": true, "example": { "created": 0, "updated": 0, "deleted": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "startedAt": { "readOnly": true, "type": [ "string", "null" ] }, "completedAt": { "readOnly": true, "type": [ "string", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "success": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "isValid": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "stats": { "readOnly": true, "example": { "processed": 120, "total": 120, "invalid": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "message": { "readOnly": true, "example": "Import deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsDataTransferImportDownload.binary": { "type": "object", "description": "Binary download endpoints (REST-only — binary streams aren't transportable\nover JSON GraphQL):\n GET /settings/data-transfer/imports/{id}/download\n GET /settings/data-transfer/imports/{id}/download-error-report\n GET /settings/data-transfer/imports/sample/{type}/{format}\n GET /settings/data-transfer/imports/sample-images/{type}\n\nAll four respond with application/octet-stream attachments. The `id`\nrequirement keeps the literal sample/{type}/{format} route from colliding.", "properties": { "id": { "readOnly": true, "type": [ "integer", "null" ] } } }, "AdminSettingsDataTransferImportIndex.AdminSettingsDataTransferImport": { "type": "object", "description": "POST /api/admin/settings/data-transfer/imports/{id}/index\n+ indexAdminSettingsDataTransferImportIndex mutation.\n\nIndexes one linked batch and returns { stats, import }. Permission:\nsettings.data_transfer.imports.import.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "code": { "readOnly": true, "example": "products", "type": [ "string", "null" ] }, "action": { "readOnly": true, "example": "append", "type": [ "string", "null" ] }, "state": { "readOnly": true, "example": "pending", "type": [ "string", "null" ] }, "processInQueue": { "readOnly": true, "example": false, "type": [ "boolean", "null" ] }, "validationStrategy": { "readOnly": true, "example": "stop-on-errors", "type": [ "string", "null" ] }, "allowedErrors": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "processedRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "invalidRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errorsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errors": { "readOnly": true, "type": [ "array", "null" ], "items": [] }, "fieldSeparator": { "readOnly": true, "example": ",", "type": [ "string", "null" ] }, "filePath": { "readOnly": true, "example": "imports/6f1a_products.csv", "type": [ "string", "null" ] }, "imagesDirectoryPath": { "readOnly": true, "example": "product/images", "type": [ "string", "null" ] }, "imageSource": { "readOnly": true, "description": "Where a product import reads its images from: url, upload or directory.", "type": [ "string", "null" ] }, "imagesArchiveName": { "readOnly": true, "description": "Name of the images archive uploaded for this import, when its images came from an upload.", "type": [ "string", "null" ] }, "errorFilePath": { "readOnly": true, "type": [ "string", "null" ] }, "summary": { "readOnly": true, "example": { "created": 0, "updated": 0, "deleted": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "startedAt": { "readOnly": true, "type": [ "string", "null" ] }, "completedAt": { "readOnly": true, "type": [ "string", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "success": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "isValid": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "stats": { "readOnly": true, "example": { "processed": 120, "total": 120, "invalid": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "message": { "readOnly": true, "example": "Import deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsDataTransferImportIndex.AdminSettingsDataTransferImport.html": { "type": "object", "description": "POST /api/admin/settings/data-transfer/imports/{id}/index\n+ indexAdminSettingsDataTransferImportIndex mutation.\n\nIndexes one linked batch and returns { stats, import }. Permission:\nsettings.data_transfer.imports.import.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "code": { "readOnly": true, "example": "products", "type": [ "string", "null" ] }, "action": { "readOnly": true, "example": "append", "type": [ "string", "null" ] }, "state": { "readOnly": true, "example": "pending", "type": [ "string", "null" ] }, "processInQueue": { "readOnly": true, "example": false, "type": [ "boolean", "null" ] }, "validationStrategy": { "readOnly": true, "example": "stop-on-errors", "type": [ "string", "null" ] }, "allowedErrors": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "processedRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "invalidRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errorsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errors": { "readOnly": true, "type": [ "array", "null" ], "items": [] }, "fieldSeparator": { "readOnly": true, "example": ",", "type": [ "string", "null" ] }, "filePath": { "readOnly": true, "example": "imports/6f1a_products.csv", "type": [ "string", "null" ] }, "imagesDirectoryPath": { "readOnly": true, "example": "product/images", "type": [ "string", "null" ] }, "imageSource": { "readOnly": true, "description": "Where a product import reads its images from: url, upload or directory.", "type": [ "string", "null" ] }, "imagesArchiveName": { "readOnly": true, "description": "Name of the images archive uploaded for this import, when its images came from an upload.", "type": [ "string", "null" ] }, "errorFilePath": { "readOnly": true, "type": [ "string", "null" ] }, "summary": { "readOnly": true, "example": { "created": 0, "updated": 0, "deleted": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "startedAt": { "readOnly": true, "type": [ "string", "null" ] }, "completedAt": { "readOnly": true, "type": [ "string", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "success": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "isValid": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "stats": { "readOnly": true, "example": { "processed": 120, "total": 120, "invalid": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "message": { "readOnly": true, "example": "Import deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsDataTransferImportLink.AdminSettingsDataTransferImport": { "type": "object", "description": "POST /api/admin/settings/data-transfer/imports/{id}/link\n+ linkAdminSettingsDataTransferImportLink mutation.\n\nLinks one processed batch and returns { stats, import }. Permission:\nsettings.data_transfer.imports.import.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "code": { "readOnly": true, "example": "products", "type": [ "string", "null" ] }, "action": { "readOnly": true, "example": "append", "type": [ "string", "null" ] }, "state": { "readOnly": true, "example": "pending", "type": [ "string", "null" ] }, "processInQueue": { "readOnly": true, "example": false, "type": [ "boolean", "null" ] }, "validationStrategy": { "readOnly": true, "example": "stop-on-errors", "type": [ "string", "null" ] }, "allowedErrors": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "processedRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "invalidRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errorsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errors": { "readOnly": true, "type": [ "array", "null" ], "items": [] }, "fieldSeparator": { "readOnly": true, "example": ",", "type": [ "string", "null" ] }, "filePath": { "readOnly": true, "example": "imports/6f1a_products.csv", "type": [ "string", "null" ] }, "imagesDirectoryPath": { "readOnly": true, "example": "product/images", "type": [ "string", "null" ] }, "imageSource": { "readOnly": true, "description": "Where a product import reads its images from: url, upload or directory.", "type": [ "string", "null" ] }, "imagesArchiveName": { "readOnly": true, "description": "Name of the images archive uploaded for this import, when its images came from an upload.", "type": [ "string", "null" ] }, "errorFilePath": { "readOnly": true, "type": [ "string", "null" ] }, "summary": { "readOnly": true, "example": { "created": 0, "updated": 0, "deleted": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "startedAt": { "readOnly": true, "type": [ "string", "null" ] }, "completedAt": { "readOnly": true, "type": [ "string", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "success": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "isValid": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "stats": { "readOnly": true, "example": { "processed": 120, "total": 120, "invalid": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "message": { "readOnly": true, "example": "Import deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsDataTransferImportLink.AdminSettingsDataTransferImport.html": { "type": "object", "description": "POST /api/admin/settings/data-transfer/imports/{id}/link\n+ linkAdminSettingsDataTransferImportLink mutation.\n\nLinks one processed batch and returns { stats, import }. Permission:\nsettings.data_transfer.imports.import.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "code": { "readOnly": true, "example": "products", "type": [ "string", "null" ] }, "action": { "readOnly": true, "example": "append", "type": [ "string", "null" ] }, "state": { "readOnly": true, "example": "pending", "type": [ "string", "null" ] }, "processInQueue": { "readOnly": true, "example": false, "type": [ "boolean", "null" ] }, "validationStrategy": { "readOnly": true, "example": "stop-on-errors", "type": [ "string", "null" ] }, "allowedErrors": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "processedRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "invalidRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errorsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errors": { "readOnly": true, "type": [ "array", "null" ], "items": [] }, "fieldSeparator": { "readOnly": true, "example": ",", "type": [ "string", "null" ] }, "filePath": { "readOnly": true, "example": "imports/6f1a_products.csv", "type": [ "string", "null" ] }, "imagesDirectoryPath": { "readOnly": true, "example": "product/images", "type": [ "string", "null" ] }, "imageSource": { "readOnly": true, "description": "Where a product import reads its images from: url, upload or directory.", "type": [ "string", "null" ] }, "imagesArchiveName": { "readOnly": true, "description": "Name of the images archive uploaded for this import, when its images came from an upload.", "type": [ "string", "null" ] }, "errorFilePath": { "readOnly": true, "type": [ "string", "null" ] }, "summary": { "readOnly": true, "example": { "created": 0, "updated": 0, "deleted": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "startedAt": { "readOnly": true, "type": [ "string", "null" ] }, "completedAt": { "readOnly": true, "type": [ "string", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "success": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "isValid": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "stats": { "readOnly": true, "example": { "processed": 120, "total": 120, "invalid": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "message": { "readOnly": true, "example": "Import deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsDataTransferImportStart.AdminSettingsDataTransferImport": { "type": "object", "description": "POST /api/admin/settings/data-transfer/imports/{id}/start\n+ startAdminSettingsDataTransferImportStart mutation.\n\nRuns one batch of the import (or kicks off the queue when process_in_queue is\nset) and returns { stats, import }. Guards: nothing-to-import (400), not-valid\n(400), setup-queue-error (400). Permission: settings.data_transfer.imports.import.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "code": { "readOnly": true, "example": "products", "type": [ "string", "null" ] }, "action": { "readOnly": true, "example": "append", "type": [ "string", "null" ] }, "state": { "readOnly": true, "example": "pending", "type": [ "string", "null" ] }, "processInQueue": { "readOnly": true, "example": false, "type": [ "boolean", "null" ] }, "validationStrategy": { "readOnly": true, "example": "stop-on-errors", "type": [ "string", "null" ] }, "allowedErrors": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "processedRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "invalidRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errorsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errors": { "readOnly": true, "type": [ "array", "null" ], "items": [] }, "fieldSeparator": { "readOnly": true, "example": ",", "type": [ "string", "null" ] }, "filePath": { "readOnly": true, "example": "imports/6f1a_products.csv", "type": [ "string", "null" ] }, "imagesDirectoryPath": { "readOnly": true, "example": "product/images", "type": [ "string", "null" ] }, "imageSource": { "readOnly": true, "description": "Where a product import reads its images from: url, upload or directory.", "type": [ "string", "null" ] }, "imagesArchiveName": { "readOnly": true, "description": "Name of the images archive uploaded for this import, when its images came from an upload.", "type": [ "string", "null" ] }, "errorFilePath": { "readOnly": true, "type": [ "string", "null" ] }, "summary": { "readOnly": true, "example": { "created": 0, "updated": 0, "deleted": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "startedAt": { "readOnly": true, "type": [ "string", "null" ] }, "completedAt": { "readOnly": true, "type": [ "string", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "success": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "isValid": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "stats": { "readOnly": true, "example": { "processed": 120, "total": 120, "invalid": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "message": { "readOnly": true, "example": "Import deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsDataTransferImportStart.AdminSettingsDataTransferImport.html": { "type": "object", "description": "POST /api/admin/settings/data-transfer/imports/{id}/start\n+ startAdminSettingsDataTransferImportStart mutation.\n\nRuns one batch of the import (or kicks off the queue when process_in_queue is\nset) and returns { stats, import }. Guards: nothing-to-import (400), not-valid\n(400), setup-queue-error (400). Permission: settings.data_transfer.imports.import.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "code": { "readOnly": true, "example": "products", "type": [ "string", "null" ] }, "action": { "readOnly": true, "example": "append", "type": [ "string", "null" ] }, "state": { "readOnly": true, "example": "pending", "type": [ "string", "null" ] }, "processInQueue": { "readOnly": true, "example": false, "type": [ "boolean", "null" ] }, "validationStrategy": { "readOnly": true, "example": "stop-on-errors", "type": [ "string", "null" ] }, "allowedErrors": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "processedRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "invalidRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errorsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errors": { "readOnly": true, "type": [ "array", "null" ], "items": [] }, "fieldSeparator": { "readOnly": true, "example": ",", "type": [ "string", "null" ] }, "filePath": { "readOnly": true, "example": "imports/6f1a_products.csv", "type": [ "string", "null" ] }, "imagesDirectoryPath": { "readOnly": true, "example": "product/images", "type": [ "string", "null" ] }, "imageSource": { "readOnly": true, "description": "Where a product import reads its images from: url, upload or directory.", "type": [ "string", "null" ] }, "imagesArchiveName": { "readOnly": true, "description": "Name of the images archive uploaded for this import, when its images came from an upload.", "type": [ "string", "null" ] }, "errorFilePath": { "readOnly": true, "type": [ "string", "null" ] }, "summary": { "readOnly": true, "example": { "created": 0, "updated": 0, "deleted": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "startedAt": { "readOnly": true, "type": [ "string", "null" ] }, "completedAt": { "readOnly": true, "type": [ "string", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "success": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "isValid": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "stats": { "readOnly": true, "example": { "processed": 120, "total": 120, "invalid": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "message": { "readOnly": true, "example": "Import deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsDataTransferImportStats.AdminSettingsDataTransferImport": { "type": "object", "description": "GET /api/admin/settings/data-transfer/imports/{id}/stats?state=\n+ adminSettingsDataTransferImportStats query.\n\nReturns the import detail plus the per-batch progress + summary block.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "code": { "readOnly": true, "example": "products", "type": [ "string", "null" ] }, "action": { "readOnly": true, "example": "append", "type": [ "string", "null" ] }, "state": { "readOnly": true, "example": "pending", "type": [ "string", "null" ] }, "processInQueue": { "readOnly": true, "example": false, "type": [ "boolean", "null" ] }, "validationStrategy": { "readOnly": true, "example": "stop-on-errors", "type": [ "string", "null" ] }, "allowedErrors": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "processedRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "invalidRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errorsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errors": { "readOnly": true, "type": [ "array", "null" ], "items": [] }, "fieldSeparator": { "readOnly": true, "example": ",", "type": [ "string", "null" ] }, "filePath": { "readOnly": true, "example": "imports/6f1a_products.csv", "type": [ "string", "null" ] }, "imagesDirectoryPath": { "readOnly": true, "example": "product/images", "type": [ "string", "null" ] }, "imageSource": { "readOnly": true, "description": "Where a product import reads its images from: url, upload or directory.", "type": [ "string", "null" ] }, "imagesArchiveName": { "readOnly": true, "description": "Name of the images archive uploaded for this import, when its images came from an upload.", "type": [ "string", "null" ] }, "errorFilePath": { "readOnly": true, "type": [ "string", "null" ] }, "summary": { "readOnly": true, "example": { "created": 0, "updated": 0, "deleted": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "startedAt": { "readOnly": true, "type": [ "string", "null" ] }, "completedAt": { "readOnly": true, "type": [ "string", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "success": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "isValid": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "stats": { "readOnly": true, "example": { "processed": 120, "total": 120, "invalid": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "message": { "readOnly": true, "example": "Import deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsDataTransferImportStats.AdminSettingsDataTransferImport.html": { "type": "object", "description": "GET /api/admin/settings/data-transfer/imports/{id}/stats?state=\n+ adminSettingsDataTransferImportStats query.\n\nReturns the import detail plus the per-batch progress + summary block.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "code": { "readOnly": true, "example": "products", "type": [ "string", "null" ] }, "action": { "readOnly": true, "example": "append", "type": [ "string", "null" ] }, "state": { "readOnly": true, "example": "pending", "type": [ "string", "null" ] }, "processInQueue": { "readOnly": true, "example": false, "type": [ "boolean", "null" ] }, "validationStrategy": { "readOnly": true, "example": "stop-on-errors", "type": [ "string", "null" ] }, "allowedErrors": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "processedRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "invalidRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errorsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errors": { "readOnly": true, "type": [ "array", "null" ], "items": [] }, "fieldSeparator": { "readOnly": true, "example": ",", "type": [ "string", "null" ] }, "filePath": { "readOnly": true, "example": "imports/6f1a_products.csv", "type": [ "string", "null" ] }, "imagesDirectoryPath": { "readOnly": true, "example": "product/images", "type": [ "string", "null" ] }, "imageSource": { "readOnly": true, "description": "Where a product import reads its images from: url, upload or directory.", "type": [ "string", "null" ] }, "imagesArchiveName": { "readOnly": true, "description": "Name of the images archive uploaded for this import, when its images came from an upload.", "type": [ "string", "null" ] }, "errorFilePath": { "readOnly": true, "type": [ "string", "null" ] }, "summary": { "readOnly": true, "example": { "created": 0, "updated": 0, "deleted": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "startedAt": { "readOnly": true, "type": [ "string", "null" ] }, "completedAt": { "readOnly": true, "type": [ "string", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "success": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "isValid": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "stats": { "readOnly": true, "example": { "processed": 120, "total": 120, "invalid": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "message": { "readOnly": true, "example": "Import deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsDataTransferImportValidate.AdminSettingsDataTransferImport": { "type": "object", "description": "POST /api/admin/settings/data-transfer/imports/{id}/validate\n+ validateAdminSettingsDataTransferImportValidate mutation.\n\nRuns the import validator and returns { is_valid, import } (mapped onto the\nAdminSettingsDataTransferImport output). Permission: settings.data_transfer.imports.import.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "code": { "readOnly": true, "example": "products", "type": [ "string", "null" ] }, "action": { "readOnly": true, "example": "append", "type": [ "string", "null" ] }, "state": { "readOnly": true, "example": "pending", "type": [ "string", "null" ] }, "processInQueue": { "readOnly": true, "example": false, "type": [ "boolean", "null" ] }, "validationStrategy": { "readOnly": true, "example": "stop-on-errors", "type": [ "string", "null" ] }, "allowedErrors": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "processedRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "invalidRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errorsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errors": { "readOnly": true, "type": [ "array", "null" ], "items": [] }, "fieldSeparator": { "readOnly": true, "example": ",", "type": [ "string", "null" ] }, "filePath": { "readOnly": true, "example": "imports/6f1a_products.csv", "type": [ "string", "null" ] }, "imagesDirectoryPath": { "readOnly": true, "example": "product/images", "type": [ "string", "null" ] }, "imageSource": { "readOnly": true, "description": "Where a product import reads its images from: url, upload or directory.", "type": [ "string", "null" ] }, "imagesArchiveName": { "readOnly": true, "description": "Name of the images archive uploaded for this import, when its images came from an upload.", "type": [ "string", "null" ] }, "errorFilePath": { "readOnly": true, "type": [ "string", "null" ] }, "summary": { "readOnly": true, "example": { "created": 0, "updated": 0, "deleted": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "startedAt": { "readOnly": true, "type": [ "string", "null" ] }, "completedAt": { "readOnly": true, "type": [ "string", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "success": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "isValid": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "stats": { "readOnly": true, "example": { "processed": 120, "total": 120, "invalid": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "message": { "readOnly": true, "example": "Import deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsDataTransferImportValidate.AdminSettingsDataTransferImport.html": { "type": "object", "description": "POST /api/admin/settings/data-transfer/imports/{id}/validate\n+ validateAdminSettingsDataTransferImportValidate mutation.\n\nRuns the import validator and returns { is_valid, import } (mapped onto the\nAdminSettingsDataTransferImport output). Permission: settings.data_transfer.imports.import.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "code": { "readOnly": true, "example": "products", "type": [ "string", "null" ] }, "action": { "readOnly": true, "example": "append", "type": [ "string", "null" ] }, "state": { "readOnly": true, "example": "pending", "type": [ "string", "null" ] }, "processInQueue": { "readOnly": true, "example": false, "type": [ "boolean", "null" ] }, "validationStrategy": { "readOnly": true, "example": "stop-on-errors", "type": [ "string", "null" ] }, "allowedErrors": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "processedRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "invalidRowsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errorsCount": { "readOnly": true, "example": 0, "type": [ "integer", "null" ] }, "errors": { "readOnly": true, "type": [ "array", "null" ], "items": [] }, "fieldSeparator": { "readOnly": true, "example": ",", "type": [ "string", "null" ] }, "filePath": { "readOnly": true, "example": "imports/6f1a_products.csv", "type": [ "string", "null" ] }, "imagesDirectoryPath": { "readOnly": true, "example": "product/images", "type": [ "string", "null" ] }, "imageSource": { "readOnly": true, "description": "Where a product import reads its images from: url, upload or directory.", "type": [ "string", "null" ] }, "imagesArchiveName": { "readOnly": true, "description": "Name of the images archive uploaded for this import, when its images came from an upload.", "type": [ "string", "null" ] }, "errorFilePath": { "readOnly": true, "type": [ "string", "null" ] }, "summary": { "readOnly": true, "example": { "created": 0, "updated": 0, "deleted": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "startedAt": { "readOnly": true, "type": [ "string", "null" ] }, "completedAt": { "readOnly": true, "type": [ "string", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "success": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "isValid": { "readOnly": true, "example": true, "type": [ "boolean", "null" ] }, "stats": { "readOnly": true, "example": { "processed": 120, "total": 120, "invalid": 0 }, "type": [ "object", "null" ], "additionalProperties": [] }, "message": { "readOnly": true, "example": "Import deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsExchangeRate": { "type": "object", "description": "Admin Settings → Exchange Rates endpoints (Block B Wave 1).\n\nREST:\n GET /api/admin/settings/exchange-rates\n GET /api/admin/settings/exchange-rates/{id}\n POST /api/admin/settings/exchange-rates\n PUT /api/admin/settings/exchange-rates/{id}\n DELETE /api/admin/settings/exchange-rates/{id}\n\nGraphQL: adminSettingsExchangeRates, adminSettingsExchangeRate,\n createAdminSettingsExchangeRate, updateAdminSettingsExchangeRate,\n deleteAdminSettingsExchangeRate\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\ExchangeRateController.\n\nNotes:\n - Bagisto's `currency_exchange_rates` table has no `source_currency` column.\n The source currency is implicit (the channel's base currency); only the\n target_currency + rate pair is stored. Composite uniqueness is therefore\n enforced on `target_currency` alone.\n - The admin UI's \"Mass Auto-Sync\" action (calls an external exchange-rates\n helper to refresh every row in bulk) is intentionally NOT exposed in v1.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "targetCurrency": { "readOnly": true, "example": 2, "type": [ "integer", "null" ] }, "targetCurrencyCode": { "readOnly": true, "example": "EUR", "type": [ "string", "null" ] }, "targetCurrencyName": { "readOnly": true, "example": "Euro", "type": [ "string", "null" ] }, "rate": { "readOnly": true, "example": 0.92, "type": [ "number", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "message": { "readOnly": true, "example": "Exchange rate deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsExchangeRate.html": { "type": "object", "description": "Admin Settings → Exchange Rates endpoints (Block B Wave 1).\n\nREST:\n GET /api/admin/settings/exchange-rates\n GET /api/admin/settings/exchange-rates/{id}\n POST /api/admin/settings/exchange-rates\n PUT /api/admin/settings/exchange-rates/{id}\n DELETE /api/admin/settings/exchange-rates/{id}\n\nGraphQL: adminSettingsExchangeRates, adminSettingsExchangeRate,\n createAdminSettingsExchangeRate, updateAdminSettingsExchangeRate,\n deleteAdminSettingsExchangeRate\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\ExchangeRateController.\n\nNotes:\n - Bagisto's `currency_exchange_rates` table has no `source_currency` column.\n The source currency is implicit (the channel's base currency); only the\n target_currency + rate pair is stored. Composite uniqueness is therefore\n enforced on `target_currency` alone.\n - The admin UI's \"Mass Auto-Sync\" action (calls an external exchange-rates\n helper to refresh every row in bulk) is intentionally NOT exposed in v1.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "targetCurrency": { "readOnly": true, "example": 2, "type": [ "integer", "null" ] }, "targetCurrencyCode": { "readOnly": true, "example": "EUR", "type": [ "string", "null" ] }, "targetCurrencyName": { "readOnly": true, "example": "Euro", "type": [ "string", "null" ] }, "rate": { "readOnly": true, "example": 0.92, "type": [ "number", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "message": { "readOnly": true, "example": "Exchange rate deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsInventorySource": { "type": "object", "description": "Admin Settings → Inventory Sources endpoints (Block B Wave 1).\n\nREST:\n GET /api/admin/settings/inventory-sources\n GET /api/admin/settings/inventory-sources/{id}\n POST /api/admin/settings/inventory-sources\n PUT /api/admin/settings/inventory-sources/{id}\n DELETE /api/admin/settings/inventory-sources/{id}\n\nGraphQL: adminSettingsInventorySources, adminSettingsInventorySource,\n createAdminSettingsInventorySource, updateAdminSettingsInventorySource,\n deleteAdminSettingsInventorySource\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\InventorySourceController.\n\nDelete guards (parity with monolith + API-specific FK guard):\n - 400 if this is the last remaining inventory source.\n - 400 if any product_inventories row references this source.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "code": { "readOnly": true, "example": "default", "type": [ "string", "null" ] }, "name": { "readOnly": true, "example": "Default Warehouse", "type": [ "string", "null" ] }, "description": { "readOnly": true, "example": "Primary fulfilment warehouse", "type": [ "string", "null" ] }, "contactName": { "readOnly": true, "example": "Jane Smith", "type": [ "string", "null" ] }, "contactEmail": { "readOnly": true, "example": "warehouse@example.com", "type": [ "string", "null" ] }, "contactNumber": { "readOnly": true, "example": "+1-555-0100", "type": [ "string", "null" ] }, "contactFax": { "readOnly": true, "example": "+1-555-0101", "type": [ "string", "null" ] }, "country": { "readOnly": true, "example": "US", "type": [ "string", "null" ] }, "state": { "readOnly": true, "example": "CA", "type": [ "string", "null" ] }, "city": { "readOnly": true, "example": "San Francisco", "type": [ "string", "null" ] }, "street": { "readOnly": true, "example": "123 Market St", "type": [ "string", "null" ] }, "postcode": { "readOnly": true, "example": "94103", "type": [ "string", "null" ] }, "priority": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "latitude": { "readOnly": true, "example": 37.7749, "type": [ "number", "null" ] }, "longitude": { "readOnly": true, "example": -122.4194, "type": [ "number", "null" ] }, "status": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "message": { "readOnly": true, "example": "Inventory source deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsInventorySource.html": { "type": "object", "description": "Admin Settings → Inventory Sources endpoints (Block B Wave 1).\n\nREST:\n GET /api/admin/settings/inventory-sources\n GET /api/admin/settings/inventory-sources/{id}\n POST /api/admin/settings/inventory-sources\n PUT /api/admin/settings/inventory-sources/{id}\n DELETE /api/admin/settings/inventory-sources/{id}\n\nGraphQL: adminSettingsInventorySources, adminSettingsInventorySource,\n createAdminSettingsInventorySource, updateAdminSettingsInventorySource,\n deleteAdminSettingsInventorySource\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\InventorySourceController.\n\nDelete guards (parity with monolith + API-specific FK guard):\n - 400 if this is the last remaining inventory source.\n - 400 if any product_inventories row references this source.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "code": { "readOnly": true, "example": "default", "type": [ "string", "null" ] }, "name": { "readOnly": true, "example": "Default Warehouse", "type": [ "string", "null" ] }, "description": { "readOnly": true, "example": "Primary fulfilment warehouse", "type": [ "string", "null" ] }, "contactName": { "readOnly": true, "example": "Jane Smith", "type": [ "string", "null" ] }, "contactEmail": { "readOnly": true, "example": "warehouse@example.com", "type": [ "string", "null" ] }, "contactNumber": { "readOnly": true, "example": "+1-555-0100", "type": [ "string", "null" ] }, "contactFax": { "readOnly": true, "example": "+1-555-0101", "type": [ "string", "null" ] }, "country": { "readOnly": true, "example": "US", "type": [ "string", "null" ] }, "state": { "readOnly": true, "example": "CA", "type": [ "string", "null" ] }, "city": { "readOnly": true, "example": "San Francisco", "type": [ "string", "null" ] }, "street": { "readOnly": true, "example": "123 Market St", "type": [ "string", "null" ] }, "postcode": { "readOnly": true, "example": "94103", "type": [ "string", "null" ] }, "priority": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "latitude": { "readOnly": true, "example": 37.7749, "type": [ "number", "null" ] }, "longitude": { "readOnly": true, "example": -122.4194, "type": [ "number", "null" ] }, "status": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "message": { "readOnly": true, "example": "Inventory source deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsRole": { "type": "object", "description": "Admin Settings → Roles endpoints (Block B Wave 2).\n\nREST:\n GET /api/admin/settings/roles\n GET /api/admin/settings/roles/{id}\n POST /api/admin/settings/roles\n PUT /api/admin/settings/roles/{id}\n DELETE /api/admin/settings/roles/{id} (guards: in-use, last-role)\n\nGraphQL:\n adminSettingsRoles / adminSettingsRole\n createAdminSettingsRole / updateAdminSettingsRole / deleteAdminSettingsRole\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\RoleController 1:1.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "name": { "readOnly": true, "example": "Administrator", "type": [ "string", "null" ] }, "description": { "readOnly": true, "example": "Full access to all modules", "type": [ "string", "null" ] }, "permissionType": { "readOnly": true, "example": "all", "type": [ "string", "null" ] }, "permissions": { "readOnly": true, "example": [ "catalog.products.create", "sales.orders.view" ], "type": [ "array", "null" ], "items": { "type": "string" } }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "message": { "readOnly": true, "example": "Role deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsRole.html": { "type": "object", "description": "Admin Settings → Roles endpoints (Block B Wave 2).\n\nREST:\n GET /api/admin/settings/roles\n GET /api/admin/settings/roles/{id}\n POST /api/admin/settings/roles\n PUT /api/admin/settings/roles/{id}\n DELETE /api/admin/settings/roles/{id} (guards: in-use, last-role)\n\nGraphQL:\n adminSettingsRoles / adminSettingsRole\n createAdminSettingsRole / updateAdminSettingsRole / deleteAdminSettingsRole\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\RoleController 1:1.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "name": { "readOnly": true, "example": "Administrator", "type": [ "string", "null" ] }, "description": { "readOnly": true, "example": "Full access to all modules", "type": [ "string", "null" ] }, "permissionType": { "readOnly": true, "example": "all", "type": [ "string", "null" ] }, "permissions": { "readOnly": true, "example": [ "catalog.products.create", "sales.orders.view" ], "type": [ "array", "null" ], "items": { "type": "string" } }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "message": { "readOnly": true, "example": "Role deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsTaxCategory": { "type": "object", "description": "Admin Settings → Tax Categories endpoints (Block B Wave 3).\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\Tax\\TaxCategoryController 1:1.\n\nREST:\n GET /api/admin/settings/tax-categories\n GET /api/admin/settings/tax-categories/{id}\n POST /api/admin/settings/tax-categories\n PUT /api/admin/settings/tax-categories/{id}\n DELETE /api/admin/settings/tax-categories/{id}\n\nGraphQL:\n adminSettingsTaxCategories — cursor listing\n adminSettingsTaxCategory(id:) — detail\n createAdminSettingsTaxCategory\n updateAdminSettingsTaxCategory\n deleteAdminSettingsTaxCategory", "properties": { "id": { "readOnly": true, "type": "integer" }, "code": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "createdAt": { "type": [ "string", "null" ], "format": "date-time" }, "updatedAt": { "type": [ "string", "null" ], "format": "date-time" }, "message": { "type": "string" }, "taxRates": { "readOnly": true, "type": "array", "items": { "type": "string", "format": "iri-reference", "example": "https://example.com/" } } } }, "AdminSettingsTaxCategory.AdminSettingsTaxCategoryRestDto": { "type": "object", "description": "Admin Settings → Tax Categories endpoints (Block B Wave 3).\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\Tax\\TaxCategoryController 1:1.\n\nREST:\n GET /api/admin/settings/tax-categories\n GET /api/admin/settings/tax-categories/{id}\n POST /api/admin/settings/tax-categories\n PUT /api/admin/settings/tax-categories/{id}\n DELETE /api/admin/settings/tax-categories/{id}\n\nGraphQL:\n adminSettingsTaxCategories — cursor listing\n adminSettingsTaxCategory(id:) — detail\n createAdminSettingsTaxCategory\n updateAdminSettingsTaxCategory\n deleteAdminSettingsTaxCategory", "properties": { "id": { "readOnly": true, "type": [ "integer", "null" ] }, "code": { "readOnly": true, "type": [ "string", "null" ] }, "name": { "readOnly": true, "type": [ "string", "null" ] }, "description": { "readOnly": true, "type": [ "string", "null" ] }, "taxRates": { "readOnly": true, "type": [ "array", "null" ], "items": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "string" }, { "type": "null" } ] } } }, "createdAt": { "readOnly": true, "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "type": [ "string", "null" ] } } }, "AdminSettingsTaxCategory.AdminSettingsTaxCategoryRestDto.html": { "type": "object", "description": "Admin Settings → Tax Categories endpoints (Block B Wave 3).\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\Tax\\TaxCategoryController 1:1.\n\nREST:\n GET /api/admin/settings/tax-categories\n GET /api/admin/settings/tax-categories/{id}\n POST /api/admin/settings/tax-categories\n PUT /api/admin/settings/tax-categories/{id}\n DELETE /api/admin/settings/tax-categories/{id}\n\nGraphQL:\n adminSettingsTaxCategories — cursor listing\n adminSettingsTaxCategory(id:) — detail\n createAdminSettingsTaxCategory\n updateAdminSettingsTaxCategory\n deleteAdminSettingsTaxCategory", "properties": { "id": { "readOnly": true, "type": [ "integer", "null" ] }, "code": { "readOnly": true, "type": [ "string", "null" ] }, "name": { "readOnly": true, "type": [ "string", "null" ] }, "description": { "readOnly": true, "type": [ "string", "null" ] }, "taxRates": { "readOnly": true, "type": [ "array", "null" ], "items": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "number" }, { "type": "integer" }, { "type": "string" }, { "type": "null" } ] } } }, "createdAt": { "readOnly": true, "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "type": [ "string", "null" ] } } }, "AdminSettingsTaxCategory.html": { "type": "object", "description": "Admin Settings → Tax Categories endpoints (Block B Wave 3).\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\Tax\\TaxCategoryController 1:1.\n\nREST:\n GET /api/admin/settings/tax-categories\n GET /api/admin/settings/tax-categories/{id}\n POST /api/admin/settings/tax-categories\n PUT /api/admin/settings/tax-categories/{id}\n DELETE /api/admin/settings/tax-categories/{id}\n\nGraphQL:\n adminSettingsTaxCategories — cursor listing\n adminSettingsTaxCategory(id:) — detail\n createAdminSettingsTaxCategory\n updateAdminSettingsTaxCategory\n deleteAdminSettingsTaxCategory", "properties": { "id": { "readOnly": true, "type": "integer" }, "code": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "createdAt": { "type": [ "string", "null" ], "format": "date-time" }, "updatedAt": { "type": [ "string", "null" ], "format": "date-time" }, "message": { "type": "string" }, "taxRates": { "readOnly": true, "type": "array", "items": { "type": "string", "format": "iri-reference", "example": "https://example.com/" } } } }, "AdminSettingsTaxRate": { "type": "object", "description": "Admin Settings → Tax Rates endpoints (Block B Wave 3).\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\Tax\\TaxRateController.\n\nis_zip conditional validation:\n - is_zip = false → zip_code required (the specific zip mode)\n - is_zip = true → zip_from + zip_to required (the range mode)\n\nNo mass-delete in the monolith admin UI; not exposed.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "identifier": { "readOnly": true, "example": "US-CA-SF", "type": [ "string", "null" ] }, "isZip": { "readOnly": true, "example": false, "type": [ "boolean", "null" ] }, "zipCode": { "readOnly": true, "example": "94103", "type": [ "string", "null" ] }, "zipFrom": { "readOnly": true, "type": [ "string", "null" ] }, "zipTo": { "readOnly": true, "type": [ "string", "null" ] }, "state": { "readOnly": true, "example": "CA", "type": [ "string", "null" ] }, "country": { "readOnly": true, "example": "US", "type": [ "string", "null" ] }, "taxRate": { "readOnly": true, "example": 8.5, "type": [ "number", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "message": { "readOnly": true, "example": "Tax rate deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsTaxRate.AdminSettingsTaxRateUpdateInput": { "type": "object", "description": "Admin Settings → Tax Rates endpoints (Block B Wave 3).\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\Tax\\TaxRateController.\n\nis_zip conditional validation:\n - is_zip = false → zip_code required (the specific zip mode)\n - is_zip = true → zip_from + zip_to required (the range mode)\n\nNo mass-delete in the monolith admin UI; not exposed.", "properties": { "id": { "description": "Resource IRI (e.g. /api/admin/settings/tax-rates/4).", "type": [ "string", "null" ] }, "identifier": { "type": [ "string", "null" ] }, "isZip": { "type": [ "boolean", "null" ] }, "zipCode": { "type": [ "string", "null" ] }, "zipFrom": { "type": [ "string", "null" ] }, "zipTo": { "type": [ "string", "null" ] }, "state": { "type": [ "string", "null" ] }, "country": { "type": [ "string", "null" ] }, "taxRate": { "type": [ "number", "null" ] } } }, "AdminSettingsTaxRate.csv": { "type": "object", "description": "Admin Settings → Tax Rates endpoints (Block B Wave 3).\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\Tax\\TaxRateController.\n\nis_zip conditional validation:\n - is_zip = false → zip_code required (the specific zip mode)\n - is_zip = true → zip_from + zip_to required (the range mode)\n\nNo mass-delete in the monolith admin UI; not exposed.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "identifier": { "readOnly": true, "example": "US-CA-SF", "type": [ "string", "null" ] }, "isZip": { "readOnly": true, "example": false, "type": [ "boolean", "null" ] }, "zipCode": { "readOnly": true, "example": "94103", "type": [ "string", "null" ] }, "zipFrom": { "readOnly": true, "type": [ "string", "null" ] }, "zipTo": { "readOnly": true, "type": [ "string", "null" ] }, "state": { "readOnly": true, "example": "CA", "type": [ "string", "null" ] }, "country": { "readOnly": true, "example": "US", "type": [ "string", "null" ] }, "taxRate": { "readOnly": true, "example": 8.5, "type": [ "number", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "message": { "readOnly": true, "example": "Tax rate deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsTaxRate.html": { "type": "object", "description": "Admin Settings → Tax Rates endpoints (Block B Wave 3).\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\Tax\\TaxRateController.\n\nis_zip conditional validation:\n - is_zip = false → zip_code required (the specific zip mode)\n - is_zip = true → zip_from + zip_to required (the range mode)\n\nNo mass-delete in the monolith admin UI; not exposed.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "identifier": { "readOnly": true, "example": "US-CA-SF", "type": [ "string", "null" ] }, "isZip": { "readOnly": true, "example": false, "type": [ "boolean", "null" ] }, "zipCode": { "readOnly": true, "example": "94103", "type": [ "string", "null" ] }, "zipFrom": { "readOnly": true, "type": [ "string", "null" ] }, "zipTo": { "readOnly": true, "type": [ "string", "null" ] }, "state": { "readOnly": true, "example": "CA", "type": [ "string", "null" ] }, "country": { "readOnly": true, "example": "US", "type": [ "string", "null" ] }, "taxRate": { "readOnly": true, "example": 8.5, "type": [ "number", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "message": { "readOnly": true, "example": "Tax rate deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsTaxRate.xls": { "type": "object", "description": "Admin Settings → Tax Rates endpoints (Block B Wave 3).\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\Tax\\TaxRateController.\n\nis_zip conditional validation:\n - is_zip = false → zip_code required (the specific zip mode)\n - is_zip = true → zip_from + zip_to required (the range mode)\n\nNo mass-delete in the monolith admin UI; not exposed.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "identifier": { "readOnly": true, "example": "US-CA-SF", "type": [ "string", "null" ] }, "isZip": { "readOnly": true, "example": false, "type": [ "boolean", "null" ] }, "zipCode": { "readOnly": true, "example": "94103", "type": [ "string", "null" ] }, "zipFrom": { "readOnly": true, "type": [ "string", "null" ] }, "zipTo": { "readOnly": true, "type": [ "string", "null" ] }, "state": { "readOnly": true, "example": "CA", "type": [ "string", "null" ] }, "country": { "readOnly": true, "example": "US", "type": [ "string", "null" ] }, "taxRate": { "readOnly": true, "example": 8.5, "type": [ "number", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "message": { "readOnly": true, "example": "Tax rate deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsTaxRate.xlsx": { "type": "object", "description": "Admin Settings → Tax Rates endpoints (Block B Wave 3).\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\Tax\\TaxRateController.\n\nis_zip conditional validation:\n - is_zip = false → zip_code required (the specific zip mode)\n - is_zip = true → zip_from + zip_to required (the range mode)\n\nNo mass-delete in the monolith admin UI; not exposed.", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "identifier": { "readOnly": true, "example": "US-CA-SF", "type": [ "string", "null" ] }, "isZip": { "readOnly": true, "example": false, "type": [ "boolean", "null" ] }, "zipCode": { "readOnly": true, "example": "94103", "type": [ "string", "null" ] }, "zipFrom": { "readOnly": true, "type": [ "string", "null" ] }, "zipTo": { "readOnly": true, "type": [ "string", "null" ] }, "state": { "readOnly": true, "example": "CA", "type": [ "string", "null" ] }, "country": { "readOnly": true, "example": "US", "type": [ "string", "null" ] }, "taxRate": { "readOnly": true, "example": 8.5, "type": [ "number", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "message": { "readOnly": true, "example": "Tax rate deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsUser": { "type": "object", "description": "Admin Settings → Users (admins) endpoints (Block B Wave 2).\n\nREST:\n GET /api/admin/settings/users\n GET /api/admin/settings/users/{id}\n POST /api/admin/settings/users\n PUT /api/admin/settings/users/{id}\n DELETE /api/admin/settings/users/{id}\n\nGraphQL: adminSettingsUsers, adminSettingsUser,\n createAdminSettingsUser, updateAdminSettingsUser,\n deleteAdminSettingsUser\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\UserController.\n\nNotes:\n - image upload is intentionally deferred in v1 — accepts a path string only.\n - Delete refuses if the admin is deleting themselves (400) or if this is\n the last admin (400).\n - Password is required on create; optional on update (re-hashed if present).", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "name": { "readOnly": true, "example": "John Doe", "type": [ "string", "null" ] }, "email": { "readOnly": true, "example": "john@example.com", "type": [ "string", "null" ] }, "roleId": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "roleName": { "readOnly": true, "example": "Administrator", "type": [ "string", "null" ] }, "status": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "image": { "readOnly": true, "example": "admins/1/avatar.png", "type": [ "string", "null" ] }, "imageUrl": { "readOnly": true, "example": "https://your-domain.com/storage/admins/1/avatar.png", "type": [ "string", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "message": { "readOnly": true, "example": "User deleted successfully.", "type": [ "string", "null" ] } } }, "AdminSettingsUser.html": { "type": "object", "description": "Admin Settings → Users (admins) endpoints (Block B Wave 2).\n\nREST:\n GET /api/admin/settings/users\n GET /api/admin/settings/users/{id}\n POST /api/admin/settings/users\n PUT /api/admin/settings/users/{id}\n DELETE /api/admin/settings/users/{id}\n\nGraphQL: adminSettingsUsers, adminSettingsUser,\n createAdminSettingsUser, updateAdminSettingsUser,\n deleteAdminSettingsUser\n\nMirrors Webkul\\Admin\\Http\\Controllers\\Settings\\UserController.\n\nNotes:\n - image upload is intentionally deferred in v1 — accepts a path string only.\n - Delete refuses if the admin is deleting themselves (400) or if this is\n the last admin (400).\n - Password is required on create; optional on update (re-hashed if present).", "properties": { "id": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "name": { "readOnly": true, "example": "John Doe", "type": [ "string", "null" ] }, "email": { "readOnly": true, "example": "john@example.com", "type": [ "string", "null" ] }, "roleId": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "roleName": { "readOnly": true, "example": "Administrator", "type": [ "string", "null" ] }, "status": { "readOnly": true, "example": 1, "type": [ "integer", "null" ] }, "image": { "readOnly": true, "example": "admins/1/avatar.png", "type": [ "string", "null" ] }, "imageUrl": { "readOnly": true, "example": "https://your-domain.com/storage/admins/1/avatar.png", "type": [ "string", "null" ] }, "createdAt": { "readOnly": true, "example": "2026-05-25T08:15:00+00:00", "type": [ "string", "null" ] }, "updatedAt": { "readOnly": true, "example": "2026-05-25T08:20:00+00:00", "type": [ "string", "null" ] }, "message": { "readOnly": true, "example": "User deleted successfully.", "type": [ "string", "null" ] } } }, "AdminShipment": { "type": "object", "properties": { "id": { "readOnly": true, "type": [ "integer", "null" ] }, "orderId": { "type": [ "integer", "null" ] }, "orderIncrementId": { "type": [ "string", "null" ] }, "shippedTo": { "type": [ "string", "null" ] }, "orderDate": { "type": [ "string", "null" ] }, "orderStatus": { "type": [ "string", "null" ] }, "orderStatusLabel": { "type": [ "string", "null" ] }, "channelName": { "type": [ "string", "null" ] }, "customerName": { "type": [ "string", "null" ] }, "customerEmail": { "type": [ "string", "null" ] }, "paymentMethod": { "type": [ "string", "null" ] }, "paymentTitle": { "type": [ "string", "null" ] }, "orderCurrencyCode": { "type": [ "string", "null" ] }, "shippingMethod": { "type": [ "string", "null" ] }, "shippingTitle": { "type": [ "string", "null" ] }, "baseShippingAmount": { "type": [ "number", "null" ] }, "formattedBaseShippingAmount": { "type": [ "string", "null" ] }, "status": { "type": [ "string", "null" ] }, "totalQty": { "type": [ "integer", "null" ] }, "totalWeight": { "type": [ "number", "null" ] }, "carrierCode": { "type": [ "string", "null" ] }, "carrierTitle": { "type": [ "string", "null" ] }, "trackNumber": { "type": [ "string", "null" ] }, "emailSent": { "type": [ "boolean", "null" ] }, "inventorySourceId": { "type": [ "integer", "null" ] }, "inventorySourceName": { "type": [ "string", "null" ] }, "billingAddress": { "type": [ "array", "null" ], "items": [] }, "shippingAddress": { "type": [ "array", "null" ], "items": [] }, "createdAt": { "type": [ "string", "null" ] }, "updatedAt": { "type": [ "string", "null" ] }, "items": { "type": "array", "items": [] } } }, "AdminShipment.html": { "type": "object", "properties": { "id": { "readOnly": true, "type": [ "integer", "null" ] }, "orderId": { "type": [ "integer", "null" ] }, "orderIncrementId": { "type": [ "string", "null" ] }, "shippedTo": { "type": [ "string", "null" ] }, "orderDate": { "type": [ "string", "null" ] }, "orderStatus": { "type": [ "string", "null" ] }, "orderStatusLabel": { "type": [ "string", "null" ] }, "channelName": { "type": [ "string", "null" ] }, "customerName": { "type": [ "string", "null" ] }, "customerEmail": { "type": [ "string", "null" ] }, "paymentMethod": { "type": [ "string", "null" ] }, "paymentTitle": { "type": [ "string", "null" ] }, "orderCurrencyCode": { "type": [ "string", "null" ] }, "shippingMethod": { "type": [ "string", "null" ] }, "shippingTitle": { "type": [ "string", "null" ] }, "baseShippingAmount": { "type": [ "number", "null" ] }, "formattedBaseShippingAmount": { "type": [ "string", "null" ] }, "status": { "type": [ "string", "null" ] }, "totalQty": { "type": [ "integer", "null" ] }, "totalWeight": { "type": [ "number", "null" ] }, "carrierCode": { "type": [ "string", "null" ] }, "carrierTitle": { "type": [ "string", "null" ] }, "trackNumber": { "type": [ "string", "null" ] }, "emailSent": { "type": [ "boolean", "null" ] }, "inventorySourceId": { "type": [ "integer", "null" ] }, "inventorySourceName": { "type": [ "string", "null" ] }, "billingAddress": { "type": [ "array", "null" ], "items": [] }, "shippingAddress": { "type": [ "array", "null" ], "items": [] }, "createdAt": { "type": [ "string", "null" ] }, "updatedAt": { "type": [ "string", "null" ] }, "items": { "type": "array", "items": [] } } } }, "responses": [], "parameters": [], "examples": [], "requestBodies": [], "headers": [], "securitySchemes": { "bearerAuth": { "type": "http", "description": "Value for the http bearer parameter.", "scheme": "bearer", "bearerFormat": "UUID" } } }, "security": [ { "bearerAuth": [] } ], "tags": [ { "name": "Admin Settings: Roles" }, { "name": "Admin Appearance: Sections" }, { "name": "Admin Appearance: Themes" }, { "name": "Admin Catalog: Attributes" }, { "name": "Admin Catalog: Attribute Families" }, { "name": "Admin Sales: Bookings" }, { "name": "Admin Sales: Orders" }, { "name": "Admin: Customer Order creation" }, { "name": "Admin Catalog: Products" }, { "name": "Admin Catalog: Categories" }, { "name": "Admin CMS" }, { "name": "Admin Configuration" }, { "name": "Admin Customers" }, { "name": "Admin Customer GDPR" }, { "name": "Admin Customer Groups" }, { "name": "Admin Customer Reviews" }, { "name": "Admin Dashboard" }, { "name": "Admin Sales: EU Withdrawal" }, { "name": "Admin Sales: Invoices" }, { "name": "Admin Magic AI" }, { "name": "Admin Marketing: Communications" }, { "name": "Admin Marketing: Promotions" }, { "name": "Admin Marketing: Search & SEO" }, { "name": "Admin Menu" }, { "name": "Admin Notifications" }, { "name": "Admin Products" }, { "name": "Admin Authentication" }, { "name": "Admin Sales: Refunds" }, { "name": "Admin Reporting: Customers" }, { "name": "Admin Reporting: Overview" }, { "name": "Admin Reporting: Products" }, { "name": "Admin Reporting: Sales" }, { "name": "Admin Sales: RMA" }, { "name": "Admin Settings: Channels" }, { "name": "Admin Settings: Currencies" }, { "name": "Admin Settings: Data Transfer" }, { "name": "Admin Settings: Exchange Rates" }, { "name": "Admin Settings: Inventory Sources" }, { "name": "Admin Settings: Locales" }, { "name": "Admin Settings: Tax Categories" }, { "name": "Admin Settings: Tax Rates" }, { "name": "Admin Settings: Users" }, { "name": "Admin Sales: Shipments" }, { "name": "Admin Sales: Transactions" } ], "webhooks": [] }