MX Platform Transaction_rules API

The Transaction_rules API from MX Platform — 2 operation(s) for transaction_rules.

OpenAPI Specification

mx-platform-transaction-rules-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  contact:
    name: MX Platform API
    url: https://www.mx.com/products/platform-api
  description: '

    The MX Platform API is a powerful, fully-featured API designed to make

    aggregating and enhancing financial data easy and reliable. It can

    seamlessly connect your app or website to tens of thousands of financial

    institutions.'
  title: MX Platform Transaction_rules API
  version: 0.1.0
servers:
- url: https://api.mx.com
- url: https://int-api.mx.com
security:
- basicAuth: []
tags:
- name: Transaction_rules
paths:
  /users/{user_guid}/transaction_rules:
    get:
      description: Use this endpoint to read the attributes of all existing transaction rules belonging to the user.
      operationId: listTransactionRules
      parameters:
      - description: Specify current page.
        example: 1
        in: query
        name: page
        schema:
          type: integer
      - description: Specify records per page.
        example: 10
        in: query
        name: records_per_page
        schema:
          type: integer
      - description: The unique id for a `user`.
        example: USR-fa7537f3-48aa-a683-a02a-b18940482f54
        in: path
        name: user_guid
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.mx.api.v1+json:
              schema:
                $ref: '#/components/schemas/TransactionRulesResponseBody'
          description: OK
      summary: List transaction rules
      tags:
      - Transaction_rules
    post:
      description: Use this endpoint to create a new transaction rule. The newly-created `transaction_rule` object will be returned if successful.
      operationId: createTransactionRule
      parameters:
      - description: The unique id for a `user`.
        example: USR-fa7537f3-48aa-a683-a02a-b18940482f54
        in: path
        name: user_guid
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionRuleCreateRequestBody'
        description: TransactionRule object to be created with optional parameters (description) and required parameters (category_guid and match_description)
        required: true
      responses:
        '200':
          content:
            application/vnd.mx.api.v1+json:
              schema:
                $ref: '#/components/schemas/TransactionRuleResponseBody'
          description: OK
      summary: Create transaction rule
      tags:
      - Transaction_rules
  /users/{user_guid}/transaction_rules/{transaction_rule_guid}:
    delete:
      description: Use this endpoint to permanently delete a transaction rule based on its unique GUID.
      operationId: deleteTransactionRule
      parameters:
      - description: The unique id for a `transaction_rule`.
        example: TXR-a080e0f9-a2d4-4d6f-9e03-672cc357a4d3
        in: path
        name: transaction_rule_guid
        required: true
        schema:
          type: string
      - description: The unique id for a `user`.
        example: USR-fa7537f3-48aa-a683-a02a-b18940482f54
        in: path
        name: user_guid
        required: true
        schema:
          type: string
      responses:
        '204':
          description: No Content
      summary: Delete transaction rule
      tags:
      - Transaction_rules
    get:
      description: Use this endpoint to read the attributes of an existing transaction rule based on the rules unique GUID.
      operationId: readTransactionRule
      parameters:
      - description: The unique id for a `transaction_rule`.
        example: TXR-a080e0f9-a2d4-4d6f-9e03-672cc357a4d3
        in: path
        name: transaction_rule_guid
        required: true
        schema:
          type: string
      - description: The unique id for a `user`.
        example: USR-fa7537f3-48aa-a683-a02a-b18940482f54
        in: path
        name: user_guid
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.mx.api.v1+json:
              schema:
                $ref: '#/components/schemas/TransactionRuleResponseBody'
          description: OK
      summary: Read transaction rule
      tags:
      - Transaction_rules
    put:
      description: Use this endpoint to update the attributes of a specific transaction rule based on its unique GUID. The API will respond with the updated transaction_rule object. Any attributes not provided will be left unchanged.
      operationId: updateTransactionRule
      parameters:
      - description: The unique id for a `transaction_rule`.
        example: TXR-a080e0f9-a2d4-4d6f-9e03-672cc357a4d3
        in: path
        name: transaction_rule_guid
        required: true
        schema:
          type: string
      - description: The unique id for a `user`.
        example: USR-fa7537f3-48aa-a683-a02a-b18940482f54
        in: path
        name: user_guid
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionRuleUpdateRequestBody'
        description: TransactionRule object to be updated
        required: true
      responses:
        '200':
          content:
            application/vnd.mx.api.v1+json:
              schema:
                $ref: '#/components/schemas/TransactionRuleResponseBody'
          description: OK
      summary: Update transaction_rule
      tags:
      - Transaction_rules
components:
  schemas:
    TransactionRuleCreateRequestBody:
      properties:
        transaction_rule:
          $ref: '#/components/schemas/TransactionRuleCreateRequest'
      type: object
    TransactionRuleResponseBody:
      properties:
        transaction_rule:
          $ref: '#/components/schemas/TransactionRuleResponse'
      type: object
    PaginationResponse:
      properties:
        current_page:
          example: 1
          type: integer
        per_page:
          example: 25
          type: integer
        total_entries:
          example: 1
          type: integer
        total_pages:
          example: 1
          type: integer
      type: object
    TransactionRulesResponseBody:
      properties:
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
        transaction_rules:
          items:
            $ref: '#/components/schemas/TransactionRuleResponse'
          type: array
      type: object
    TransactionRuleUpdateRequestBody:
      properties:
        transaction_rule:
          $ref: '#/components/schemas/TransactionRuleUpdateRequest'
      type: object
    TransactionRuleResponse:
      properties:
        category_guid:
          example: CAT-b1de2a04-db08-b6ed-f6fe-ca2f5b11c2d0
          nullable: true
          type: string
        created_at:
          example: '2018-10-02T22:00:50+00:00'
          nullable: true
          type: string
        description:
          example: Wal-mart food storage
          nullable: true
          type: string
        guid:
          example: TXR-a080e0f9-a2d4-4d6f-9e03-672cc357a4d3
          nullable: true
          type: string
        match_description:
          example: Wal-mart
          nullable: true
          type: string
        updated_at:
          example: '2018-10-02T23:54:40+00:00'
          nullable: true
          type: string
        user_guid:
          example: USR-22fc3203-b3e6-8340-43db-8e50b2f56995
          nullable: true
          type: string
      type: object
    TransactionRuleCreateRequest:
      properties:
        category_guid:
          example: CAT-b1de2a04-db08-b6ed-f6fe-ca2f5b11c2d0
          type: string
        description:
          example: Wal-mart food storage
          type: string
        match_description:
          example: Wal-mart
          type: string
      required:
      - category_guid
      - match_description
      type: object
    TransactionRuleUpdateRequest:
      properties:
        category_guid:
          example: CAT-b1de2a04-db08-b6ed-f6fe-ca2f5b11c2d0
          type: string
        description:
          example: Wal-mart food storage
          type: string
        match_description:
          example: Wal-mart
          type: string
      type: object
  securitySchemes:
    basicAuth:
      scheme: basic
      type: http