Soldo Expense Reviews API

The Expense Reviews API from Soldo — 7 operation(s) for expense reviews.

OpenAPI Specification

soldo-expense-reviews-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Soldo Business API v2.0 Accounting Classification Expense Reviews API
  description: Soldo Business API v2.0 OpenAPI specification
  version: 5.56.0
servers:
- url: https://api.soldo.com
  description: Production server (using live data)
- url: https://api-demo.soldocloud.net
  description: Sandbox server (using test data)
tags:
- name: Expense Reviews
paths:
  /business/v2/expense-review/{userId}:
    get:
      tags:
      - Expense Reviews
      summary: Get Expense Review
      description: Endpoint to get the `ExpenseReview` of a specific `User`.
      operationId: expense-review-get
      parameters:
      - name: userId
        in: path
        required: true
        schema:
          type: string
          description: The ID of the `User`.
          example: XMPL1234-000001
      - name: status
        in: query
        description: The status of the `ExpenseReview`.
        schema:
          type: array
          description: The status of the `ExpenseReview`.
          example: APPROVED
          items:
            $ref: '#/components/schemas/ExpenseStatus'
        example: APPROVED
      - name: fromDate
        in: query
        description: 'The beginning of the period of the search `fromDate` included (i.e. greater than or equal to) (Formats: `yyyy-MM-dd`, `yyyy-MM-ddThh:mm:ss`, `yyyy-MM-ddThh:mm:ssZ`).'
        schema:
          $ref: '#/components/schemas/DateParam'
        example: '2020-04-06T12:48:40Z'
      - name: toDate
        in: query
        description: 'The end of the period of the search `toDate` included (i.e. less than) (Formats: `yyyy-MM-dd`, `yyyy-MM-ddThh:mm:ss`, `yyyy-MM-ddThh:mm:ssZ`).'
        schema:
          $ref: '#/components/schemas/DateParam'
        example: '2020-05-07T12:48:40Z'
      - name: paymentMethod
        in: query
        description: It determines the filter by payment method of the transaction.
        schema:
          type: array
          description: It determines the filter by payment method of the transaction.
          items:
            $ref: '#/components/schemas/ExpensePaymentMethod'
        example: SUBSCRIPTION
      - name: p
        in: query
        description: It indicates the specific page to display (the counter starts from zero).
        schema:
          type: integer
          format: int32
          default: 0
          description: It indicates the specific page to display (the counter starts from zero).
          example: 3
        example: 3
      - name: s
        in: query
        description: It indicates the number of items per page.
        schema:
          type: integer
          format: int32
          default: 0
          description: It indicates the number of items per page.
          example: 25
          maximum: 50
        example: 25
      - name: d
        in: query
        description: It indicates how the pages are ordered.
        schema:
          $ref: '#/components/schemas/Direction'
        example: DESC
      - name: props
        in: query
        description: It indicates the sorting direction applied to the above parameters. To apply a sorting on multiple parameters, set as many times the `props` parameter in the request.
        schema:
          type: array
          description: It indicates the sorting direction applied to the above parameters. To apply a sorting on multiple parameters, set as many times the `props` parameter in the request.
          example: creationTime
          items:
            type: string
            description: It indicates the sorting direction applied to the above parameters. To apply a sorting on multiple parameters, set as many times the `props` parameter in the request.
            example: creationTime
        example: creationTime
      responses:
        '200':
          description: The returned resource is a `ExpenseReview`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpenseItem'
        '404':
          description: One or more resource requested does not exist.
      security:
      - standardAuth:
        - expense_review_read
  /business/v2/expense-review/{userId}/reminder:
    post:
      tags:
      - Expense Reviews
      summary: Send Expense Review Reminder
      description: Endpoint to send a reminder of `ExpenseReview` to a specific `User`.
      operationId: expense-review-reminder
      parameters:
      - name: userId
        in: path
        required: true
        schema:
          type: string
          description: The ID of the `User`.
          example: XMPL1234-000001
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendExpensesReminder'
      responses:
        '204':
          description: No content as result.
        '400':
          description: Your request has missing arguments or is malformed.
      security:
      - standardAuth:
        - expense_review_read
  /business/v2/expense-review/export-expenses/{userId}:
    post:
      tags:
      - Expense Reviews
      summary: Export Expense Review
      description: Endpoint to export the `ExpenseReview` of a single `User`.
      operationId: expense-review-export
      parameters:
      - name: userId
        in: path
        required: true
        schema:
          type: string
          description: The `User` ID.
          example: XMPL1234-000001
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExportExpense'
      responses:
        '200':
          description: The result is data containing `ExpenseReview` export.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExportExpenseReview'
        '400':
          description: Your request has missing arguments or is malformed.
        '404':
          description: One or more resource requested does not exist.
      security:
      - standardAuth:
        - expense_review_write
  /business/v2/expense-review:
    get:
      tags:
      - Expense Reviews
      summary: Search Expense Reviews
      description: Endpoint to find users with `ExpenseReview` using filtering parameters.
      operationId: expense-review-search
      parameters:
      - name: delegatedBy
        in: query
        schema:
          type: array
          description: Filters expenses by the user who delegated them.
          example: XMPL1234-000001
          items:
            type: string
            description: Filters expenses by the user who delegated them.
            example: XMPL1234-000001
      - name: fromDate
        in: query
        description: 'The beginning of the period of the search `fromDate` included (i.e. greater than or equal to) (Formats: `yyyy-MM-dd`, `yyyy-MM-ddThh:mm:ss`, `yyyy-MM-ddThh:mm:ssZ`).'
        schema:
          $ref: '#/components/schemas/DateParam'
        example: '2020-04-06T12:48:40Z'
      - name: toDate
        in: query
        description: 'The end of the period of the search `toDate` included (i.e. less than) (Formats: `yyyy-MM-dd`, `yyyy-MM-ddThh:mm:ss`, `yyyy-MM-ddThh:mm:ssZ`).'
        schema:
          $ref: '#/components/schemas/DateParam'
        example: '2020-05-07T12:48:40Z'
      - name: text
        in: query
        description: A text to search in the expenses reviewer name or surname.
        schema:
          type: string
          description: A text to search in the expenses reviewer name or surname.
          example: John
        example: John
      - name: p
        in: query
        description: It indicates the specific page to display (the counter starts from zero).
        schema:
          type: integer
          format: int32
          default: 0
          description: It indicates the specific page to display (the counter starts from zero).
          example: 3
        example: 3
      - name: s
        in: query
        description: It indicates the number of items per page.
        schema:
          type: integer
          format: int32
          default: 0
          description: It indicates the number of items per page.
          example: 25
          maximum: 50
        example: 25
      - name: props
        in: query
        description: It indicates the sorting direction applied to the above parameters. To apply a sorting on multiple parameters, set as many times the `props` parameter in the request.
        schema:
          type: array
          description: It indicates the sorting direction applied to the above parameters. To apply a sorting on multiple parameters, set as many times the `props` parameter in the request.
          example: creationTime
          items:
            type: string
            description: It indicates the sorting direction applied to the above parameters. To apply a sorting on multiple parameters, set as many times the `props` parameter in the request.
            example: creationTime
        example: creationTime
      responses:
        '200':
          description: The returned resource is an array of `Expenses`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Expenses'
      security:
      - standardAuth:
        - expense_review_read
  /business/v2/transactions/{transactionId}/expense-review/change-type:
    put:
      tags:
      - Expense Reviews
      summary: Update Expense Review Type
      description: Endpoint to update the type of an `ExpenseReview`.
      operationId: expense-review-update-type
      parameters:
      - name: transactionId
        in: path
        required: true
        schema:
          type: string
          description: The `Transaction` ID.
          example: 7bf79328-a7ae-4222-aa54-091ff7f429a7
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateExpenseType'
      responses:
        '204':
          description: No content as result.
        '400':
          description: Your request has missing arguments or is malformed.
        '404':
          description: One or more resource requested does not exist.
      security:
      - standardAuth:
        - expense_review_write
  /business/v2/transactions/{transactionId}/expense-review/request-info:
    put:
      tags:
      - Expense Reviews
      summary: Request Expense Review Info
      description: Endpoint to request info to an `User` about an `ExpenseReview`.
      operationId: expense-review-request-info
      parameters:
      - name: transactionId
        in: path
        required: true
        schema:
          type: string
          description: The `Transaction` ID.
          example: 7bf79328-a7ae-4222-aa54-091ff7f429a7
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestExpenseInfo'
      responses:
        '204':
          description: No content as result.
        '400':
          description: Your request has missing arguments or is malformed.
        '404':
          description: One or more resource requested does not exist.
      security:
      - standardAuth:
        - expense_review_write
  /business/v2/transactions/{transactionId}/expense-review/update-status:
    put:
      tags:
      - Expense Reviews
      summary: Update Expense Review Status
      description: Endpoint to update the status of an `ExpenseReview`.
      operationId: expense-review-update-status
      parameters:
      - name: transactionId
        in: path
        required: true
        schema:
          type: string
          description: The `Transaction` ID.
          example: 7bf79328-a7ae-4222-aa54-091ff7f429a7
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateExpenseStatus'
      responses:
        '204':
          description: No content as result.
        '400':
          description: Your request has missing arguments or is malformed.
        '404':
          description: One or more resource requested does not exist.
      security:
      - standardAuth:
        - expense_review_write
