openapi: 3.0.3
info:
  title: 'Laravel API Documentation'
  description: ''
  version: 1.0.0
servers:
  -
    url: 'https://asianpaints.binaryic.in'
tags:
  -
    name: 'Account Management'
    description: ''
  -
    name: Authentication
    description: ''
  -
    name: 'Cart Management'
    description: ''
  -
    name: 'Dashboard Integration'
    description: ''
  -
    name: Endpoints
    description: ''
  -
    name: Inventory
    description: ''
  -
    name: 'Order Management'
    description: ''
  -
    name: Profile
    description: ''
  -
    name: 'TSE Management'
    description: ''
paths:
  /api/account-statement:
    post:
      summary: 'Get Account Statement'
      operationId: getAccountStatement
      description: 'Fetch the account statement for a specific customer (kunnr) within an optional date range.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  status_code: 200
                  message: 'Account statement fetched successfully'
                  data:
                    openingBal: '1500.50'
                    details:
                      -
                        docDate: '2023-05-10'
                        docNo: '1800001234'
                        docDesc: 'Invoice Payment'
                        docAmount: '500.00'
                        balAmount: '1000.00'
                    itCollection: []
                    itInvoices: []
                properties:
                  success:
                    type: boolean
                    example: true
                  status_code:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: 'Account statement fetched successfully'
                  data:
                    type: object
                    properties:
                      openingBal:
                        type: string
                        example: '1500.50'
                      details:
                        type: array
                        example:
                          -
                            docDate: '2023-05-10'
                            docNo: '1800001234'
                            docDesc: 'Invoice Payment'
                            docAmount: '500.00'
                            balAmount: '1000.00'
                        items:
                          type: object
                          properties:
                            docDate:
                              type: string
                              example: '2023-05-10'
                            docNo:
                              type: string
                              example: '1800001234'
                            docDesc:
                              type: string
                              example: 'Invoice Payment'
                            docAmount:
                              type: string
                              example: '500.00'
                            balAmount:
                              type: string
                              example: '1000.00'
                      itCollection:
                        type: array
                        example: []
                      itInvoices:
                        type: array
                        example: []
      tags:
        - 'Account Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                kunnr:
                  type: string
                  description: 'Customer ID (The unique identifier for the customer/dealer).'
                  example: '0001001234'
                start_date:
                  type: date
                  description: 'Start Date (The beginning of the statement period, format Y-m-d).'
                  example: '2023-01-01'
                  nullable: true
                end_date:
                  type: date
                  description: 'End Date (The end of the statement period, format Y-m-d).'
                  example: '2023-12-31'
                  nullable: true
              required:
                - kunnr
      security: []
  /api/account-statement-pdf:
    post:
      summary: 'Standardized PDF Generation and Retrieval (acstn).'
      operationId: standardizedPDFGenerationAndRetrievalacstn
      description: 'Generate and retrieve a URL for the account statement PDF for a specific customer within an optional date range.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  status_code: 200
                  message: 'PDF generated successfully'
                  data:
                    pdf_url: 'https://asianpaints-staging.binaryic.in/storage/statements/account_statement_AER10558_1775541059.pdf'
                    filename: account_statement_AER10558_1775541059.pdf
                properties:
                  success:
                    type: boolean
                    example: true
                  status_code:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: 'PDF generated successfully'
                  data:
                    type: object
                    properties:
                      pdf_url:
                        type: string
                        example: 'https://asianpaints-staging.binaryic.in/storage/statements/account_statement_AER10558_1775541059.pdf'
                      filename:
                        type: string
                        example: account_statement_AER10558_1775541059.pdf
      tags:
        - 'Account Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                customer:
                  type: string
                  description: 'Customer ID.'
                  example: AER10558
                startDate:
                  type: date
                  description: 'Start Date (format Y-m-d).'
                  example: '2024-01-01'
                  nullable: true
                endDate:
                  type: date
                  description: 'End Date (format Y-m-d).'
                  example: '2026-07-08'
                  nullable: true
              required:
                - customer
      security: []
  /api/send-otp:
    post:
      summary: 'Send OTP'
      operationId: sendOTP
      description: 'Generates and sends a 4-digit OTP to the provided mobile number via Dialog SMS gateway.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  status_code: 200
                  message: 'OTP sent successfully'
                  data:
                    status: success
                    message: 'OTP sent successfully'
                properties:
                  success:
                    type: boolean
                    example: true
                  status_code:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: 'OTP sent successfully'
                  data:
                    type: object
                    properties:
                      status:
                        type: string
                        example: success
                      message:
                        type: string
                        example: 'OTP sent successfully'
      tags:
        - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                mobile:
                  type: string
                  description: "Mobile Number (The user's 10-digit contact number)."
                  example: '0771234567'
              required:
                - mobile
      security: []
  /api/verify-otp:
    post:
      summary: 'Verify OTP'
      operationId: verifyOTP
      description: "Verifies the 4-digit OTP sent to the user's mobile number."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  status_code: 200
                  message: 'OTP verified successfully'
                  data:
                    status: success
                    message: 'OTP verified successfully'
                properties:
                  success:
                    type: boolean
                    example: true
                  status_code:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: 'OTP verified successfully'
                  data:
                    type: object
                    properties:
                      status:
                        type: string
                        example: success
                      message:
                        type: string
                        example: 'OTP verified successfully'
      tags:
        - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                mobile:
                  type: string
                  description: "Mobile Number (The user's 10-digit contact number)."
                  example: '0771234567'
                otp:
                  type: string
                  description: 'Verification Code (The 4-digit OTP sent to the mobile).'
                  example: '1234'
              required:
                - mobile
                - otp
      security: []
  /api/check-final-price:
    post:
      summary: 'Retrieve the final price for a set of materials.'
      operationId: retrieveTheFinalPriceForASetOfMaterials
      description: "Delegates the CPI POST call to CartService, evaluates the result,\nand returns a standard JSON envelope. On downstream failure, returns\na structured 200 error response without exposing upstream details."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  status_code: 200
                  message: 'Final price fetched successfully'
                  data:
                    ltOut:
                      -
                        material: AE1-F0006099918T
                        netValue: '45670.0000'
                        discount: '-10960.80'
                        tax: '1735.46'
                        grossValue: '36444.66'
                        currency: AED
                      -
                        material: AE1-F05730997025
                        netValue: '1840.0000'
                        discount: '-441.60'
                        tax: '69.92'
                        grossValue: '1468.32'
                        currency: AED
                    pdfString: ''
                    mat:
                      -
                        matnr: AE1-F0006099918T
                        kwmeng: '10.000'
                      -
                        matnr: AE1-F05730997025
                        kwmeng: '10.000'
                    return: []
                properties:
                  success:
                    type: boolean
                    example: true
                  status_code:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: 'Final price fetched successfully'
                  data:
                    type: object
                    properties:
                      ltOut:
                        type: array
                        example:
                          -
                            material: AE1-F0006099918T
                            netValue: '45670.0000'
                            discount: '-10960.80'
                            tax: '1735.46'
                            grossValue: '36444.66'
                            currency: AED
                          -
                            material: AE1-F05730997025
                            netValue: '1840.0000'
                            discount: '-441.60'
                            tax: '69.92'
                            grossValue: '1468.32'
                            currency: AED
                        items:
                          type: object
                          properties:
                            material:
                              type: string
                              example: AE1-F0006099918T
                            netValue:
                              type: string
                              example: '45670.0000'
                            discount:
                              type: string
                              example: '-10960.80'
                            tax:
                              type: string
                              example: '1735.46'
                            grossValue:
                              type: string
                              example: '36444.66'
                            currency:
                              type: string
                              example: AED
                      pdfString:
                        type: string
                        example: ''
                      mat:
                        type: array
                        example:
                          -
                            matnr: AE1-F0006099918T
                            kwmeng: '10.000'
                          -
                            matnr: AE1-F05730997025
                            kwmeng: '10.000'
                        items:
                          type: object
                          properties:
                            matnr:
                              type: string
                              example: AE1-F0006099918T
                            kwmeng:
                              type: string
                              example: '10.000'
                      return:
                        type: array
                        example: []
      tags:
        - 'Cart Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                customer:
                  type: string
                  description: 'Customer ID.'
                  example: AER10558
                stpCustomer:
                  type: string
                  description: 'Ship To Party Customer ID.'
                  example: AER10558
                docTyp:
                  type: string
                  description: 'Document Type.'
                  example: ZIRO
                mat:
                  type: array
                  description: 'The list of materials.'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      matnr:
                        type: string
                        description: 'Material Number.'
                        example: AE1-F0006099918T
                      kwmeng:
                        type: string
                        description: Quantity.
                        example: '10.000'
                    required:
                      - matnr
                      - kwmeng
              required:
                - customer
                - stpCustomer
                - docTyp
                - mat
      security: []
  /api/get-payment-terms:
    post:
      summary: 'Retrieve payment terms for a given dealer.'
      operationId: retrievePaymentTermsForAGivenDealer
      description: "Delegates the CPI call to CartService::getPaymentTerms, extracts unique\npayTerm values from the `knavvv` array in the response body, and returns\na standard JSON envelope. On downstream failure, returns a structured\n200 error response without exposing upstream details."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  status_code: 200
                  message: 'Dealer payment terms fetched successfully'
                  data:
                    customer: AER10558
                    payTerms:
                      - P180
                properties:
                  success:
                    type: boolean
                    example: true
                  status_code:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: 'Dealer payment terms fetched successfully'
                  data:
                    type: object
                    properties:
                      customer:
                        type: string
                        example: AER10558
                      payTerms:
                        type: array
                        example:
                          - P180
                        items:
                          type: string
      tags:
        - 'Cart Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                customer:
                  type: string
                  description: 'Customer ID.'
                  example: AER10558
              required:
                - customer
      security: []
  /api/get-ship-to-party-list:
    post:
      summary: 'Retrieve the ship-to-party list for a given dealer.'
      operationId: retrieveTheShipToPartyListForAGivenDealer
      description: "Delegates the CPI POST call to CartService::getSTPList, evaluates the\nresult, and returns a standard JSON envelope. On downstream failure,\nreturns a structured 200 error response without exposing upstream details."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  status_code: 200
                  message: 'Ship to party fetched successfully'
                  data:
                    -
                      stpRes:
                        -
                          shipToParty: AER10558
                          shipToPartyName: 'EXTRACO FIBER GLASS & PREFAB'
                      Message: []
                properties:
                  success:
                    type: boolean
                    example: true
                  status_code:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: 'Ship to party fetched successfully'
                  data:
                    type: array
                    example:
                      -
                        stpRes:
                          -
                            shipToParty: AER10558
                            shipToPartyName: 'EXTRACO FIBER GLASS & PREFAB'
                        Message: []
                    items:
                      type: object
                      properties:
                        stpRes:
                          type: array
                          example:
                            -
                              shipToParty: AER10558
                              shipToPartyName: 'EXTRACO FIBER GLASS & PREFAB'
                          items:
                            type: object
                            properties:
                              shipToParty:
                                type: string
                                example: AER10558
                              shipToPartyName:
                                type: string
                                example: 'EXTRACO FIBER GLASS & PREFAB'
                        Message:
                          type: array
                          example: []
      tags:
        - 'Cart Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                vkorg:
                  type: string
                  description: 'Sales Organization.'
                  example: AE10
                vtweg:
                  type: string
                  description: 'Distribution Channel.'
                  example: '10'
                spart:
                  type: string
                  description: Division.
                  example: '01'
                kunnr:
                  type: string
                  description: 'Dealer Code (Customer).'
                  example: AER10558
              required:
                - vkorg
                - vtweg
                - spart
                - kunnr
      security: []
  /api/get-foc-products:
    post:
      summary: 'Retrieve FOC (Free of Charge) products for a given order.'
      operationId: retrieveFOCFreeOfChargeProductsForAGivenOrder
      description: "Delegates the CPI POST call to CartService::getFOCProducts, evaluates the\nresult, and returns a standard JSON envelope. On downstream failure,\nreturns a structured 200 error response without exposing upstream details."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  status_code: 200
                  message: 'FOC products fetched successfully'
                  data:
                    itProdVol:
                      -
                        prodCode: AE1-F0006
                        prodDesc: ' MANSONARY PRIMER'
                        totalQty: '1.000'
                        totalVol: '18.000'
                      -
                        prodCode: AE1-F0106
                        prodDesc: 'ROYALE PLAY ITALIAN STUCCO.'
                        totalQty: '10.000'
                        totalVol: '140.000'
                    itZforMatnrs1:
                      -
                        material: AE1-F0106H27914K
                        materialDesc: 'R/P ITALIAN STUCCO CW L152'
                        salesNo: ''
                        agreementDesc: 'In-bill Qty FOC – 09'
                        freeMaterial: AE1-F00040000098df6
                      -
                        material: AE1-F00040000180
                        materialDesc: 'SUPREME PVA PRIMER WHITE'
                        salesNo: ''
                        agreementDesc: 'In-bill Qty FOC – 09'
                        freeMaterial: AE1-F0006099918T
                    Return: []
                properties:
                  success:
                    type: boolean
                    example: true
                  status_code:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: 'FOC products fetched successfully'
                  data:
                    type: object
                    properties:
                      itProdVol:
                        type: array
                        example:
                          -
                            prodCode: AE1-F0006
                            prodDesc: ' MANSONARY PRIMER'
                            totalQty: '1.000'
                            totalVol: '18.000'
                          -
                            prodCode: AE1-F0106
                            prodDesc: 'ROYALE PLAY ITALIAN STUCCO.'
                            totalQty: '10.000'
                            totalVol: '140.000'
                        items:
                          type: object
                          properties:
                            prodCode:
                              type: string
                              example: AE1-F0006
                            prodDesc:
                              type: string
                              example: ' MANSONARY PRIMER'
                            totalQty:
                              type: string
                              example: '1.000'
                            totalVol:
                              type: string
                              example: '18.000'
                      itZforMatnrs1:
                        type: array
                        example:
                          -
                            material: AE1-F0106H27914K
                            materialDesc: 'R/P ITALIAN STUCCO CW L152'
                            salesNo: ''
                            agreementDesc: 'In-bill Qty FOC – 09'
                            freeMaterial: AE1-F00040000098df6
                          -
                            material: AE1-F00040000180
                            materialDesc: 'SUPREME PVA PRIMER WHITE'
                            salesNo: ''
                            agreementDesc: 'In-bill Qty FOC – 09'
                            freeMaterial: AE1-F0006099918T
                        items:
                          type: object
                          properties:
                            material:
                              type: string
                              example: AE1-F0106H27914K
                            materialDesc:
                              type: string
                              example: 'R/P ITALIAN STUCCO CW L152'
                            salesNo:
                              type: string
                              example: ''
                            agreementDesc:
                              type: string
                              example: 'In-bill Qty FOC – 09'
                            freeMaterial:
                              type: string
                              example: AE1-F00040000098df6
                      Return:
                        type: array
                        example: []
      tags:
        - 'Cart Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                order:
                  type: array
                  description: 'The list of order items.'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      matnr:
                        type: string
                        description: 'Material Number.'
                        example: AE1-F0006099918T
                      kwmeng:
                        type: string
                        description: Quantity.
                        example: '1.000'
                      vkaus:
                        type: string
                        description: 'optional Usage indicator.'
                        example: '""'
                    required:
                      - matnr
                      - kwmeng
              required:
                - order
      security: []
  /api/dashboard-api:
    post:
      summary: 'Get Integrated Customer Dashboard'
      operationId: getIntegratedCustomerDashboard
      description: "Fetch financial performance and account statement data for the specified customer.\nThis API integrates with the SAP ODOS endpoint and automatically processes embedded PDF statements."
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n \"success\": true,\n \"status_code\": 200,\n \"message\": \"Dashboard data retrieved successfully\",\n \"data\": {\n     \"tab\": [...],\n     \"pdf_url\": \"https://asianpaints.dev/storage/statements/dashboard_statement_AER10558_1775541059.pdf\",\n     \"filename\": \"dashboard_statement_AER10558_1775541059.pdf\"\n }\n}"
      tags:
        - 'Dashboard Integration'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                customer:
                  type: string
                  description: 'The unique customer identifier.'
                  example: AER10558
              required:
                - customer
      security: []
  /api/sap/token/refresh:
    post:
      summary: 'Fetch a new SAP token and persist it.'
      operationId: fetchANewSAPTokenAndPersistIt
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
  /api/stock-check:
    post:
      summary: 'Check Material Stock'
      operationId: checkMaterialStock
      description: "Verifies the availability of a specific material (matnr) for the requested quantity.\nReturns whether the material is fully available, partially available, or not available."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  -
                    description: Available
                    type: object
                    example:
                      success: true
                      status_code: 200
                      message: 'Stock fetched successfully'
                      data:
                        matnr: AE1-F0122K55325K
                        requested_qty: 100
                        available_qty: 1086
                        api_message: Available
                        status: available
                    properties:
                      success:
                        type: boolean
                        example: true
                      status_code:
                        type: integer
                        example: 200
                      message:
                        type: string
                        example: 'Stock fetched successfully'
                      data:
                        type: object
                        properties:
                          matnr:
                            type: string
                            example: AE1-F0122K55325K
                          requested_qty:
                            type: integer
                            example: 100
                          available_qty:
                            type: integer
                            example: 1086
                          api_message:
                            type: string
                            example: Available
                          status:
                            type: string
                            example: available
                  -
                    description: 'Partially Available'
                    type: object
                    example:
                      success: true
                      status_code: 200
                      message: 'Stock fetched successfully'
                      data:
                        matnr: AE1-F0122K55325K
                        requested_qty: 100000
                        available_qty: 1086
                        api_message: 'Partially Available'
                        status: 'partially available'
                    properties:
                      success:
                        type: boolean
                        example: true
                      status_code:
                        type: integer
                        example: 200
                      message:
                        type: string
                        example: 'Stock fetched successfully'
                      data:
                        type: object
                        properties:
                          matnr:
                            type: string
                            example: AE1-F0122K55325K
                          requested_qty:
                            type: integer
                            example: 100000
                          available_qty:
                            type: integer
                            example: 1086
                          api_message:
                            type: string
                            example: 'Partially Available'
                          status:
                            type: string
                            example: 'partially available'
                  -
                    description: 'Not Available'
                    type: object
                    example:
                      success: true
                      status_code: 200
                      message: 'Stock fetched successfully'
                      data:
                        matnr: 'AE1-F0122K55325K 000'
                        requested_qty: 100000
                        available_qty: 0
                        api_message: 'AE1-F0122K55325K 000Entered material not available'
                        status: 'not available'
                    properties:
                      success:
                        type: boolean
                        example: true
                      status_code:
                        type: integer
                        example: 200
                      message:
                        type: string
                        example: 'Stock fetched successfully'
                      data:
                        type: object
                        properties:
                          matnr:
                            type: string
                            example: 'AE1-F0122K55325K 000'
                          requested_qty:
                            type: integer
                            example: 100000
                          available_qty:
                            type: integer
                            example: 0
                          api_message:
                            type: string
                            example: 'AE1-F0122K55325K 000Entered material not available'
                          status:
                            type: string
                            example: 'not available'
      tags:
        - Inventory
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                matnr:
                  type: string
                  description: 'Material ID (The unique code for the product).'
                  example: AE1-F0122K55325K
                quantity:
                  type: number
                  description: 'Quantity (The number of units to check).'
                  example: 100.0
                dealer_code:
                  type: string
                  description: 'Customer ID (The unique identifier for the dealer/customer).'
                  example: AER10057
              required:
                - matnr
                - quantity
      security: []
  /api/order-list:
    post:
      summary: 'Retrieve Order List'
      operationId: retrieveOrderList
      description: "Fetch the list of orders for a specific dealer, optionally filtered by date range or order/invoice numbers.\nThis endpoint returns only the order-related parameters and excludes invoice details."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  status_code: 200
                  message: 'Order details fetched successfully'
                  data:
                    orderList:
                      -
                        orderNo: '5101631911'
                        orderDate: '2026-02-09'
                        customerRef: '1234568'
                        customerRefDate: '0000-00-00'
                        orderValue: '3470.92'
                        orderedQty: '1.000'
                        billedQty: '1.000'
                        soldToAddress: 'EXTRACO FIBER GLASS & PREFAB'
                        shipToAddress: 'EXTRACO FIBER GLASS & PREFAB'
                        placedBy: 'CC Agent / CFA'
                        paymentTerm: '180 days credit'
                        billingStatus: 'Completely billed'
                        orderStatus: 'In Process'
                        salesOrg: ''
                        channel: ''
                        division: ''
                    orderItems:
                      -
                        orderNumber: '5101631911'
                        skuDescription: ' MANSONARY PRIMER CLR'
                        totalOrderedQty: '1.000'
                        totalBilledQty: '1.000'
                    headerDetails:
                      -
                        totalOrders: '0'
                        openOrders: '      388'
                    itEpod: []
                    return: []
                properties:
                  success:
                    type: boolean
                    example: true
                  status_code:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: 'Order details fetched successfully'
                  data:
                    type: object
                    properties:
                      orderList:
                        type: array
                        example:
                          -
                            orderNo: '5101631911'
                            orderDate: '2026-02-09'
                            customerRef: '1234568'
                            customerRefDate: '0000-00-00'
                            orderValue: '3470.92'
                            orderedQty: '1.000'
                            billedQty: '1.000'
                            soldToAddress: 'EXTRACO FIBER GLASS & PREFAB'
                            shipToAddress: 'EXTRACO FIBER GLASS & PREFAB'
                            placedBy: 'CC Agent / CFA'
                            paymentTerm: '180 days credit'
                            billingStatus: 'Completely billed'
                            orderStatus: 'In Process'
                            salesOrg: ''
                            channel: ''
                            division: ''
                        items:
                          type: object
                          properties:
                            orderNo:
                              type: string
                              example: '5101631911'
                            orderDate:
                              type: string
                              example: '2026-02-09'
                            customerRef:
                              type: string
                              example: '1234568'
                            customerRefDate:
                              type: string
                              example: '0000-00-00'
                            orderValue:
                              type: string
                              example: '3470.92'
                            orderedQty:
                              type: string
                              example: '1.000'
                            billedQty:
                              type: string
                              example: '1.000'
                            soldToAddress:
                              type: string
                              example: 'EXTRACO FIBER GLASS & PREFAB'
                            shipToAddress:
                              type: string
                              example: 'EXTRACO FIBER GLASS & PREFAB'
                            placedBy:
                              type: string
                              example: 'CC Agent / CFA'
                            paymentTerm:
                              type: string
                              example: '180 days credit'
                            billingStatus:
                              type: string
                              example: 'Completely billed'
                            orderStatus:
                              type: string
                              example: 'In Process'
                            salesOrg:
                              type: string
                              example: ''
                            channel:
                              type: string
                              example: ''
                            division:
                              type: string
                              example: ''
                      orderItems:
                        type: array
                        example:
                          -
                            orderNumber: '5101631911'
                            skuDescription: ' MANSONARY PRIMER CLR'
                            totalOrderedQty: '1.000'
                            totalBilledQty: '1.000'
                        items:
                          type: object
                          properties:
                            orderNumber:
                              type: string
                              example: '5101631911'
                            skuDescription:
                              type: string
                              example: ' MANSONARY PRIMER CLR'
                            totalOrderedQty:
                              type: string
                              example: '1.000'
                            totalBilledQty:
                              type: string
                              example: '1.000'
                      headerDetails:
                        type: array
                        example:
                          -
                            totalOrders: '0'
                            openOrders: '      388'
                        items:
                          type: object
                          properties:
                            totalOrders:
                              type: string
                              example: '0'
                            openOrders:
                              type: string
                              example: '      388'
                      itEpod:
                        type: array
                        example: []
                      return:
                        type: array
                        example: []
      tags:
        - 'Order Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                dealerCode:
                  type: string
                  description: 'The dealer ID to fetch the order list for.'
                  example: AER10558
                dateFrom:
                  type: date
                  description: 'optional The start date parameter (Y-m-d). Example:'
                  example: architecto
                  nullable: true
                dateTo:
                  type: date
                  description: 'optional The end date parameter (Y-m-d). Example:'
                  example: architecto
                  nullable: true
                orderNo:
                  type: string
                  description: 'optional The specific order number.'
                  example: '5101631911'
                  nullable: true
                invoiceNo:
                  type: string
                  description: 'optional The specific invoice number. Example:'
                  example: architecto
                  nullable: true
                dashboardFlag:
                  type: string
                  description: 'optional Dashboard flag. Example:'
                  example: architecto
                  nullable: true
              required:
                - dealerCode
      security: []
  /api/order-details:
    post:
      summary: 'Retrieve Order Details'
      operationId: retrieveOrderDetails
      description: "Fetch the full breakdown for a specific order number, including invoice details,\norder items, header summary, ePOD data, and return entries."
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n    \"success\": true,\n    \"status_code\": 200,\n    \"message\": \"Order details fetched successfully\",\n    \"data\": {\n        \"orderList\": [...],\n        \"orderItems\": [...],\n        \"invoiceList\": [...],\n        \"headerDetails\": [...],\n        \"itEpod\": [],\n        \"return\": []\n    }\n}"
      tags:
        - 'Order Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                dealerCode:
                  type: string
                  description: 'The dealer ID to fetch the order for.'
                  example: AER10558
                orderNo:
                  type: string
                  description: 'The specific order number to retrieve details for.'
                  example: '5101632649'
                invoiceNo:
                  type: string
                  description: 'optional The specific invoice number. Example:'
                  example: architecto
                  nullable: true
                dashboardFlag:
                  type: string
                  description: 'optional Dashboard flag. Example:'
                  example: architecto
                  nullable: true
              required:
                - dealerCode
                - orderNo
      security: []
  /api/profile/user-details:
    get:
      summary: 'Get User Profile'
      operationId: getUserProfile
      description: 'Fetch standardized user profile and loyalty details from Shopify via SAP CPI.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  status_code: 200
                  message: 'User profile retrieved successfully.'
                  data:
                    kunnr: AER10057
                    name1: 'GOLDEN PALM PAINTS TRADING 123'
                    telf1: '25553383'
                    vkbur: AE1A
                    zterm: 'P125  125 days credit'
                    vwerk: AE1C
                    adrnr: ''
                    salesOrg: AE10
                    distChan: '10'
                    division: '01'
                    knavvv:
                      -
                        customer: AER10057
                        salesOrg: AE10
                        distChan: '10'
                        division: '02'
                        payTerm: P125
                        plant: AE1A
                        salesOff: AE1C
                    Message: []
                properties:
                  success:
                    type: boolean
                    example: true
                  status_code:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: 'User profile retrieved successfully.'
                  data:
                    type: object
                    properties:
                      kunnr:
                        type: string
                        example: AER10057
                      name1:
                        type: string
                        example: 'GOLDEN PALM PAINTS TRADING 123'
                      telf1:
                        type: string
                        example: '25553383'
                      vkbur:
                        type: string
                        example: AE1A
                      zterm:
                        type: string
                        example: 'P125  125 days credit'
                      vwerk:
                        type: string
                        example: AE1C
                      adrnr:
                        type: string
                        example: ''
                      salesOrg:
                        type: string
                        example: AE10
                      distChan:
                        type: string
                        example: '10'
                      division:
                        type: string
                        example: '01'
                      knavvv:
                        type: array
                        example:
                          -
                            customer: AER10057
                            salesOrg: AE10
                            distChan: '10'
                            division: '02'
                            payTerm: P125
                            plant: AE1A
                            salesOff: AE1C
                        items:
                          type: object
                          properties:
                            customer:
                              type: string
                              example: AER10057
                            salesOrg:
                              type: string
                              example: AE10
                            distChan:
                              type: string
                              example: '10'
                            division:
                              type: string
                              example: '02'
                            payTerm:
                              type: string
                              example: P125
                            plant:
                              type: string
                              example: AE1A
                            salesOff:
                              type: string
                              example: AE1C
                      Message:
                        type: array
                        example: []
      tags:
        - Profile
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                customer:
                  type: string
                  description: 'Customer ID (The unique identifier for the customer/dealer).'
                  example: AER10057
              required:
                - customer
      security: []
  /api/tse-level-dealers:
    post:
      summary: 'Get TSE Level Dealers'
      operationId: getTSELevelDealers
      description: 'Fetch TSE level dealers for the given company code and mobile number.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  status_code: 200
                  message: 'TSE level dealers fetched successfully'
                  data:
                    Return: []
                    Knvh:
                      -
                        kunnr: AER11076
                        name1: 'BYBLOS BUILDING MATERIALS TRAD'
                        ort01: ' 07-2442196'
                        counc: '999'
                        bezei: Dummy
                        hkunnr: 00IAE1C102
                      -
                        kunnr: AER11173
                        name1: 'AL AZEM BUILDING MAT'
                        ort01: AE
                        counc: '999'
                        bezei: Dummy
                        hkunnr: 00IAE1C102
                    pdf: JVBERi0xLjYNJeLjz9MNCjI1MTggMCBvYmoKPDwvRmlsd...
                properties:
                  success:
                    type: boolean
                    example: true
                  status_code:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: 'TSE level dealers fetched successfully'
                  data:
                    type: object
                    properties:
                      Return:
                        type: array
                        example: []
                      Knvh:
                        type: array
                        example:
                          -
                            kunnr: AER11076
                            name1: 'BYBLOS BUILDING MATERIALS TRAD'
                            ort01: ' 07-2442196'
                            counc: '999'
                            bezei: Dummy
                            hkunnr: 00IAE1C102
                          -
                            kunnr: AER11173
                            name1: 'AL AZEM BUILDING MAT'
                            ort01: AE
                            counc: '999'
                            bezei: Dummy
                            hkunnr: 00IAE1C102
                        items:
                          type: object
                          properties:
                            kunnr:
                              type: string
                              example: AER11076
                            name1:
                              type: string
                              example: 'BYBLOS BUILDING MATERIALS TRAD'
                            ort01:
                              type: string
                              example: ' 07-2442196'
                            counc:
                              type: string
                              example: '999'
                            bezei:
                              type: string
                              example: Dummy
                            hkunnr:
                              type: string
                              example: 00IAE1C102
                      pdf:
                        type: string
                        example: JVBERi0xLjYNJeLjz9MNCjI1MTggMCBvYmoKPDwvRmlsd...
      tags:
        - 'TSE Management'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                bukrs:
                  type: string
                  description: 'Company Code (The internal identifier for the company).'
                  example: IAE1
                mobileNumber:
                  type: string
                  description: 'Mobile Number (The contact number of the TSE).'
                  example: '917441104130'
                customer_code:
                  type: string
                  description: 'Customer ID (The unique identifier for the customer/dealer).'
                  example: AED10063
              required:
                - bukrs
                - mobileNumber
      security: []
