From 81f66f3f1c2096a63f63461b4f0119db13be4471 Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Tue, 15 Jun 2021 17:31:07 +0100 Subject: [PATCH 1/2] Update Account-related information in the Entities section --- _entities.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/_entities.md b/_entities.md index 0db680c..eb0902a 100644 --- a/_entities.md +++ b/_entities.md @@ -1,6 +1,7 @@ # Entities ## Account Object + > An example account encoded in JSON looks like this: ```json @@ -20,12 +21,12 @@ Property | Description -------- | ----------------------------------------------------------------------- billing | The relevant billing details associated with the account. -brand | The brand of the `card` account. +brand | The brand of the account (if it is of type `card`). currency | The currency in which the account is denominated. id | A unique ID associated with the account. label | The display name of the account as chosen by the user. -status | The current status of the account. Possible values are `ok` and `failed`. -type | The type of the account. Possible values are `card` and `sepa`. +status | The current status of the account. Possible values are `blocked`, `expired`, `failed`, `ok` and `pending`. +type | The type of the account. Possible values are `ach`, `card` and `sepa`. ## Authentication Method Object @@ -150,7 +151,7 @@ pair | The currency pair AB represents moving from A to B. > An example phone encoded in JSON looks like this: -``` +```json { "e164Masked": "+XXXXXXXXX04", "id": "1d78aeb5-43ac-4ee8-8d28-1291b5d8355c", From ef5c39baa0f426501d313305f19fe85e81bde6c4 Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Tue, 15 Jun 2021 17:31:38 +0100 Subject: [PATCH 2/2] Document functionality to delete accounts --- _accounts.md | 34 ++++++++++++++++++++++++++++++++++ _totp.md | 3 ++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/_accounts.md b/_accounts.md index 37eac4c..e72c543 100644 --- a/_accounts.md +++ b/_accounts.md @@ -111,3 +111,37 @@ Retrieves the details about a specific account. ### Response Returns a fully formed [Account Object](#account-object) representing the requested account. + +## Remove Account + +```bash +curl https://api.uphold.com/v0/me/accounts/18843b6d-5a43-480f-8e2b-73b27d726bf0 \ + -X DELETE + -H "Authorization: Bearer " +``` + +> The above command returns a response with no body, and HTTP status code `204` +([No Content](https://datatracker.ietf.org/doc/html/rfc7231#section-6.3.5)). + +Deletes a specific account. + +### Request + +`DELETE https://api.uphold.com/v0/me/accounts/:id` + + + + +### Response + +In case of success, returns a response with no body and an HTTP status code of `204` +([No Content](https://datatracker.ietf.org/doc/html/rfc7231#section-6.3.5)). + +If the account doesn't exist under the authorization-granting user, returns a 404 HTTP error. + +If the token lacks the `accounts:write` scope, returns a 404 HTTP error +with the JSON body `{ "error": "invalid_scope" }`. diff --git a/_totp.md b/_totp.md index a38660c..a7c783e 100644 --- a/_totp.md +++ b/_totp.md @@ -138,4 +138,5 @@ curl https://api.uphold.com/v0/me/authentication_methods/3f8f8264-2f5e-4b2b-8333 ### Response -Returns an HTTP status code of 204 and no JSON body, in case of success. +Returns an HTTP status code of `204` ([No Content](https://datatracker.ietf.org/doc/html/rfc7231#section-6.3.5)) +and no JSON body, in case of success.