> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lojou.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Publish product

> Submits the product for review (`status_2` → `pending`). Requires name, price (≥ 50 for MZN stores), sale page, image, category, subcategory, contact number, at least one file, and — for recurring products — a plan already created via `POST /v1/plan`.



## OpenAPI

````yaml /openapi.yaml post /v1/products/{id}/publish
openapi: 3.1.0
info:
  title: Lojou API
  version: 1.0.0
  description: |
    Official reference for the Lojou `/v1` API — everything a developer needs
    to create products, process orders, manage plans, and receive webhooks
    from a Lojou store.
servers:
  - url: https://api.lojou.app
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Health
  - name: OAuth
  - name: User
  - name: Products
  - name: Plans
  - name: Orders
  - name: Customers
  - name: Files
  - name: Webhooks
  - name: Discounts
  - name: Affiliates
paths:
  /v1/products/{id}/publish:
    post:
      tags:
        - Products
      summary: Publish product
      description: >-
        Submits the product for review (`status_2` → `pending`). Requires name,
        price (≥ 50 for MZN stores), sale page, image, category, subcategory,
        contact number, at least one file, and — for recurring products — a plan
        already created via `POST /v1/plan`.
      operationId: postV1ProductPublish
      parameters:
        - $ref: '#/components/parameters/ProductIdParam'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
              example:
                status: success
                message: Product submitted for review successfully.
                data:
                  product_id: 272
                  product_pid: QUyMp
                  status: pending
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '409':
          description: Product is already pending review or already approved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: error
                message: Product is already in review.
        '422':
          description: Product is missing required data for review submission
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
              example:
                status: error
                message: Product is missing required data for review submission.
                missing_fields:
                  image: Product image is required.
                  files: At least one product file/link is required.
components:
  parameters:
    ProductIdParam:
      name: id
      in: path
      required: true
      description: Product identifier (`id` or `product_pid`).
      schema:
        type: string
  responses:
    UnauthorizedError:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: error
            message: Unauthorized user.
    ForbiddenError:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: error
            message: Permission denied for this endpoint.
            error_code: insufficient_scope
            required_scopes:
              - orders.read
            missing_scopes:
              - orders.read
            granted_scopes:
              - products.read
              - products.write
    NotFoundError:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: error
            message: Resource not found.
  schemas:
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          example: error
        message:
          type: string
      additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        Send an API key or an OAuth access token in the `Authorization` header
        as a Bearer token. See [Authentication](/authentication) for details.

````