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

# Post v1hubreports



## OpenAPI

````yaml https://api.comm.com/docs/api.json post /v1/hub/reports
openapi: 3.1.0
info:
  title: Commvoice API
  version: '1'
servers:
  - url: https://api.comm.com/api
    description: Live
security:
  - http: []
paths:
  /v1/hub/reports:
    post:
      tags:
        - SellerReports
      operationId: hub.seller-reports
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                sortModel:
                  type: array
                  example:
                    - sort: asc
                      colId: updated_datetime
                  prefixItems:
                    - $ref: >-
                        #/components/schemas/App.Domain.Campaigns.Data.Reports.Sendlogs.SortModelData
                  minItems: 1
                  maxItems: 1
                  additionalItems: false
                filterModel:
                  type: array
                  example: >-
                    {"is_sent":{"filterType":"number","type":"greaterThan","filter":5}}


                    note that it needs to be col_id: {FilterModel}, PHP doesn't
                    support this kind of description.
                  prefixItems:
                    - type: array
                      prefixItems:
                        - $ref: '#/components/schemas/FilterModelData'
                      minItems: 1
                      maxItems: 1
                      additionalItems: false
                  minItems: 1
                  maxItems: 1
                  additionalItems: false
                rowGroupCols:
                  type: array
                  example:
                    - id: campaign_id
                      displayName: Campaign_Id
                      field: campaign_id
                  prefixItems:
                    - $ref: '#/components/schemas/ApiSendlogRowGroupColsData'
                  minItems: 1
                  maxItems: 1
                  additionalItems: false
                selectCols:
                  type: array
                  example: >-
                    ["country_id"]

                    Will make a select query with only the columns in the array,
                    if not provided default columns will be selected
                  prefixItems:
                    - $ref: '#/components/schemas/ApiSendLogFieldEnum'
                  minItems: 1
                  maxItems: 1
                  additionalItems: false
                groupKeys:
                  type: array
                  example: |-
                    ["campaign_uuid"]
                    Not the column type, it's a filter of the query
                  prefixItems:
                    - type: string
                  minItems: 1
                  maxItems: 1
                  additionalItems: false
                startRow:
                  type: integer
                  minimum: 0
                endRow:
                  type: integer
                  minimum: 1
                groupByAll:
                  type: boolean
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/DataGridApiSendLogResource'
                  meta:
                    type: object
                    properties:
                      total:
                        type: integer
                    required:
                      - total
                required:
                  - data
                  - meta
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    DataGridApiSendLogResource:
      type: object
      properties:
        sms_id:
          type: string
        endpoint_id:
          type: string
        sms_route_id:
          type: string
        sms_routing_plan_id:
          type: string
        client_company_id:
          type: string
        vendor_company_id:
          type: string
        foreign_id:
          type: string
        country_id:
          type: string
        source_addr:
          type: string
          description: >-
            'registered_delivery' => $this->resource['registered_delivery'],

            'esm_class' => $this->resource['esm_class'],

            'data_coding' => $this->resource['data_coding'],

            'sm_length' => $this->resource['sm_length'],

            'user_message_reference' =>
            $this->resource['user_message_reference'],

            'sar_msg_ref_num' => $this->resource['sar_msg_ref_num'],

            'sar_total_segments' => $this->resource['sar_total_segments'],

            'sar_segment_seqnum' => $this->resource['sar_segment_seqnum'],

            'payload_type' => $this->resource['payload_type'],

            'source_addr_ton' => $this->resource['source_addr_ton'],

            'source_addr_npi' => $this->resource['source_addr_npi'],

            'dest_addr_ton' => $this->resource['dest_addr_ton'],

            'dest_addr_npi' => $this->resource['dest_addr_npi'],

            'service_type' => $this->resource['service_type'],
        destination_addr:
          type: string
        message_payload:
          type: string
          description: >-
            'schedule_delivery_time' =>
            $this->resource['schedule_delivery_time'],

            'validity_period' => $this->resource['validity_period'],
        dlr_status:
          type: string
          description: |-
            'pdu' => $this->resource['pdu'],
            'error' => $this->resource['error'],
            'error_code' => $this->resource['error_code'],
        network_id:
          type: string
          description: |-
            'dlr_received' => $this->resource['dlr_received'],
            'dlr_sent' => $this->resource['dlr_sent'],
        network_brand:
          type: string
        cost:
          type: string
        profit:
          type: string
        is_sent:
          type: string
        is_clicked:
          type: string
        is_lead:
          type: string
        is_sale:
          type: string
        is_delivered:
          type: string
        created_at:
          type: string
      required:
        - sms_id
        - endpoint_id
        - sms_route_id
        - sms_routing_plan_id
        - client_company_id
        - vendor_company_id
        - foreign_id
        - country_id
        - source_addr
        - destination_addr
        - message_payload
        - dlr_status
        - network_id
        - network_brand
        - cost
        - profit
        - is_sent
        - is_clicked
        - is_lead
        - is_sale
        - is_delivered
        - created_at
      title: DataGridApiSendLogResource
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      scheme: bearer
      bearerFormat: JWT

````