openapi: 3.0.3
info:
  title: 'Farmsell api documentation'
  description: 'This documentation will provide all the information you need to work with our API'
  version: 1.0.0
servers:
  -
    url: farmsell.org
paths:
  /api/v2/admin/add-admin:
    post:
      summary: "Store a newly created administrator\n\nCreates a new administrator account, validates the input data, generates a random password, sends a confirmation email, and returns the created user details along with a success message."
      operationId: storeANewlyCreatedAdministratorCreatesANewAdministratorAccountValidatesTheInputDataGeneratesARandomPasswordSendsAConfirmationEmailAndReturnsTheCreatedUserDetailsAlongWithASuccessMessage
      description: ''
      parameters: []
      responses:
        201:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  message: 'Registration successful. Please check your email for verification.'
                  user:
                    id: 1
                    full_name: 'John Doe'
                    email: admin@example.com
                    created_at: '2025-01-30T12:00:00Z'
                    updated_at: '2025-01-30T12:00:00Z'
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: 'Registration successful. Please check your email for verification.'
                  user:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      full_name:
                        type: string
                        example: 'John Doe'
                      email:
                        type: string
                        example: admin@example.com
                      created_at:
                        type: string
                        example: '2025-01-30T12:00:00Z'
                      updated_at:
                        type: string
                        example: '2025-01-30T12:00:00Z'
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  error: 'This email address is already associated with another account. Please use a different email.'
                properties:
                  status:
                    type: string
                    example: FAILED
                  error:
                    type: string
                    example: 'This email address is already associated with another account. Please use a different email.'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  result: 'Database error: <error_message>'
                properties:
                  status:
                    type: string
                    example: FAILED
                  result:
                    type: string
                    example: 'Database error: <error_message>'
      tags:
        - 'AdminPortal Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                full_name:
                  type: string
                  description: 'The full name of the administrator.'
                  example: 'John Doe'
                  nullable: false
                email:
                  type: string
                  description: 'The email address of the administrator. Must be unique.'
                  example: admin@example.com
                  nullable: false
              required:
                - full_name
                - email
      security: []
  /api/v2/admin/login:
    post:
      summary: "Login an administrator\n\nAuthenticates an administrator by verifying their email and password, and returns a generated token for access to other API routes."
      operationId: loginAnAdministratorAuthenticatesAnAdministratorByVerifyingTheirEmailAndPasswordAndReturnsAGeneratedTokenForAccessToOtherAPIRoutes
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  data:
                    token: generated_token_here
                    user:
                      id: 1
                      full_name: 'John Doe'
                      email: admin@example.com
                      created_at: '2025-01-30T12:00:00Z'
                      updated_at: '2025-01-30T12:00:00Z'
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  data:
                    type: object
                    properties:
                      token:
                        type: string
                        example: generated_token_here
                      user:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          full_name:
                            type: string
                            example: 'John Doe'
                          email:
                            type: string
                            example: admin@example.com
                          created_at:
                            type: string
                            example: '2025-01-30T12:00:00Z'
                          updated_at:
                            type: string
                            example: '2025-01-30T12:00:00Z'
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'Invalid credentials'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'Invalid credentials'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'User not found'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'User not found'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  errors:
                    email:
                      - 'The email field is required.'
                    password:
                      - 'The password field is required.'
                properties:
                  errors:
                    type: object
                    properties:
                      email:
                        type: array
                        example:
                          - 'The email field is required.'
                        items:
                          type: string
                      password:
                        type: array
                        example:
                          - 'The password field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'Database error: <error_message>'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'Database error: <error_message>'
      tags:
        - 'AdminPortal Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: 'The email address of the administrator.'
                  example: admin@example.com
                  nullable: false
                password:
                  type: string
                  description: 'The password of the administrator.'
                  example: password123
                  nullable: false
              required:
                - email
                - password
      security: []
  /api/v2/admin/verify_otp:
    post:
      summary: "Verify OTP and login\n\nVerifies the OTP entered by the user and logs the user in if the OTP is valid and not expired.\nUpon successful verification, a token is generated for the user."
      operationId: verifyOTPAndLoginVerifiesTheOTPEnteredByTheUserAndLogsTheUserInIfTheOTPIsValidAndNotExpiredUponSuccessfulVerificationATokenIsGeneratedForTheUser
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n \"status\": \"SUCCESS\",\n \"user\": {\n     \"id\": 1,\n     \"full_name\": \"John Doe\",\n     \"email\": \"admin@example.com\",\n     // other user details\n },\n \"token\": \"access_token_here\",\n \"message\": \"Login successful\"\n}"
        422:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: ''
                    type: object
                    example:
                      status: FAILED
                      message: 'Invalid or expired OTP'
                    properties:
                      status:
                        type: string
                        example: FAILED
                      message:
                        type: string
                        example: 'Invalid or expired OTP'
                  -
                    description: ''
                    type: object
                    example:
                      errors:
                        email:
                          - 'The email field is required.'
                        otp:
                          - 'The otp field is required.'
                    properties:
                      errors:
                        type: object
                        properties:
                          email:
                            type: array
                            example:
                              - 'The email field is required.'
                            items:
                              type: string
                          otp:
                            type: array
                            example:
                              - 'The otp field is required.'
                            items:
                              type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'An error occurred: <error_message>'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'An error occurred: <error_message>'
      tags:
        - 'AdminPortal Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: 'The email address of the administrator.'
                  example: '"admin@example.com"'
                  nullable: false
                otp:
                  type: string
                  description: "The one-time password (OTP) sent to the user's email."
                  example: '"123456"'
                  nullable: false
              required:
                - email
                - otp
      security: []
  /api/v2/admin/resend-verify-code:
    post:
      summary: "Resend OTP verification code\n\nResends the OTP verification code to the user's email address.\nThis is useful if the user didn't receive the OTP or it has expired."
      operationId: resendOTPVerificationCodeResendsTheOTPVerificationCodeToTheUsersEmailAddressThisIsUsefulIfTheUserDidntReceiveTheOTPOrItHasExpired
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  message: 'OTP sent successfully'
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: 'OTP sent successfully'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  errors:
                    email:
                      - 'The email field is required.'
                properties:
                  errors:
                    type: object
                    properties:
                      email:
                        type: array
                        example:
                          - 'The email field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'An error occurred: <error_message>'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'An error occurred: <error_message>'
      tags:
        - 'AdminPortal Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: 'The email address of the administrator.'
                  example: '"admin@example.com"'
                  nullable: false
              required:
                - email
      security: []
  '/api/v2/admin/email/verify/{id}/{hash}':
    get:
      summary: "Verify an administrator's email\n\nVerifies the administrator's email using a unique verification link with a user ID and hash. Marks the email as verified if the link is valid."
      operationId: verifyAnAdministratorsEmailVerifiesTheAdministratorsEmailUsingAUniqueVerificationLinkWithAUserIDAndHashMarksTheEmailAsVerifiedIfTheLinkIsValid
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  message: 'Email verified successfully'
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: 'Email verified successfully'
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'Invalid verification link'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'Invalid verification link'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'An error occurred: <error_message>'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'An error occurred: <error_message>'
      tags:
        - 'AdminPortal Management'
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the administrator to verify.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: hash
        description: "The hashed verification code sent to the administrator's email."
        example: abcdef12345
        required: true
        schema:
          type: string
  /api/v2/admin/resend:
    post:
      summary: "Resend email verification link\n\nResends the email verification link to an administrator who has not yet verified their email address.\nReturns a success message if the email has been sent, or an error message if the email is already verified."
      operationId: resendEmailVerificationLinkResendsTheEmailVerificationLinkToAnAdministratorWhoHasNotYetVerifiedTheirEmailAddressReturnsASuccessMessageIfTheEmailHasBeenSentOrAnErrorMessageIfTheEmailIsAlreadyVerified
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  message: 'Verification link sent!'
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: 'Verification link sent!'
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'Email is already verified.'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'Email is already verified.'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'An error occurred: <error_message>'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'An error occurred: <error_message>'
      tags:
        - 'AdminPortal Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the administrator who needs the verification link.'
                  example: 1
                  nullable: false
              required:
                - id
      security: []
  /api/v2/admin/admin-profile:
    post:
      summary: "Get the admin profile\n\nThis endpoint returns the profile information of the authenticated admin.\nIt fetches the current admin's data using the authentication token."
      operationId: getTheAdminProfileThisEndpointReturnsTheProfileInformationOfTheAuthenticatedAdminItFetchesTheCurrentAdminsDataUsingTheAuthenticationToken
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  data:
                    id: 1
                    full_name: 'John Doe'
                    email: admin@example.com
                    created_at: '2025-01-30T10:00:00.000000Z'
                    updated_at: '2025-01-30T10:00:00.000000Z'
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      full_name:
                        type: string
                        example: 'John Doe'
                      email:
                        type: string
                        example: admin@example.com
                      created_at:
                        type: string
                        example: '2025-01-30T10:00:00.000000Z'
                      updated_at:
                        type: string
                        example: '2025-01-30T10:00:00.000000Z'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'An error occurred: <error_message>'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'An error occurred: <error_message>'
      tags:
        - 'AdminPortal Management'
      security: []
  /api/v2/admin/admin-update-profile:
    post:
      summary: "Update the authenticated admin's profile.\n\nThis endpoint allows an authenticated admin to update their profile details.\nYou can update optional fields like full name, email, profile picture, location, and more."
      operationId: updateTheAuthenticatedAdminsProfileThisEndpointAllowsAnAuthenticatedAdminToUpdateTheirProfileDetailsYouCanUpdateOptionalFieldsLikeFullNameEmailProfilePictureLocationAndMore
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Profile updated successfully.'
                  data:
                    id: 1
                    full_name: 'John Doe'
                    email: admin@example.com
                    user_name: johndoe
                    picture: 'http://example.com/picture.jpg'
                    avatar_google: 'http://example.com/avatar.jpg'
                    about_user: 'I am a software developer.'
                    location: 'New York'
                    language: English
                    gender: Male
                    image_cover: 'http://example.com/cover.jpg'
                    country: USA
                    date_of_birth: '1985-10-10'
                    physical_address: '123 Street, City'
                    country_code: '+1'
                    phone: '+1234567890'
                    created_at: '2025-01-30T10:00:00.000000Z'
                    updated_at: '2025-01-30T10:30:00.000000Z'
                properties:
                  message:
                    type: string
                    example: 'Profile updated successfully.'
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      full_name:
                        type: string
                        example: 'John Doe'
                      email:
                        type: string
                        example: admin@example.com
                      user_name:
                        type: string
                        example: johndoe
                      picture:
                        type: string
                        example: 'http://example.com/picture.jpg'
                      avatar_google:
                        type: string
                        example: 'http://example.com/avatar.jpg'
                      about_user:
                        type: string
                        example: 'I am a software developer.'
                      location:
                        type: string
                        example: 'New York'
                      language:
                        type: string
                        example: English
                      gender:
                        type: string
                        example: Male
                      image_cover:
                        type: string
                        example: 'http://example.com/cover.jpg'
                      country:
                        type: string
                        example: USA
                      date_of_birth:
                        type: string
                        example: '1985-10-10'
                      physical_address:
                        type: string
                        example: '123 Street, City'
                      country_code:
                        type: string
                        example: '+1'
                      phone:
                        type: string
                        example: '+1234567890'
                      created_at:
                        type: string
                        example: '2025-01-30T10:00:00.000000Z'
                      updated_at:
                        type: string
                        example: '2025-01-30T10:30:00.000000Z'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Administor not found.'
                properties:
                  message:
                    type: string
                    example: 'Administor not found.'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'An error occurred while updating the profile.'
                  error: '<error_message>'
                properties:
                  message:
                    type: string
                    example: 'An error occurred while updating the profile.'
                  error:
                    type: string
                    example: '<error_message>'
      tags:
        - 'AdminPortal Management'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                full_name:
                  type: string|null
                  description: 'The full name of the admin.'
                  example: 'John Doe'
                  nullable: false
                email:
                  type: string|null
                  description: 'The email address of the admin.'
                  example: admin@example.com
                  nullable: false
                user_name:
                  type: string|null
                  description: 'The username of the admin.'
                  example: johndoe
                  nullable: false
                picture:
                  type: string|null
                  description: 'The profile picture URL.'
                  example: 'http://example.com/picture.jpg'
                  nullable: false
                avatar_google:
                  type: string|null
                  description: 'The Google avatar URL.'
                  example: 'http://example.com/avatar.jpg'
                  nullable: false
                about_user:
                  type: string|null
                  description: 'The biography or about section of the admin.'
                  example: 'I am a software developer.'
                  nullable: false
                location:
                  type: string|null
                  description: 'The location of the admin.'
                  example: 'New York'
                  nullable: false
                language:
                  type: string|null
                  description: 'The preferred language of the admin.'
                  example: English
                  nullable: false
                gender:
                  type: string|null
                  description: 'The gender of the admin.'
                  example: Male
                  nullable: false
                image_cover:
                  type: string|null
                  description: 'The cover image URL.'
                  example: 'http://example.com/cover.jpg'
                  nullable: false
                country:
                  type: string|null
                  description: 'The country of the admin.'
                  example: USA
                  nullable: false
                date_of_birth:
                  type: date|null
                  description: 'The birth date of the admin.'
                  example: '1985-10-10'
                  nullable: false
                physical_address:
                  type: string|null
                  description: 'The physical address of the admin.'
                  example: '123 Street, City'
                  nullable: false
                country_code:
                  type: string|null
                  description: 'The country calling code.'
                  example: '+1'
                  nullable: false
                phone:
                  type: string|null
                  description: 'The phone number of the admin.'
                  example: '+1234567890'
                  nullable: false
      security: []
  /api/v2/admin/admin_logout:
    post:
      summary: "Logout the authenticated admin.\n\nThis endpoint allows the authenticated admin to log out by revoking and deleting their access token.\nAfter logging out, the admin will no longer be able to make authenticated requests until they log in again."
      operationId: logoutTheAuthenticatedAdminThisEndpointAllowsTheAuthenticatedAdminToLogOutByRevokingAndDeletingTheirAccessTokenAfterLoggingOutTheAdminWillNoLongerBeAbleToMakeAuthenticatedRequestsUntilTheyLogInAgain
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  result: true
                  message: 'Successfully logged out'
                properties:
                  result:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Successfully logged out'
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthorized
                properties:
                  message:
                    type: string
                    example: Unauthorized
      tags:
        - 'AdminPortal Management'
      security: []
  /api/v2/admin/category/add-category:
    post:
      summary: "Create a Category\n\nCreates a new product category with an optional banner image."
      operationId: createACategoryCreatesANewProductCategoryWithAnOptionalBannerImage
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  data: 'Category created successfully'
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  data:
                    type: string
                    example: 'Category created successfully'
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error:
                    category_name:
                      - 'The category name field is required.'
                properties:
                  error:
                    type: object
                    properties:
                      category_name:
                        type: array
                        example:
                          - 'The category name field is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  data: 'Error message'
                properties:
                  status:
                    type: string
                    example: FAILED
                  data:
                    type: string
                    example: 'Error message'
      tags:
        - 'Category Management'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                category_name:
                  type: string
                  description: 'The name of the category.'
                  example: sint
                  nullable: false
                description:
                  type: string
                  description: 'The description of the category.'
                  example: 'Officiis rerum quo eligendi ut laudantium est cum alias.'
                  nullable: false
                image:
                  type: string
                  format: binary
                  description: 'The image file for the category banner.'
                  nullable: false
              required:
                - category_name
      security: []
  /api/v2/admin/category/update-category:
    post:
      summary: "Update a Category\n\nUpdates the details of an existing category, including an optional category banner image."
      operationId: updateACategoryUpdatesTheDetailsOfAnExistingCategoryIncludingAnOptionalCategoryBannerImage
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  data: 'Category updated successfully'
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  data:
                    type: string
                    example: 'Category updated successfully'
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error:
                    category_id:
                      - 'The category_id field is required.'
                properties:
                  error:
                    type: object
                    properties:
                      category_id:
                        type: array
                        example:
                          - 'The category_id field is required.'
                        items:
                          type: string
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  data: 'Category not found'
                properties:
                  status:
                    type: string
                    example: FAILED
                  data:
                    type: string
                    example: 'Category not found'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  data: 'Error message'
                properties:
                  status:
                    type: string
                    example: FAILED
                  data:
                    type: string
                    example: 'Error message'
      tags:
        - 'Category Management'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                category_id:
                  type: integer
                  description: 'The ID of the category to update.'
                  example: 9
                  nullable: false
                category_name:
                  type: string
                  description: 'The new name of the category.'
                  example: sapiente
                  nullable: false
                description:
                  type: string
                  description: 'The new description of the category.'
                  example: 'Dolor sunt non laborum ut.'
                  nullable: false
                image:
                  type: string
                  format: binary
                  description: 'The image file for the category banner (optional).'
                  nullable: false
              required:
                - category_id
      security: []
  /api/v2/admin/category/all-category:
    post:
      summary: "List Categories\n\nRetrieves a list of categories with optional filters and pagination."
      operationId: listCategoriesRetrievesAListOfCategoriesWithOptionalFiltersAndPagination
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n \"status\": \"SUCCESS\",\n \"data\": {\n     \"current_page\": 1,\n     \"data\": [\n         {\n             \"id\": 1,\n             \"category_name\": \"Electronics\",\n             \"banner\": {\n                 \"picture_url\": \"electronics_banner.jpg\"\n             },\n             \"subcategory\": [\n                 {\n                     \"subcat_name\": \"Mobile Phones\"\n                 },\n                 {\n                     \"subcat_name\": \"Laptops\"\n                 }\n             ]\n         },\n         ...\n     ],\n     \"last_page\": 5\n }\n}"
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  data: 'Invalid request'
                properties:
                  status:
                    type: string
                    example: FAILED
                  data:
                    type: string
                    example: 'Invalid request'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  data: 'Error message'
                properties:
                  status:
                    type: string
                    example: FAILED
                  data:
                    type: string
                    example: 'Error message'
      tags:
        - 'Category Management'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                search:
                  type: string
                  description: 'Search term to filter categories by name (optional).'
                  example: sunt
                  nullable: false
                category_id:
                  type: integer
                  description: 'Filter categories by a specific category ID (optional).'
                  example: 19
                  nullable: false
      security: []
  /api/v2/admin/category/delete-category:
    post:
      summary: "Delete a Category\n\nDeletes a category from the system."
      operationId: deleteACategoryDeletesACategoryFromTheSystem
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  data: 'Category deleted successfully'
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  data:
                    type: string
                    example: 'Category deleted successfully'
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error:
                    category_id:
                      - 'The category_id field is required.'
                properties:
                  error:
                    type: object
                    properties:
                      category_id:
                        type: array
                        example:
                          - 'The category_id field is required.'
                        items:
                          type: string
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  data: 'Category not found'
                properties:
                  status:
                    type: string
                    example: FAILED
                  data:
                    type: string
                    example: 'Category not found'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  data: 'Error message'
                properties:
                  status:
                    type: string
                    example: FAILED
                  data:
                    type: string
                    example: 'Error message'
      tags:
        - 'Category Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                category_id:
                  type: integer
                  description: 'The ID of the category to delete.'
                  example: 18
                  nullable: false
              required:
                - category_id
      security: []
  /api/v2/admin/product/update-stock-level:
    post:
      summary: ''
      operationId: postApiV2AdminProductUpdateStockLevel
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
  /api/v2/admin/product/adjust-price:
    post:
      summary: ''
      operationId: postApiV2AdminProductAdjustPrice
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
  /api/v2/admin/product/mark-product:
    post:
      summary: ''
      operationId: postApiV2AdminProductMarkProduct
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
  /api/v2/admin/inventory/analytics:
    get:
      summary: "Get Product Analytics\n\nRetrieves various analytics related to product performance, including total products, low-stock items, top-performing products, and slow-moving products."
      operationId: getProductAnalyticsRetrievesVariousAnalyticsRelatedToProductPerformanceIncludingTotalProductsLowStockItemsTopPerformingProductsAndSlowMovingProducts
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  total_products: 150
                  low_stock_items: 10
                  top_performing_products: 5
                  slow_moving_products: 8
                properties:
                  total_products:
                    type: integer
                    example: 150
                  low_stock_items:
                    type: integer
                    example: 10
                  top_performing_products:
                    type: integer
                    example: 5
                  slow_moving_products:
                    type: integer
                    example: 8
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'An error occurred while fetching analytics.'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'An error occurred while fetching analytics.'
      tags:
        - 'Inventory Management'
      security: []
  /api/v2/admin/inventory/all-stock:
    get:
      summary: "Get All Stock\n\nRetrieves a paginated list of all stock products with optional filtering by status, category, subcategory, and product title."
      operationId: getAllStockRetrievesAPaginatedListOfAllStockProductsWithOptionalFilteringByStatusCategorySubcategoryAndProductTitle
      description: ''
      parameters:
        -
          in: query
          name: status
          description: 'Optional The status of the products to filter.'
          example: active
          required: false
          schema:
            type: string
            description: 'Optional The status of the products to filter.'
            example: active
            nullable: false
        -
          in: query
          name: category_id
          description: 'Optional The ID of the category to filter by.'
          example: 2
          required: false
          schema:
            type: integer
            description: 'Optional The ID of the category to filter by.'
            example: 2
            nullable: false
        -
          in: query
          name: sub_category_id
          description: 'Optional The ID of the subcategory to filter by.'
          example: 5
          required: false
          schema:
            type: integer
            description: 'Optional The ID of the subcategory to filter by.'
            example: 5
            nullable: false
        -
          in: query
          name: product_title
          description: 'Optional The product title to search for (partial match).'
          example: Laptop
          required: false
          schema:
            type: string
            description: 'Optional The product title to search for (partial match).'
            example: Laptop
            nullable: false
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  payload:
                    current_page: 1
                    data:
                      -
                        id: 1
                        product_title: Laptop
                        category:
                          id: 2
                          name: Electronics
                        subCategory:
                          id: 5
                          name: Computers
                        status: active
                        images:
                          -
                            id: 10
                            url: 'https://example.com/image.jpg'
                    per_page: 20
                    total: 100
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  payload:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        example: 1
                      data:
                        type: array
                        example:
                          -
                            id: 1
                            product_title: Laptop
                            category:
                              id: 2
                              name: Electronics
                            subCategory:
                              id: 5
                              name: Computers
                            status: active
                            images:
                              -
                                id: 10
                                url: 'https://example.com/image.jpg'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1
                            product_title:
                              type: string
                              example: Laptop
                            category:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 2
                                name:
                                  type: string
                                  example: Electronics
                            subCategory:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 5
                                name:
                                  type: string
                                  example: Computers
                            status:
                              type: string
                              example: active
                            images:
                              type: array
                              example:
                                -
                                  id: 10
                                  url: 'https://example.com/image.jpg'
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 10
                                  url:
                                    type: string
                                    example: 'https://example.com/image.jpg'
                      per_page:
                        type: integer
                        example: 20
                      total:
                        type: integer
                        example: 100
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'Failed to fetch products'
                  error: 'Internal server error message'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'Failed to fetch products'
                  error:
                    type: string
                    example: 'Internal server error message'
      tags:
        - 'Inventory Management'
      security: []
  /api/v2/admin/order/all-orders:
    post:
      summary: "List All Orders\n\nRetrieves all orders with optional filters for status and date sorting."
      operationId: listAllOrdersRetrievesAllOrdersWithOptionalFiltersForStatusAndDateSorting
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  current_page: 1
                  data:
                    -
                      id: 1
                      customer:
                        id: 123
                        full_name: 'John Doe'
                        phone: 123-456-7890
                        email: john.doe@example.com
                      items:
                        -
                          id: 1
                          product:
                            id: 10
                            product_title: 'Product Title'
                          quantity: 2
                          price: 25.0
                      status: pending
                      created_at: '2025-01-29T12:00:00Z'
                  total: 100
                  per_page: 20
                  last_page: 5
                  from: 1
                  to: 20
                properties:
                  current_page:
                    type: integer
                    example: 1
                  data:
                    type: array
                    example:
                      -
                        id: 1
                        customer:
                          id: 123
                          full_name: 'John Doe'
                          phone: 123-456-7890
                          email: john.doe@example.com
                        items:
                          -
                            id: 1
                            product:
                              id: 10
                              product_title: 'Product Title'
                            quantity: 2
                            price: 25
                        status: pending
                        created_at: '2025-01-29T12:00:00Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        customer:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 123
                            full_name:
                              type: string
                              example: 'John Doe'
                            phone:
                              type: string
                              example: 123-456-7890
                            email:
                              type: string
                              example: john.doe@example.com
                        items:
                          type: array
                          example:
                            -
                              id: 1
                              product:
                                id: 10
                                product_title: 'Product Title'
                              quantity: 2
                              price: 25
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1
                              product:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 10
                                  product_title:
                                    type: string
                                    example: 'Product Title'
                              quantity:
                                type: integer
                                example: 2
                              price:
                                type: number
                                example: 25.0
                        status:
                          type: string
                          example: pending
                        created_at:
                          type: string
                          example: '2025-01-29T12:00:00Z'
                  total:
                    type: integer
                    example: 100
                  per_page:
                    type: integer
                    example: 20
                  last_page:
                    type: integer
                    example: 5
                  from:
                    type: integer
                    example: 1
                  to:
                    type: integer
                    example: 20
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'Failed to fetch products'
                  error: 'Error message'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'Failed to fetch products'
                  error:
                    type: string
                    example: 'Error message'
      tags:
        - 'Order Management'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  description: "optional The status of the order (e.g., 'pending', 'completed')."
                  example: sed
                  nullable: false
                sort_date:
                  type: string
                  description: "optional The sorting order for the orders based on their creation date. Accepts 'asc' or 'desc'. Defaults to 'asc'."
                  example: ratione
                  nullable: false
      security: []
  /api/v2/admin/order/cancel-order:
    post:
      summary: "Cancel an Order\n\nCancels an existing order by updating its status to 'canceled'."
      operationId: cancelAnOrderCancelsAnExistingOrderByUpdatingItsStatusTocanceled
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  message: 'Order has been cancelled'
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: 'Order has been cancelled'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Order not found'
                properties:
                  message:
                    type: string
                    example: 'Order not found'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'Order has been cancelled'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'Order has been cancelled'
      tags:
        - 'Order Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                orderId:
                  type: integer
                  description: 'The ID of the order to be canceled.'
                  example: 6
                  nullable: false
              required:
                - orderId
      security: []
  /api/v2/admin/order/shipped-order:
    post:
      summary: "Mark an Order as Shipped\n\nMarks an existing order as shipped by updating its status to 'shipped'.\nOptionally, this could also update the shipment timestamp and notify the customer."
      operationId: markAnOrderAsShippedMarksAnExistingOrderAsShippedByUpdatingItsStatusToshippedOptionallyThisCouldAlsoUpdateTheShipmentTimestampAndNotifyTheCustomer
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  message: 'Order has been shipped'
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: 'Order has been shipped'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Order not found'
                properties:
                  message:
                    type: string
                    example: 'Order not found'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'Order has failed to be shipped'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'Order has failed to be shipped'
      tags:
        - 'Order Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                orderId:
                  type: integer
                  description: 'The ID of the order to be marked as shipped.'
                  example: 3
                  nullable: false
              required:
                - orderId
      security: []
  /api/v2/admin/order/bulk_shipping:
    post:
      summary: "Bulk Update Orders to Shipped Status\n\nThis endpoint allows you to bulk update the status of multiple orders to 'shipped'.\nIt accepts an array of order IDs and processes them to set their status to 'shipped'."
      operationId: bulkUpdateOrdersToShippedStatusThisEndpointAllowsYouToBulkUpdateTheStatusOfMultipleOrdersToshippedItAcceptsAnArrayOfOrderIDsAndProcessesThemToSetTheirStatusToshipped
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  message: "Bulk operation for 'shipped' completed"
                  results:
                    shipped:
                      - 1
                      - 2
                      - 3
                    failed:
                      -
                        id: 4
                        message: 'Order not found'
                      -
                        id: 5
                        message: 'Status update failed'
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: "Bulk operation for 'shipped' completed"
                  results:
                    type: object
                    properties:
                      shipped:
                        type: array
                        example:
                          - 1
                          - 2
                          - 3
                        items:
                          type: integer
                      failed:
                        type: array
                        example:
                          -
                            id: 4
                            message: 'Order not found'
                          -
                            id: 5
                            message: 'Status update failed'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 4
                            message:
                              type: string
                              example: 'Order not found'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'Something went wrong'
                  error: 'Exception message here'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'Something went wrong'
                  error:
                    type: string
                    example: 'Exception message here'
      tags:
        - 'Order Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                order_Ids:
                  type: array
                  description: 'The IDs of the orders to be updated to shipped status.'
                  example:
                    - rerum
                  items:
                    type: string
              required:
                - order_Ids
      security: []
  /api/v2/admin/order/delivered-order:
    post:
      summary: "Mark an Order as Delivered\n\nMarks an existing order as delivered by updating its status to 'delivered'.\nOptionally, it records the delivery time and notifies the customer about the delivery."
      operationId: markAnOrderAsDeliveredMarksAnExistingOrderAsDeliveredByUpdatingItsStatusTodeliveredOptionallyItRecordsTheDeliveryTimeAndNotifiesTheCustomerAboutTheDelivery
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  message: 'Order has been delivered'
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: 'Order has been delivered'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Order not found'
                properties:
                  message:
                    type: string
                    example: 'Order not found'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'Order has failed to be delivered'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'Order has failed to be delivered'
      tags:
        - 'Order Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                orderId:
                  type: integer
                  description: 'The ID of the order to be marked as delivered.'
                  example: 17
                  nullable: false
              required:
                - orderId
      security: []
  /api/v2/admin/order/bulk-delivered:
    post:
      summary: "Bulk Update Orders to Delivered Status\n\nThis endpoint allows you to bulk update the status of multiple orders to 'delivered'.\nIt accepts an array of order IDs and processes them to set their status to 'delivered'."
      operationId: bulkUpdateOrdersToDeliveredStatusThisEndpointAllowsYouToBulkUpdateTheStatusOfMultipleOrdersTodeliveredItAcceptsAnArrayOfOrderIDsAndProcessesThemToSetTheirStatusTodelivered
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  message: "Bulk operation for 'delivered' completed"
                  results:
                    delivered:
                      - 1
                      - 2
                      - 3
                    failed:
                      -
                        id: 4
                        message: 'Order not found'
                      -
                        id: 5
                        message: 'Status update failed'
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: "Bulk operation for 'delivered' completed"
                  results:
                    type: object
                    properties:
                      delivered:
                        type: array
                        example:
                          - 1
                          - 2
                          - 3
                        items:
                          type: integer
                      failed:
                        type: array
                        example:
                          -
                            id: 4
                            message: 'Order not found'
                          -
                            id: 5
                            message: 'Status update failed'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 4
                            message:
                              type: string
                              example: 'Order not found'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'Something went wrong'
                  error: 'Exception message here'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'Something went wrong'
                  error:
                    type: string
                    example: 'Exception message here'
      tags:
        - 'Order Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                order_Ids:
                  type: array
                  description: 'The IDs of the orders to be updated to delivered status.'
                  example:
                    - distinctio
                  items:
                    type: string
              required:
                - order_Ids
      security: []
  /api/v2/admin/order/completed-order:
    post:
      summary: "Mark an Order as Completed\n\nMarks an existing order as completed by updating its status to 'completed'."
      operationId: markAnOrderAsCompletedMarksAnExistingOrderAsCompletedByUpdatingItsStatusTocompleted
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  message: 'Order has been completed'
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: 'Order has been completed'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Order not found'
                properties:
                  message:
                    type: string
                    example: 'Order not found'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'Order has failed been completed'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'Order has failed been completed'
      tags:
        - 'Order Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                orderId:
                  type: integer
                  description: 'The ID of the order to be marked as completed.'
                  example: 6
                  nullable: false
              required:
                - orderId
      security: []
  /api/v2/admin/order/bulk-canceled:
    post:
      summary: "Bulk Update Orders to Canceled Status\n\nThis endpoint allows you to bulk update the status of multiple orders to 'canceled'.\nIt accepts an array of order IDs and processes them to set their status to 'canceled'."
      operationId: bulkUpdateOrdersToCanceledStatusThisEndpointAllowsYouToBulkUpdateTheStatusOfMultipleOrdersTocanceledItAcceptsAnArrayOfOrderIDsAndProcessesThemToSetTheirStatusTocanceled
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  message: "Bulk operation for 'canceled' completed"
                  results:
                    canceled:
                      - 1
                      - 2
                      - 3
                    failed:
                      -
                        id: 4
                        message: 'Order not found'
                      -
                        id: 5
                        message: 'Status update failed'
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: "Bulk operation for 'canceled' completed"
                  results:
                    type: object
                    properties:
                      canceled:
                        type: array
                        example:
                          - 1
                          - 2
                          - 3
                        items:
                          type: integer
                      failed:
                        type: array
                        example:
                          -
                            id: 4
                            message: 'Order not found'
                          -
                            id: 5
                            message: 'Status update failed'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 4
                            message:
                              type: string
                              example: 'Order not found'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'Something went wrong'
                  error: 'Exception message here'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'Something went wrong'
                  error:
                    type: string
                    example: 'Exception message here'
      tags:
        - 'Order Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                order_Ids:
                  type: array
                  description: 'The IDs of the orders to be updated to canceled status.'
                  example:
                    - reprehenderit
                  items:
                    type: string
              required:
                - order_Ids
      security: []
  /api/v2/admin/order/bulk-completed:
    post:
      summary: "Bulk Update Orders to Completed Status\n\nThis endpoint allows you to bulk update the status of multiple orders to 'completed'.\nIt accepts an array of order IDs and processes them to set their status to 'completed'."
      operationId: bulkUpdateOrdersToCompletedStatusThisEndpointAllowsYouToBulkUpdateTheStatusOfMultipleOrdersTocompletedItAcceptsAnArrayOfOrderIDsAndProcessesThemToSetTheirStatusTocompleted
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  message: "Bulk operation for 'completed' completed"
                  results:
                    completed:
                      - 1
                      - 2
                      - 3
                    failed:
                      -
                        id: 4
                        message: 'Order not found'
                      -
                        id: 5
                        message: 'Status update failed'
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: "Bulk operation for 'completed' completed"
                  results:
                    type: object
                    properties:
                      completed:
                        type: array
                        example:
                          - 1
                          - 2
                          - 3
                        items:
                          type: integer
                      failed:
                        type: array
                        example:
                          -
                            id: 4
                            message: 'Order not found'
                          -
                            id: 5
                            message: 'Status update failed'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 4
                            message:
                              type: string
                              example: 'Order not found'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'Something went wrong'
                  error: 'Exception message here'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'Something went wrong'
                  error:
                    type: string
                    example: 'Exception message here'
      tags:
        - 'Order Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                order_Ids:
                  type: array
                  description: 'The IDs of the orders to be updated to completed status.'
                  example:
                    - provident
                  items:
                    type: string
              required:
                - order_Ids
      security: []
  /api/v2/admin/order/order-status-analysis:
    post:
      summary: "Get the Order Status Analysis\n\nRetrieves the count of orders by their status (pending, completed, canceled, delivered, and shipped).\nThis is helpful for analyzing the distribution of orders across various statuses."
      operationId: getTheOrderStatusAnalysisRetrievesTheCountOfOrdersByTheirStatuspendingCompletedCanceledDeliveredAndShippedThisIsHelpfulForAnalyzingTheDistributionOfOrdersAcrossVariousStatuses
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  payload:
                    pending: 10
                    completed: 25
                    canceled: 5
                    delivered: 30
                    shipped: 20
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  payload:
                    type: object
                    properties:
                      pending:
                        type: integer
                        example: 10
                      completed:
                        type: integer
                        example: 25
                      canceled:
                        type: integer
                        example: 5
                      delivered:
                        type: integer
                        example: 30
                      shipped:
                        type: integer
                        example: 20
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: ERROR
                  message: 'Internal Server Error'
                properties:
                  status:
                    type: string
                    example: ERROR
                  message:
                    type: string
                    example: 'Internal Server Error'
      tags:
        - 'Order Management'
      security: []
  /api/v2/admin/order/export-order:
    get:
      summary: "Export Orders\n\nExports a list of orders with optional filters for status and sorting by date."
      operationId: exportOrdersExportsAListOfOrdersWithOptionalFiltersForStatusAndSortingByDate
      description: ''
      parameters:
        -
          in: query
          name: status
          description: 'Optional The status of the orders to filter.'
          example: pending
          required: false
          schema:
            type: string
            description: 'Optional The status of the orders to filter.'
            example: pending
            nullable: false
        -
          in: query
          name: sort_date
          description: "Optional The sorting order for the creation date ('asc' or 'desc'). Default is 'asc'."
          example: desc
          required: false
          schema:
            type: string
            description: "Optional The sorting order for the creation date ('asc' or 'desc'). Default is 'asc'."
            example: desc
            nullable: false
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  file: orders.csv
                properties:
                  file:
                    type: string
                    example: orders.csv
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'No orders found to export.'
                properties:
                  message:
                    type: string
                    example: 'No orders found to export.'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'An error occurred while exporting orders.'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'An error occurred while exporting orders.'
      tags:
        - 'Order Management'
      security: []
  /api/v2/admin/product/all-product:
    get:
      summary: 'Get All Products'
      operationId: getAllProducts
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  message: 'Products retrieved successfully'
                  data:
                    -
                      id: 1
                      product_title: 'Sample Product'
                      status: Active
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: 'Products retrieved successfully'
                  data:
                    type: array
                    example:
                      -
                        id: 1
                        product_title: 'Sample Product'
                        status: Active
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        product_title:
                          type: string
                          example: 'Sample Product'
                        status:
                          type: string
                          example: Active
      tags:
        - 'Product Management'
      security: []
  /api/v2/admin/product/view-product:
    post:
      summary: 'Review Product'
      operationId: reviewProduct
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  message: 'Product reviewed successfully'
                  data:
                    id: 11
                    product_title: 'Sample Product'
                    status: Reviewed
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: 'Product reviewed successfully'
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 11
                      product_title:
                        type: string
                        example: 'Sample Product'
                      status:
                        type: string
                        example: Reviewed
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  message: 'Invalid Product ID'
                properties:
                  status:
                    type: string
                    example: FAILED
                  message:
                    type: string
                    example: 'Invalid Product ID'
      tags:
        - 'Product Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the product to be reviewed.'
                  example: 11
                  nullable: false
              required:
                - id
      security: []
  /api/v2/admin/product/approve-product:
    post:
      summary: "Approve a Product\n\nThis endpoint approves a product by changing its status."
      operationId: approveAProductThisEndpointApprovesAProductByChangingItsStatus
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  message: 'Product approved successfully.'
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: 'Product approved successfully.'
      tags:
        - 'Product Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the product to approve.'
                  example: 3
                  nullable: false
              required:
                - id
      security: []
  /api/v2/admin/product/bulk-approve:
    post:
      summary: "Bulk Approve Products\n\nApprove multiple products in bulk."
      operationId: bulkApproveProductsApproveMultipleProductsInBulk
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  message: 'Bulk operation completed'
                  results:
                    approved:
                      - 1
                      - 2
                    failed:
                      -
                        id: 3
                        message: 'Invalid status'
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: 'Bulk operation completed'
                  results:
                    type: object
                    properties:
                      approved:
                        type: array
                        example:
                          - 1
                          - 2
                        items:
                          type: integer
                      failed:
                        type: array
                        example:
                          -
                            id: 3
                            message: 'Invalid status'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 3
                            message:
                              type: string
                              example: 'Invalid status'
      tags:
        - 'Product Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                product_Ids:
                  type: array
                  description: 'The list of product IDs to approve.'
                  example:
                    - 1
                    - 2
                    - 3
                  items:
                    type: string
              required:
                - product_Ids
      security: []
  /api/v2/admin/product/reject-product:
    post:
      summary: "Reject a Product\n\nRejects a product with a given reason."
      operationId: rejectAProductRejectsAProductWithAGivenReason
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  message: 'Product rejected successfully.'
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: 'Product rejected successfully.'
      tags:
        - 'Product Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the product to reject.'
                  example: 18
                  nullable: false
                reason:
                  type: string
                  description: 'The reason for rejection.'
                  example: et
                  nullable: false
              required:
                - id
                - reason
      security: []
  /api/v2/admin/product/bulk-reject:
    post:
      summary: "Bulk reject Products\n\nReject multiple products in bulk."
      operationId: bulkRejectProductsRejectMultipleProductsInBulk
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  message: 'Bulk operation completed'
                  results:
                    rejected:
                      - 1
                      - 2
                    failed:
                      -
                        id: 3
                        message: 'Invalid status'
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: 'Bulk operation completed'
                  results:
                    type: object
                    properties:
                      rejected:
                        type: array
                        example:
                          - 1
                          - 2
                        items:
                          type: integer
                      failed:
                        type: array
                        example:
                          -
                            id: 3
                            message: 'Invalid status'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 3
                            message:
                              type: string
                              example: 'Invalid status'
      tags:
        - 'Product Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                product_Ids:
                  type: array
                  description: 'The list of product IDs to approve.'
                  example:
                    - 1
                    - 2
                    - 3
                  items:
                    type: string
              required:
                - product_Ids
      security: []
  /api/v2/admin/product/update-product:
    post:
      summary: "Update a Product\n\nUpdates product details."
      operationId: updateAProductUpdatesProductDetails
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  edit_product:
                    id: 1
                    product_title: 'New Title'
                    price: 50.0
                    quantity_available: 100
                properties:
                  status:
                    type: string
                    example: success
                  edit_product:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      product_title:
                        type: string
                        example: 'New Title'
                      price:
                        type: number
                        example: 50.0
                      quantity_available:
                        type: integer
                        example: 100
      tags:
        - 'Product Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  description: 'The ID of the product.'
                  example: 14
                  nullable: false
                product_title:
                  type: string
                  description: 'The title of the product.'
                  example: repellat
                  nullable: false
                price:
                  type: number
                  description: 'The price of the product.'
                  example: 687913.761
                  nullable: false
                quantity_available:
                  type: integer
                  description: 'The available quantity.'
                  example: 8
                  nullable: false
              required:
                - id
      security: []
  /api/v2/admin/product/product-analytics:
    get:
      summary: "Get Product Analytics\n\nRetrieves the count of products in different statuses."
      operationId: getProductAnalyticsRetrievesTheCountOfProductsInDifferentStatuses
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  payload:
                    pending_count: 5
                    approved_count: 10
                    rejected_count: 2
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  payload:
                    type: object
                    properties:
                      pending_count:
                        type: integer
                        example: 5
                      approved_count:
                        type: integer
                        example: 10
                      rejected_count:
                        type: integer
                        example: 2
      tags:
        - 'Product Management'
      security: []
  /api/v2/admin/product/export-products:
    get:
      summary: ''
      operationId: getApiV2AdminProductExportProducts
      description: ''
      parameters: []
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized
                properties:
                  error:
                    type: string
                    example: Unauthorized
      tags:
        - 'Product Management'
      security: []
  /api/v2/admin/category/add-subcategory:
    post:
      summary: "Add SubCategories\n\nAdds one or more subcategories to a category."
      operationId: addSubCategoriesAddsOneOrMoreSubcategoriesToACategory
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  result: true
                  success: 'subcategory created successfully'
                properties:
                  result:
                    type: boolean
                    example: true
                  success:
                    type: string
                    example: 'subcategory created successfully'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: ERROR
                  errors:
                    category_id:
                      - 'The category id must be a valid integer.'
                    'sub_categories.*.name':
                      - 'The subcategory name is required.'
                properties:
                  status:
                    type: string
                    example: ERROR
                  errors:
                    type: object
                    properties:
                      category_id:
                        type: array
                        example:
                          - 'The category id must be a valid integer.'
                        items:
                          type: string
                      'sub_categories.*.name':
                        type: array
                        example:
                          - 'The subcategory name is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  data: 'Error message'
                properties:
                  status:
                    type: string
                    example: FAILED
                  data:
                    type: string
                    example: 'Error message'
      tags:
        - 'SubCategory Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                category_id:
                  type: integer
                  description: 'The ID of the category to associate the subcategories with.'
                  example: 7
                  nullable: false
                sub_categories:
                  type: array
                  description: 'An array of subcategory names.'
                  example:
                    - omnis
                  items:
                    type: string
              required:
                - category_id
                - sub_categories
      security: []
  /api/v2/admin/category/update-subcategory:
    post:
      summary: "Update SubCategories\n\nUpdates existing subcategories or creates new ones within a category."
      operationId: updateSubCategoriesUpdatesExistingSubcategoriesOrCreatesNewOnesWithinACategory
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: SUCCESS
                  message: 'Subcategories updated successfully.'
                properties:
                  status:
                    type: string
                    example: SUCCESS
                  message:
                    type: string
                    example: 'Subcategories updated successfully.'
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: ERROR
                  errors:
                    category_id:
                      - 'The category id must be a valid integer.'
                    'sub_categories.*.sub_id':
                      - 'The subcategory id is required.'
                    'sub_categories.*.name':
                      - 'The subcategory name is required.'
                properties:
                  status:
                    type: string
                    example: ERROR
                  errors:
                    type: object
                    properties:
                      category_id:
                        type: array
                        example:
                          - 'The category id must be a valid integer.'
                        items:
                          type: string
                      'sub_categories.*.sub_id':
                        type: array
                        example:
                          - 'The subcategory id is required.'
                        items:
                          type: string
                      'sub_categories.*.name':
                        type: array
                        example:
                          - 'The subcategory name is required.'
                        items:
                          type: string
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: FAILED
                  error: 'Error message'
                properties:
                  status:
                    type: string
                    example: FAILED
                  error:
                    type: string
                    example: 'Error message'
      tags:
        - 'SubCategory Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                category_id:
                  type: integer
                  description: 'The ID of the category to update subcategories within.'
                  example: 17
                  nullable: false
                sub_categories:
                  type: array
                  description: 'An array of subcategories to be updated.'
                  example:
                    - totam
                  items:
                    type: string
              required:
                - category_id
                - sub_categories
      security: []
tags:
  -
    name: 'AdminPortal Management'
    description: ''
  -
    name: 'Category Management'
    description: ''
  -
    name: Endpoints
    description: ''
  -
    name: 'Inventory Management'
    description: ''
  -
    name: 'Order Management'
    description: ''
  -
    name: 'Product Management'
    description: ''
  -
    name: 'SubCategory Management'
    description: ''