components:
  schemas:
    ExpenseStatus:
      type: string
      enum:
      - APPROVED
      - PARTIALLY_APPROVED
      - DENIED
      - TO_REVIEW
    DateParam:
      description: 'The end of the period of the search `toDate` included (i.e. less than) (Formats: `yyyy-MM-dd`, `yyyy-MM-ddThh:mm:ss`, `yyyy-MM-ddThh:mm:ssZ`).'
      example: '1970-01-30'
    ExpenseType:
      type: string
      enum:
      - COMPANY
      - PERSONAL
      - TRAVEL_AND_ENTERTAINMENT
    UpdateExpenseStatus:
      properties:
        status:
          $ref: '#/components/schemas/ExpenseStatus'
          description: The expense status of the transaction.
          example: APPROVED
        status_category:
          $ref: '#/components/schemas/ExpenseStatusCategory'
          description: The status category of the transaction expense.
          example: AGAINST_POLICY
        status_reason:
          type: string
          description: The reason of the status.
          example: Expense violates company's reimbursement policy
        approver_id:
          type: string
          description: The ID of the SuperAdmin `User` who approves/rejects the `ExpenseReport`.
          example: XMPL1234-000003
      required:
      - approver_id
      - status
      - status_category
    ExportExpenseReview:
      properties:
        expense_report_protocol_ids:
          type: array
          description: The protocol IDs of the `ExpenseReport`.
          example:
          - 7bf79328-a7ae-4222-aa54-091ff7f429a7
          - 2d65bd5e-3fdf-4002-b166-bde7fb8863fa
          items:
            type: string
    ExpensePaymentMethod:
      type: string
      description: It determines the filter by payment method of the transaction.
      enum:
      - USER
      - COMPANY
      - PURCHASE
      - SUBSCRIPTION
      - ONLINE_ADS
      - OUT_OF_PLATFORM_COMPANY
      - OUT_OF_PLATFORM_PERSONAL
    SendExpensesReminder:
      description: Send Expense reminder JSON parameters.
      properties:
        request_timestamp:
          type: integer
          format: int64
          description: The epoch timestamp in millis. This is checked in Soldo. Requests with timestamp older than 5 seconds will be rejected.
          example: 1576850500000
        from_date:
          $ref: '#/components/schemas/DateParam'
          description: 'The beginning of the period of the search `fromDate` included (i.e. greater than or equal to) (Formats: `yyyy-MM-dd`, `yyyy-MM-ddThh:mm:ss`, `yyyy-MM-ddThh:mm:ssZ`).'
          example: '2020-04-06T12:48:40Z'
        to_date:
          $ref: '#/components/schemas/DateParam'
          description: 'The end of the period of the search `toDate` included (i.e. less than) (Formats: `yyyy-MM-dd`, `yyyy-MM-ddThh:mm:ss`, `yyyy-MM-ddThh:mm:ssZ`).'
          example: '2020-05-07T12:48:40Z'
      required:
      - from_date
      - request_timestamp
      - to_date
    ExportExpense:
      description: Export the Expenses JSON parameters.
      properties:
        transaction_ids:
          type: array
          description: An array of `Transaction` ID to be exported
          example:
          - 7bf79328-a7ae-4222-aa54-091ff7f429a7
          - 2d65bd5e-3fdf-4002-b166-bde7fb8863fa
          items:
            type: string
        exported_by_id:
          type: string
          description: The ID of the `User` who exports the expense.
          example: XMPL1234-000003
      required:
      - transaction_ids
    Direction:
      type: string
      description: It indicates how the pages are ordered.
      enum:
      - ASC
      - DESC
      example: DESC
    ExpenseStatusCategory:
      type: string
      enum:
      - AGAINST_POLICY
      - PERSONAL_EXPENSE
      - OTHER
    Expenses:
      properties:
        total:
          type: integer
          format: int32
          description: It represents the total number of available items in the list.
          example: 168
        pages:
          type: integer
          format: int32
          description: It represents the total number of available pages.
          example: 7
        page_size:
          type: integer
          format: int32
          description: It represents the number of items per page.
          example: 25
        current_page:
          type: integer
          format: int32
          description: It indicates the current page (the counter starts from zero).
          example: 0
        results_size:
          type: integer
          format: int32
          description: It indicates the size of the array results.
          example: 25
        results:
          type: array
          items:
            $ref: '#/components/schemas/Expense'
    RequestExpenseInfo:
      properties:
        approver_id:
          type: string
          description: The ID of the SuperAdmin `User` who approves/rejects the expense.
          example: XMPL1234-000003
        message:
          type: string
          description: The request info of the transaction expense review.
          example: Request info to employee
      required:
      - approver_id
      - message
    Expense:
      properties:
        user_id:
          type: string
          description: 'The ID of the `User` (sortable: no).'
          example: XMPL1234-000001
        user_name:
          type: string
          description: 'The name of the `User` (sortable: yes).'
          example: JOHN
        user_surname:
          type: string
          description: 'The surname of the `User` (sortable: yes).'
          example: DOE
        job_title:
          type: string
          description: 'The job title of the `User` (sortable: yes).'
          example: CTO
        to_review_transaction:
          type: integer
          format: int64
          description: 'The number of the `Transaction` items in status `TO_REVIEW` (sortable: no).'
          example: 1
        reviewed_transaction:
          type: integer
          format: int64
          description: 'The number of the `Transaction` items in status `REVIEWED` (sortable: no).'
          example: 2
        exported_transaction:
          type: integer
          format: int64
          description: 'The number of the `Transaction` items in status `EXPORTED` (sortable: no).'
          example: 1
        total_transaction:
          type: integer
          format: int64
          description: 'The number of `Transaction` items (sortable: no).'
          example: 3
    UpdateExpenseType:
      properties:
        type:
          $ref: '#/components/schemas/ExpenseType'
          description: The type of the `Transaction` expense.
          example: TRAVEL_AND_ENTERTAINMENT
        approver_id:
          type: string
          description: The ID of the 'SuperAdmin' `user` who approves/rejects the `expenseReview`.
          example: XMPL1234-000003
      required:
      - approver_id
      - type
    ExpenseItem:
      properties:
        user_id:
          type: string
          description: 'The ID of the `User` (sortable: no).'
          example: XMPL1234-000001
        user_name:
          type: string
          description: 'The name of the `User` (sortable: yes).'
          example: JOHN
        user_surname:
          type: string
          description: 'The surname of the `User` (sortable: yes).'
          example: DOE
        job_title:
          type: string
          description: 'The job title of the `User` (sortable: yes).'
          example: CTO
        to_review_transaction:
          type: integer
          format: int64
          description: 'The number of the `Transaction` items in status `TO_REVIEW` (sortable: no).'
          example: 1
        reviewed_transaction:
          type: integer
          format: int64
          description: 'The number of the `Transaction` items in status `REVIEWED` (sortable: no).'
          example: 2
        exported_transaction:
          type: integer
          format: int64
          description: 'The number of the `Transaction` items in status `EXPORTED` (sortable: no).'
          example: 1
        total_transaction:
          type: integer
          format: int64
          description: 'The number of `Transaction` items (sortable: no).'
          example: 3
        from_date:
          type: string
          description: 'The beginning of the period of the search (sortable: no).'
          example: '2017-06-01T12:48:40Z'
        to_date:
          type: string
          description: 'The end of the period of the search (sortable: no).'
          example: '2017-06-05T12:48:40Z'
        transaction_to_review:
          type: array
          description: 'The array contains ID of the `Transaction` in status `TO_REVIEW` (sortable: no).'
          example:
          - 7bf79328-a7ae-4222-aa54-091ff7f429a7
          - 2d65bd5e-3fdf-4002-b166-bde7fb8863fa
          items:
            type: string
        transaction_reviewed:
          type: array
          description: 'The array contains ID of the `Transaction` in status `REVIEWED` (sortable: no).'
          example:
          - 7bf79328-a7ae-4222-aa54-091ff7f429a7
          - 2d65bd5e-3fdf-4002-b166-bde7fb8863fa
          items:
            type: string
        transaction_exported:
          type: array
          description: 'The array array contains ID of the `Transaction` in status `EXPORTED` (sortable: no).'
          example:
          - 7bf79328-a7ae-4222-aa54-091ff7f429a7
          - 2d65bd5e-3fdf-4002-b166-bde7fb8863fa
          items:
            type: string
  securitySchemes:
    standardAuth:
      type: oauth2
      description: This API uses OAuth 2 with the "Client Credentials" grant flow.
      flows:
        clientCredentials:
          tokenUrl: https://api.soldo.com/oauth/authorize
          refreshUrl: https://api.soldo.com/oauth/refresh
          scopes:
            address_read: Can read address details.
            address_write: Can update address details.
            card_read: Can read card details.
            card_write: Can change card details.
            company_read: Can read company details.
            company_write: Can change company details.
            contact_read: Can read contact details.
            contact_write: Can change contact details.
            employee_read: Can read employee details.
            employee_write: Can change employee details.
            expense_category_read: Can read expense category details.
            expense_category_write: Can change expense category details.
            expense_report_read: Can read expense report details.
            expense_report_write: Can change expense report details.
            expense_review_read: Can read expense review status.
            expense_review_write: Can change expense review status.
            group_read: Can read group details.
            group_write: Can change groups details.
            online_ads_read: Can read online ads details.
            online_ads_write: Can change online ads details.
            payment_read: Can read payment details.
            payment_write: Can change payment details.
            purchase_read: Can read purchase details.
            purchase_write: Can change purchase details.
            refueling_read: Can read refueling details.
            refueling_write: Can change refueling details.
            resource_set_read: Can read resource set details.
            resource_set_write: Can change resource set details.
            role_read: Can read role details.
            statement_read: Can read statement details.
            subscription_read: Can read subscription details.
            subscription_write: Can change subscription details.
            tag_read: Can read tags.
            tag_write: can change tags.
            tax_rate_read: Can read vat rate details.
            tax_rate_write: Can change vat rate details.
            transaction_read: Can read transaction details.
            transaction_write: Can change transaction details.
            vehicle_read: Can read vehicle details.
            vehicle_write: Can change vehicle details.
            wallet_read: Can read wallet details.
            wallet_write: Can change wallet details.
            webhook_subscription_read: Can read webhook subscription details.
            webhook_subscription_write: Can change webhook subscription details.
x-readme:
  hidden: false