Back to top

Payments and Finance

Payments and Finance bounded context aka Payments&Finance.

Manages payments and finance. Follow HAL and Problem Details standards.

Headers

As API is working with JSON every request must add the following headers:

Accept: application/json

And for request with body:

Content-Type: application/json

In order to use this API we must authenticate using the user&identity bounded context, and the token must be set in the request header:

Authorization: aa.bb.cc

Bank Account Holders

Public Bank Accounts

Get Bank Account
GET/api/bank-accounts/{bankAccountId}

Example URI

GET https://monolith.spotahome.com/api/bank-accounts/8f2dbe69-b68f-4775-bc93-b8b036727a03
URI Parameters
HideShow
bankAccountId
string (required) Example: 8f2dbe69-b68f-4775-bc93-b8b036727a03
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "iban": "IT93Q0326803403052213115840",
  "bic": "BSANADAD",
  "currency": "EUR",
  "address": {
    "city": "madrid",
    "zipCode": "80312",
    "street": "Calle Gonzalez 12",
    "country": "spain"
  },
  "accountHolderFullName": "John Due"
}
Response  401
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "Unauthorized user",
  "status": 401,
  "title": "Unauthorized",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string)"
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "Bank Account Not Found",
  "status": 404,
  "title": "Not Found",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string)"
    }
  }
}

Update Bank Account
PUT/api/bank-accounts/{bankAccountId}

Example URI

PUT https://monolith.spotahome.com/api/bank-accounts/8f2dbe69-b68f-4775-bc93-b8b036727a03
URI Parameters
HideShow
bankAccountId
string (required) Example: 8f2dbe69-b68f-4775-bc93-b8b036727a03
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: aa.bb.cc
Body
{
  "iban": "IT93Q0326803403052213115840",
  "bic": "BSANADAD",
  "currency": "EUR",
  "address": {
    "city": "madrid",
    "zipCode": "80312",
    "street": "Calle Gonzalez 12",
    "country": "spain"
  },
  "accountHolderFullName": "John Due"
}
Response  204
Response  401
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "Unauthorized user",
  "status": 401,
  "title": "Unauthorized",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string)"
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "Bank Account Not Found",
  "status": 404,
  "title": "Not Found",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string)"
    }
  }
}
Response  422
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request was well formed but was unable to be followed due to semantic errors",
  "status": 422,
  "title": "Unprocessable Entity",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616",
  "validationMessages": {
    "field": {
      "stringLength": "The input is less than 6 characters long"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string)"
    },
    "validationMessages": {
      "type": "object",
      "properties": {
        "field": {
          "type": "object",
          "properties": {
            "stringLength": {
              "type": "string"
            }
          }
        }
      },
      "description": "Contains a property for each field that failed validation."
    }
  }
}

Remove Bank Account
DELETE/api/bank-accounts/{bankAccountId}

Example URI

DELETE https://monolith.spotahome.com/api/bank-accounts/8f2dbe69-b68f-4775-bc93-b8b036727a03
URI Parameters
HideShow
bankAccountId
string (required) Example: 8f2dbe69-b68f-4775-bc93-b8b036727a03
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: aa.bb.cc
Response  204
Response  401
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "Unauthorized user",
  "status": 401,
  "title": "Unauthorized",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string)"
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "Bank Account Not Found",
  "status": 404,
  "title": "Not Found",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string)"
    }
  }
}
Response  422
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request was well formed but was unable to be followed due to semantic errors",
  "status": 422,
  "title": "Unprocessable Entity",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616",
  "validationMessages": {
    "field": {
      "stringLength": "The input is less than 6 characters long"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string)"
    },
    "validationMessages": {
      "type": "object",
      "properties": {
        "field": {
          "type": "object",
          "properties": {
            "stringLength": {
              "type": "string"
            }
          }
        }
      },
      "description": "Contains a property for each field that failed validation."
    }
  }
}

Landlord Bank Account Holders endpoints

Public Bank account Holders

Get Bank account holder
GET/api/landlord/bank-account-holders

Example URI

GET https://monolith.spotahome.com/api/landlord/bank-account-holders
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "_id": "10038",
  "name": "Bruno Biagi",
  "vat_number": "B82860165",
  "is_multi_iban": true,
  "bank_account": {
    "iban": "IT93Q0326803403052213115840",
    "bic": "",
    "currency_code": "EUR",
    "address": {
      "city": "undefined",
      "country_code": "undefined",
      "zip_code": "undefined",
      "street": "undefined"
    },
    "holder_name": "Bruno Malaga"
  }
}
Response  400
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request is not valid",
  "status": 400,
  "title": "Bad Request",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string)"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request is not valid",
  "status": 400,
  "title": "Bad Request",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string)"
    }
  }
}

Create Bank Account Holder with one Bank Account
POST/api/landlord/bank-account-holders

Example URI

POST https://monolith.spotahome.com/api/landlord/bank-account-holders
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "signatoryFullName": "John Doe",
  "bankAccount": {
    "iban": "NL56ABNA4871952010",
    "bic": "BSANADAD",
    "address": {
      "city": "madrid",
      "zipCode": "80312",
      "street": "Calle Gonzalez 12",
      "country": "ES"
    },
    "currency": "EUR",
    "accountHolderFullName": "John Due"
  },
  "vatNumber": "H5678787887",
  "isMultiIban": false
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "signatoryFullName": {
      "type": "string"
    },
    "bankAccount": {
      "type": "object",
      "properties": {
        "iban": {
          "type": [
            "string",
            "null"
          ],
          "description": "In case of MultiIban value should be null"
        },
        "bic": {
          "type": [
            "string",
            "null"
          ],
          "description": "In case of MultiIban value should be null"
        },
        "address": {
          "type": "object",
          "properties": {
            "city": {
              "type": [
                "string",
                "null"
              ],
              "description": "In case of MultiIban value should be null"
            },
            "zipCode": {
              "type": [
                "string",
                "null"
              ],
              "description": "In case of MultiIban value should be null"
            },
            "street": {
              "type": [
                "string",
                "null"
              ],
              "description": "In case of MultiIban value should be null"
            },
            "country": {
              "type": [
                "string",
                "null"
              ],
              "description": "In case of MultiIban value should be null"
            }
          },
          "required": [
            "city",
            "zipCode",
            "street",
            "country"
          ]
        },
        "currency": {
          "type": [
            "string",
            "null"
          ],
          "description": "In case of MultiIban value should be null"
        },
        "accountHolderFullName": {
          "type": [
            "string",
            "null"
          ],
          "description": "In case of MultiIban value should be null"
        }
      },
      "required": [
        "iban",
        "bic",
        "currency",
        "accountHolderFullName"
      ]
    },
    "vatNumber": {
      "type": "string"
    },
    "isMultiIban": {
      "type": "boolean"
    }
  },
  "required": [
    "signatoryFullName",
    "vatNumber",
    "isMultiIban"
  ]
}
Response  201
HideShow
Headers
Location: /api/bank-account-holders?bankAccountHolderIds[]=10029
Response  401
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "Unauthorized user",
  "status": 401,
  "title": "Unauthorized",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string)"
    }
  }
}
Response  409
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be completed due to a conflict with the current state of the resource",
  "status": 409,
  "title": "Conflict",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}
Response  422
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request was well formed but was unable to be followed due to semantic errors",
  "status": 422,
  "title": "Unprocessable Entity",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616",
  "validationMessages": {
    "field": {
      "stringLength": "The input is less than 6 characters long"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string)"
    },
    "validationMessages": {
      "type": "object",
      "properties": {
        "field": {
          "type": "object",
          "properties": {
            "stringLength": {
              "type": "string"
            }
          }
        }
      },
      "description": "Contains a property for each field that failed validation."
    }
  }
}

Update Bank Account Holder information
PUT/api/landlord/bank-account-holders

Example URI

PUT https://monolith.spotahome.com/api/landlord/bank-account-holders
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "signatoryFullName": "John Due",
  "vatNumber": "H56787878878899",
  "isMultiIban": false
}
Response  204
Response  401
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "Unauthorized user",
  "status": 401,
  "title": "Unauthorized",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string)"
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "Bank Account Holder Not Found",
  "status": 404,
  "title": "Not Found",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string)"
    }
  }
}
Response  422
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request was well formed but was unable to be followed due to semantic errors",
  "status": 422,
  "title": "Unprocessable Entity",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616",
  "validationMessages": {
    "field": {
      "stringLength": "The input is less than 6 characters long"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string)"
    },
    "validationMessages": {
      "type": "object",
      "properties": {
        "field": {
          "type": "object",
          "properties": {
            "stringLength": {
              "type": "string"
            }
          }
        }
      },
      "description": "Contains a property for each field that failed validation."
    }
  }
}

Landlord Bank Accounts

Update Bank Account
PUT/api/landlord/bank-account-holders/bank-accounts/{bankAccountId}

Example URI

PUT https://monolith.spotahome.com/api/landlord/bank-account-holders/bank-accounts/8f2dbe69-b68f-4775-bc93-b8b036727a03
URI Parameters
HideShow
bankAccountId
string (required) Example: 8f2dbe69-b68f-4775-bc93-b8b036727a03
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: aa.bb.cc
Body
{
  "iban": "IT93Q0326803403052213115840",
  "bic": "BSANADAD",
  "currency": "EUR",
  "address": {
    "city": "madrid",
    "zipCode": "80312",
    "street": "Calle Gonzalez 12",
    "country": "spain"
  },
  "accountHolderFullName": "John Due"
}
Response  204
Response  401
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "Unauthorized user",
  "status": 401,
  "title": "Unauthorized",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string)"
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "Bank Account Not Found",
  "status": 404,
  "title": "Not Found",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string)"
    }
  }
}
Response  422
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request was well formed but was unable to be followed due to semantic errors",
  "status": 422,
  "title": "Unprocessable Entity",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616",
  "validationMessages": {
    "field": {
      "stringLength": "The input is less than 6 characters long"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string)"
    },
    "validationMessages": {
      "type": "object",
      "properties": {
        "field": {
          "type": "object",
          "properties": {
            "stringLength": {
              "type": "string"
            }
          }
        }
      },
      "description": "Contains a property for each field that failed validation."
    }
  }
}

Landlord Bank Accounts

Update Bank Account
POST/api/landlord/bank-account-holders/bank-accounts/

Example URI

POST https://monolith.spotahome.com/api/landlord/bank-account-holders/bank-accounts/
Request
HideShow
Headers
Content-Type: application/json
Accept: application/json
Authorization: aa.bb.cc
Body
{
  "iban": "IT93Q0326803403052213115840",
  "bic": "BSANADAD",
  "currency": "EUR",
  "address": {
    "city": "madrid",
    "zipCode": "80312",
    "street": "Calle Gonzalez 12",
    "country": "spain"
  },
  "accountHolderFullName": "John Due"
}
Response  204
Response  401
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "Unauthorized user",
  "status": 401,
  "title": "Unauthorized",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string)"
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "Bank Account Not Found",
  "status": 404,
  "title": "Not Found",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string)"
    }
  }
}
Response  422
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request was well formed but was unable to be followed due to semantic errors",
  "status": 422,
  "title": "Unprocessable Entity",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616",
  "validationMessages": {
    "field": {
      "stringLength": "The input is less than 6 characters long"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string)"
    },
    "validationMessages": {
      "type": "object",
      "properties": {
        "field": {
          "type": "object",
          "properties": {
            "stringLength": {
              "type": "string"
            }
          }
        }
      },
      "description": "Contains a property for each field that failed validation."
    }
  }
}

Currencies

Currency

View all supported currencies
GET/api/currencies{?page,itemsPerPage}

Example URI

GET https://monolith.spotahome.com/api/currencies?page=1&itemsPerPage=100
URI Parameters
HideShow
page
number (optional) Example: 1
itemsPerPage
number (optional) Example: 100
Request
HideShow
Headers
Accept: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "count": 1,
    "total": 28,
    "_links": {
        "self": {
            "href": "/api/currencies?itemsPerPage=1&page=1"
        },
        "first": {
            "href": "/api/currencies?itemsPerPage=1&page=1"
        },
        "last": {
            "href": "/api/currencies?itemsPerPage=1&page=28"
        },
        "next": {
            "href": "/api/currencies?itemsPerPage=1&page=2"
        }
    }
    "_embedded": {
        "currencies": {
            "label": "EUR" (enum[string], required)
                - EUR
                - GBP
                - AED
                - TRY
                - PLN
                - CZK
                - HUF
                - CAD
            "symbol": "€" (enum[string], required)
                - €
                - £
                - AED
                - TL
                - zł
                - Kč
                - Ft
                - $
        }
    }
}

Generated by aglio on 27 Nov 2025