From 188ae00845bb4e7559fc57ce8216712883ca8863 Mon Sep 17 00:00:00 2001 From: Matthew Spaulding Date: Mon, 27 Nov 2023 16:22:09 -0500 Subject: [PATCH] add new field and endpoint --- openapi/mx_platform_api.yml | 252 +++++++++++++++++++++++++++--------- 1 file changed, 188 insertions(+), 64 deletions(-) diff --git a/openapi/mx_platform_api.yml b/openapi/mx_platform_api.yml index 7b10d68..04b5094 100644 --- a/openapi/mx_platform_api.yml +++ b/openapi/mx_platform_api.yml @@ -1000,6 +1000,10 @@ components: example: false nullable: true type: boolean + micro_call_to_action: + example: Learn more + nullable: true + type: string micro_description: example: Netflix charged you $5.00 more this month than normal. nullable: true @@ -1035,16 +1039,16 @@ components: example: false type: boolean type: object - InsightsReadResponseBody: + InsightResponseBody: properties: - account_numbers: + insight: items: "$ref": "#/components/schemas/InsightResponse" type: object type: object InsightsResponseBody: properties: - account_numbers: + insights: items: "$ref": "#/components/schemas/InsightResponse" type: array @@ -3353,6 +3357,59 @@ paths: summary: List transactions by account tags: - mx_platform + get: + description: This endpoint returns a list of the last 90 days of transactions + associated with the specified account. + operationId: listTransactionsByAccount + parameters: + - description: The unique id for an `account`. + example: ACT-06d7f44b-caae-0f6e-1384-01f52e75dcb1 + in: path + name: account_guid + required: true + schema: + type: string + - description: Filter transactions from this date. + example: '2015-09-20' + in: query + name: from_date + schema: + type: string + - 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: Filter transactions to this date. + example: '2019-10-20' + in: query + name: to_date + 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/TransactionsResponseBody" + description: OK + summary: List transactions by account + tags: + - mx_platform "/users/{user_guid}/categories": get: description: Use this endpoint to list all categories associated with a `user`, @@ -3678,15 +3735,14 @@ paths: description: OK summary: List all insights for a user. tags: - - mx_platform - "/users/{user_guid}/insights/{guid}": - put: - description: Use this endpoint to update the attributes of a particular insight - according to its unique GUID. - operationId: updateInsight + - insights + "/users/{user_guid}/insights/{insight_guid}/categories": + get: + description: Use this endpoint to list all the categories associated with the insight. + operationId: listCategoriesInsight parameters: - description: The unique identifier for the user. Defined by MX. - example: USR-fa7537f3-48aa-a683-a02a-b18940482f54 + example: USR-1234-abcd in: path name: user_guid required: true @@ -3695,59 +3751,21 @@ paths: - description: The unique identifier for the insight. Defined by MX. example: BET-1234-abcd in: path - name: guid + name: insight_guid required: true schema: type: string - requestBody: - content: - application/json: - schema: - "$ref": "#/components/schemas/InsightUpdateRequest" - description: The insight to be updated (None of these parameters are required, - but the user object cannot be empty.) - required: true responses: '200': content: application/vnd.mx.api.v1+json: schema: - "$ref": "#/components/schemas/InsightResponse" + "$ref": "#/components/schemas/CategoriesResponseBody" description: OK - summary: Update insight + summary: List all categories associated with an insight. tags: - - mx_platform - "/users/{user_guid}/insights/{guid}/accounts": - "/users/{user_guid}/insights/{guid}/categories": - get: - description: Use this endpoint to list all the categories associated with - the insight. - operationId: listCategoriesInsight - parameters: - - description: The unique identifier for the user. Defined by MX. - example: USR-1234-abcd - in: path - name: user_guid - required: true - schema: - type: string - - description: The unique identifier for the insight. Defined by MX. - example: BET-1234-abcd - in: path - name: guid - required: true - schema: - type: string - responses: - '200': - content: - application/vnd.mx.api.v1+json: - schema: - "$ref": "#/components/schemas/CategoriesResponseBody" - description: OK - summary: List all categories associated with an insight. - tags: - - mx_platform + - insights + "/users/{user_guid}/insights/{insight_guid}/accounts": get: description: Use this endpoint to list all the accounts associated with the insight. @@ -3763,7 +3781,7 @@ paths: - description: The unique identifier for the insight. Defined by MX. example: BET-1234-abcd in: path - name: guid + name: insight_guid required: true schema: type: string @@ -3776,8 +3794,8 @@ paths: description: OK summary: List all accounts associated with an insight. tags: - - mx_platform - "/users/{user_guid}/insights/{guid}/merchants": + - insights + "/users/{user_guid}/insights/{insight_guid}/merchants": get: description: Use this endpoint to list all the merchants associated with the insight. @@ -3793,7 +3811,7 @@ paths: - description: The unique identifier for the insight. Defined by MX. example: BET-1234-abcd in: path - name: guid + name: insight_guid required: true schema: type: string @@ -3806,8 +3824,8 @@ paths: description: OK summary: List all merchants associated with an insight. tags: - - mx_platform - "/users/{user_guid}/insights/{guid}/transactions": + - insights + "/users/{user_guid}/insights/{insight_guid}/transactions": get: description: Use this endpoint to list all the transactions associated with the insight. @@ -3823,7 +3841,7 @@ paths: - description: The unique identifier for the insight. Defined by MX. example: BET-1234-abcd in: path - name: guid + name: insight_guid required: true schema: type: string @@ -3836,8 +3854,8 @@ paths: description: OK summary: List all transactions associated with an insight. tags: - - mx_platform - "/users/{user_guid}/insights{guid}": + - insights + "/users/{user_guid}/insights{insight_guid}": get: description: Use this endpoint to read the attributes of a specific insight according to its unique GUID. @@ -3853,7 +3871,7 @@ paths: - description: The unique identifier for the insight. Defined by MX. example: BET-1234-abcd in: path - name: guid + name: insight_guid required: true schema: type: string @@ -3866,7 +3884,113 @@ paths: description: OK summary: Read a specific insight. tags: - - mx_platform + - insights + put: + description: Use this endpoint to update the attributes of a particular insight + according to its unique GUID. + operationId: updateInsight + parameters: + - description: The unique identifier for the user. Defined by MX. + example: USR-fa7537f3-48aa-a683-a02a-b18940482f54 + in: path + name: user_guid + required: true + schema: + type: string + - description: The unique identifier for the insight. Defined by MX. + example: BET-1234-abcd + in: path + name: insight_guid + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + "$ref": "#/components/schemas/InsightUpdateRequest" + description: The insight to be updated (None of these parameters are required, + but the user object cannot be empty.) + required: true + responses: + '200': + content: + application/vnd.mx.api.v1+json: + schema: + "$ref": "#/components/schemas/InsightResponse" + description: OK + summary: Update insight + tags: + - insights + "/accounts/{account_guid}/insights": + get: + description: Use this endpoint to list all insights associated with a specified account ID. + operationId: listByAccountID + parameters: + - description: The unique id for an `account`. + example: ACT-06d7f44b-caae-0f6e-1384-01f52e75dcb1 + in: path + name: account_guid + required: true + schema: + type: string + - 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 + responses: + '200': + content: + application/vnd.mx.api.v1+json: + schema: + "$ref": "#/components/schemas/InsightsResponseBody" + description: OK + summary: List all insights with specified account ID + tags: + - insights + "/transactions/{transaction_guid}/insights": + get: + description: Use this endpoint to list all insights associated with a specified transaction ID. + operationId: listByTransactionID + parameters: + parameters: + - description: The unique id for a `transaction`. + example: TRN-06d7f44b-caae-0f6e-1384-01f52e75dcb1 + in: path + name: transaction_guid + required: true + schema: + type: string + - 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 + responses: + '200': + content: + application/vnd.mx.api.v1+json: + schema: + "$ref": "#/components/schemas/InsightsResponseBody" + description: OK + summary: List all insights with specified transaction ID + tags: + - insights "/users/{user_guid}/managed_members": get: description: This endpoint returns a list of all the partner-managed members