diff --git a/openapi/mx_platform_api.yml b/openapi/mx_platform_api.yml index 2e42bed..a1c6b90 100644 --- a/openapi/mx_platform_api.yml +++ b/openapi/mx_platform_api.yml @@ -2282,6 +2282,109 @@ components: pagination: "$ref": "#/components/schemas/PaginationResponse" type: object + MicrodepositVerifyRequest: + properties: + deposit_amount_1: + type: integer + example: 0.09 + deposit_amount_2: + type: integer + example: 0.09 + MicrodepositVerifyRequestBody: + properties: + micro_deposit: + "$ref": "#/components/schemas/MicrodepositVerifyRequest" + type: object + MicrodepositRequest: + properties: + account_number: + example: "3331261" + type: string + account_type: + example: CHECKING + type: string + routing_number: + example: "091000019" + type: string + account_name: + example: My test account + type: string + email: + example: joshyboy2@example.com + type: string + first_name: + example: Joshy + type: string + last_name: + example: Grobanne + type: string + required: + - account_number + - account_type + - routing_number + MicrodepositRequestBody: + properties: + micro_deposit: + "$ref": "#/components/schemas/MicrodepositRequest" + type: object + MicrodepositResponse: + properties: + account_name: + type: string + example: My test account + account_number: + type: string + example: 3331261 + account_type: + type: string + example: CHECKING + email: + type: string + example: joshyboy2@example.com + first_name: + type: string + example: Joshy + last_name: + type: string + example: Grobanne + routing_number: + type: string + example: 091000019 + error_message: + type: string + example: null + guid: + type: string + example: MIC-09ba578e-8448-4f7f-89e1-b62ff2517edb + institution_code: + example: mxbank + type: string + institution_name: + example: MX Bank + type: string + status: + example: INITIATED + type: string + updated_at: + example: 2023-06-01T19:18:06Z + type: string + verified_at: + example: null + type: string + MicrodepositResponseBody: + properties: + micro_deposit: + "$ref": "#/components/schemas/MicrodepositResponse" + type: object + MicrodepositsResponseBody: + properties: + micro_deposits: + items: + "$ref": "#/components/schemas/MicrodepositResponse" + type: array + pagination: + "$ref": "#/components/schemas/PaginationResponse" + type: object MonthlyCashFlowResponse: properties: guid: @@ -3020,6 +3123,236 @@ components: "$ref": "#/components/schemas/TaxDocumentResponse" type: array type: object + TransactionCreateRequest: + properties: + amount: + example: 61.11 + type: number + date: + example: "2016-10-06" + type: string + description: + example: Whole foods + type: string + type: + description: The type of transaction, which must be CREDIT or DEBIT. See Transaction Fields for more information. + example: DEBIT + type: string + category_guid: + description: Unique identifier of the category. + example: CAT-b6d61a19-30a7-e852-2703-bdfb4072289e + type: string + currency_code: + example: USD + type: string + has_been_viewed: + example: false + type: boolean + is_hidden: + example: false + type: boolean + is_international: + example: false + type: boolean + memo: + example: This is a memo + type: string + metadata: + example: some metadata + type: string + skip_webhook: + description: When set to true, this parameter will prevent a webhook from being triggered by the request. + example: true + type: boolean + required: + - amount + - date + - description + - type + TransactionCreateRequestBody: + properties: + transaction: + "$ref": "#/components/schemas/TransactionCreateRequest" + type: object + TransactionCreateResponseBody: + properties: + account_guid: + example: ACT-06d7f44b-caae-0f6e-1384-01f52e75dcb1 + nullable: true + type: string + account_id: + example: account123 + nullable: true + type: string + amount: + example: 61.11 + nullable: false + type: number + category: + example: Groceries + nullable: true + type: string + category_guid: + example: CAT-b6d61a19-30a7-e852-2703-bdfb4072289e + nullable: true + type: string + check_number_string: + example: null + nullable: true + type: string + created_at: + example: '2016-10-08T09:43:42.000Z' + nullable: true + type: string + currency_code: + example: USD + nullable: true + type: string + date: + example: '2016-10-06T00:00:00.000Z' + nullable: true + type: string + description: + example: Whole foods + nullable: true + type: string + extended_transaction_type: + example: null + nullable: true + type: string + guid: + example: TRN-265abee9-889b-af6a-c69b-25157db2bdd9 + nullable: true + type: string + id: + example: null + nullable: true + type: string + is_bill_pay: + example: false + nullable: true + type: boolean + is_direct_deposit: + example: false + nullable: true + type: boolean + is_expense: + example: true + nullable: true + type: boolean + is_fee: + example: false + nullable: true + type: boolean + is_income: + example: false + nullable: true + type: boolean + is_international: + example: false + nullable: true + type: boolean + is_manual: + example: true + nullable: true + type: boolean + is_overdraft_fee: + example: false + nullable: true + type: boolean + is_payroll_advance: + example: false + nullable: true + type: boolean + is_recurring: + example: null + nullable: true + type: boolean + is_subscription: + example: false + nullable: true + type: boolean + latitude: + example: null + nullable: true + type: number + localized_description: + example: null + nullable: true + type: string + localized_memo: + example: null + nullable: true + type: string + longitude: + example: null + nullable: true + type: number + member_guid: + example: MBR-7c6f361b-e582-15b6-60c0-358f12466b4b + nullable: true + type: string + member_is_managed_by_user: + example: true + nullable: true + type: boolean + memo: + example: This is a memo + nullable: true + type: string + merchant_category_code: + example: null + nullable: true + type: integer + merchant_guid: + example: null + nullable: true + type: string + merchant_location_guid: + example: null + nullable: true + type: string + metadata: + example: some metadata + nullable: true + type: string + original_description: + example: null + nullable: true + type: string + posted_at: + example: null + nullable: true + type: string + status: + example: null + nullable: true + type: string + top_level_category: + example: Food & Dining + nullable: true + type: string + transacted_at: + example: null + nullable: true + type: string + type: + example: DEBIT + nullable: false + type: string + updated_at: + example: '2016-10-08T05:49:12.000Z' + nullable: false + type: string + user_guid: + example: USR-fa7537f3-48aa-a683-a02a-b18940482f54 + nullable: true + type: string + user_id: + example: user123 + nullable: true + type: string + type: object TransactionResponse: properties: account_guid: @@ -4357,6 +4690,37 @@ paths: tags: - insights "/users/{user_guid}/accounts/{account_guid}/transactions": + post: + tags: + - transactions + summary: Create manual transaction + description: This endpoint can only be used to create manual transactions that are under a manual account. This endpoint accepts the optional MX-Skip-Webhook header and skip_webhook parameter. + parameters: + - name: user_guid + description: The unique identifier for the user. + in: path + required: true + schema: + type: string + - name: account_guid + description: The unique identifier for the account. + in: path + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + "$ref": '#/components/schemas/TransactionCreateRequestBody' + responses: + '200': + description: OK + content: + application/vnd.mx.api.v1+json: + schema: + $ref: '#/components/schemas/TransactionCreateResponseBody' get: description: This endpoint returns a list of the last 90 days of transactions @@ -7204,6 +7568,126 @@ paths: summary: Verify member tags: - mx_platform + "/users/{user_guid}/micro_deposits": + get: + tags: + - microdeposits + summary: List all microdeposits for a user + description: Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID. + parameters: + - name: user_guid + description: The unique identifier for the user. Defined by MX. + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/MicrodepositsResponseBody' + post: + tags: + - microdeposits + summary: Create a microdeposit + description: Use this endpoint to create a microdeposit. The response will include the new microdeposit record with a status of INITIATED. + parameters: + - name: user_guid + description: The unique identifier for the user. Defined by MX. + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/MicrodepositRequestBody" + required: true + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/MicrodepositResponseBody' + "/users/{user_guid}/micro_deposits/{micro_deposit_guid}": + delete: + tags: + - microdeposits + summary: Delete a microdeposit + description: + Use this endpoint to delete the specified microdeposit. + parameters: + - name: micro_deposit_guid + description: The unique identifier for the microdeposit. Defined by MX. + in: path + required: true + example: MIC-09ba578e-8448-4f7f-89e1-b62ff2517edb + 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 + get: + tags: + - microdeposits + summary: Read a microdeposit for a user + description: Use this endpoint to read the attributes of a specific microdeposit according to its unique GUID.

Webhooks for microdeposit status changes are triggered when a status changes. The actual status of the microdeposit guid updates every minute. You may force a status update by calling the read microdeposit endpoint. + parameters: + - name: user_guid + description: The unique identifier for the user. Defined by MX. + in: path + required: true + schema: + type: string + - name: micro_deposit_guid + description: The unique identifier for the microdeposit. Defined by MX. + in: path + required: true + schema: + type: string + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/MicrodepositResponseBody' + "/micro_deposits/{microdeposit_guid}/verify": + put: + tags: + - microdeposits + summary: Verify a Microdeposit + description: Use this endpoint to verify the amounts deposited into the account during a microdeposit verification. The verification has not successfully completed until the `status` is `VERIFIED`. Poll the `/users/{user_guid}/micro_deposits/{micro_deposit_guid}` (read microdeposit) endpoint until you see this status or an error state. + parameters: + - name: microdeposit_guid + description: The unique identifier for the microdeposit. Defined by MX. + in: path + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/MicrodepositVerifyRequestBody" + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/MicrodepositResponseBody' "/users/{user_guid}/monthly_cash_flow_profile": get: parameters: