Closes an account if the balance is zero.

Prev Next
Post
/accounts/{account_id}/close

Closes an account given the account identifier (UUID, IBAN or BBAN and country) if the account balance (available amount) is zero.

Closing an eMoney account implies to close all the virtual accounts associated to it. So no operations will be accomplished (transactions, update accounts, create limits).

Closing a Virtual Account implies to avoid operating with that account. So no operations will be accomplished (transactions, update account, create limits).

Security
OAuth

OAuth Grant type, Private JWT

FlowClient Credentials
Token URL$(host)/oauth/token
Scopes:
accounts.deleteClosing accounts
Header parameters
x-client-id
stringRequired

Client ID header.

Min length36
Max length36
Pattern^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$
x-device
string

Device information permitted for the data query.

You can use this parameter to apply an experience base to optimize data collection.

Min length0
Max length255
Pattern^[a-zA-Z]*$
Path parameters
account_id
Required

Identifier of the account. The number format is defined in the "account_id_type" parameter.

ExampleES8299999999530000000097
Query parameters
account_id_country
string

Account id country

Min length2
Max length2
Pattern^[A-Z]*$
ExampleGB
account_id_type
string

Account id type

Valid values[ "iban", "bban", "uuid" ]
Exampleiban
Body parameters

Request body where the reason from the clousure is indicated.

POST_ACCOUNT_CLOSE_BODY
{
  "closureReason": "Example reason"
}
object

Closure Reason Body.

closureReason
string Required

The reason for the closure.

Min length0
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
ExampleClosed by testing
Responses
204

No content

400

Bad Request

INVALID_SCHEMA
{
  "errors": [
    {
      "code": "INVALID_SCHEMA",
      "message": "Invalid input.",
      "level": "ERROR",
      "description": "Error validating schema."
    }
  ]
}
Expand All
object

Data structure containing the details for errors.

errors
Array of object (Error)

Array of errors.

Min items0
Max items50
object

Data structure containing error details.

code
string

Unique alphanumeric human readable error code.

Min length1
Max length255
Pattern^[a-zA-Z_0-9-]*$
ExampleINVALID_CODE
message
string

Brief summary of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
Exampleinvalid_message
level
string

Level of the reported issue. The possible values are:

  • ERROR
  • FATAL
  • INFO
  • WARNING
Valid values[ "ERROR", "FATAL", "INFO", "WARNING" ]
ExampleERROR
description
string

Detailed description of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
ExampleError validating schema
401

Unauthorized

UNAUTHORIZED
{
  "errors": [
    {
      "code": "UNAUTHORIZED",
      "message": "A token must be provided.",
      "level": "ERROR",
      "description": "There was an error during token verification in header [authorization]"
    }
  ]
}
Expand All
object

Data structure containing the details for errors.

errors
Array of object (Error)

Array of errors.

Min items0
Max items50
object

Data structure containing error details.

code
string

Unique alphanumeric human readable error code.

Min length1
Max length255
Pattern^[a-zA-Z_0-9-]*$
ExampleINVALID_CODE
message
string

Brief summary of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
Exampleinvalid_message
level
string

Level of the reported issue. The possible values are:

  • ERROR
  • FATAL
  • INFO
  • WARNING
Valid values[ "ERROR", "FATAL", "INFO", "WARNING" ]
ExampleERROR
description
string

Detailed description of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
ExampleError validating schema
403

Forbidden

LEGAL_ENTITY_NOT_ENABLED
{
  "errors": [
    {
      "code": "LEGAL_ENTITY_NOT_ENABLED",
      "message": "The legal entity is not enabled.",
      "level": "ERROR",
      "description": "Legal entity not enabled."
    }
  ]
}
OPERATION_NOT_ALLOWED
{
  "errors": [
    {
      "code": "OPERATION_NOT_ALLOWED",
      "message": "operation not allowed due to lack of permissions.",
      "level": "ERROR",
      "description": "Operation not allowed due to lack of permissions."
    }
  ]
}
INVALID_AUTH_TOKEN
{
  "errors": [
    {
      "code": "INVALID_AUTH_TOKEN",
      "message": "The token provided is invalid.",
      "level": "ERROR",
      "description": "Invalid auth token."
    }
  ]
}
FORBIDDEN
{
  "errors": [
    {
      "code": "FORBIDDEN",
      "message": "A token must be provided.",
      "level": "ERROR",
      "description": "Operation not allowed due to lack of permissions."
    }
  ]
}
Expand All
object

Data structure containing the details for errors.

errors
Array of object (Error)

Array of errors.

Min items0
Max items50
object

Data structure containing error details.

code
string

Unique alphanumeric human readable error code.

Min length1
Max length255
Pattern^[a-zA-Z_0-9-]*$
ExampleINVALID_CODE
message
string

Brief summary of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
Exampleinvalid_message
level
string

Level of the reported issue. The possible values are:

  • ERROR
  • FATAL
  • INFO
  • WARNING
Valid values[ "ERROR", "FATAL", "INFO", "WARNING" ]
ExampleERROR
description
string

Detailed description of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
ExampleError validating schema
404

Data structure showing an account does not exist in the system.

NOT_FOUND
{
  "errors": [
    {
      "code": "NOT_FOUND",
      "level": "ERROR",
      "message": "Not found.",
      "description": "The server can not find the requested resource. In the browser, this means the URL is not recognized."
    }
  ]
}
ACCOUNT_NOT_FOUND
{
  "errors": [
    {
      "code": "ACCOUNT_NOT_FOUND",
      "level": "ERROR",
      "message": "Account not found.",
      "description": "The data related to the account with identifier \"a26c7fc3-3f9b-4045-a946-24e565bee1f9\" could not be found."
    }
  ]
}
REAL_ACCOUNT_VIRTUAL_STRUCTURE_NOT_EXIST
{
  "errors": [
    {
      "code": "REAL_ACCOUNT_VIRTUAL_STRUCTURE_NOT_EXIST",
      "level": "ERROR",
      "message": "Real account has no virtual account structure",
      "description": "This account with an UUID \"698b21e5-016f-487c-b0a7-bb86772f126f\" has no  virtual structure ID."
    }
  ]
}
Expand All
object

Data structure containing the details for errors.

errors
Array of object (Error)

Array of errors.

Min items0
Max items50
object

Data structure containing error details.

code
string

Unique alphanumeric human readable error code.

Min length1
Max length255
Pattern^[a-zA-Z_0-9-]*$
ExampleINVALID_CODE
message
string

Brief summary of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
Exampleinvalid_message
level
string

Level of the reported issue. The possible values are:

  • ERROR
  • FATAL
  • INFO
  • WARNING
Valid values[ "ERROR", "FATAL", "INFO", "WARNING" ]
ExampleERROR
description
string

Detailed description of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
ExampleError validating schema
405

Method Not Allowed

METHOD_NOT_ALLOWED
{
  "errors": [
    {
      "code": "METHOD_NOT_ALLOWED",
      "level": "ERROR",
      "message": "Method not allowed",
      "description": "The request method is known by the server but is not supported by the target resource."
    }
  ]
}
Expand All
object

Data structure containing the details for errors.

errors
Array of object (Error)

Array of errors.

Min items0
Max items50
object

Data structure containing error details.

code
string

Unique alphanumeric human readable error code.

Min length1
Max length255
Pattern^[a-zA-Z_0-9-]*$
ExampleINVALID_CODE
message
string

Brief summary of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
Exampleinvalid_message
level
string

Level of the reported issue. The possible values are:

  • ERROR
  • FATAL
  • INFO
  • WARNING
Valid values[ "ERROR", "FATAL", "INFO", "WARNING" ]
ExampleERROR
description
string

Detailed description of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
ExampleError validating schema
406

Not Acceptable

NOT_ACCEPTABLE
{
  "errors": [
    {
      "code": "NOT_ACCEPTABLE",
      "level": "ERROR",
      "message": "Not Acceptable",
      "description": "This response is sent when the web server, after performing server-driven content negotiation, doesn't find any content that conforms to the criteria given by the user agent."
    }
  ]
}
Expand All
object

Data structure containing the details for errors.

errors
Array of object (Error)

Array of errors.

Min items0
Max items50
object

Data structure containing error details.

code
string

Unique alphanumeric human readable error code.

Min length1
Max length255
Pattern^[a-zA-Z_0-9-]*$
ExampleINVALID_CODE
message
string

Brief summary of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
Exampleinvalid_message
level
string

Level of the reported issue. The possible values are:

  • ERROR
  • FATAL
  • INFO
  • WARNING
Valid values[ "ERROR", "FATAL", "INFO", "WARNING" ]
ExampleERROR
description
string

Detailed description of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
ExampleError validating schema
409

Conflict

CONFLICT
{
  "errors": [
    {
      "code": "CONFLICT",
      "level": "ERROR",
      "message": "Conflict",
      "description": "This response is sent when a request conflicts with the current state of the server."
    }
  ]
}
Expand All
object

Data structure containing the details for errors.

errors
Array of object (Error)

Array of errors.

Min items0
Max items50
object

Data structure containing error details.

code
string

Unique alphanumeric human readable error code.

Min length1
Max length255
Pattern^[a-zA-Z_0-9-]*$
ExampleINVALID_CODE
message
string

Brief summary of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
Exampleinvalid_message
level
string

Level of the reported issue. The possible values are:

  • ERROR
  • FATAL
  • INFO
  • WARNING
Valid values[ "ERROR", "FATAL", "INFO", "WARNING" ]
ExampleERROR
description
string

Detailed description of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
ExampleError validating schema
413

Payload too large

PAYLOAD_TOO_LARGE
{
  "errors": [
    {
      "code": "PAYLOAD_TOO_LARGE",
      "level": "ERROR",
      "message": "Payload too large",
      "description": "Request entity is larger than limits defined by server. The server might close the connection or return an Retry-After header field."
    }
  ]
}
Expand All
object

Data structure containing the details for errors.

errors
Array of object (Error)

Array of errors.

Min items0
Max items50
object

Data structure containing error details.

code
string

Unique alphanumeric human readable error code.

Min length1
Max length255
Pattern^[a-zA-Z_0-9-]*$
ExampleINVALID_CODE
message
string

Brief summary of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
Exampleinvalid_message
level
string

Level of the reported issue. The possible values are:

  • ERROR
  • FATAL
  • INFO
  • WARNING
Valid values[ "ERROR", "FATAL", "INFO", "WARNING" ]
ExampleERROR
description
string

Detailed description of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
ExampleError validating schema
414

Request URI Too Long

REQUEST_URI_TOO_LONG
{
  "errors": [
    {
      "code": "URI_TOO_LARGE",
      "level": "ERROR",
      "message": "URI too large",
      "description": "The URI requested by the client is longer than the server is willing to interpret."
    }
  ]
}
Expand All
object

Data structure containing the details for errors.

errors
Array of object (Error)

Array of errors.

Min items0
Max items50
object

Data structure containing error details.

code
string

Unique alphanumeric human readable error code.

Min length1
Max length255
Pattern^[a-zA-Z_0-9-]*$
ExampleINVALID_CODE
message
string

Brief summary of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
Exampleinvalid_message
level
string

Level of the reported issue. The possible values are:

  • ERROR
  • FATAL
  • INFO
  • WARNING
Valid values[ "ERROR", "FATAL", "INFO", "WARNING" ]
ExampleERROR
description
string

Detailed description of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
ExampleError validating schema
415

Unsupported Media Type

UNSUPPORTED_MEDIA_TYPE
{
  "errors": [
    {
      "code": "UNSUPPORTED_MEDIA_TYPE",
      "level": "ERROR",
      "message": "Unsupported Media Type",
      "description": "The media format of the requested data is not supported by the server, so the server is rejecting the request."
    }
  ]
}
Expand All
object

Data structure containing the details for errors.

errors
Array of object (Error)

Array of errors.

Min items0
Max items50
object

Data structure containing error details.

code
string

Unique alphanumeric human readable error code.

Min length1
Max length255
Pattern^[a-zA-Z_0-9-]*$
ExampleINVALID_CODE
message
string

Brief summary of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
Exampleinvalid_message
level
string

Level of the reported issue. The possible values are:

  • ERROR
  • FATAL
  • INFO
  • WARNING
Valid values[ "ERROR", "FATAL", "INFO", "WARNING" ]
ExampleERROR
description
string

Detailed description of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
ExampleError validating schema
422

Data structure showing account could not be closed because it is already closed or the account balance is not zero.

ACCOUNT_ALREADY_CLOSED
{
  "errors": [
    {
      "code": "ACCOUNT_ALREADY_CLOSED",
      "level": "ERROR",
      "message": "Account is already closed",
      "description": "The account could not be closed because it is already closed"
    }
  ]
}
Expand All
object

Data structure containing the details for errors.

errors
Array of object (Error)

Array of errors.

Min items0
Max items50
object

Data structure containing error details.

code
string

Unique alphanumeric human readable error code.

Min length1
Max length255
Pattern^[a-zA-Z_0-9-]*$
ExampleINVALID_CODE
message
string

Brief summary of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
Exampleinvalid_message
level
string

Level of the reported issue. The possible values are:

  • ERROR
  • FATAL
  • INFO
  • WARNING
Valid values[ "ERROR", "FATAL", "INFO", "WARNING" ]
ExampleERROR
description
string

Detailed description of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
ExampleError validating schema
429

Too Many Requests

TOO_MANY_REQUESTS
{
  "errors": [
    {
      "code": "TOO_MANY_REQUESTS",
      "level": "ERROR",
      "message": "Too many requests.",
      "description": "The user has sent too many requests in a given amount of time"
    }
  ]
}
Expand All
object

Data structure containing the details for errors.

errors
Array of object (Error)

Array of errors.

Min items0
Max items50
object

Data structure containing error details.

code
string

Unique alphanumeric human readable error code.

Min length1
Max length255
Pattern^[a-zA-Z_0-9-]*$
ExampleINVALID_CODE
message
string

Brief summary of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
Exampleinvalid_message
level
string

Level of the reported issue. The possible values are:

  • ERROR
  • FATAL
  • INFO
  • WARNING
Valid values[ "ERROR", "FATAL", "INFO", "WARNING" ]
ExampleERROR
description
string

Detailed description of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
ExampleError validating schema
500

Internal Server Error

INTERNAL_SERVER_ERROR
{
  "errors": [
    {
      "code": "INTERNAL_SERVER_ERROR",
      "message": "Internal Server Error.",
      "level": "ERROR",
      "description": "INTERNAL_SERVER_ERROR"
    }
  ]
}
Expand All
object

Data structure containing the details for errors.

errors
Array of object (Error)

Array of errors.

Min items0
Max items50
object

Data structure containing error details.

code
string

Unique alphanumeric human readable error code.

Min length1
Max length255
Pattern^[a-zA-Z_0-9-]*$
ExampleINVALID_CODE
message
string

Brief summary of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
Exampleinvalid_message
level
string

Level of the reported issue. The possible values are:

  • ERROR
  • FATAL
  • INFO
  • WARNING
Valid values[ "ERROR", "FATAL", "INFO", "WARNING" ]
ExampleERROR
description
string

Detailed description of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
ExampleError validating schema
503

Service Down Error

SERVICE_ERROR
{
  "errors": [
    {
      "code": "SERVICE_DOWN_ERROR",
      "message": "Service down error.",
      "level": "ERROR",
      "description": "Service down error."
    }
  ]
}
Expand All
object

Data structure containing the details for errors.

errors
Array of object (Error)

Array of errors.

Min items0
Max items50
object

Data structure containing error details.

code
string

Unique alphanumeric human readable error code.

Min length1
Max length255
Pattern^[a-zA-Z_0-9-]*$
ExampleINVALID_CODE
message
string

Brief summary of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
Exampleinvalid_message
level
string

Level of the reported issue. The possible values are:

  • ERROR
  • FATAL
  • INFO
  • WARNING
Valid values[ "ERROR", "FATAL", "INFO", "WARNING" ]
ExampleERROR
description
string

Detailed description of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
ExampleError validating schema
504

Gateway Timeout Error

GATEWAY_TIMEOUT
{
  "errors": [
    {
      "code": "GATEWAY_TIMEOUT_ERROR",
      "message": "Gateway timeout error.",
      "level": "ERROR",
      "description": "Gateway timeout error"
    }
  ]
}
Expand All
object

Data structure containing the details for errors.

errors
Array of object (Error)

Array of errors.

Min items0
Max items50
object

Data structure containing error details.

code
string

Unique alphanumeric human readable error code.

Min length1
Max length255
Pattern^[a-zA-Z_0-9-]*$
ExampleINVALID_CODE
message
string

Brief summary of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
Exampleinvalid_message
level
string

Level of the reported issue. The possible values are:

  • ERROR
  • FATAL
  • INFO
  • WARNING
Valid values[ "ERROR", "FATAL", "INFO", "WARNING" ]
ExampleERROR
description
string

Detailed description of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
ExampleError validating schema
default

Internal Server Error

INTERNAL_SERVER_ERROR
{
  "errors": [
    {
      "code": "INTERNAL_SERVER_ERROR",
      "message": "Internal Server Error.",
      "level": "ERROR",
      "description": "INTERNAL_SERVER_ERROR"
    }
  ]
}
Expand All
object

Data structure containing the details for errors.

errors
Array of object (Error)

Array of errors.

Min items0
Max items50
object

Data structure containing error details.

code
string

Unique alphanumeric human readable error code.

Min length1
Max length255
Pattern^[a-zA-Z_0-9-]*$
ExampleINVALID_CODE
message
string

Brief summary of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
Exampleinvalid_message
level
string

Level of the reported issue. The possible values are:

  • ERROR
  • FATAL
  • INFO
  • WARNING
Valid values[ "ERROR", "FATAL", "INFO", "WARNING" ]
ExampleERROR
description
string

Detailed description of the reported issue.

Min length1
Max length255
Pattern^[a-zA-Z_0-9_@./#&+-_ '""]*$
ExampleError validating schema