openapi: 3.0.3
info:
  title: 'eInvoiceMe API Documentation'
  description: 'Start (and never finish) side projects with this API.'
  version: 1.0.0
servers:
  -
    url: 'http://127.0.0.1:8000'
tags:
  -
    name: Authentication
    description: "*\nOur APIs uses the bearer tokens to authorize and authenticate calls. It provides secure access to protect resources thereby reducing the hassle of asking for a username and password everytime a user logs in."
  -
    name: Branch
    description: ''
  -
    name: 'Manage Companies'
    description: "*\nCreate & Manage Companies for the user."
  -
    name: 'Manage Profile'
    description: "\nThis controller handles the management of user profiles, including viewing and updating profile information."
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: 'You can retrieve your token by using the Authentication > Login API Endpoint.'
security:
  -
    default: []
paths:
  /api/register:
    post:
      summary: 'Register a new user'
      operationId: registerANewUser
      description: "Once the user is registered, a welcome email is sent to the user.\nThey can now login to the system using login API."
      parameters: []
      responses: {  }
      tags:
        - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'The name of the user. Must not be greater than 255 characters.'
                  example: 'Ahsan Zaman'
                  nullable: false
                email:
                  type: string
                  description: 'The email of the user. Must be a valid email address. Must not be greater than 255 characters.'
                  example: jerde.abdullah@example.net
                  nullable: false
                password:
                  type: string
                  description: 'The password of the user. It must be at least 8 characters long and confirmed.'
                  example: Test1234
                  nullable: false
                password_confirmation:
                  type: string
                  description: 'The password confirmation of the user. It must match the password. The value and <code>password</code> must match.'
                  example: Test1234
                  nullable: false
                training_activate:
                  type: boolean
                  description: 'Activate the training for the user.'
                  example: false
                  nullable: true
                seller:
                  type: string
                  description: 'Seller ID of the user if applicable. Must be 8 characters.'
                  example: null
                  nullable: true
                country:
                  type: string
                  description: 'The country code of the user. Must be 2 characters.'
                  example: SA
                  nullable: true
                phone:
                  type: string
                  description: 'The phone number of the user. It should be a valid phone number for the specified country.'
                  example: '+966571708606'
                  nullable: true
              required:
                - name
                - email
                - password
                - password_confirmation
      security: []
  /api/login:
    post:
      summary: 'Login a user'
      operationId: loginAUser
      description: 'This API is used to login a user. It returns a token that can be used to access protected resources.'
      parameters: []
      responses: {  }
      tags:
        - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: 'The Email of the user.'
                  example: ahsan.web.ml@gmail.com
                  nullable: false
                password:
                  type: string
                  description: 'The password of the user.'
                  example: Test1234
                  nullable: false
                device_name:
                  type: string
                  description: 'The name of the device from which the user is logging in.'
                  example: 'My Laptop'
                  nullable: false
              required:
                - email
                - device_name
      security: []
  /api/logout:
    post:
      summary: 'Logout a user'
      operationId: logoutAUser
      description: 'This API is used to logout the current user. And revoke the access token.'
      parameters: []
      responses: {  }
      tags:
        - Authentication
  /api/permissions:
    get:
      summary: 'Display a list of available permssions.'
      operationId: displayAListOfAvailablePermssions
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      name: view.invoice
                      updated_at: '2025-07-13'
                      created_at: '2025-07-13'
                    -
                      name: create.invoice
                      updated_at: '2025-07-13'
                      created_at: '2025-07-13'
                    -
                      name: share.invoice
                      updated_at: '2025-07-13'
                      created_at: '2025-07-13'
                    -
                      name: view.credit-note
                      updated_at: '2025-07-13'
                      created_at: '2025-07-13'
                    -
                      name: create.credit-note
                      updated_at: '2025-07-13'
                      created_at: '2025-07-13'
                    -
                      name: share.credit-note
                      updated_at: '2025-07-13'
                      created_at: '2025-07-13'
                    -
                      name: view.debit-note
                      updated_at: '2025-07-13'
                      created_at: '2025-07-13'
                    -
                      name: create.debit-note
                      updated_at: '2025-07-13'
                      created_at: '2025-07-13'
                    -
                      name: share.debit-note
                      updated_at: '2025-07-13'
                      created_at: '2025-07-13'
                    -
                      name: view.dashboard
                      updated_at: '2025-07-13'
                      created_at: '2025-07-13'
                  links:
                    first: null
                    last: null
                    prev: null
                    next: 'http://127.0.0.1:8000/api/permissions?cursor=eyJwZXJtaXNzaW9ucy5pZCI6MTAsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0'
                  meta:
                    path: 'http://127.0.0.1:8000/api/permissions'
                    per_page: 10
                    next_cursor: eyJwZXJtaXNzaW9ucy5pZCI6MTAsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0
                    prev_cursor: null
                properties:
                  data:
                    type: array
                    example:
                      -
                        name: view.invoice
                        updated_at: '2025-07-13'
                        created_at: '2025-07-13'
                      -
                        name: create.invoice
                        updated_at: '2025-07-13'
                        created_at: '2025-07-13'
                      -
                        name: share.invoice
                        updated_at: '2025-07-13'
                        created_at: '2025-07-13'
                      -
                        name: view.credit-note
                        updated_at: '2025-07-13'
                        created_at: '2025-07-13'
                      -
                        name: create.credit-note
                        updated_at: '2025-07-13'
                        created_at: '2025-07-13'
                      -
                        name: share.credit-note
                        updated_at: '2025-07-13'
                        created_at: '2025-07-13'
                      -
                        name: view.debit-note
                        updated_at: '2025-07-13'
                        created_at: '2025-07-13'
                      -
                        name: create.debit-note
                        updated_at: '2025-07-13'
                        created_at: '2025-07-13'
                      -
                        name: share.debit-note
                        updated_at: '2025-07-13'
                        created_at: '2025-07-13'
                      -
                        name: view.dashboard
                        updated_at: '2025-07-13'
                        created_at: '2025-07-13'
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          example: view.invoice
                        updated_at:
                          type: string
                          example: '2025-07-13'
                        created_at:
                          type: string
                          example: '2025-07-13'
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: null
                      last:
                        type: string
                        example: null
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: 'http://127.0.0.1:8000/api/permissions?cursor=eyJwZXJtaXNzaW9ucy5pZCI6MTAsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0'
                  meta:
                    type: object
                    properties:
                      path:
                        type: string
                        example: 'http://127.0.0.1:8000/api/permissions'
                      per_page:
                        type: integer
                        example: 10
                      next_cursor:
                        type: string
                        example: eyJwZXJtaXNzaW9ucy5pZCI6MTAsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0
                      prev_cursor:
                        type: string
                        example: null
      tags:
        - Branch
  /api/temp-files/upload:
    post:
      summary: 'Save a temporary file.'
      operationId: saveATemporaryFile
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: false
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                image:
                  type: string
                  format: binary
                  description: 'Must be an image. Must not be greater than 6000 kilobytes.'
                  nullable: true
  /api/temp-files/delete:
    delete:
      summary: 'Delete a temporary file.'
      operationId: deleteATemporaryFile
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
  '/api/temp-files/{media_id}':
    delete:
      summary: 'Delete a media file.'
      operationId: deleteAMediaFile
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: media_id
        description: 'The ID of the media.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/dashboard':
    get:
      summary: 'Branch Dashboard'
      operationId: branchDashboard
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Dashboard Data'
                  chart1:
                    label: []
                    data: []
                    limit: Unlimited
                    used: 0
                    remaining: Unlimited
                  chart2:
                    label: []
                    data: []
                    limit: 0
                    used: 0
                    remaining: 0
                  chart3:
                    label: []
                    data: []
                    limit: Unlimited
                    used: 0
                    remaining: Unlimited
                  totalSales: 0
                  totalVat: 0
                  totalCredit: 0
                  totalCreditVat: 0
                  chartSales:
                    label: []
                    data: []
                    limit: 1000
                    used: 0
                properties:
                  message:
                    type: string
                    example: 'Dashboard Data'
                  chart1:
                    type: object
                    properties:
                      label:
                        type: array
                        example: []
                      data:
                        type: array
                        example: []
                      limit:
                        type: string
                        example: Unlimited
                      used:
                        type: integer
                        example: 0
                      remaining:
                        type: string
                        example: Unlimited
                  chart2:
                    type: object
                    properties:
                      label:
                        type: array
                        example: []
                      data:
                        type: array
                        example: []
                      limit:
                        type: integer
                        example: 0
                      used:
                        type: integer
                        example: 0
                      remaining:
                        type: integer
                        example: 0
                  chart3:
                    type: object
                    properties:
                      label:
                        type: array
                        example: []
                      data:
                        type: array
                        example: []
                      limit:
                        type: string
                        example: Unlimited
                      used:
                        type: integer
                        example: 0
                      remaining:
                        type: string
                        example: Unlimited
                  totalSales:
                    type: integer
                    example: 0
                  totalVat:
                    type: integer
                    example: 0
                  totalCredit:
                    type: integer
                    example: 0
                  totalCreditVat:
                    type: integer
                    example: 0
                  chartSales:
                    type: object
                    properties:
                      label:
                        type: array
                        example: []
                      data:
                        type: array
                        example: []
                      limit:
                        type: integer
                        example: 1000
                      used:
                        type: integer
                        example: 0
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/invoice-settings':
    get:
      summary: 'Display invoice settings for specified branch.'
      operationId: displayInvoiceSettingsForSpecifiedBranch
      description: ''
      parameters: []
      responses:
        403:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'This action is unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'This action is unauthorized.'
      tags:
        - Branch
    post:
      summary: 'Update invoice settings for the specified branch.'
      operationId: updateInvoiceSettingsForTheSpecifiedBranch
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                invoice:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                credit_note:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                debit_note:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                auto_sms:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                auto_email:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                currency:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: rqglgntfd
                  nullable: false
                frac_unit:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: wfriqawp
                  nullable: false
                qty_label:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: bdbmtqcyuopfhougegxfvalb
                  nullable: true
                qty_label_ar:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: ubrpnp
                  nullable: true
                qty2_label:
                  type: string
                  description: 'Must not be greater than 32 characters.'
                  example: oruielmoii
                  nullable: true
                qty2_label_ar:
                  type: string
                  description: 'Must not be greater than 32 characters.'
                  example: wwmswfk
                  nullable: true
                quotation_title_en:
                  type: string
                  description: 'Must not be greater than 32 characters.'
                  example: turithp
                  nullable: true
                quotation_title_ar:
                  type: string
                  description: 'Must not be greater than 32 characters.'
                  example: fwznfuyaobhbjkwyz
                  nullable: true
                show_qty2:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                show_product_id:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                total_qty:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                show_word_amount:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                show_word_amount_ar:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                show_word_payable:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                show_word_payable_ar:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                show_name_en:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                show_payment_method:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                show_credit_days:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                disable_credit_sales:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                show_created_by:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                customer_email:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                customer_phone:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                customer_additional_id:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                customer_credit_limit:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                add_to_inventory:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                strict_inventory:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                adjust_inventory:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                pos_payment_required:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                auto_print:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                size:
                  type: integer
                  description: 'Must be between 40 and 220.'
                  example: 41
                  nullable: false
                show_email:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                show_phone:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                use_min_max:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                latest_price:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                new_entry:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                customer_in_simplified:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                product_id_required:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                total_qty_form:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                reverse_invoice_items:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                show_all_fields:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                show_calc:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                bank_must:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                branch_bank_id:
                  type: integer
                  description: 'The <code>id</code> of an existing record in the branch_banks table.'
                  example: 14
                  nullable: true
                round_line_items:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                negative_price:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                format_amount:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                rounding:
                  type: string
                  description: ''
                  example: 'Downward Rounding'
                  nullable: false
                  enum:
                    - Disabled
                    - 'Upward Rounding'
                    - 'Downward Rounding'
                    - 'Normal Rounding'
                tax_template_id:
                  type: integer
                  description: 'The <code>id</code> of an existing record in the invoice_templates table.'
                  example: 20
                  nullable: true
                simplified_template_id:
                  type: integer
                  description: 'The <code>id</code> of an existing record in the invoice_templates table.'
                  example: 20
                  nullable: true
                extras:
                  type: array
                  description: 'Must not have more than 10 items.'
                  example: null
                  items:
                    type: object
                    nullable: true
                    properties:
                      label:
                        type: string
                        description: 'Must not be greater than 256 characters.'
                        example: kj
                        nullable: true
                      value:
                        type: string
                        description: 'Must not be greater than 256 characters.'
                        example: jmxsfzzqqtztksdvqaa
                        nullable: true
                stamp:
                  type: string
                  description: 'Must not be greater than 1024 characters.'
                  example: fccamoxyktrabqdwnp
                  nullable: true
                auto_starting_balance:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                attach_supplier_to_customer:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                supplier_on_rv:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                daily_sales_no:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                tax_filing:
                  type: string
                  description: ''
                  example: Monthly
                  nullable: true
                  enum:
                    - Quarterly
                    - Monthly
                custom_fields:
                  type: object
                  description: ''
                  example: null
                  nullable: true
                  properties: {  }
                bank_on_rv:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
                optional_supplier_on_purchases:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
                purchase_sequence:
                  type: boolean
                  description: ''
                  example: false
                  nullable: false
              required:
                - rounding
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/branch-emails/login-with-google':
    get:
      summary: 'Login with Google. Use Gmail account.'
      operationId: loginWithGoogleUseGmailAccount
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Redirect user to the following URL to initiate the login process'
                  data: 'https://accounts.google.com/o/oauth2/v2/auth?response_type=code&access_type=offline&client_id=449339483187-o1qidqhqu3kulg47ta8psgru5dkcmaum.apps.googleusercontent.com&redirect_uri=http%3A%2F%2F127.0.0.1%3A8000%2Fapi%2Fcompanies%2F10000%2Fbranches%2F1000%2Fbranch-emails%2Flogin-with-google%2Fcallback&state=1000&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.send&approval_prompt=auto'
                properties:
                  message:
                    type: string
                    example: 'Redirect user to the following URL to initiate the login process'
                  data:
                    type: string
                    example: 'https://accounts.google.com/o/oauth2/v2/auth?response_type=code&access_type=offline&client_id=449339483187-o1qidqhqu3kulg47ta8psgru5dkcmaum.apps.googleusercontent.com&redirect_uri=http%3A%2F%2F127.0.0.1%3A8000%2Fapi%2Fcompanies%2F10000%2Fbranches%2F1000%2Fbranch-emails%2Flogin-with-google%2Fcallback&state=1000&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.send&approval_prompt=auto'
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/branch-emails/login-with-google/callback':
    get:
      summary: 'Login with Google. Callback URL.'
      operationId: loginWithGoogleCallbackURL
      description: ''
      parameters: []
      responses:
        403:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Access Denied'
                properties:
                  message:
                    type: string
                    example: 'Access Denied'
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  description: ''
                  example: est
                  nullable: false
                state:
                  type: string
                  description: ''
                  example: enim
                  nullable: false
              required:
                - code
                - state
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/branch-emails/login-with-google/disconnect':
    get:
      summary: 'Login with Google. Disconnect Gmail account.'
      operationId: loginWithGoogleDisconnectGmailAccount
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Your company does not have any email configs.'
                properties:
                  message:
                    type: string
                    example: 'Your company does not have any email configs.'
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/branch-emails':
    get:
      summary: 'Custom email settings for the specified branch.'
      operationId: customEmailSettingsForTheSpecifiedBranch
      description: ''
      parameters: []
      responses:
        403:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'This action is unauthorized.'
                properties:
                  message:
                    type: string
                    example: 'This action is unauthorized.'
      tags:
        - Branch
    post:
      summary: 'Store a newly created resource in storage.'
      operationId: storeANewlyCreatedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                server:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: gdixbn
                  nullable: true
                port:
                  type: integer
                  description: ''
                  example: 9
                  nullable: true
                from:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: lcyetohqzozp
                  nullable: true
                username:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: bwiwefopnimalmmerpdrzfnjl
                  nullable: true
                password:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: '`2#Nd4zE%:@wuT-c!'
                  nullable: true
                encryption:
                  type: string
                  description: ''
                  example: ssl
                  nullable: true
                  enum:
                    - ssl
                    - tls
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/branch-emails/{id}':
    delete:
      summary: 'Remove the specified resource from storage.'
      operationId: removeTheSpecifiedResourceFromStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the branch email.'
        example: 4
        required: true
        schema:
          type: integer
  '/api/companies/{company}/branches/{branch}/printers/download':
    get:
      summary: 'Printer Client Download'
      operationId: printerClientDownload
      description: ''
      parameters: []
      responses:
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Server Error'
                properties:
                  message:
                    type: string
                    example: 'Server Error'
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company
        description: 'The company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch
        description: 'The branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/printers':
    get:
      summary: 'Display the current printer for the specified branch.'
      operationId: displayTheCurrentPrinterForTheSpecifiedBranch
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: 2
                      created_at: '2025-07-19 02:26:26'
                      updated_at: '2025-07-19 02:26:26'
                      name: Dell
                      api_token: Wy1EAfK4gzyUsXEBnF25GHRVD4GkrWkhlCXKTgLV
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: 2
                        created_at: '2025-07-19 02:26:26'
                        updated_at: '2025-07-19 02:26:26'
                        name: Dell
                        api_token: Wy1EAfK4gzyUsXEBnF25GHRVD4GkrWkhlCXKTgLV
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 2
                        created_at:
                          type: string
                          example: '2025-07-19 02:26:26'
                        updated_at:
                          type: string
                          example: '2025-07-19 02:26:26'
                        name:
                          type: string
                          example: Dell
                        api_token:
                          type: string
                          example: Wy1EAfK4gzyUsXEBnF25GHRVD4GkrWkhlCXKTgLV
      tags:
        - Branch
    post:
      summary: 'Add a new printer for the specified branch.'
      operationId: addANewPrinterForTheSpecifiedBranch
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: lfg
                  nullable: false
              required:
                - name
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/printers/{id}':
    delete:
      summary: 'Remove the specified printer from the specified branch.'
      operationId: removeTheSpecifiedPrinterFromTheSpecifiedBranch
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the printer.'
        example: 2
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/sales-groups/{salesGroup_id}/customers':
    get:
      summary: 'List of customers for the specified sales group.'
      operationId: listOfCustomersForTheSpecifiedSalesGroup
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Server Error'
                properties:
                  message:
                    type: string
                    example: 'Server Error'
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: salesGroup_id
        description: 'The ID of the salesGroup.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/sales-groups/{salesGroup_id}/customers/export/pdf':
    get:
      summary: 'Generate PDF of customers for the specified sales group.'
      operationId: generatePDFOfCustomersForTheSpecifiedSalesGroup
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Server Error'
                properties:
                  message:
                    type: string
                    example: 'Server Error'
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: salesGroup_id
        description: 'The ID of the salesGroup.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/sales-groups/{salesGroup_id}/customers/transfer':
    get:
      summary: 'Transfer customers from one sales person to another.'
      operationId: transferCustomersFromOneSalesPersonToAnother
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Customers transferred successfully.'
                properties:
                  message:
                    type: string
                    example: 'Customers transferred successfully.'
      tags:
        - Branch
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                customers:
                  type: array
                  description: ''
                  example:
                    - 15
                  items:
                    type: integer
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: salesGroup_id
        description: 'The ID of the salesGroup.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/sales-groups':
    get:
      summary: 'List of sales groups for the specified branch.'
      operationId: listOfSalesGroupsForTheSpecifiedBranch
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: 1
                      created_at: '2025-07-19 23:32:45'
                      updated_at: '2025-07-19 23:32:45'
                      deleted_at: null
                      code: SG001
                      name: 'Sales Group TEST 1'
                      name_en: null
                      phone: null
                      email: null
                      country: null
                      address: null
                      branch_id: 1000
                      user_id: null
                      invoice_template_id: null
                      customer_type_id: null
                      type: 'B2B Sales'
                      route_planning: 0
                      name_locale: 'Sales Group TEST 1'
                    -
                      id: 2
                      created_at: '2025-07-19 23:32:56'
                      updated_at: '2025-07-19 23:48:33'
                      deleted_at: null
                      code: SG002
                      name: No-example
                      name_en: null
                      phone: null
                      email: null
                      country: null
                      address: null
                      branch_id: 1000
                      user_id: null
                      invoice_template_id: null
                      customer_type_id: null
                      type: 'B2B Sales'
                      route_planning: 0
                      name_locale: No-example
                  links:
                    first: null
                    last: null
                    prev: null
                    next: null
                  meta:
                    path: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/sales-groups'
                    per_page: 10
                    next_cursor: null
                    prev_cursor: null
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: 1
                        created_at: '2025-07-19 23:32:45'
                        updated_at: '2025-07-19 23:32:45'
                        deleted_at: null
                        code: SG001
                        name: 'Sales Group TEST 1'
                        name_en: null
                        phone: null
                        email: null
                        country: null
                        address: null
                        branch_id: 1000
                        user_id: null
                        invoice_template_id: null
                        customer_type_id: null
                        type: 'B2B Sales'
                        route_planning: 0
                        name_locale: 'Sales Group TEST 1'
                      -
                        id: 2
                        created_at: '2025-07-19 23:32:56'
                        updated_at: '2025-07-19 23:48:33'
                        deleted_at: null
                        code: SG002
                        name: No-example
                        name_en: null
                        phone: null
                        email: null
                        country: null
                        address: null
                        branch_id: 1000
                        user_id: null
                        invoice_template_id: null
                        customer_type_id: null
                        type: 'B2B Sales'
                        route_planning: 0
                        name_locale: No-example
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        created_at:
                          type: string
                          example: '2025-07-19 23:32:45'
                        updated_at:
                          type: string
                          example: '2025-07-19 23:32:45'
                        deleted_at:
                          type: string
                          example: null
                        code:
                          type: string
                          example: SG001
                        name:
                          type: string
                          example: 'Sales Group TEST 1'
                        name_en:
                          type: string
                          example: null
                        phone:
                          type: string
                          example: null
                        email:
                          type: string
                          example: null
                        country:
                          type: string
                          example: null
                        address:
                          type: string
                          example: null
                        branch_id:
                          type: integer
                          example: 1000
                        user_id:
                          type: string
                          example: null
                        invoice_template_id:
                          type: string
                          example: null
                        customer_type_id:
                          type: string
                          example: null
                        type:
                          type: string
                          example: 'B2B Sales'
                        route_planning:
                          type: integer
                          example: 0
                        name_locale:
                          type: string
                          example: 'Sales Group TEST 1'
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: null
                      last:
                        type: string
                        example: null
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: null
                  meta:
                    type: object
                    properties:
                      path:
                        type: string
                        example: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/sales-groups'
                      per_page:
                        type: integer
                        example: 10
                      next_cursor:
                        type: string
                        example: null
                      prev_cursor:
                        type: string
                        example: null
      tags:
        - Branch
    post:
      summary: 'Create a new sales group for the specified branch.'
      operationId: createANewSalesGroupForTheSpecifiedBranch
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  description: 'Unique code for the sales group. Must not be greater than 255 characters.'
                  example: SG001
                  nullable: false
                name:
                  type: string
                  description: 'Name of the sales group. Must not be greater than 255 characters.'
                  example: No-example
                  nullable: false
                name_en:
                  type: string
                  description: 'Name of the sales group in English. Must not be greater than 255 characters.'
                  example: null
                  nullable: true
                email:
                  type: string
                  description: 'Email of the sales group. Must not be greater than 255 characters.'
                  example: null
                  nullable: true
                phone:
                  type: string
                  description: 'Point of contact for the sales group. Must not be greater than 255 characters.'
                  example: null
                  nullable: true
                country:
                  type: string
                  description: 'Country code of the phone number. ISO 3166-1 alpha-2 format. This field is required when <code>phone</code> is present. Must be 2 characters.'
                  example: null
                  nullable: false
                address:
                  type: string
                  description: 'Addess of the sales group. Must not be greater than 255 characters.'
                  example: null
                  nullable: true
                user_id:
                  type: integer
                  description: 'Assign user to the sales group.'
                  example: null
                  nullable: true
                invoice_template_id:
                  type: integer
                  description: 'Custom invoice template for the sales group.'
                  example: null
                  nullable: true
                customer_type_id:
                  type: integer
                  description: 'Set default customer type for the sales group.'
                  example: null
                  nullable: true
                route_planning:
                  type: boolean
                  description: 'Default route planning for the sales group.'
                  example: null
                  nullable: true
                type:
                  type: string
                  description: 'Type of the sales group. Possible values: Direct Sales, B2B Sales.'
                  example: 'B2B Sales'
                  nullable: false
                  enum:
                    - 'Direct Sales'
                    - 'B2B Sales'
              required:
                - code
                - name
                - type
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/sales-groups/{id}':
    put:
      summary: 'Update the sales group for the specified branch.'
      operationId: updateTheSalesGroupForTheSpecifiedBranch
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                code:
                  type: string
                  description: 'Unique code for the sales group. Must not be greater than 255 characters.'
                  example: SG001
                  nullable: false
                name:
                  type: string
                  description: 'Name of the sales group. Must not be greater than 255 characters.'
                  example: No-example
                  nullable: false
                name_en:
                  type: string
                  description: 'Name of the sales group in English. Must not be greater than 255 characters.'
                  example: null
                  nullable: true
                email:
                  type: string
                  description: 'Email of the sales group. Must not be greater than 255 characters.'
                  example: null
                  nullable: true
                phone:
                  type: string
                  description: 'Point of contact for the sales group. Must not be greater than 255 characters.'
                  example: null
                  nullable: true
                country:
                  type: string
                  description: 'Country code of the phone number. ISO 3166-1 alpha-2 format. This field is required when <code>phone</code> is present. Must be 2 characters.'
                  example: null
                  nullable: false
                address:
                  type: string
                  description: 'Addess of the sales group. Must not be greater than 255 characters.'
                  example: null
                  nullable: true
                user_id:
                  type: integer
                  description: 'Assign user to the sales group.'
                  example: null
                  nullable: true
                invoice_template_id:
                  type: integer
                  description: 'Custom invoice template for the sales group.'
                  example: null
                  nullable: true
                customer_type_id:
                  type: integer
                  description: 'Set default customer type for the sales group.'
                  example: null
                  nullable: true
                route_planning:
                  type: boolean
                  description: 'Default route planning for the sales group.'
                  example: null
                  nullable: true
                type:
                  type: string
                  description: 'Type of the sales group. Possible values: Direct Sales, B2B Sales.'
                  example: 'B2B Sales'
                  nullable: false
                  enum:
                    - 'Direct Sales'
                    - 'B2B Sales'
              required:
                - code
                - name
                - type
    delete:
      summary: 'Delete the sales group'
      operationId: deleteTheSalesGroup
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the sales group.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/custom-fields':
    get:
      summary: 'List of custom fields for the specified branch.'
      operationId: listOfCustomFieldsForTheSpecifiedBranch
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Server Error'
                properties:
                  message:
                    type: string
                    example: 'Server Error'
      tags:
        - Branch
    post:
      summary: 'Store a newly created resource in storage.'
      operationId: storeANewlyCreatedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: myilsqudsqhy
                  nullable: false
                name_ar:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: qlhp
                  nullable: true
                type:
                  type: string
                  description: ''
                  example: select
                  nullable: false
                  enum:
                    - text
                    - date
                    - number
                    - select
                options:
                  type: array
                  description: 'Must not be greater than 255 characters.'
                  example:
                    - hkcoueabpxkvcefhx
                  items:
                    type: string
              required:
                - name
                - type
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/custom-fields/{id}':
    put:
      summary: 'Update the specified resource in storage.'
      operationId: updateTheSpecifiedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: b
                  nullable: false
                name_ar:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: mjygivaaeay
                  nullable: true
                type:
                  type: string
                  description: ''
                  example: text
                  nullable: false
                  enum:
                    - text
                    - date
                    - number
                    - select
                options:
                  type: array
                  description: 'Must not be greater than 255 characters.'
                  example:
                    - tyex
                  items:
                    type: string
              required:
                - name
                - type
    delete:
      summary: 'Remove the specified resource from storage.'
      operationId: removeTheSpecifiedResourceFromStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the custom field.'
        example: 7
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/product-custom-fields':
    get:
      summary: 'List of product custom fields for the specified branch.'
      operationId: listOfProductCustomFieldsForTheSpecifiedBranch
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data: []
                  links:
                    first: null
                    last: null
                    prev: null
                    next: null
                  meta:
                    path: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/product-custom-fields'
                    per_page: 10
                    next_cursor: null
                    prev_cursor: null
                properties:
                  data:
                    type: array
                    example: []
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: null
                      last:
                        type: string
                        example: null
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: null
                  meta:
                    type: object
                    properties:
                      path:
                        type: string
                        example: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/product-custom-fields'
                      per_page:
                        type: integer
                        example: 10
                      next_cursor:
                        type: string
                        example: null
                      prev_cursor:
                        type: string
                        example: null
      tags:
        - Branch
    post:
      summary: 'Create a new product custom field for the specified branch.'
      operationId: createANewProductCustomFieldForTheSpecifiedBranch
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: mjkniboenxrjleayiftxmlvnd
                  nullable: false
                name_ar:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: mopuijsqolgav
                  nullable: true
                type:
                  type: string
                  description: ''
                  example: select
                  nullable: false
                  enum:
                    - text
                    - date
                    - number
                    - select
                options:
                  type: array
                  description: 'Must not be greater than 255 characters.'
                  example:
                    - aiupmshmlxqtbrvxwu
                  items:
                    type: string
                calculative:
                  type: boolean
                  description: ''
                  example: true
                  nullable: true
              required:
                - name
                - type
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/product-custom-fields/{id}':
    put:
      summary: 'Update the product custom field for the specified branch.'
      operationId: updateTheProductCustomFieldForTheSpecifiedBranch
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: whzzshga
                  nullable: false
                name_ar:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: xhnlbgqlexopuavrlgcognj
                  nullable: true
                type:
                  type: string
                  description: ''
                  example: number
                  nullable: false
                  enum:
                    - text
                    - date
                    - number
                    - select
                options:
                  type: array
                  description: 'Must not be greater than 255 characters.'
                  example:
                    - ljqqdvkczlugwbdvcjfeoh
                  items:
                    type: string
                calculative:
                  type: boolean
                  description: ''
                  example: true
                  nullable: true
              required:
                - name
                - type
    delete:
      summary: 'Delete the product custom field.'
      operationId: deleteTheProductCustomField
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the product custom field.'
        example: 18
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/customer-custom-fields':
    get:
      summary: 'List of customer custom fields for the specified branch.'
      operationId: listOfCustomerCustomFieldsForTheSpecifiedBranch
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Server Error'
                properties:
                  message:
                    type: string
                    example: 'Server Error'
      tags:
        - Branch
    post:
      summary: 'Create a new customer custom field for the specified branch.'
      operationId: createANewCustomerCustomFieldForTheSpecifiedBranch
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: icizgfkuleuomrgascmrkwjjs
                  nullable: false
                name_ar:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: tzjtkenqmajntiiktosg
                  nullable: true
                type:
                  type: string
                  description: ''
                  example: number
                  nullable: false
                  enum:
                    - text
                    - date
                    - number
              required:
                - name
                - type
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/customer-custom-fields/{id}':
    put:
      summary: 'Update the specified resource in storage.'
      operationId: updateTheSpecifiedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: juslpyszuxjtjuubeormyhpm
                  nullable: false
                name_ar:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: eijt
                  nullable: true
                type:
                  type: string
                  description: ''
                  example: date
                  nullable: false
                  enum:
                    - text
                    - date
                    - number
              required:
                - name
                - type
    delete:
      summary: 'Delete the customer custom field from the specified branch.'
      operationId: deleteTheCustomerCustomFieldFromTheSpecifiedBranch
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the customer custom field.'
        example: 13
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/roles':
    get:
      summary: 'List of the roles available for the specified branch.'
      operationId: listOfTheRolesAvailableForTheSpecifiedBranch
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
        -
          in: query
          name: with_permissions
          description: 'Load with or without permssions.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Load with or without permssions.'
            example: false
            nullable: false
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data: []
                  links:
                    first: null
                    last: null
                    prev: null
                    next: null
                  meta:
                    path: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/roles'
                    per_page: 10
                    next_cursor: null
                    prev_cursor: null
                properties:
                  data:
                    type: array
                    example: []
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: null
                      last:
                        type: string
                        example: null
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: null
                  meta:
                    type: object
                    properties:
                      path:
                        type: string
                        example: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/roles'
                      per_page:
                        type: integer
                        example: 10
                      next_cursor:
                        type: string
                        example: null
                      prev_cursor:
                        type: string
                        example: null
      tags:
        - Branch
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                with_permissions:
                  type: boolean
                  description: ''
                  example: true
                  nullable: true
    post:
      summary: 'Create a new role for the specified branch.'
      operationId: createANewRoleForTheSpecifiedBranch
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'The name of the role. Must not be greater than 255 characters.'
                  example: 'New Role'
                  nullable: false
                permissions:
                  type: array
                  description: 'The <code>name</code> of an existing record in the permissions table. Must not be greater than 255 characters.'
                  example:
                    - uftdqkceyrm
                  items:
                    type: string
              required:
                - name
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/roles/{id}':
    put:
      summary: 'Update A Role.'
      operationId: updateARole
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'The name of the role. Must not be greater than 255 characters.'
                  example: 'New Role'
                  nullable: false
                permissions:
                  type: array
                  description: 'The <code>name</code> of an existing record in the permissions table. Must not be greater than 255 characters.'
                  example:
                    - fjnebiszmxuhyjhbidrldxf
                  items:
                    type: string
              required:
                - name
    delete:
      summary: 'Delete a Role.'
      operationId: deleteARole
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the role.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/branch-users/{branchUser_id}/recalculate-balance':
    post:
      summary: 'Recalculate the user cash in hand balance.'
      operationId: recalculateTheUserCashInHandBalance
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branchUser_id
        description: 'The ID of the branchUser.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/branch-users/{branchUser_id}/toggle-otp':
    post:
      summary: 'Enable or disable OTP authentication for a user.'
      operationId: enableOrDisableOTPAuthenticationForAUser
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branchUser_id
        description: 'The ID of the branchUser.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/branch-users':
    get:
      summary: 'Display a listing of the users in the current branch.'
      operationId: displayAListingOfTheUsersInTheCurrentBranch
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: 1
                      name: 'Ahsan Zaman'
                      email: ahsan.web.ml@gmail.com
                      email_verified: true
                      phone: '+966571708606'
                      user_type: null
                      default_payment_status: null
                      default_payment_method: cash
                      profile_photo: null
                      created_at: '2025-07-13 18:12:08'
                      updated_at: '2025-07-13 18:12:08'
                      role: Admin
                      inventory_location_id: ''
                      cash_in_hand: 0
                      cash_in_hand_limit: ''
                  links:
                    first: null
                    last: null
                    prev: null
                    next: null
                  meta:
                    path: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-users'
                    per_page: 10
                    next_cursor: null
                    prev_cursor: null
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: 1
                        name: 'Ahsan Zaman'
                        email: ahsan.web.ml@gmail.com
                        email_verified: true
                        phone: '+966571708606'
                        user_type: null
                        default_payment_status: null
                        default_payment_method: cash
                        profile_photo: null
                        created_at: '2025-07-13 18:12:08'
                        updated_at: '2025-07-13 18:12:08'
                        role: Admin
                        inventory_location_id: ''
                        cash_in_hand: 0
                        cash_in_hand_limit: ''
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: 'Ahsan Zaman'
                        email:
                          type: string
                          example: ahsan.web.ml@gmail.com
                        email_verified:
                          type: boolean
                          example: true
                        phone:
                          type: string
                          example: '+966571708606'
                        user_type:
                          type: string
                          example: null
                        default_payment_status:
                          type: string
                          example: null
                        default_payment_method:
                          type: string
                          example: cash
                        profile_photo:
                          type: string
                          example: null
                        created_at:
                          type: string
                          example: '2025-07-13 18:12:08'
                        updated_at:
                          type: string
                          example: '2025-07-13 18:12:08'
                        role:
                          type: string
                          example: Admin
                        inventory_location_id:
                          type: string
                          example: ''
                        cash_in_hand:
                          type: integer
                          example: 0
                        cash_in_hand_limit:
                          type: string
                          example: ''
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: null
                      last:
                        type: string
                        example: null
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: null
                  meta:
                    type: object
                    properties:
                      path:
                        type: string
                        example: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/branch-users'
                      per_page:
                        type: integer
                        example: 10
                      next_cursor:
                        type: string
                        example: null
                      prev_cursor:
                        type: string
                        example: null
      tags:
        - Branch
    post:
      summary: 'Add a new user to the branch.'
      operationId: addANewUserToTheBranch
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: zzeewjerxfxbuxoodtbhmmp
                  nullable: false
                email:
                  type: string
                  description: 'Must be a valid email address.'
                  example: pfeffer.levi@example.net
                  nullable: false
                password:
                  type: string
                  description: 'Must be at least 6 characters.'
                  example: '3|dlq,al4JHO$'
                  nullable: true
                country:
                  type: string
                  description: 'Must be 2 characters.'
                  example: pe
                  nullable: false
                phone:
                  type: string
                  description: ''
                  example: est
                  nullable: false
                role_id:
                  type: integer
                  description: ''
                  example: 13
                  nullable: true
                role:
                  type: string
                  description: ''
                  example: 'Custom User'
                  nullable: false
                  enum:
                    - Operator
                    - Sales
                    - 'Custom User'
                cash_in_hand_limit:
                  type: number
                  description: ''
                  example: 32115.9504536
                  nullable: true
                permissions:
                  type: array
                  description: 'The <code>name</code> of an existing record in the permissions table. Must not be greater than 255 characters.'
                  example:
                    - pdybrakjvxlqtrrifvpcv
                  items:
                    type: string
                location_id:
                  type: integer
                  description: ''
                  example: 7
                  nullable: true
                sales_person_id:
                  type: integer
                  description: ''
                  example: 20
                  nullable: true
                locale:
                  type: string
                  description: ''
                  example: ar
                  nullable: true
                  enum:
                    - en
                    - ar
              required:
                - name
                - email
                - country
                - phone
                - role
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/branch-users/{id}':
    put:
      summary: 'Update settings for a user in the branch.'
      operationId: updateSettingsForAUserInTheBranch
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: dokfe
                  nullable: false
                email:
                  type: string
                  description: 'Must be a valid email address.'
                  example: bhegmann@example.com
                  nullable: false
                password:
                  type: string
                  description: 'Must be at least 6 characters.'
                  example: 'L:9}FoQF]oNl=#eD#x'
                  nullable: true
                country:
                  type: string
                  description: 'Must be 2 characters.'
                  example: vk
                  nullable: false
                phone:
                  type: string
                  description: ''
                  example: enim
                  nullable: false
                role_id:
                  type: integer
                  description: ''
                  example: 6
                  nullable: true
                role:
                  type: string
                  description: ''
                  example: Sales
                  nullable: false
                  enum:
                    - Operator
                    - Sales
                    - 'Custom User'
                cash_in_hand_limit:
                  type: number
                  description: ''
                  example: 311.7
                  nullable: true
                permissions:
                  type: array
                  description: 'The <code>name</code> of an existing record in the permissions table. Must not be greater than 255 characters.'
                  example:
                    - gusblldrkhlzhkhvnmglpkhk
                  items:
                    type: string
                location_id:
                  type: integer
                  description: ''
                  example: 14
                  nullable: true
                sales_person_id:
                  type: integer
                  description: ''
                  example: 15
                  nullable: true
                locale:
                  type: string
                  description: ''
                  example: ar
                  nullable: true
                  enum:
                    - en
                    - ar
              required:
                - name
                - email
                - country
                - phone
                - role
    delete:
      summary: 'Remove a user from the branch.'
      operationId: removeAUserFromTheBranch
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the branch user.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/api-tokens':
    get:
      summary: 'Display a listing of the user tokens.'
      operationId: displayAListingOfTheUserTokens
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: 1004
                      branch_id: null
                      name: 'My Laptop'
                      last_used_ago: '1 week ago'
                  links:
                    first: null
                    last: null
                    prev: null
                    next: null
                  meta:
                    path: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/api-tokens'
                    per_page: 10
                    next_cursor: null
                    prev_cursor: null
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: 1004
                        branch_id: null
                        name: 'My Laptop'
                        last_used_ago: '1 week ago'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1004
                        branch_id:
                          type: string
                          example: null
                        name:
                          type: string
                          example: 'My Laptop'
                        last_used_ago:
                          type: string
                          example: '1 week ago'
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: null
                      last:
                        type: string
                        example: null
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: null
                  meta:
                    type: object
                    properties:
                      path:
                        type: string
                        example: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/api-tokens'
                      per_page:
                        type: integer
                        example: 10
                      next_cursor:
                        type: string
                        example: null
                      prev_cursor:
                        type: string
                        example: null
      tags:
        - Branch
    post:
      summary: 'Create a new token.'
      operationId: createANewToken
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: tjsyioqfssszorp
                  nullable: false
              required:
                - name
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/api-tokens/{id}':
    delete:
      summary: 'Delete a specific token.'
      operationId: deleteASpecificToken
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the api token.'
        example: 1004
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/customer-types':
    get:
      summary: 'Display a listing of the customer Types for the specified branch.'
      operationId: displayAListingOfTheCustomerTypesForTheSpecifiedBranch
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: 1
                      created_at: '2025-07-23 20:14:50'
                      updated_at: '2025-07-23 20:14:50'
                      is_active: true
                      'no': RT
                      name: Retail
                      starting_no: RT-00001
                      auto_no: 1
                      rounding: 1
                      customers_count: 0
                    -
                      id: 2
                      created_at: '2025-07-23 20:15:09'
                      updated_at: '2025-07-23 20:15:09'
                      is_active: true
                      'no': B2B
                      name: 'Back Office'
                      starting_no: null
                      auto_no: 0
                      rounding: 1
                      customers_count: 0
                  links:
                    first: null
                    last: null
                    prev: null
                    next: null
                  meta:
                    path: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/customer-types'
                    per_page: 10
                    next_cursor: null
                    prev_cursor: null
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: 1
                        created_at: '2025-07-23 20:14:50'
                        updated_at: '2025-07-23 20:14:50'
                        is_active: true
                        'no': RT
                        name: Retail
                        starting_no: RT-00001
                        auto_no: 1
                        rounding: 1
                        customers_count: 0
                      -
                        id: 2
                        created_at: '2025-07-23 20:15:09'
                        updated_at: '2025-07-23 20:15:09'
                        is_active: true
                        'no': B2B
                        name: 'Back Office'
                        starting_no: null
                        auto_no: 0
                        rounding: 1
                        customers_count: 0
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        created_at:
                          type: string
                          example: '2025-07-23 20:14:50'
                        updated_at:
                          type: string
                          example: '2025-07-23 20:14:50'
                        is_active:
                          type: boolean
                          example: true
                        'no':
                          type: string
                          example: RT
                        name:
                          type: string
                          example: Retail
                        starting_no:
                          type: string
                          example: RT-00001
                        auto_no:
                          type: integer
                          example: 1
                        rounding:
                          type: integer
                          example: 1
                        customers_count:
                          type: integer
                          example: 0
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: null
                      last:
                        type: string
                        example: null
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: null
                  meta:
                    type: object
                    properties:
                      path:
                        type: string
                        example: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/customer-types'
                      per_page:
                        type: integer
                        example: 10
                      next_cursor:
                        type: string
                        example: null
                      prev_cursor:
                        type: string
                        example: null
      tags:
        - Branch
    post:
      summary: 'Store a new Customer Type.'
      operationId: storeANewCustomerType
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                'no':
                  type: string
                  description: 'The unique number for the customer type. Must not be greater than 255 characters.'
                  example: RT
                  nullable: false
                name:
                  type: string
                  description: 'The name of the customer type. Must not be greater than 255 characters.'
                  example: Retail
                  nullable: false
                auto_no:
                  type: boolean
                  description: 'Indicates if the customers created using this customer type will get auto-generated customer numbers or not.'
                  example: false
                  nullable: true
                starting_no:
                  type: string
                  description: 'The starting number for auto-generated customer numbers. Must not be greater than 255 characters.'
                  example: RT-00001
                  nullable: false
              required:
                - 'no'
                - name
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/customer-types/{id}':
    put:
      summary: 'Update the specified Customer Type.'
      operationId: updateTheSpecifiedCustomerType
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                'no':
                  type: string
                  description: 'The unique number for the customer type. Must not be greater than 255 characters.'
                  example: RT
                  nullable: false
                name:
                  type: string
                  description: 'The name of the customer type. Must not be greater than 255 characters.'
                  example: Retail
                  nullable: false
                auto_no:
                  type: boolean
                  description: 'Indicates if the customers created using this customer type will get auto-generated customer numbers or not.'
                  example: false
                  nullable: true
                starting_no:
                  type: string
                  description: 'The starting number for auto-generated customer numbers. Must not be greater than 255 characters.'
                  example: RT-00001
                  nullable: false
              required:
                - 'no'
                - name
    delete:
      summary: 'Remove the specified Customer Type.'
      operationId: removeTheSpecifiedCustomerType
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the customer type.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/regions':
    get:
      summary: 'Display a listing of the regions for the specified branch.'
      operationId: displayAListingOfTheRegionsForTheSpecifiedBranch
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: 1
                      name: 'North Region'
                      updated_at: '2025-07-23 20:28:38'
                      created_at: '2025-07-23 20:28:38'
                      is_active: true
                  links:
                    first: null
                    last: null
                    prev: null
                    next: null
                  meta:
                    path: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/regions'
                    per_page: 10
                    next_cursor: null
                    prev_cursor: null
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: 1
                        name: 'North Region'
                        updated_at: '2025-07-23 20:28:38'
                        created_at: '2025-07-23 20:28:38'
                        is_active: true
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: 'North Region'
                        updated_at:
                          type: string
                          example: '2025-07-23 20:28:38'
                        created_at:
                          type: string
                          example: '2025-07-23 20:28:38'
                        is_active:
                          type: boolean
                          example: true
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: null
                      last:
                        type: string
                        example: null
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: null
                  meta:
                    type: object
                    properties:
                      path:
                        type: string
                        example: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/regions'
                      per_page:
                        type: integer
                        example: 10
                      next_cursor:
                        type: string
                        example: null
                      prev_cursor:
                        type: string
                        example: null
      tags:
        - Branch
    post:
      summary: 'Store a new region.'
      operationId: storeANewRegion
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'The name of the customer type. Must not be greater than 255 characters.'
                  example: 'North Region'
                  nullable: false
              required:
                - name
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/regions/{id}':
    put:
      summary: 'Update the specified region.'
      operationId: updateTheSpecifiedRegion
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'The name of the customer type. Must not be greater than 255 characters.'
                  example: 'North Region'
                  nullable: false
              required:
                - name
    delete:
      summary: 'Remove the specified region.'
      operationId: removeTheSpecifiedRegion
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the region.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/customers/{customer_id}/calculate-balance':
    post:
      summary: ''
      operationId: postApiCompaniesCompany_idBranchesBranch_idCustomersCustomer_idCalculateBalance
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: customer_id
        description: 'The ID of the customer.'
        example: 7
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/customers/{customer}/export/excel':
    get:
      summary: 'Export customers to Excel.'
      operationId: exportCustomersToExcel
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: ''
      tags:
        - Branch
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                sortBy:
                  type: string
                  description: ''
                  example: customer_no
                  nullable: true
                  enum:
                    - customer_no
                customer:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: owoypmjwwaoagx
                  nullable: true
                customer_no:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: dhzgxlix
                  nullable: true
                customer_phone:
                  type: string
                  description: 'Must not be greater than 15 characters.'
                  example: akvoqzpbaghxfo
                  nullable: true
                cr_no:
                  type: string
                  description: 'Must not be greater than 10 characters.'
                  example: sr
                  nullable: true
                vat_no:
                  type: string
                  description: 'Must not be greater than 15 characters.'
                  example: sg
                  nullable: true
                additional_id:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: uanulunmwe
                  nullable: true
                customer_id:
                  type: integer
                  description: ''
                  example: 12
                  nullable: true
                customer_type_id:
                  type: integer
                  description: ''
                  example: 12
                  nullable: true
                sp:
                  type: integer
                  description: ''
                  example: 7
                  nullable: true
                sg:
                  type: integer
                  description: ''
                  example: 9
                  nullable: true
                approved_by:
                  type: integer
                  description: ''
                  example: 9
                  nullable: true
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: customer
        description: 'The customer.'
        example: 8
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/customers/{customer}/export/pdf':
    get:
      summary: 'Generate PDF for customers.'
      operationId: generatePDFForCustomers
      description: ''
      parameters: []
      responses:
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Server Error'
                properties:
                  message:
                    type: string
                    example: 'Server Error'
      tags:
        - Branch
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                sortBy:
                  type: string
                  description: ''
                  example: customer_no
                  nullable: true
                  enum:
                    - customer_no
                customer:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: xiqavndwdhla
                  nullable: true
                customer_no:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: yfjuaxohbiqzppmmyh
                  nullable: true
                customer_phone:
                  type: string
                  description: 'Must not be greater than 15 characters.'
                  example: arktztrocaoztm
                  nullable: true
                cr_no:
                  type: string
                  description: 'Must not be greater than 10 characters.'
                  example: py
                  nullable: true
                vat_no:
                  type: string
                  description: 'Must not be greater than 15 characters.'
                  example: cbtxx
                  nullable: true
                additional_id:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: xhggzfengajm
                  nullable: true
                customer_id:
                  type: integer
                  description: ''
                  example: 20
                  nullable: true
                customer_type_id:
                  type: integer
                  description: ''
                  example: 12
                  nullable: true
                sp:
                  type: integer
                  description: ''
                  example: 5
                  nullable: true
                sg:
                  type: integer
                  description: ''
                  example: 1
                  nullable: true
                approved_by:
                  type: integer
                  description: ''
                  example: 6
                  nullable: true
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: customer
        description: 'The customer.'
        example: 7
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/customers':
    get:
      summary: 'Display a listing of the customers for the specified branch.'
      operationId: displayAListingOfTheCustomersForTheSpecifiedBranch
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data: []
                  links:
                    first: null
                    last: null
                    prev: null
                    next: null
                  meta:
                    path: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/customers'
                    per_page: 10
                    next_cursor: null
                    prev_cursor: null
                properties:
                  data:
                    type: array
                    example: []
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: null
                      last:
                        type: string
                        example: null
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: null
                  meta:
                    type: object
                    properties:
                      path:
                        type: string
                        example: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/customers'
                      per_page:
                        type: integer
                        example: 10
                      next_cursor:
                        type: string
                        example: null
                      prev_cursor:
                        type: string
                        example: null
      tags:
        - Branch
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                sortBy:
                  type: string
                  description: ''
                  example: customer_no
                  nullable: true
                  enum:
                    - customer_no
                customer:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: picmg
                  nullable: true
                customer_no:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: gmits
                  nullable: true
                customer_phone:
                  type: string
                  description: 'Must not be greater than 15 characters.'
                  example: xr
                  nullable: true
                cr_no:
                  type: string
                  description: 'Must not be greater than 10 characters.'
                  example: ugfakz
                  nullable: true
                vat_no:
                  type: string
                  description: 'Must not be greater than 15 characters.'
                  example: diunlzenblqflhq
                  nullable: true
                additional_id:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: hakrnzwsjjctn
                  nullable: true
                customer_id:
                  type: integer
                  description: ''
                  example: 20
                  nullable: true
                customer_type_id:
                  type: integer
                  description: ''
                  example: 15
                  nullable: true
                region_id:
                  type: integer
                  description: ''
                  example: 6
                  nullable: true
                sp:
                  type: integer
                  description: ''
                  example: 17
                  nullable: true
                sg:
                  type: integer
                  description: ''
                  example: 5
                  nullable: true
                approved_by:
                  type: integer
                  description: ''
                  example: 12
                  nullable: true
    post:
      summary: 'Store a newly created resource in storage.'
      operationId: storeANewlyCreatedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                customer_no:
                  type: string
                  description: 'Unique customer number for the customer. If not provided, it will be auto-generated. Must not be greater than 255 characters.'
                  example: CUST-001
                  nullable: true
                customer_type:
                  type: string
                  description: 'Type of customer, either "c" for consumer or "b" for business.'
                  example: c
                  nullable: true
                  enum:
                    - c
                    - b
                customer_type_id:
                  type: integer
                  description: 'ID of the customer type. Must exist in the customer types for the branch. The <code>id</code> of an existing record in the customer_types table.'
                  example: 1
                  nullable: true
                customer_name:
                  type: string
                  description: 'Arabic name of the customer. Must not be greater than 255 characters.'
                  example: 'جون دو'
                  nullable: false
                customer_name_en:
                  type: string
                  description: 'Name of the customer. Must not be greater than 255 characters.'
                  example: 'John Doe'
                  nullable: true
                address:
                  type: string
                  description: 'Line Address of the customer. Must not be greater than 255 characters.'
                  example: '123 Main St, Riyadh'
                  nullable: false
                email:
                  type: string
                  description: 'Email address of the customer. Required if the branch settings require customer email. Must be a valid email address.'
                  example: null
                  nullable: true
                country:
                  type: string
                  description: "Country code of the customer's location, must be a 2-letter ISO code. This field is required when <code>phone</code> is present. Must be 2 characters."
                  example: SA
                  nullable: false
                phone:
                  type: string
                  description: 'Phone number of the customer. Required if the branch settings require customer phone.'
                  example: '+966500000000'
                  nullable: true
                customer_vat_no:
                  type: string
                  description: 'VAT number of the customer, must be 15 digits. Must be 15 digits.'
                  example: null
                  nullable: true
                cr_no:
                  type: string
                  description: 'Commercial Registration number of the customer, must be 10 digits. Must be 10 characters.'
                  example: null
                  nullable: true
                un:
                  type: string
                  description: 'Unified Number of the customer, must be 10 digits. Must be 10 characters.'
                  example: null
                  nullable: true
                sales_person_id:
                  type: integer
                  description: 'ID of the sales person associated with the customer. Must exist in the sales people for the branch. The <code>id</code> of an existing record in the sales_people table.'
                  example: 1
                  nullable: true
                customer_visit_plan_id:
                  type: integer
                  description: 'ID of the customer visit plan associated with the customer. Must exist in the visit plans for the branch. The <code>id</code> of an existing record in the customer_visit_plans table.'
                  example: 1
                  nullable: true
                balance:
                  type: number
                  description: 'Current balance of the customer.'
                  example: 1000.0
                  nullable: true
                region:
                  type: string
                  description: "Region of the customer's location. Must not be greater than 255 characters."
                  example: Riyadh
                  nullable: true
                region_id:
                  type: integer
                  description: 'ID of the region associated with the customer. Must exist in the regions for the branch. The <code>id</code> of an existing record in the regions table.'
                  example: 1
                  nullable: true
                google_maps:
                  type: string
                  description: "Google Maps link for the customer's location. Must not be greater than 255 characters."
                  example: 'https://maps.google.com/?q=24.7136,46.6753'
                  nullable: true
                credit_limit:
                  type: number
                  description: 'Credit limit for the customer.'
                  example: 5000.0
                  nullable: true
                max_credit_days:
                  type: integer
                  description: 'Maximum credit days allowed for the customer.'
                  example: 30
                  nullable: true
                contacts:
                  type: array
                  description: 'Array of contacts associated with the customer.'
                  example: null
                  items:
                    type: object
                    nullable: true
                    properties:
                      name:
                        type: string
                        description: 'Name of the contact person.'
                        example: 'Jane Doe'
                        nullable: false
                      phone:
                        type: string
                        description: 'Phone number of the contact person.'
                        example: '+966500000001'
                        nullable: false
                    required:
                      - name
                      - phone
                supplier_id:
                  type: integer
                  description: 'ID of the supplier associated with the customer.'
                  example: null
                  nullable: true
                short_address:
                  type: string
                  description: 'The short address for the customer. (Arabic). Must not be greater than 255 characters.'
                  example: RAHA3443
                  nullable: true
                building_no:
                  type: string
                  description: 'Building number of the customer. (Arabic). Must not be greater than 255 characters.'
                  example: ٢٩٢٩
                  nullable: true
                street_address:
                  type: string
                  description: 'Street name of the customer. (Arabic). Must not be greater than 255 characters.'
                  example: 'ريحانة بنت زيد'
                  nullable: true
                secondary_no:
                  type: string
                  description: 'Secondary number of the customer. (Arabic). Must not be greater than 255 characters.'
                  example: ٨١١٨
                  nullable: true
                district_name:
                  type: string
                  description: 'District of the customer. (Arabic). Must not be greater than 255 characters.'
                  example: 'حي العارض'
                  nullable: true
                city:
                  type: string
                  description: 'City of the customer. (Arabic). Must not be greater than 255 characters.'
                  example: الرياض
                  nullable: true
                zip_code:
                  type: string
                  description: 'Postal code of the customer. (Arabic). Must not be greater than 255 characters.'
                  example: ١٣٣٣٧
                  nullable: true
                short_address_en:
                  type: string
                  description: 'The short address for the customer. (English). Must not be greater than 255 characters.'
                  example: RAHA3443
                  nullable: true
                building_no_en:
                  type: string
                  description: 'Building number of the customer. (English). Must not be greater than 255 characters.'
                  example: '2929'
                  nullable: true
                street_address_en:
                  type: string
                  description: 'Street name of the customer. (English). Must not be greater than 255 characters.'
                  example: 'Raihan Bint Zaid'
                  nullable: true
                secondary_no_en:
                  type: string
                  description: 'Secondary number of the customer. (English). Must not be greater than 255 characters.'
                  example: '8118'
                  nullable: true
                district_name_en:
                  type: string
                  description: 'District of the customer. (English). Must not be greater than 255 characters.'
                  example: 'Al Arid'
                  nullable: true
                city_en:
                  type: string
                  description: 'City of the customer. (English). Must not be greater than 255 characters.'
                  example: Riyadh
                  nullable: true
                zip_code_en:
                  type: string
                  description: 'Postal code of the customer. (English). Must not be greater than 255 characters.'
                  example: '13337'
                  nullable: true
                cfs:
                  type: array
                  description: ''
                  example: null
                  items:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: integer
                        description: 'The <code>id</code> of an existing record in the customer_custom_fields table.'
                        example: 17
                        nullable: false
                      value:
                        type: string
                        description: 'Must not be greater than 255 characters.'
                        example: ungryoqp
                        nullable: true
                    required:
                      - id
              required:
                - customer_name
                - address
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/customers/{id}':
    put:
      summary: 'Update the specified resource in storage.'
      operationId: updateTheSpecifiedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                customer_no:
                  type: string
                  description: 'Unique customer number for the customer. If not provided, it will be auto-generated. Must not be greater than 255 characters.'
                  example: CUST-001
                  nullable: true
                customer_type:
                  type: string
                  description: 'Type of customer, either "c" for consumer or "b" for business.'
                  example: c
                  nullable: true
                  enum:
                    - c
                    - b
                customer_type_id:
                  type: integer
                  description: 'ID of the customer type. Must exist in the customer types for the branch. The <code>id</code> of an existing record in the customer_types table.'
                  example: 1
                  nullable: true
                customer_name:
                  type: string
                  description: 'Arabic name of the customer. Must not be greater than 255 characters.'
                  example: 'جون دو'
                  nullable: false
                customer_name_en:
                  type: string
                  description: 'Name of the customer. Must not be greater than 255 characters.'
                  example: 'John Doe'
                  nullable: true
                address:
                  type: string
                  description: 'Line Address of the customer. Must not be greater than 255 characters.'
                  example: '123 Main St, Riyadh'
                  nullable: false
                email:
                  type: string
                  description: 'Email address of the customer. Required if the branch settings require customer email. Must be a valid email address.'
                  example: null
                  nullable: true
                country:
                  type: string
                  description: "Country code of the customer's location, must be a 2-letter ISO code. This field is required when <code>phone</code> is present. Must be 2 characters."
                  example: SA
                  nullable: false
                phone:
                  type: string
                  description: 'Phone number of the customer. Required if the branch settings require customer phone.'
                  example: '+966500000000'
                  nullable: true
                customer_vat_no:
                  type: string
                  description: 'VAT number of the customer, must be 15 digits. Must be 15 digits.'
                  example: null
                  nullable: true
                cr_no:
                  type: string
                  description: 'Commercial Registration number of the customer, must be 10 digits. Must be 10 characters.'
                  example: null
                  nullable: true
                un:
                  type: string
                  description: 'Unified Number of the customer, must be 10 digits. Must be 10 characters.'
                  example: null
                  nullable: true
                sales_person_id:
                  type: integer
                  description: 'ID of the sales person associated with the customer. Must exist in the sales people for the branch. The <code>id</code> of an existing record in the sales_people table.'
                  example: 1
                  nullable: true
                customer_visit_plan_id:
                  type: integer
                  description: 'ID of the customer visit plan associated with the customer. Must exist in the visit plans for the branch. The <code>id</code> of an existing record in the customer_visit_plans table.'
                  example: 1
                  nullable: true
                balance:
                  type: number
                  description: 'Current balance of the customer.'
                  example: 1000.0
                  nullable: true
                region:
                  type: string
                  description: "Region of the customer's location. Must not be greater than 255 characters."
                  example: Riyadh
                  nullable: true
                region_id:
                  type: integer
                  description: 'ID of the region associated with the customer. Must exist in the regions for the branch. The <code>id</code> of an existing record in the regions table.'
                  example: 1
                  nullable: true
                google_maps:
                  type: string
                  description: "Google Maps link for the customer's location. Must not be greater than 255 characters."
                  example: 'https://maps.google.com/?q=24.7136,46.6753'
                  nullable: true
                credit_limit:
                  type: number
                  description: 'Credit limit for the customer.'
                  example: 5000.0
                  nullable: true
                max_credit_days:
                  type: integer
                  description: 'Maximum credit days allowed for the customer.'
                  example: 30
                  nullable: true
                contacts:
                  type: array
                  description: 'Array of contacts associated with the customer.'
                  example: null
                  items:
                    type: object
                    nullable: true
                    properties:
                      name:
                        type: string
                        description: 'Name of the contact person.'
                        example: 'Jane Doe'
                        nullable: false
                      phone:
                        type: string
                        description: 'Phone number of the contact person.'
                        example: '+966500000001'
                        nullable: false
                    required:
                      - name
                      - phone
                supplier_id:
                  type: integer
                  description: 'ID of the supplier associated with the customer.'
                  example: null
                  nullable: true
                short_address:
                  type: string
                  description: 'The short address for the customer. (Arabic). Must not be greater than 255 characters.'
                  example: RAHA3443
                  nullable: true
                building_no:
                  type: string
                  description: 'Building number of the customer. (Arabic). Must not be greater than 255 characters.'
                  example: ٢٩٢٩
                  nullable: true
                street_address:
                  type: string
                  description: 'Street name of the customer. (Arabic). Must not be greater than 255 characters.'
                  example: 'ريحانة بنت زيد'
                  nullable: true
                secondary_no:
                  type: string
                  description: 'Secondary number of the customer. (Arabic). Must not be greater than 255 characters.'
                  example: ٨١١٨
                  nullable: true
                district_name:
                  type: string
                  description: 'District of the customer. (Arabic). Must not be greater than 255 characters.'
                  example: 'حي العارض'
                  nullable: true
                city:
                  type: string
                  description: 'City of the customer. (Arabic). Must not be greater than 255 characters.'
                  example: الرياض
                  nullable: true
                zip_code:
                  type: string
                  description: 'Postal code of the customer. (Arabic). Must not be greater than 255 characters.'
                  example: ١٣٣٣٧
                  nullable: true
                short_address_en:
                  type: string
                  description: 'The short address for the customer. (English). Must not be greater than 255 characters.'
                  example: RAHA3443
                  nullable: true
                building_no_en:
                  type: string
                  description: 'Building number of the customer. (English). Must not be greater than 255 characters.'
                  example: '2929'
                  nullable: true
                street_address_en:
                  type: string
                  description: 'Street name of the customer. (English). Must not be greater than 255 characters.'
                  example: 'Raihan Bint Zaid'
                  nullable: true
                secondary_no_en:
                  type: string
                  description: 'Secondary number of the customer. (English). Must not be greater than 255 characters.'
                  example: '8118'
                  nullable: true
                district_name_en:
                  type: string
                  description: 'District of the customer. (English). Must not be greater than 255 characters.'
                  example: 'Al Arid'
                  nullable: true
                city_en:
                  type: string
                  description: 'City of the customer. (English). Must not be greater than 255 characters.'
                  example: Riyadh
                  nullable: true
                zip_code_en:
                  type: string
                  description: 'Postal code of the customer. (English). Must not be greater than 255 characters.'
                  example: '13337'
                  nullable: true
                cfs:
                  type: array
                  description: ''
                  example: null
                  items:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: integer
                        description: 'The <code>id</code> of an existing record in the customer_custom_fields table.'
                        example: 8
                        nullable: false
                      value:
                        type: string
                        description: 'Must not be greater than 255 characters.'
                        example: yyooukvlezujwvmiamjafqo
                        nullable: true
                    required:
                      - id
              required:
                - customer_name
                - address
    delete:
      summary: 'Remove the specified resource from storage.'
      operationId: removeTheSpecifiedResourceFromStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the customer.'
        example: 4
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/categories':
    get:
      summary: 'Display a listing of the product categories.'
      operationId: displayAListingOfTheProductCategories
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data: []
                  links:
                    first: null
                    last: null
                    prev: null
                    next: null
                  meta:
                    path: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/categories'
                    per_page: 10
                    next_cursor: null
                    prev_cursor: null
                properties:
                  data:
                    type: array
                    example: []
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: null
                      last:
                        type: string
                        example: null
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: null
                  meta:
                    type: object
                    properties:
                      path:
                        type: string
                        example: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/categories'
                      per_page:
                        type: integer
                        example: 10
                      next_cursor:
                        type: string
                        example: null
                      prev_cursor:
                        type: string
                        example: null
      tags:
        - Branch
    post:
      summary: 'Store a newly created resource in storage.'
      operationId: storeANewlyCreatedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: fnrbuxrkskgtnupjnb
                  nullable: false
              required:
                - name
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/categories/{id}':
    put:
      summary: 'Update the specified resource in storage.'
      operationId: updateTheSpecifiedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: rjqgndseftcah
                  nullable: false
              required:
                - name
    delete:
      summary: 'Remove the specified resource from storage.'
      operationId: removeTheSpecifiedResourceFromStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the category.'
        example: 17
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/tags':
    get:
      summary: 'Display a listing of the branch product tags.'
      operationId: displayAListingOfTheBranchProductTags
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data: []
                  links:
                    first: null
                    last: null
                    prev: null
                    next: null
                  meta:
                    path: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/tags'
                    per_page: 10
                    next_cursor: null
                    prev_cursor: null
                properties:
                  data:
                    type: array
                    example: []
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: null
                      last:
                        type: string
                        example: null
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: null
                  meta:
                    type: object
                    properties:
                      path:
                        type: string
                        example: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/tags'
                      per_page:
                        type: integer
                        example: 10
                      next_cursor:
                        type: string
                        example: null
                      prev_cursor:
                        type: string
                        example: null
      tags:
        - Branch
    post:
      summary: 'Store a newly created resource in storage.'
      operationId: storeANewlyCreatedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: zfwbrsoqh
                  nullable: false
              required:
                - name
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/tags/{id}':
    put:
      summary: 'Update the specified resource in storage.'
      operationId: updateTheSpecifiedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: aagkygecvjbtmiervdcid
                  nullable: false
              required:
                - name
    delete:
      summary: 'Remove the specified resource from storage.'
      operationId: removeTheSpecifiedResourceFromStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the tag.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/product-skus':
    get:
      summary: 'Display a listing of the resource.'
      operationId: displayAListingOfTheResource
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data: []
                  links:
                    first: null
                    last: null
                    prev: null
                    next: null
                  meta:
                    path: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/product-skus'
                    per_page: 10
                    next_cursor: null
                    prev_cursor: null
                properties:
                  data:
                    type: array
                    example: []
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: null
                      last:
                        type: string
                        example: null
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: null
                  meta:
                    type: object
                    properties:
                      path:
                        type: string
                        example: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/product-skus'
                      per_page:
                        type: integer
                        example: 10
                      next_cursor:
                        type: string
                        example: null
                      prev_cursor:
                        type: string
                        example: null
      tags:
        - Branch
    post:
      summary: 'Store a newly created resource in storage.'
      operationId: storeANewlyCreatedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                sku:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: zzbcjadgnbrowddxkafwdtunp
                  nullable: false
                base_unit:
                  type: number
                  description: ''
                  example: 58931.904251949
                  nullable: false
                label_ar:
                  type: string
                  description: ''
                  example: fugiat
                  nullable: false
                label_en:
                  type: string
                  description: ''
                  example: consequatur
                  nullable: false
              required:
                - sku
                - base_unit
                - label_ar
                - label_en
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/product-skus/{id}':
    put:
      summary: 'Update the specified resource in storage.'
      operationId: updateTheSpecifiedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                sku:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: dexx
                  nullable: false
                base_unit:
                  type: number
                  description: ''
                  example: 391.0
                  nullable: false
                label_ar:
                  type: string
                  description: ''
                  example: porro
                  nullable: false
                label_en:
                  type: string
                  description: ''
                  example: repellat
                  nullable: false
              required:
                - sku
                - base_unit
                - label_ar
                - label_en
    delete:
      summary: 'Remove the specified resource from storage.'
      operationId: removeTheSpecifiedResourceFromStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the product sku.'
        example: 7
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/products/{product_id}/enable':
    post:
      summary: 'Remove the specified resource from storage.'
      operationId: removeTheSpecifiedResourceFromStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: product_id
        description: 'The ID of the product.'
        example: 20
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/products/export/excel':
    get:
      summary: 'Delete a media file.'
      operationId: deleteAMediaFile
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: ''
      tags:
        - Branch
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: lrzbrxmmruaaaiwq
                  nullable: true
                product_id:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: ywekrslnjphemnyswnwceea
                  nullable: true
                product:
                  type: integer
                  description: ''
                  example: 18
                  nullable: true
                category_id:
                  type: integer
                  description: 'Must not be greater than 999999999.'
                  example: 18
                  nullable: true
                product_sku_id:
                  type: integer
                  description: ''
                  example: 8
                  nullable: true
                exclude_zero_stock:
                  type: boolean
                  description: ''
                  example: false
                  nullable: true
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/products':
    get:
      summary: 'Display a listing of the products in the specified branch.'
      operationId: displayAListingOfTheProductsInTheSpecifiedBranch
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data: []
                  links:
                    first: null
                    last: null
                    prev: null
                    next: null
                  meta:
                    path: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/products'
                    per_page: 15
                    next_cursor: null
                    prev_cursor: null
                properties:
                  data:
                    type: array
                    example: []
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: null
                      last:
                        type: string
                        example: null
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: null
                  meta:
                    type: object
                    properties:
                      path:
                        type: string
                        example: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/products'
                      per_page:
                        type: integer
                        example: 15
                      next_cursor:
                        type: string
                        example: null
                      prev_cursor:
                        type: string
                        example: null
      tags:
        - Branch
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: z
                  nullable: true
                product_id:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: iloyzahsrmrxcygzjyk
                  nullable: true
                product:
                  type: integer
                  description: ''
                  example: 6
                  nullable: true
                category_id:
                  type: integer
                  description: ''
                  example: 8
                  nullable: true
                product_sku_id:
                  type: integer
                  description: ''
                  example: 9
                  nullable: true
                exclude_zero_stock:
                  type: boolean
                  description: ''
                  example: true
                  nullable: true
    post:
      summary: 'Store a newly created resource in storage.'
      operationId: storeANewlyCreatedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                product_name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: uwpkffhajutaa
                  nullable: false
                narration:
                  type: string
                  description: 'Must not be greater than 5000 characters.'
                  example: nwzvuzgpl
                  nullable: true
                product_id:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: jtnsizphmqwalhlcpnpuyvy
                  nullable: true
                vat_rate:
                  type: number
                  description: 'Must not be greater than 100.'
                  example: 5
                  nullable: false
                tax_code:
                  type: string
                  description: ''
                  example: e
                  nullable: true
                  enum:
                    - p
                    - e
                    - x
                    - z
                min_price:
                  type: number
                  description: ''
                  example: 55077.47369
                  nullable: true
                max_price:
                  type: number
                  description: ''
                  example: 68.521315972
                  nullable: true
                price:
                  type: number
                  description: ''
                  example: 2008.586
                  nullable: false
                cost_price:
                  type: number
                  description: ''
                  example: 20417.65000155
                  nullable: true
                supplier_price:
                  type: number
                  description: ''
                  example: 77309.1514867
                  nullable: true
                model_no:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: ig
                  nullable: true
                category_id:
                  type: integer
                  description: 'The <code>id</code> of an existing record in the categories table.'
                  example: 17
                  nullable: true
                product_sku_id:
                  type: integer
                  description: 'The <code>id</code> of an existing record in the product_s_k_u_s table.'
                  example: 6
                  nullable: true
                type:
                  type: string
                  description: ''
                  example: service
                  nullable: true
                  enum:
                    - service
                    - product
                barcode:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: hmmtohxujhrql
                  nullable: true
                image:
                  type: string
                  format: binary
                  description: 'Must be a file. Must not be greater than 1024 kilobytes.'
                  nullable: true
                cash_sales_only:
                  type: boolean
                  description: ''
                  example: false
                  nullable: true
                cfs:
                  type: array
                  description: ''
                  example: null
                  items:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: integer
                        description: 'The <code>id</code> of an existing record in the product_custom_fields table.'
                        example: 16
                        nullable: false
                      value:
                        type: string
                        description: 'Must not be greater than 255 characters.'
                        example: edxyhebnzpa
                        nullable: true
                    required:
                      - id
              required:
                - product_name
                - vat_rate
                - price
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/products/{id}':
    put:
      summary: 'Update the specified resource in storage.'
      operationId: updateTheSpecifiedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                product_name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: qcsoyirudmfd
                  nullable: false
                narration:
                  type: string
                  description: 'Must not be greater than 5000 characters.'
                  example: efqxwwlxtpvchdl
                  nullable: true
                product_id:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: aorbwjfhhzambnogady
                  nullable: true
                vat_rate:
                  type: number
                  description: 'Must not be greater than 100.'
                  example: 5
                  nullable: false
                tax_code:
                  type: string
                  description: ''
                  example: z
                  nullable: true
                  enum:
                    - p
                    - e
                    - x
                    - z
                min_price:
                  type: number
                  description: ''
                  example: 120.1816223
                  nullable: true
                max_price:
                  type: number
                  description: ''
                  example: 1.846916411
                  nullable: true
                price:
                  type: number
                  description: ''
                  example: 32.770459585
                  nullable: false
                cost_price:
                  type: number
                  description: ''
                  example: 24.0
                  nullable: true
                supplier_price:
                  type: number
                  description: ''
                  example: 495.0
                  nullable: true
                model_no:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: chhjnnbfaqgxkexcmxnpvzoa
                  nullable: true
                category_id:
                  type: integer
                  description: 'The <code>id</code> of an existing record in the categories table.'
                  example: 7
                  nullable: true
                product_sku_id:
                  type: integer
                  description: 'The <code>id</code> of an existing record in the product_s_k_u_s table.'
                  example: 2
                  nullable: true
                type:
                  type: string
                  description: ''
                  example: service
                  nullable: true
                  enum:
                    - service
                    - product
                barcode:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: xpkknhitcflxpwmrlqkeiit
                  nullable: true
                image:
                  type: string
                  format: binary
                  description: 'Must be a file. Must not be greater than 1024 kilobytes.'
                  nullable: true
                cash_sales_only:
                  type: boolean
                  description: ''
                  example: true
                  nullable: true
                cfs:
                  type: array
                  description: ''
                  example: null
                  items:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: integer
                        description: 'The <code>id</code> of an existing record in the product_custom_fields table.'
                        example: 15
                        nullable: false
                      value:
                        type: string
                        description: 'Must not be greater than 255 characters.'
                        example: nocirmtzt
                        nullable: true
                    required:
                      - id
              required:
                - product_name
                - vat_rate
                - price
    delete:
      summary: 'Remove the specified resource from storage.'
      operationId: removeTheSpecifiedResourceFromStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the product.'
        example: 19
        required: true
        schema:
          type: integer
  '/api/companies/{company}/branches/{branch}/inventory-locations/export/excel':
    get:
      summary: 'Export Inventory Location products to Excel.'
      operationId: exportInventoryLocationProductsToExcel
      description: ''
      parameters: []
      responses:
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Server Error'
                properties:
                  message:
                    type: string
                    example: 'Server Error'
      tags:
        - Branch
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: exzhopoponspkudcp
                  nullable: true
                product_id:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: vecakyvnwlcbhzqeojbezeeq
                  nullable: true
                product:
                  type: integer
                  description: ''
                  example: 2
                  nullable: true
                category_id:
                  type: integer
                  description: ''
                  example: 14
                  nullable: true
    parameters:
      -
        in: path
        name: company
        description: 'The company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch
        description: 'The branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/inventory-locations/{inventory-location}/add-products':
    post:
      summary: 'Add Product to Inventory Location'
      operationId: addProductToInventoryLocation
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                inventory_location_id:
                  type: integer
                  description: 'The ID of the inventory location.'
                  example: 8
                  nullable: false
                product_id:
                  type: integer
                  description: 'The ID of the product to be added.'
                  example: 15
                  nullable: false
                quantity:
                  type: integer
                  description: 'The quantity of the product to be added.'
                  example: 17
                  nullable: false
              required:
                - inventory_location_id
                - product_id
                - quantity
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: inventory-location
        description: ''
        example: 5
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/inventory-locations/{inventory-location}/remove-products':
    delete:
      summary: 'Remove Product to Inventory Location'
      operationId: removeProductToInventoryLocation
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                product_id:
                  type: integer
                  description: 'The ID of the product to be added.'
                  example: 16
                  nullable: false
                quantity:
                  type: integer
                  description: 'The quantity of the product to be added.'
                  example: 2
                  nullable: false
              required:
                - product_id
                - quantity
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: inventory-location
        description: ''
        example: 14
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/inventory-locations':
    get:
      summary: 'List of the Inventory Locations for the specified branch.'
      operationId: listOfTheInventoryLocationsForTheSpecifiedBranch
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data: []
                  links:
                    first: null
                    last: null
                    prev: null
                    next: null
                  meta:
                    path: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-locations'
                    per_page: 15
                    next_cursor: null
                    prev_cursor: null
                properties:
                  data:
                    type: array
                    example: []
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: null
                      last:
                        type: string
                        example: null
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: null
                  meta:
                    type: object
                    properties:
                      path:
                        type: string
                        example: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/inventory-locations'
                      per_page:
                        type: integer
                        example: 15
                      next_cursor:
                        type: string
                        example: null
                      prev_cursor:
                        type: string
                        example: null
      tags:
        - Branch
    post:
      summary: 'Create a new Inventory Location.'
      operationId: createANewInventoryLocation
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                location_id:
                  type: string
                  description: ''
                  example: praesentium
                  nullable: false
                name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: bbescydfabktwqnnhdokjj
                  nullable: false
                customer_id:
                  type: integer
                  description: 'The <code>id</code> of an existing record in the customers table.'
                  example: 17
                  nullable: true
              required:
                - location_id
                - name
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/inventory-locations/{id}':
    put:
      summary: 'Update an Inventory Location.'
      operationId: updateAnInventoryLocation
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                location_id:
                  type: string
                  description: ''
                  example: temporibus
                  nullable: false
                name:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: uwtopwfydozwx
                  nullable: false
                customer_id:
                  type: integer
                  description: 'The <code>id</code> of an existing record in the customers table.'
                  example: 6
                  nullable: true
              required:
                - location_id
                - name
    delete:
      summary: 'Disable an Inventory Location.'
      operationId: disableAnInventoryLocation
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the inventory location.'
        example: 20
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/stock-transfer-notes/{stock-transfer-note}/export/pdf':
    get:
      summary: 'Export to PDF'
      operationId: exportToPDF
      description: ''
      parameters: []
      responses:
        302:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "<!DOCTYPE html>\n<html>\n    <head>\n        <meta charset=\"UTF-8\" />\n        <meta http-equiv=\"refresh\" content=\"0;url='http://127.0.0.1:8000/docs'\" />\n\n        <title>Redirecting to http://127.0.0.1:8000/docs</title>\n    </head>\n    <body>\n        Redirecting to <a href=\"http://127.0.0.1:8000/docs\">http://127.0.0.1:8000/docs</a>.\n    </body>\n</html>"
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: stock-transfer-note
        description: ''
        example: 10
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/stock-transfer-notes':
    get:
      summary: 'Display a list of stock transfer notes for the specified branch.'
      operationId: displayAListOfStockTransferNotesForTheSpecifiedBranch
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data: []
                  links:
                    first: null
                    last: null
                    prev: null
                    next: null
                  meta:
                    path: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-notes'
                    per_page: 10
                    next_cursor: null
                    prev_cursor: null
                properties:
                  data:
                    type: array
                    example: []
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: null
                      last:
                        type: string
                        example: null
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: null
                  meta:
                    type: object
                    properties:
                      path:
                        type: string
                        example: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-notes'
                      per_page:
                        type: integer
                        example: 10
                      next_cursor:
                        type: string
                        example: null
                      prev_cursor:
                        type: string
                        example: null
      tags:
        - Branch
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                from_location:
                  type: integer
                  description: ''
                  example: 1
                  nullable: true
                to_location:
                  type: integer
                  description: ''
                  example: 6
                  nullable: true
                from:
                  type: string
                  description: 'Must be a valid date in the format <code>Y-m-d</code>.'
                  example: '2025-07-30'
                  nullable: true
                to:
                  type: string
                  description: 'Must be a valid date in the format <code>Y-m-d</code>.'
                  example: '2025-07-30'
                  nullable: true
    post:
      summary: 'Create a new stock transfer note or convert from stock transfer request.'
      operationId: createANewStockTransferNoteOrConvertFromStockTransferRequest
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                stock_transfer_request_id:
                  type: integer
                  description: ''
                  example: 9
                  nullable: true
                date:
                  type: string
                  description: 'Must be a valid date in the format <code>Y-m-d</code>.'
                  example: '2025-07-30'
                  nullable: false
                all_products:
                  type: boolean
                  description: ''
                  example: false
                  nullable: true
                items:
                  type: array
                  description: 'Must have at least 1 items.'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: ''
                        example: 2
                        nullable: false
                      quantity:
                        type: number
                        description: ''
                        example: 2260255.2
                        nullable: false
                    required:
                      - id
                      - quantity
                remarks:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: wbvintvjjq
                  nullable: true
                from_location_id:
                  type: integer
                  description: ''
                  example: 9
                  nullable: false
                to_location_id:
                  type: integer
                  description: ''
                  example: 15
                  nullable: false
              required:
                - date
                - items
                - from_location_id
                - to_location_id
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/stock-transfer-notes/{id}':
    put:
      summary: 'Update a stock transfer note.'
      operationId: updateAStockTransferNote
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                stock_transfer_request_id:
                  type: integer
                  description: ''
                  example: 12
                  nullable: true
                date:
                  type: string
                  description: 'Must be a valid date in the format <code>Y-m-d</code>.'
                  example: '2025-07-30'
                  nullable: false
                all_products:
                  type: boolean
                  description: ''
                  example: true
                  nullable: true
                items:
                  type: array
                  description: 'Must have at least 1 items.'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: ''
                        example: 6
                        nullable: false
                      quantity:
                        type: number
                        description: ''
                        example: 3.4
                        nullable: false
                    required:
                      - id
                      - quantity
                remarks:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: tnawflglpharldlctpobe
                  nullable: true
                from_location_id:
                  type: integer
                  description: ''
                  example: 12
                  nullable: false
                to_location_id:
                  type: integer
                  description: ''
                  example: 5
                  nullable: false
              required:
                - date
                - items
                - from_location_id
                - to_location_id
    delete:
      summary: 'Delete a stock transfer note.'
      operationId: deleteAStockTransferNote
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the stock transfer note.'
        example: 16
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/stock-transfer-requests':
    get:
      summary: 'Display a list of the STRs for specified branch.'
      operationId: displayAListOfTheSTRsForSpecifiedBranch
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data: []
                  links:
                    first: null
                    last: null
                    prev: null
                    next: null
                  meta:
                    path: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-requests'
                    per_page: 10
                    next_cursor: null
                    prev_cursor: null
                properties:
                  data:
                    type: array
                    example: []
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: null
                      last:
                        type: string
                        example: null
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: null
                  meta:
                    type: object
                    properties:
                      path:
                        type: string
                        example: 'http://127.0.0.1:8000/api/companies/10000/branches/1000/stock-transfer-requests'
                      per_page:
                        type: integer
                        example: 10
                      next_cursor:
                        type: string
                        example: null
                      prev_cursor:
                        type: string
                        example: null
      tags:
        - Branch
    post:
      summary: 'Create a new STR.'
      operationId: createANewSTR
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                date:
                  type: string
                  description: 'Must be a valid date in the format <code>Y-m-d</code>.'
                  example: '2025-07-30'
                  nullable: false
                from_location_id:
                  type: integer
                  description: ''
                  example: 20
                  nullable: true
                to_location_id:
                  type: integer
                  description: ''
                  example: 18
                  nullable: true
                items:
                  type: array
                  description: 'Must have at least 1 items.'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: ''
                        example: 9
                        nullable: false
                      quantity:
                        type: number
                        description: ''
                        example: 7.7
                        nullable: false
                      cac:
                        type: number
                        description: ''
                        example: 12348791.9
                        nullable: true
                    required:
                      - id
                      - quantity
              required:
                - date
                - items
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/stock-transfer-requests/{id}':
    put:
      summary: 'Update/Approve a STR.'
      operationId: updateApproveASTR
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                date:
                  type: string
                  description: 'Must be a valid date in the format <code>Y-m-d</code>.'
                  example: '2025-07-30'
                  nullable: false
                from_location_id:
                  type: integer
                  description: ''
                  example: 14
                  nullable: true
                to_location_id:
                  type: integer
                  description: ''
                  example: 14
                  nullable: true
                items:
                  type: array
                  description: 'Must have at least 1 items.'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: ''
                        example: 11
                        nullable: false
                      quantity:
                        type: number
                        description: ''
                        example: 8390161.4137781
                        nullable: false
                      cac:
                        type: number
                        description: ''
                        example: 567.0
                        nullable: true
                    required:
                      - id
                      - quantity
              required:
                - date
                - items
    delete:
      summary: 'Cancel a STR.'
      operationId: cancelASTR
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the stock transfer request.'
        example: 20
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/inventory-adjustments/export/excel':
    get:
      summary: 'Export inventory adjustments to aa excel file.'
      operationId: exportInventoryAdjustmentsToAaExcelFile
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: ''
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                quarter:
                  type: string
                  description: ''
                  example: voluptatem
                  nullable: true
                from:
                  type: string
                  description: ''
                  example: molestias
                  nullable: false
                to:
                  type: string
                  description: 'Must be a valid date in the format <code>Y-m-d</code>.'
                  example: '2025-07-30'
                  nullable: false
                product:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: ux
                  nullable: true
                product_id:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: rynisqhhutk
                  nullable: true
                location_id:
                  type: integer
                  description: ''
                  example: 17
                  nullable: true
                type:
                  type: string
                  description: ''
                  example: returned
                  nullable: true
                  enum:
                    - received
                    - sold
                    - returned
                    - damaged
                    - transfer
                    - conversion
                    - other
              required:
                - from
                - to
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/inventory-adjustments':
    get:
      summary: 'Display a list of the adjustments log.'
      operationId: displayAListOfTheAdjustmentsLog
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        422:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The to field must be a date after .'
                  errors:
                    to:
                      - 'The to field must be a date after .'
                properties:
                  message:
                    type: string
                    example: 'The to field must be a date after .'
                  errors:
                    type: object
                    properties:
                      to:
                        type: array
                        example:
                          - 'The to field must be a date after .'
                        items:
                          type: string
      tags:
        - Branch
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                quarter:
                  type: string
                  description: ''
                  example: fugiat
                  nullable: true
                from:
                  type: string
                  description: ''
                  example: null
                  nullable: true
                to:
                  type: string
                  description: 'Must be a valid date in the format <code>Y-m-d</code>.'
                  example: '2025-07-30'
                  nullable: true
                product:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: sripkvjaackcssm
                  nullable: true
                product_id:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: cjyavu
                  nullable: true
                location_id:
                  type: integer
                  description: ''
                  example: 9
                  nullable: true
                type:
                  type: string
                  description: ''
                  example: transfer
                  nullable: true
                  enum:
                    - received
                    - sold
                    - returned
                    - damaged
                    - transfer
                    - conversion
                    - other
    post:
      summary: 'Store a newly created resource in storage.'
      operationId: storeANewlyCreatedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                product_id:
                  type: integer
                  description: ''
                  example: 10
                  nullable: false
                location_id:
                  type: integer
                  description: ''
                  example: 1
                  nullable: true
                product2_id:
                  type: integer
                  description: 'This field is required when <code>type</code> is <code>conversion</code>.'
                  example: 18
                  nullable: false
                location2_id:
                  type: integer
                  description: ''
                  example: 4
                  nullable: true
                quantity:
                  type: number
                  description: 'Must not be one of <code>0</code> Must be between -9999999999.9999 and 9999999999.9999.'
                  example: -9999999999
                  nullable: false
                type:
                  type: string
                  description: ''
                  example: received
                  nullable: false
                  enum:
                    - received
                    - damaged
                    - sold
                    - returned
                    - other
                    - conversion
                reason:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: mmavwoejdkic
                  nullable: true
              required:
                - product_id
                - quantity
                - type
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/inventory-adjustments/{id}':
    put:
      summary: 'Update an adjustment.'
      operationId: updateAnAdjustment
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                product_id:
                  type: integer
                  description: ''
                  example: 7
                  nullable: false
                location_id:
                  type: integer
                  description: ''
                  example: 3
                  nullable: true
                product2_id:
                  type: integer
                  description: 'This field is required when <code>type</code> is <code>conversion</code>.'
                  example: 6
                  nullable: false
                location2_id:
                  type: integer
                  description: ''
                  example: 2
                  nullable: true
                quantity:
                  type: number
                  description: 'Must not be one of <code>0</code> Must be between -9999999999.9999 and 9999999999.9999.'
                  example: -9999999999
                  nullable: false
                type:
                  type: string
                  description: ''
                  example: returned
                  nullable: false
                  enum:
                    - received
                    - damaged
                    - sold
                    - returned
                    - other
                    - conversion
                reason:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: tkvj
                  nullable: true
              required:
                - product_id
                - quantity
                - type
    delete:
      summary: 'Delete an adjustment.'
      operationId: deleteAnAdjustment
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the inventory adjustment.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/landed-costs/{landedCost_id}/post':
    post:
      summary: 'Post Landed Cost.'
      operationId: postLandedCost
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: landedCost_id
        description: 'The ID of the landedCost.'
        example: 18
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/landed-costs':
    get:
      summary: 'Display a list of the landed costs.'
      operationId: displayAListOfTheLandedCosts
      description: ''
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Server Error'
                properties:
                  message:
                    type: string
                    example: 'Server Error'
      tags:
        - Branch
    post:
      summary: 'Create a new landed cost.'
      operationId: createANewLandedCost
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                'no':
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: pcodqswcdvxkzgkf
                  nullable: false
                date:
                  type: string
                  description: 'Must be a valid date in the format <code>Y-m-d</code>.'
                  example: '2025-07-30'
                  nullable: false
                purchase_order_id:
                  type: integer
                  description: ''
                  example: 20
                  nullable: false
                purchase_id:
                  type: integer
                  description: ''
                  example: 17
                  nullable: true
                xr:
                  type: number
                  description: ''
                  example: 43024024.912977
                  nullable: true
                currency:
                  type: string
                  description: 'Must be 3 characters.'
                  example: moq
                  nullable: true
                items:
                  type: array
                  description: 'Must have at least 1 items.'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        description: ''
                        example: 'Warehouse Expenses'
                        nullable: false
                        enum:
                          - Clearance
                          - 'Custom Duty'
                          - Demurrage
                          - Freight
                          - Insurence
                          - 'Port Expenses'
                          - 'Warehouse Expenses'
                      method:
                        type: string
                        description: ''
                        example: Equal
                        nullable: false
                        enum:
                          - Equal
                          - 'By Quantity'
                          - 'By Current Cost'
                      amount:
                        type: number
                        description: ''
                        example: 545.909
                        nullable: false
                    required:
                      - type
                      - method
                      - amount
              required:
                - 'no'
                - date
                - purchase_order_id
                - items
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{branch_id}/landed-costs/{id}':
    put:
      summary: 'Update an existing landed cost.'
      operationId: updateAnExistingLandedCost
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                'no':
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: flcwpaqqiim
                  nullable: false
                date:
                  type: string
                  description: 'Must be a valid date in the format <code>Y-m-d</code>.'
                  example: '2025-07-30'
                  nullable: false
                purchase_order_id:
                  type: integer
                  description: ''
                  example: 13
                  nullable: false
                purchase_id:
                  type: integer
                  description: ''
                  example: 11
                  nullable: true
                xr:
                  type: number
                  description: ''
                  example: 26.0
                  nullable: true
                currency:
                  type: string
                  description: 'Must be 3 characters.'
                  example: nzk
                  nullable: true
                items:
                  type: array
                  description: 'Must have at least 1 items.'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        description: ''
                        example: Clearance
                        nullable: false
                        enum:
                          - Clearance
                          - 'Custom Duty'
                          - Demurrage
                          - Freight
                          - Insurence
                          - 'Port Expenses'
                          - 'Warehouse Expenses'
                      method:
                        type: string
                        description: ''
                        example: 'By Quantity'
                        nullable: false
                        enum:
                          - Equal
                          - 'By Quantity'
                          - 'By Current Cost'
                      amount:
                        type: number
                        description: ''
                        example: 332097591.52987
                        nullable: false
                    required:
                      - type
                      - method
                      - amount
              required:
                - 'no'
                - date
                - purchase_order_id
                - items
    delete:
      summary: 'Delete a landed cost.'
      operationId: deleteALandedCost
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Branch
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: branch_id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the landed cost.'
        example: 1
        required: true
        schema:
          type: integer
  /api/companies:
    get:
      summary: 'List of Companies'
      operationId: listOfCompanies
      description: 'This endpoint retrieves a list of companies associated with the authenticated user.'
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: 10000
                      created_at: '2025-07-13 18:12:08'
                      updated_at: '2025-07-17 01:30:38'
                      name: 'شركة محدودة'
                      name_ar: 'My Company Ltd'
                      vat_no: '312378945600003'
                      id_type: cr
                      cr: '4030101010'
                      enable_issue: false
                      branch_limit: 0
                      status: Disabled
                      type: Main
                      un: '7007000077'
                      status_color: red-700
                      name_locale: 'My Company Ltd'
                      branches:
                        -
                          id: 1000
                          created_at: '2025-07-13 18:12:08'
                          updated_at: '2025-07-13 18:12:08'
                          branch_name: 'Jeddah Branch'
                          logo: /branch_logo/16310998641000.png
                          country: null
                          phone: null
                          email: ahsan@ahsan-web.ml
                          website: null
                          short_address: null
                          building_no: null
                          street_name: 'Al Ahd Al Jadid'
                          secondary_no: null
                          district: 'Ar Ruwais'
                          city: Jeddah
                          postal_code: null
                          allow_webhook: false
                          allow_api: true
                          short_address_en: null
                          building_no_en: null
                          street_name_en: null
                          secondary_no_en: null
                          district_en: null
                          city_en: null
                          postal_code_en: null
                          role: Admin
                          logo_url: /storage//branch_logo/16310998641000.png
                          full_address_ar: '- Al Ahd Al Jadid- Ar Ruwais-Jeddah '
                          full_address_en: ''
                    -
                      id: 10003
                      created_at: '2025-07-16 00:24:56'
                      updated_at: '2025-07-16 00:24:56'
                      name: 'شركة محدودة'
                      name_ar: 'My Company Ltd'
                      vat_no: '312345678900003'
                      id_type: cr
                      cr: '4030123456'
                      enable_issue: true
                      branch_limit: 1
                      status: Active
                      type: Main
                      un: '7001234567'
                      status_color: green-700
                      name_locale: 'My Company Ltd'
                      branches:
                        -
                          id: 1010
                          created_at: '2025-07-16 19:54:01'
                          updated_at: '2025-07-16 20:18:04'
                          branch_name: 'Main Branch'
                          logo: null
                          country: SA
                          phone: '+966500000000'
                          email: test@test.com
                          website: null
                          short_address: RAHA3443
                          building_no: ٢٩٢٩
                          street_name: 'ريحانة بنت زيد'
                          secondary_no: ٨١١٨
                          district: 'حي العارض'
                          city: nlfwerknss
                          postal_code: ١٣٣٣٧
                          allow_webhook: false
                          allow_api: true
                          short_address_en: RAHA3443
                          building_no_en: '2929'
                          street_name_en: 'Raihan Bint Zaid'
                          secondary_no_en: '8118'
                          district_en: 'Al Arid'
                          city_en: Riyadh
                          postal_code_en: '13337'
                          role: Admin
                          logo_url: 'https://cdn-einvme.fra1.cdn.digitaloceanspaces.com/eInvoiceMe/7/conversions/Picture1-logo.jpg'
                          full_address_ar: 'RAHA3443-٢٩٢٩ ريحانة بنت زيد-٨١١٨ حي العارض-nlfwerknss ١٣٣٣٧'
                          full_address_en: 'RAHA3443-2929 Raihan Bint Zaid-8118 Al Arid-Riyadh 13337'
                  links:
                    first: null
                    last: null
                    prev: null
                    next: null
                  meta:
                    path: 'http://127.0.0.1:8000/api/companies'
                    per_page: 10
                    next_cursor: null
                    prev_cursor: null
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: 10000
                        created_at: '2025-07-13 18:12:08'
                        updated_at: '2025-07-17 01:30:38'
                        name: 'شركة محدودة'
                        name_ar: 'My Company Ltd'
                        vat_no: '312378945600003'
                        id_type: cr
                        cr: '4030101010'
                        enable_issue: false
                        branch_limit: 0
                        status: Disabled
                        type: Main
                        un: '7007000077'
                        status_color: red-700
                        name_locale: 'My Company Ltd'
                        branches:
                          -
                            id: 1000
                            created_at: '2025-07-13 18:12:08'
                            updated_at: '2025-07-13 18:12:08'
                            branch_name: 'Jeddah Branch'
                            logo: /branch_logo/16310998641000.png
                            country: null
                            phone: null
                            email: ahsan@ahsan-web.ml
                            website: null
                            short_address: null
                            building_no: null
                            street_name: 'Al Ahd Al Jadid'
                            secondary_no: null
                            district: 'Ar Ruwais'
                            city: Jeddah
                            postal_code: null
                            allow_webhook: false
                            allow_api: true
                            short_address_en: null
                            building_no_en: null
                            street_name_en: null
                            secondary_no_en: null
                            district_en: null
                            city_en: null
                            postal_code_en: null
                            role: Admin
                            logo_url: /storage//branch_logo/16310998641000.png
                            full_address_ar: '- Al Ahd Al Jadid- Ar Ruwais-Jeddah '
                            full_address_en: ''
                      -
                        id: 10003
                        created_at: '2025-07-16 00:24:56'
                        updated_at: '2025-07-16 00:24:56'
                        name: 'شركة محدودة'
                        name_ar: 'My Company Ltd'
                        vat_no: '312345678900003'
                        id_type: cr
                        cr: '4030123456'
                        enable_issue: true
                        branch_limit: 1
                        status: Active
                        type: Main
                        un: '7001234567'
                        status_color: green-700
                        name_locale: 'My Company Ltd'
                        branches:
                          -
                            id: 1010
                            created_at: '2025-07-16 19:54:01'
                            updated_at: '2025-07-16 20:18:04'
                            branch_name: 'Main Branch'
                            logo: null
                            country: SA
                            phone: '+966500000000'
                            email: test@test.com
                            website: null
                            short_address: RAHA3443
                            building_no: ٢٩٢٩
                            street_name: 'ريحانة بنت زيد'
                            secondary_no: ٨١١٨
                            district: 'حي العارض'
                            city: nlfwerknss
                            postal_code: ١٣٣٣٧
                            allow_webhook: false
                            allow_api: true
                            short_address_en: RAHA3443
                            building_no_en: '2929'
                            street_name_en: 'Raihan Bint Zaid'
                            secondary_no_en: '8118'
                            district_en: 'Al Arid'
                            city_en: Riyadh
                            postal_code_en: '13337'
                            role: Admin
                            logo_url: 'https://cdn-einvme.fra1.cdn.digitaloceanspaces.com/eInvoiceMe/7/conversions/Picture1-logo.jpg'
                            full_address_ar: 'RAHA3443-٢٩٢٩ ريحانة بنت زيد-٨١١٨ حي العارض-nlfwerknss ١٣٣٣٧'
                            full_address_en: 'RAHA3443-2929 Raihan Bint Zaid-8118 Al Arid-Riyadh 13337'
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 10000
                        created_at:
                          type: string
                          example: '2025-07-13 18:12:08'
                        updated_at:
                          type: string
                          example: '2025-07-17 01:30:38'
                        name:
                          type: string
                          example: 'شركة محدودة'
                        name_ar:
                          type: string
                          example: 'My Company Ltd'
                        vat_no:
                          type: string
                          example: '312378945600003'
                        id_type:
                          type: string
                          example: cr
                        cr:
                          type: string
                          example: '4030101010'
                        enable_issue:
                          type: boolean
                          example: false
                        branch_limit:
                          type: integer
                          example: 0
                        status:
                          type: string
                          example: Disabled
                        type:
                          type: string
                          example: Main
                        un:
                          type: string
                          example: '7007000077'
                        status_color:
                          type: string
                          example: red-700
                        name_locale:
                          type: string
                          example: 'My Company Ltd'
                        branches:
                          type: array
                          example:
                            -
                              id: 1000
                              created_at: '2025-07-13 18:12:08'
                              updated_at: '2025-07-13 18:12:08'
                              branch_name: 'Jeddah Branch'
                              logo: /branch_logo/16310998641000.png
                              country: null
                              phone: null
                              email: ahsan@ahsan-web.ml
                              website: null
                              short_address: null
                              building_no: null
                              street_name: 'Al Ahd Al Jadid'
                              secondary_no: null
                              district: 'Ar Ruwais'
                              city: Jeddah
                              postal_code: null
                              allow_webhook: false
                              allow_api: true
                              short_address_en: null
                              building_no_en: null
                              street_name_en: null
                              secondary_no_en: null
                              district_en: null
                              city_en: null
                              postal_code_en: null
                              role: Admin
                              logo_url: /storage//branch_logo/16310998641000.png
                              full_address_ar: '- Al Ahd Al Jadid- Ar Ruwais-Jeddah '
                              full_address_en: ''
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 1000
                              created_at:
                                type: string
                                example: '2025-07-13 18:12:08'
                              updated_at:
                                type: string
                                example: '2025-07-13 18:12:08'
                              branch_name:
                                type: string
                                example: 'Jeddah Branch'
                              logo:
                                type: string
                                example: /branch_logo/16310998641000.png
                              country:
                                type: string
                                example: null
                              phone:
                                type: string
                                example: null
                              email:
                                type: string
                                example: ahsan@ahsan-web.ml
                              website:
                                type: string
                                example: null
                              short_address:
                                type: string
                                example: null
                              building_no:
                                type: string
                                example: null
                              street_name:
                                type: string
                                example: 'Al Ahd Al Jadid'
                              secondary_no:
                                type: string
                                example: null
                              district:
                                type: string
                                example: 'Ar Ruwais'
                              city:
                                type: string
                                example: Jeddah
                              postal_code:
                                type: string
                                example: null
                              allow_webhook:
                                type: boolean
                                example: false
                              allow_api:
                                type: boolean
                                example: true
                              short_address_en:
                                type: string
                                example: null
                              building_no_en:
                                type: string
                                example: null
                              street_name_en:
                                type: string
                                example: null
                              secondary_no_en:
                                type: string
                                example: null
                              district_en:
                                type: string
                                example: null
                              city_en:
                                type: string
                                example: null
                              postal_code_en:
                                type: string
                                example: null
                              role:
                                type: string
                                example: Admin
                              logo_url:
                                type: string
                                example: /storage//branch_logo/16310998641000.png
                              full_address_ar:
                                type: string
                                example: '- Al Ahd Al Jadid- Ar Ruwais-Jeddah '
                              full_address_en:
                                type: string
                                example: ''
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: null
                      last:
                        type: string
                        example: null
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: null
                  meta:
                    type: object
                    properties:
                      path:
                        type: string
                        example: 'http://127.0.0.1:8000/api/companies'
                      per_page:
                        type: integer
                        example: 10
                      next_cursor:
                        type: string
                        example: null
                      prev_cursor:
                        type: string
                        example: null
      tags:
        - 'Manage Companies'
    post:
      summary: 'Create a new Company'
      operationId: createANewCompany
      description: ''
      parameters: []
      responses: {  }
      tags:
        - 'Manage Companies'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'The name of the company in Arabic. Must not be greater than 255 characters.'
                  example: 'شركة محدودة'
                  nullable: false
                name_en:
                  type: string
                  description: 'The English name of the company. Must not be greater than 255 characters.'
                  example: 'My Company Ltd'
                  nullable: true
                cr:
                  type: string
                  description: 'Company registration number (CR). Must be 10 digits.'
                  example: '4030123456'
                  nullable: false
                un:
                  type: string
                  description: 'Unified Number of the company. Must be 10 digits.'
                  example: '700*******'
                  nullable: true
                vat_no:
                  type: string
                  description: 'VAT number of the company. Must be 15 digits.'
                  example: '3*********00003'
                  nullable: true
                id_type:
                  type: string
                  description: 'Type of ID used for the company.'
                  example: cr
                  nullable: true
                  enum:
                    - cr
                    - ni
                    - un
                sequence_start:
                  type: string
                  description: 'Starting sequence number for invoices. Must not be greater than 20 characters.'
                  example: 100001
                  nullable: true
              required:
                - name
                - cr
  '/api/companies/{id}':
    put:
      summary: 'Update the specified Company.'
      operationId: updateTheSpecifiedCompany
      description: ''
      parameters: []
      responses: {  }
      tags:
        - 'Manage Companies'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'The name of the company in Arabic. Must not be greater than 255 characters.'
                  example: 'شركة محدودة'
                  nullable: false
                name_en:
                  type: string
                  description: 'The English name of the company. Must not be greater than 255 characters.'
                  example: 'My Company Ltd'
                  nullable: true
                cr:
                  type: string
                  description: 'Company registration number (CR). Must be 10 digits.'
                  example: '4030123456'
                  nullable: false
                un:
                  type: string
                  description: 'Unified Number of the company. Must be 10 digits.'
                  example: '700*******'
                  nullable: true
                vat_no:
                  type: string
                  description: 'VAT number of the company. Must be 15 digits.'
                  example: '3*********00003'
                  nullable: true
                id_type:
                  type: string
                  description: 'Type of ID used for the company.'
                  example: cr
                  nullable: true
                  enum:
                    - cr
                    - ni
                    - un
                sequence_start:
                  type: string
                  description: 'Starting sequence number for invoices. Must not be greater than 20 characters.'
                  example: 100001
                  nullable: true
              required:
                - name
                - cr
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/settings':
    get:
      summary: 'View Company Settings'
      operationId: viewCompanySettings
      description: 'This endpoint retrieves the settings of a specific company associated with the authenticated user.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Company settings retrieved successfully.'
                  data:
                    created_at: '2025-07-18 01:12:14'
                    updated_at: '2025-07-18 01:12:14'
                    unified_inventory: false
                    unified_customers: false
                    unified_suppliers: false
                    enable_zatca: false
                    integration_phase_acknowledged: false
                    unified_templates: false
                    internal_search: false
                properties:
                  message:
                    type: string
                    example: 'Company settings retrieved successfully.'
                  data:
                    type: object
                    properties:
                      created_at:
                        type: string
                        example: '2025-07-18 01:12:14'
                      updated_at:
                        type: string
                        example: '2025-07-18 01:12:14'
                      unified_inventory:
                        type: boolean
                        example: false
                      unified_customers:
                        type: boolean
                        example: false
                      unified_suppliers:
                        type: boolean
                        example: false
                      enable_zatca:
                        type: boolean
                        example: false
                      integration_phase_acknowledged:
                        type: boolean
                        example: false
                      unified_templates:
                        type: boolean
                        example: false
                      internal_search:
                        type: boolean
                        example: false
      tags:
        - 'Manage Companies'
    post:
      summary: 'Update Company Settings'
      operationId: updateCompanySettings
      description: 'This endpoint updates the settings of a specific company associated with the authenticated user.'
      parameters: []
      responses: {  }
      tags:
        - 'Manage Companies'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                unified_inventory:
                  type: boolean
                  description: 'Enable or disable unified inventory across branches.'
                  example: false
                  nullable: true
                unified_customers:
                  type: boolean
                  description: 'Enable or disable unified customer management across branches.'
                  example: false
                  nullable: true
                unified_suppliers:
                  type: boolean
                  description: 'Enable or disable unified supplier management across branches.'
                  example: false
                  nullable: true
                unified_templates:
                  type: boolean
                  description: 'Enable or disable unified templates across branches.'
                  example: false
                  nullable: true
                internal_search:
                  type: boolean
                  description: 'Enable or disable internal search functionality across branches.'
                  example: false
                  nullable: true
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/sequences':
    get:
      summary: 'List Sequences'
      operationId: listSequences
      description: 'This endpoint retrieves all sequences for a specific company associated with the authenticated user.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: 1
                      created_at: '2025-07-16 02:22:48'
                      updated_at: '2025-07-16 02:22:48'
                      ref: '2023'
                      prefix: INV-
                      first: INV-2023
                      last: null
                  links:
                    first: null
                    last: null
                    prev: null
                    next: null
                  meta:
                    path: 'http://127.0.0.1:8000/api/companies/10000/sequences'
                    per_page: 2
                    next_cursor: null
                    prev_cursor: null
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: 1
                        created_at: '2025-07-16 02:22:48'
                        updated_at: '2025-07-16 02:22:48'
                        ref: '2023'
                        prefix: INV-
                        first: INV-2023
                        last: null
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        created_at:
                          type: string
                          example: '2025-07-16 02:22:48'
                        updated_at:
                          type: string
                          example: '2025-07-16 02:22:48'
                        ref:
                          type: string
                          example: '2023'
                        prefix:
                          type: string
                          example: INV-
                        first:
                          type: string
                          example: INV-2023
                        last:
                          type: string
                          example: null
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: null
                      last:
                        type: string
                        example: null
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: null
                  meta:
                    type: object
                    properties:
                      path:
                        type: string
                        example: 'http://127.0.0.1:8000/api/companies/10000/sequences'
                      per_page:
                        type: integer
                        example: 2
                      next_cursor:
                        type: string
                        example: null
                      prev_cursor:
                        type: string
                        example: null
      tags:
        - 'Manage Companies'
    post:
      summary: 'Create Sequence'
      operationId: createSequence
      description: 'This endpoint allows the authenticated user to create a new sequence for a specific company.'
      parameters: []
      responses: {  }
      tags:
        - 'Manage Companies'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                prefix:
                  type: string
                  description: 'The prefix for the sequence (optional). Must not be greater than 10 characters.'
                  example: INV-
                  nullable: true
                ref:
                  type: string
                  description: 'The reference for the sequence (required). Must not be greater than 20 characters.'
                  example: '2023'
                  nullable: false
              required:
                - ref
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/sequences/{id}':
    put:
      summary: 'Update Sequence'
      operationId: updateSequence
      description: 'This endpoint allows the authenticated user to update an existing sequence for a specific company.'
      parameters: []
      responses: {  }
      tags:
        - 'Manage Companies'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                prefix:
                  type: string
                  description: 'The prefix for the sequence (optional). Must not be greater than 10 characters.'
                  example: INV-
                  nullable: true
                ref:
                  type: string
                  description: 'The reference for the sequence (required). Must not be greater than 20 characters.'
                  example: '2023'
                  nullable: false
              required:
                - ref
    delete:
      summary: 'Delete Sequence'
      operationId: deleteSequence
      description: 'This endpoint allows the authenticated user to delete an existing sequence for a specific company.'
      parameters: []
      responses: {  }
      tags:
        - 'Manage Companies'
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the sequence.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches':
    get:
      summary: 'List Branches'
      operationId: listBranches
      description: 'This endpoint retrieves all branches for a specific company associated with the authenticated user.'
      parameters:
        -
          in: query
          name: search
          description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'Optional search term to filter the results. Must not be greater than 255 characters.'
            example: null
            nullable: true
        -
          in: query
          name: per_page
          description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'Number of items to return per page. Defaults to 10 if not provided. Must be at least 1. Must not be greater than 300.'
            example: 10
            nullable: true
        -
          in: query
          name: with_disabled
          description: 'Include disabled items in the results.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'Include disabled items in the results.'
            example: false
            nullable: true
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: 1000
                      created_at: '2025-07-13 18:12:08'
                      updated_at: '2025-07-13 18:12:08'
                      branch_name: 'Jeddah Branch'
                      logo: /branch_logo/16310998641000.png
                      country: null
                      phone: null
                      email: ahsan@ahsan-web.ml
                      website: null
                      short_address: null
                      building_no: null
                      street_name: 'Al Ahd Al Jadid'
                      secondary_no: null
                      district: 'Ar Ruwais'
                      city: Jeddah
                      postal_code: null
                      allow_webhook: false
                      allow_api: true
                      short_address_en: null
                      building_no_en: null
                      street_name_en: null
                      secondary_no_en: null
                      district_en: null
                      city_en: null
                      postal_code_en: null
                      role: null
                      logo_url: /storage//branch_logo/16310998641000.png
                      full_address_ar: '- Al Ahd Al Jadid- Ar Ruwais-Jeddah '
                      full_address_en: ''
                  links:
                    first: null
                    last: null
                    prev: null
                    next: null
                  meta:
                    path: 'http://127.0.0.1:8000/api/companies/10000/branches'
                    per_page: 10
                    next_cursor: null
                    prev_cursor: null
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: 1000
                        created_at: '2025-07-13 18:12:08'
                        updated_at: '2025-07-13 18:12:08'
                        branch_name: 'Jeddah Branch'
                        logo: /branch_logo/16310998641000.png
                        country: null
                        phone: null
                        email: ahsan@ahsan-web.ml
                        website: null
                        short_address: null
                        building_no: null
                        street_name: 'Al Ahd Al Jadid'
                        secondary_no: null
                        district: 'Ar Ruwais'
                        city: Jeddah
                        postal_code: null
                        allow_webhook: false
                        allow_api: true
                        short_address_en: null
                        building_no_en: null
                        street_name_en: null
                        secondary_no_en: null
                        district_en: null
                        city_en: null
                        postal_code_en: null
                        role: null
                        logo_url: /storage//branch_logo/16310998641000.png
                        full_address_ar: '- Al Ahd Al Jadid- Ar Ruwais-Jeddah '
                        full_address_en: ''
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1000
                        created_at:
                          type: string
                          example: '2025-07-13 18:12:08'
                        updated_at:
                          type: string
                          example: '2025-07-13 18:12:08'
                        branch_name:
                          type: string
                          example: 'Jeddah Branch'
                        logo:
                          type: string
                          example: /branch_logo/16310998641000.png
                        country:
                          type: string
                          example: null
                        phone:
                          type: string
                          example: null
                        email:
                          type: string
                          example: ahsan@ahsan-web.ml
                        website:
                          type: string
                          example: null
                        short_address:
                          type: string
                          example: null
                        building_no:
                          type: string
                          example: null
                        street_name:
                          type: string
                          example: 'Al Ahd Al Jadid'
                        secondary_no:
                          type: string
                          example: null
                        district:
                          type: string
                          example: 'Ar Ruwais'
                        city:
                          type: string
                          example: Jeddah
                        postal_code:
                          type: string
                          example: null
                        allow_webhook:
                          type: boolean
                          example: false
                        allow_api:
                          type: boolean
                          example: true
                        short_address_en:
                          type: string
                          example: null
                        building_no_en:
                          type: string
                          example: null
                        street_name_en:
                          type: string
                          example: null
                        secondary_no_en:
                          type: string
                          example: null
                        district_en:
                          type: string
                          example: null
                        city_en:
                          type: string
                          example: null
                        postal_code_en:
                          type: string
                          example: null
                        role:
                          type: string
                          example: null
                        logo_url:
                          type: string
                          example: /storage//branch_logo/16310998641000.png
                        full_address_ar:
                          type: string
                          example: '- Al Ahd Al Jadid- Ar Ruwais-Jeddah '
                        full_address_en:
                          type: string
                          example: ''
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: null
                      last:
                        type: string
                        example: null
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: null
                  meta:
                    type: object
                    properties:
                      path:
                        type: string
                        example: 'http://127.0.0.1:8000/api/companies/10000/branches'
                      per_page:
                        type: integer
                        example: 10
                      next_cursor:
                        type: string
                        example: null
                      prev_cursor:
                        type: string
                        example: null
      tags:
        - 'Manage Companies'
    post:
      summary: 'Create Branch'
      operationId: createBranch
      description: 'This endpoint allows the authenticated user to create a new branch for a specific company.'
      parameters: []
      responses: {  }
      tags:
        - 'Manage Companies'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                branch_name:
                  type: string
                  description: 'The name of the branch. Must not be greater than 255 characters.'
                  example: 'Main Branch'
                  nullable: false
                logo:
                  type: string
                  format: binary
                  description: ''
                  nullable: true
                short_address:
                  type: string
                  description: 'The short address for the branch/company. (Arabic). Must be 8 characters.'
                  example: RAHA3443
                  nullable: true
                building_no:
                  type: string
                  description: 'Building number of the branch/company. (Arabic). Must match the regex /^([0-9٠-٩]{4})$/u.'
                  example: ٢٩٢٩
                  nullable: true
                street_name:
                  type: string
                  description: 'Street name of the branch/company. (Arabic). Must not be greater than 64 characters.'
                  example: 'ريحانة بنت زيد'
                  nullable: true
                secondary_no:
                  type: string
                  description: 'Secondary number of the branch/company. (Arabic). Must match the regex /^([0-9٠-٩]{4})$/u.'
                  example: ٨١١٨
                  nullable: true
                district:
                  type: string
                  description: 'District of the branch/company. (Arabic). Must not be greater than 32 characters.'
                  example: 'حي العارض'
                  nullable: true
                postal_code:
                  type: string
                  description: 'Postal code of the branch/company. (Arabic). Must match the regex /^([0-9٠-٩]{5})$/u.'
                  example: ١٣٣٣٧
                  nullable: true
                city:
                  type: string
                  description: 'Must not be greater than 32 characters.'
                  example: uvchuw
                  nullable: true
                short_address_en:
                  type: string
                  description: 'The short address for the branch/company. (English). Must be 8 characters.'
                  example: RAHA3443
                  nullable: true
                building_no_en:
                  type: string
                  description: 'Building number of the branch/company. (English). Must match the regex /^([0-9٠-٩]{4})$/u.'
                  example: '2929'
                  nullable: true
                street_name_en:
                  type: string
                  description: 'Street name of the branch/company. (English). Must not be greater than 64 characters.'
                  example: 'Raihan Bint Zaid'
                  nullable: true
                secondary_no_en:
                  type: string
                  description: 'Secondary number of the branch/company. (English). Must match the regex /^([0-9٠-٩]{4})$/u.'
                  example: '8118'
                  nullable: true
                district_en:
                  type: string
                  description: 'District of the branch/company. (English). Must not be greater than 32 characters.'
                  example: 'Al Arid'
                  nullable: true
                postal_code_en:
                  type: string
                  description: 'Postal code of the branch/company. (English). Must match the regex /^([0-9٠-٩]{5})$/u.'
                  example: '13337'
                  nullable: true
                city_en:
                  type: string
                  description: 'City of the branch/company. (English). Must not be greater than 32 characters.'
                  example: Riyadh
                  nullable: true
                email:
                  type: string
                  description: 'Email address of the branch (optional). Must be a valid email address. Must not be greater than 255 characters.'
                  example: test@test.com
                  nullable: false
                phone:
                  type: string
                  description: 'Phone number of the branch (optional).'
                  example: '+966500000000'
                  nullable: true
                country:
                  type: string
                  description: 'Country code of the branch (optional). ISO 3166-1 alpha-2 format. This field is required when <code>phone</code> is present. Must not be greater than 2 characters.'
                  example: SA
                  nullable: false
              required:
                - branch_name
                - email
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/branches/{id}':
    put:
      summary: 'Update Branch'
      operationId: updateBranch
      description: 'This endpoint allows the authenticated user to update an existing branch for a specific company.'
      parameters: []
      responses: {  }
      tags:
        - 'Manage Companies'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                branch_name:
                  type: string
                  description: 'The name of the branch. Must not be greater than 255 characters.'
                  example: 'Main Branch'
                  nullable: false
                logo:
                  type: string
                  format: binary
                  description: ''
                  nullable: true
                short_address:
                  type: string
                  description: 'The short address for the branch/company. (Arabic). Must be 8 characters.'
                  example: RAHA3443
                  nullable: true
                building_no:
                  type: string
                  description: 'Building number of the branch/company. (Arabic). Must match the regex /^([0-9٠-٩]{4})$/u.'
                  example: ٢٩٢٩
                  nullable: true
                street_name:
                  type: string
                  description: 'Street name of the branch/company. (Arabic). Must not be greater than 64 characters.'
                  example: 'ريحانة بنت زيد'
                  nullable: true
                secondary_no:
                  type: string
                  description: 'Secondary number of the branch/company. (Arabic). Must match the regex /^([0-9٠-٩]{4})$/u.'
                  example: ٨١١٨
                  nullable: true
                district:
                  type: string
                  description: 'District of the branch/company. (Arabic). Must not be greater than 32 characters.'
                  example: 'حي العارض'
                  nullable: true
                postal_code:
                  type: string
                  description: 'Postal code of the branch/company. (Arabic). Must match the regex /^([0-9٠-٩]{5})$/u.'
                  example: ١٣٣٣٧
                  nullable: true
                city:
                  type: string
                  description: 'Must not be greater than 32 characters.'
                  example: gtqnhyo
                  nullable: true
                short_address_en:
                  type: string
                  description: 'The short address for the branch/company. (English). Must be 8 characters.'
                  example: RAHA3443
                  nullable: true
                building_no_en:
                  type: string
                  description: 'Building number of the branch/company. (English). Must match the regex /^([0-9٠-٩]{4})$/u.'
                  example: '2929'
                  nullable: true
                street_name_en:
                  type: string
                  description: 'Street name of the branch/company. (English). Must not be greater than 64 characters.'
                  example: 'Raihan Bint Zaid'
                  nullable: true
                secondary_no_en:
                  type: string
                  description: 'Secondary number of the branch/company. (English). Must match the regex /^([0-9٠-٩]{4})$/u.'
                  example: '8118'
                  nullable: true
                district_en:
                  type: string
                  description: 'District of the branch/company. (English). Must not be greater than 32 characters.'
                  example: 'Al Arid'
                  nullable: true
                postal_code_en:
                  type: string
                  description: 'Postal code of the branch/company. (English). Must match the regex /^([0-9٠-٩]{5})$/u.'
                  example: '13337'
                  nullable: true
                city_en:
                  type: string
                  description: 'City of the branch/company. (English). Must not be greater than 32 characters.'
                  example: Riyadh
                  nullable: true
                email:
                  type: string
                  description: 'Email address of the branch (optional). Must be a valid email address. Must not be greater than 255 characters.'
                  example: test@test.com
                  nullable: false
                phone:
                  type: string
                  description: 'Phone number of the branch (optional).'
                  example: '+966500000000'
                  nullable: true
                country:
                  type: string
                  description: 'Country code of the branch (optional). ISO 3166-1 alpha-2 format. This field is required when <code>phone</code> is present. Must not be greater than 2 characters.'
                  example: SA
                  nullable: false
              required:
                - branch_name
                - email
    delete:
      summary: 'Delete Branch'
      operationId: deleteBranch
      description: 'This endpoint allows the authenticated user to delete an existing branch for a specific company.'
      parameters: []
      responses: {  }
      tags:
        - 'Manage Companies'
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The ID of the branch.'
        example: 1000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/zatcaSettings':
    get:
      summary: 'Display the ZATCA settings for a company.'
      operationId: displayTheZATCASettingsForACompany
      description: ''
      parameters: []
      responses:
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Server Error'
                properties:
                  message:
                    type: string
                    example: 'Server Error'
      tags:
        - 'Manage Companies'
    post:
      summary: 'Store or update the ZATCA settings for a company.'
      operationId: storeOrUpdateTheZATCASettingsForACompany
      description: ''
      parameters: []
      responses: {  }
      tags:
        - 'Manage Companies'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                common_name:
                  type: string
                  description: 'Provided by the Taxpayer for each Solution unit: Unique Name or Asset Tracking Number of the Solution Unit. Must match the regex /^[a-zA-Z0-9\s]*$/. Must be between 3 and 255 characters.'
                  example: 'Company Name'
                  nullable: false
                egs_serial_number:
                  type: string
                  description: 'Automatically filled and not by the taxpayer: Unique identification code for the EGS. Manufacturer serial number for each solution unit including <br>1. Manufacturer or Solution Provider Name | 2-Model or Version | 3-SerialNumber. Must match the regex /(1-[a-zA-Z\d]{3,})([|]2-[a-zA-Z\d]{3,})([|]3-[a-zA-Z\d]{3,})/. Must be between 3 and 255 characters.'
                  example: 1-eInvoiceMe|2-v1.0.0|3-10001
                  nullable: false
                organization_unit_name:
                  type: string
                  description: 'The branch name for taxpayers. In case of VAT Groups this field should contain the 10-digit TIN number of the individual group member whose EGS Unit is being onboarded. Must be between 3 and 255 characters.'
                  example: 'Finance Department'
                  nullable: false
                organization_name:
                  type: string
                  description: 'Organization/Taxpayer Name. Must match the regex /^[a-zA-Z0-9\s]*$/. Must be between 3 and 255 characters.'
                  example: 'My Company Name'
                  nullable: false
                country_name:
                  type: string
                  description: 'Name of the country <br>2 letter code. ISO 3166-1 alpha-2 code. Must be 2 characters.'
                  example: SA
                  nullable: false
                invoice_type:
                  type: string
                  description: 'The type of invoices issued by the organization. <br>Allowed values: 1100, 0100, 1000.'
                  example: '1100'
                  nullable: false
                  enum:
                    - '1100'
                    - '0100'
                    - '1000'
                location:
                  type: string
                  description: 'The address of the Branch or location where the device or solution unit is primarily situated (could be website address for e-commerce). Must not be greater than 255 characters.'
                  example: 'Riyadh, Saudi Arabia'
                  nullable: false
                industry:
                  type: string
                  description: 'Industry or sector for which the device or solution will generate invoices. Must not be greater than 255 characters.'
                  example: 'Information Technology'
                  nullable: false
                is_live:
                  type: boolean
                  description: 'Indicates if the ZATCA setting is for the LIVE environment or the Simulation environment.'
                  example: false
                  nullable: true
                otp:
                  type: string
                  description: "Log onto the fatoora portal (<a class='text-blue-700 underline' href='https://fatoora.zatca.gov.sa'>https://fatoora.zatca.gov.sa</a>) with tax portal credentials. select Onboard new solution unit/device and you will be presented with an option to generate an OTP. The OTP is then required to be entered in this step. Must be 6 digits."
                  example: '123456'
                  nullable: false
              required:
                - common_name
                - egs_serial_number
                - organization_unit_name
                - organization_name
                - country_name
                - invoice_type
                - location
                - industry
                - otp
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/zatca/auto-post':
    post:
      summary: 'Enable/Disable ZATCA Auto Post'
      operationId: enableDisableZATCAAutoPost
      description: ''
      parameters: []
      responses: {  }
      tags:
        - 'Manage Companies'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                auto:
                  type: boolean
                  description: ''
                  example: true
                  nullable: false
              required:
                - auto
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/zatca/dashboard':
    get:
      summary: 'Display the ZATCA dashboard for a company.'
      operationId: displayTheZATCADashboardForACompany
      description: ''
      parameters:
        -
          in: query
          name: irn
          description: 'The Invoice Reference Number (IRN) of the invoice.'
          example: 1234567890
          required: false
          schema:
            type: integer
            description: 'The Invoice Reference Number (IRN) of the invoice.'
            example: 1234567890
            nullable: true
        -
          in: query
          name: inv
          description: 'The Invoice Number.'
          example: null
          required: false
          schema:
            type: string
            description: 'The Invoice Number.'
            example: null
            nullable: true
        -
          in: query
          name: vat_no
          description: 'The VAT Number of the company. Must not be greater than 15 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'The VAT Number of the company. Must not be greater than 15 characters.'
            example: null
            nullable: true
        -
          in: query
          name: cr_no
          description: 'The Commercial Registration Number of the company. Must not be greater than 10 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'The Commercial Registration Number of the company. Must not be greater than 10 characters.'
            example: null
            nullable: true
        -
          in: query
          name: customer_name
          description: 'The name of the customer. Must not be greater than 50 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'The name of the customer. Must not be greater than 50 characters.'
            example: null
            nullable: true
        -
          in: query
          name: customer_phone
          description: 'The phone number of the customer. Must not be greater than 15 characters.'
          example: null
          required: false
          schema:
            type: string
            description: 'The phone number of the customer. Must not be greater than 15 characters.'
            example: null
            nullable: true
        -
          in: query
          name: invoice_type
          description: 'The type of invoice.'
          example: null
          required: false
          schema:
            type: string
            description: 'The type of invoice.'
            example: null
            nullable: true
            enum:
              - simplified-tax-invoice
              - tax-invoice
        -
          in: query
          name: transaction_type
          description: 'The type of transaction.'
          example: null
          required: false
          schema:
            type: string
            description: 'The type of transaction.'
            example: null
            nullable: true
            enum:
              - i
              - c
              - d
        -
          in: query
          name: status
          description: 'The status of the invoice.'
          example: null
          required: false
          schema:
            type: string
            description: 'The status of the invoice.'
            example: null
            nullable: true
            enum:
              - accepted
              - rejected
              - not-sent
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data: []
                  links:
                    first: null
                    last: null
                    prev: null
                    next: null
                  meta:
                    path: 'http://127.0.0.1:8000/api/companies/10000/zatca/dashboard'
                    per_page: 15
                    next_cursor: null
                    prev_cursor: null
                properties:
                  data:
                    type: array
                    example: []
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: null
                      last:
                        type: string
                        example: null
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: null
                  meta:
                    type: object
                    properties:
                      path:
                        type: string
                        example: 'http://127.0.0.1:8000/api/companies/10000/zatca/dashboard'
                      per_page:
                        type: integer
                        example: 15
                      next_cursor:
                        type: string
                        example: null
                      prev_cursor:
                        type: string
                        example: null
      tags:
        - 'Manage Companies'
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/invoice-sequences/{invoiceSequence_id}/report':
    post:
      summary: 'Report document to ZATCA for a specific invoice sequence.'
      operationId: reportDocumentToZATCAForASpecificInvoiceSequence
      description: ''
      parameters: []
      responses: {  }
      tags:
        - 'Manage Companies'
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
      -
        in: path
        name: invoiceSequence_id
        description: 'The ID of the invoiceSequence.'
        example: 7
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/transactions':
    get:
      summary: 'Compnay Transactions Report'
      operationId: compnayTransactionsReport
      description: ''
      parameters:
        -
          in: query
          name: irn
          description: 'The IRN of the transaction.'
          example: null
          required: false
          schema:
            type: string
            description: 'The IRN of the transaction.'
            example: null
            nullable: true
        -
          in: query
          name: inv
          description: 'The internal invoice number of the transaction.'
          example: null
          required: false
          schema:
            type: string
            description: 'The internal invoice number of the transaction.'
            example: null
            nullable: true
        -
          in: query
          name: vat_no
          description: 'Filter all transactions by the seller VAT number.'
          example: null
          required: false
          schema:
            type: integer
            description: 'Filter all transactions by the seller VAT number.'
            example: null
            nullable: true
        -
          in: query
          name: branch_id
          description: 'Get all the transactions for a specific branch.'
          example: null
          required: false
          schema:
            type: integer
            description: 'Get all the transactions for a specific branch.'
            example: null
            nullable: true
        -
          in: query
          name: transaction_type
          description: 'Filter transactions by document type. i (Invoice), c (Credit Note), d (Debit Note).'
          example: null
          required: false
          schema:
            type: string
            description: 'Filter transactions by document type. i (Invoice), c (Credit Note), d (Debit Note).'
            example: null
            nullable: true
            enum:
              - i
              - c
              - d
        -
          in: query
          name: from
          description: 'Filter transactions from a specific date. Must be a valid date in the format <code>Y-m-d</code>.'
          example: '2025-07-01'
          required: true
          schema:
            type: string
            description: 'Filter transactions from a specific date. Must be a valid date in the format <code>Y-m-d</code>.'
            example: '2025-07-01'
            nullable: false
        -
          in: query
          name: to
          description: 'Filter transactions to a specific date. Must be a valid date in the format <code>Y-m-d</code>.'
          example: '2025-07-31'
          required: true
          schema:
            type: string
            description: 'Filter transactions to a specific date. Must be a valid date in the format <code>Y-m-d</code>.'
            example: '2025-07-31'
            nullable: false
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data: []
                  links:
                    first: null
                    last: null
                    prev: null
                    next: null
                  meta:
                    path: 'http://127.0.0.1:8000/api/companies/10000/transactions'
                    per_page: 10
                    next_cursor: null
                    prev_cursor: null
                properties:
                  data:
                    type: array
                    example: []
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: null
                      last:
                        type: string
                        example: null
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: null
                  meta:
                    type: object
                    properties:
                      path:
                        type: string
                        example: 'http://127.0.0.1:8000/api/companies/10000/transactions'
                      per_page:
                        type: integer
                        example: 10
                      next_cursor:
                        type: string
                        example: null
                      prev_cursor:
                        type: string
                        example: null
      tags:
        - 'Manage Companies'
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/vat-sales':
    get:
      summary: 'Company VAT Sales Report'
      operationId: companyVATSalesReport
      description: ''
      parameters:
        -
          in: query
          name: vat_no
          description: 'VAT number of the company. Optional, but if provided, must be a 15-digit number. Must be 15 digits.'
          example: null
          required: false
          schema:
            type: string
            description: 'VAT number of the company. Optional, but if provided, must be a 15-digit number. Must be 15 digits.'
            example: null
            nullable: true
        -
          in: query
          name: from
          description: 'Start date for the report in YYYY-MM-DD format. Must be a valid date in the format <code>Y-m-d</code>.'
          example: '2025-07-01'
          required: true
          schema:
            type: string
            description: 'Start date for the report in YYYY-MM-DD format. Must be a valid date in the format <code>Y-m-d</code>.'
            example: '2025-07-01'
            nullable: false
        -
          in: query
          name: to
          description: 'End date for the report in YYYY-MM-DD format. Must be a valid date in the format <code>Y-m-d</code>. Must be a date after or equal to <code>from</code>.'
          example: '2025-07-31'
          required: true
          schema:
            type: string
            description: 'End date for the report in YYYY-MM-DD format. Must be a valid date in the format <code>Y-m-d</code>. Must be a date after or equal to <code>from</code>.'
            example: '2025-07-31'
            nullable: false
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'VAT Sales Report'
                  data:
                    transactions: []
                    sales_vat: 0
                    open_vat: 0
                    debit_vat: 0
                    adjusted_vat: 0
                properties:
                  message:
                    type: string
                    example: 'VAT Sales Report'
                  data:
                    type: object
                    properties:
                      transactions:
                        type: array
                        example: []
                      sales_vat:
                        type: integer
                        example: 0
                      open_vat:
                        type: integer
                        example: 0
                      debit_vat:
                        type: integer
                        example: 0
                      adjusted_vat:
                        type: integer
                        example: 0
      tags:
        - 'Manage Companies'
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
  '/api/companies/{company_id}/vat-purchases':
    get:
      summary: 'Company VAT Purchases Report'
      operationId: companyVATPurchasesReport
      description: ''
      parameters:
        -
          in: query
          name: from
          description: 'Start date for the report in YYYY-MM-DD format. Must be a valid date in the format <code>Y-m-d</code>.'
          example: '2025-07-01'
          required: true
          schema:
            type: string
            description: 'Start date for the report in YYYY-MM-DD format. Must be a valid date in the format <code>Y-m-d</code>.'
            example: '2025-07-01'
            nullable: false
        -
          in: query
          name: to
          description: 'End date for the report in YYYY-MM-DD format. Must be a valid date in the format <code>Y-m-d</code>. Must be a date after or equal to <code>from</code>.'
          example: '2025-07-31'
          required: true
          schema:
            type: string
            description: 'End date for the report in YYYY-MM-DD format. Must be a valid date in the format <code>Y-m-d</code>. Must be a date after or equal to <code>from</code>.'
            example: '2025-07-31'
            nullable: false
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Company VAT Purchases Report'
                  transactions: []
                  total_sales: 0
                  total_sales_vat: 0
                  total_debit_notes: 0
                  total_debit_notes_vat: 0
                  total_credit_notes: 0
                  total_credit_notes_vat: 0
                properties:
                  message:
                    type: string
                    example: 'Company VAT Purchases Report'
                  transactions:
                    type: array
                    example: []
                  total_sales:
                    type: integer
                    example: 0
                  total_sales_vat:
                    type: integer
                    example: 0
                  total_debit_notes:
                    type: integer
                    example: 0
                  total_debit_notes_vat:
                    type: integer
                    example: 0
                  total_credit_notes:
                    type: integer
                    example: 0
                  total_credit_notes_vat:
                    type: integer
                    example: 0
      tags:
        - 'Manage Companies'
    parameters:
      -
        in: path
        name: company_id
        description: 'The ID of the company.'
        example: 10000
        required: true
        schema:
          type: integer
  /api/my-profile:
    get:
      summary: 'Current User profile.'
      operationId: currentUserProfile
      description: "This method retrieves the authenticated user's profile information"
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'User profile retrieved successfully'
                  data:
                    id: 1
                    name: 'Ahsan Zaman'
                    email: ahsan.web.ml@gmail.com
                    email_verified: true
                    phone: '+966571708606'
                    user_type: User
                    default_payment_status: open
                    default_payment_method: cash
                    profile_photo:
                      id: 1
                      model_type: App\Models\User
                      model_id: 1
                      uuid: b7eb9ee0-a30c-4285-af35-267b0752cb0d
                      collection_name: profile_photo
                      name: logo
                      file_name: logo.jpeg
                      mime_type: image/jpeg
                      disk: public
                      conversions_disk: public
                      size: 6488
                      manipulations: []
                      custom_properties:
                        custom_headers:
                          visibility: public
                      generated_conversions: []
                      responsive_images: []
                      order_column: 1
                      created_at: '2025-07-13T19:53:22.000000Z'
                      updated_at: '2025-07-13T19:53:22.000000Z'
                      original_url: 'http://127.0.0.1:8000/storage/eInvoiceMe/1/logo.jpeg'
                      preview_url: ''
                properties:
                  message:
                    type: string
                    example: 'User profile retrieved successfully'
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 1
                      name:
                        type: string
                        example: 'Ahsan Zaman'
                      email:
                        type: string
                        example: ahsan.web.ml@gmail.com
                      email_verified:
                        type: boolean
                        example: true
                      phone:
                        type: string
                        example: '+966571708606'
                      user_type:
                        type: string
                        example: User
                      default_payment_status:
                        type: string
                        example: open
                      default_payment_method:
                        type: string
                        example: cash
                      profile_photo:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          model_type:
                            type: string
                            example: App\Models\User
                          model_id:
                            type: integer
                            example: 1
                          uuid:
                            type: string
                            example: b7eb9ee0-a30c-4285-af35-267b0752cb0d
                          collection_name:
                            type: string
                            example: profile_photo
                          name:
                            type: string
                            example: logo
                          file_name:
                            type: string
                            example: logo.jpeg
                          mime_type:
                            type: string
                            example: image/jpeg
                          disk:
                            type: string
                            example: public
                          conversions_disk:
                            type: string
                            example: public
                          size:
                            type: integer
                            example: 6488
                          manipulations:
                            type: array
                            example: []
                          custom_properties:
                            type: object
                            properties:
                              custom_headers:
                                type: object
                                properties:
                                  visibility:
                                    type: string
                                    example: public
                          generated_conversions:
                            type: array
                            example: []
                          responsive_images:
                            type: array
                            example: []
                          order_column:
                            type: integer
                            example: 1
                          created_at:
                            type: string
                            example: '2025-07-13T19:53:22.000000Z'
                          updated_at:
                            type: string
                            example: '2025-07-13T19:53:22.000000Z'
                          original_url:
                            type: string
                            example: 'http://127.0.0.1:8000/storage/eInvoiceMe/1/logo.jpeg'
                          preview_url:
                            type: string
                            example: ''
      tags:
        - 'Manage Profile'
  /api/update-my-profile:
    post:
      summary: 'Update Current User profile.'
      operationId: updateCurrentUserProfile
      description: "This method updates the authenticated user's profile information"
      parameters: []
      responses: {  }
      tags:
        - 'Manage Profile'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'The name of the user. Must not be greater than 255 characters.'
                  example: 'Ahsan Zaman'
                  nullable: false
                email:
                  type: string
                  description: 'The email of the user. Must be a valid email address. Must not be greater than 255 characters.'
                  example: jerde.quincy@example.net
                  nullable: false
                country:
                  type: string
                  description: 'The country code of the user. ISO 3166-1 alpha-2 format is expected. Must be 2 characters.'
                  example: SA
                  nullable: true
                phone:
                  type: string
                  description: 'The phone number of the user. It should be a valid phone number for the specified country.'
                  example: '+966571708606'
                  nullable: false
                invoice_type:
                  type: string
                  description: 'Indicates whether the user TAX Invoices (true) or Simplified TAX Invoices (false).'
                  example: true
                  nullable: false
                  enum:
                    - 'true'
                    - 'false'
                    - '1'
                    - '0'
                    - '1'
                    - '0'
                    - '1'
                    - ''
                customer_type:
                  type: string
                  description: 'Indicates whether the user is a Business (true) or Individual (false).'
                  example: true
                  nullable: false
                  enum:
                    - 'true'
                    - 'false'
                    - '1'
                    - '0'
                    - '1'
                    - '0'
                    - '1'
                    - ''
                payment_status:
                  type: integer
                  description: 'Default payment status for documents. 0 for Close with RV, 1 for Open, 2 for Close without RV.'
                  example: 1
                  nullable: false
                payment_method:
                  type: string
                  description: 'The default payment method used by the user.'
                  example: cash
                  nullable: true
                  enum:
                    - cash
                    - debit
                    - credit
                    - bank
                    - cheque
                    - acc
                    - gold
                    - 'Hunger Station'
                    - Jahez
                    - Lugmty
                    - 'The chefz'
                    - deposit
                    - withdrawal
                photo:
                  type: string
                  format: binary
                  description: ''
                  nullable: true
              required:
                - name
                - email
                - phone
                - invoice_type
                - customer_type
                - payment_status
  /api/billing:
    get:
      summary: 'Get Current User Bills.'
      operationId: getCurrentUserBills
      description: "This method retrieves the authenticated user's bills & Subscription payments"
      parameters: []
      responses:
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'Server Error'
                properties:
                  message:
                    type: string
                    example: 'Server Error'
      tags:
        - 'Manage Profile'
  /api/verify-phone:
    post:
      summary: 'Verify Phone Number'
      operationId: verifyPhoneNumber
      description: "This method verifies the user's phone number by sending an OTP.\nIf the phone number is already verified, it returns a message indicating that."
      parameters: []
      responses: {  }
      tags:
        - 'Manage Profile'
  /api/verify-phone-otp:
    post:
      summary: 'Verify Phone Number OTP'
      operationId: verifyPhoneNumberOTP
      description: "This method verifies the user's phone number by checking the provided OTP."
      parameters: []
      responses: {  }
      tags:
        - 'Manage Profile'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                otp:
                  type: string
                  description: 'User must provide a 6-digit OTP received via SMS. Must be 6 characters.'
                  example: '123456'
                  nullable: false
              required:
                - otp
