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 AccountGET/api/bank-accounts/{bankAccountId}
Example URI
GET https://monolith.spotahome.com/api/bank-accounts/8f2dbe69-b68f-4775-bc93-b8b036727a03
URI Parameters
- bankAccountId
string(required) Example: 8f2dbe69-b68f-4775-bc93-b8b036727a03
Request
Headers
Content-Type: application/json
Authorization: aa.bb.ccResponse
200Headers
Content-Type: application/jsonBody
{
"iban": "IT93Q0326803403052213115840",
"bic": "BSANADAD",
"currency": "EUR",
"address": {
"city": "madrid",
"zipCode": "80312",
"street": "Calle Gonzalez 12",
"country": "spain"
},
"accountHolderFullName": "John Due"
}Response
401Headers
Content-Type: application/problem+jsonBody
{
"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
404Headers
Content-Type: application/problem+jsonBody
{
"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 AccountPUT/api/bank-accounts/{bankAccountId}
Example URI
PUT https://monolith.spotahome.com/api/bank-accounts/8f2dbe69-b68f-4775-bc93-b8b036727a03
URI Parameters
- bankAccountId
string(required) Example: 8f2dbe69-b68f-4775-bc93-b8b036727a03
Request
Headers
Content-Type: application/json
Accept: application/json
Authorization: aa.bb.ccBody
{
"iban": "IT93Q0326803403052213115840",
"bic": "BSANADAD",
"currency": "EUR",
"address": {
"city": "madrid",
"zipCode": "80312",
"street": "Calle Gonzalez 12",
"country": "spain"
},
"accountHolderFullName": "John Due"
}Response
204Response
401Headers
Content-Type: application/problem+jsonBody
{
"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
404Headers
Content-Type: application/problem+jsonBody
{
"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
422Headers
Content-Type: application/problem+jsonBody
{
"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 AccountDELETE/api/bank-accounts/{bankAccountId}
Example URI
DELETE https://monolith.spotahome.com/api/bank-accounts/8f2dbe69-b68f-4775-bc93-b8b036727a03
URI Parameters
- bankAccountId
string(required) Example: 8f2dbe69-b68f-4775-bc93-b8b036727a03
Request
Headers
Content-Type: application/json
Accept: application/json
Authorization: aa.bb.ccResponse
204Response
401Headers
Content-Type: application/problem+jsonBody
{
"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
404Headers
Content-Type: application/problem+jsonBody
{
"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
422Headers
Content-Type: application/problem+jsonBody
{
"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 holderGET/api/landlord/bank-account-holders
Example URI
GET https://monolith.spotahome.com/api/landlord/bank-account-holders
Request
Headers
Content-Type: application/json
Authorization: aa.bb.ccResponse
200Headers
Content-Type: application/jsonBody
{
"_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
400Headers
Content-Type: application/problem+jsonBody
{
"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
401Headers
Content-Type: application/problem+jsonBody
{
"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 AccountPOST/api/landlord/bank-account-holders
Example URI
POST https://monolith.spotahome.com/api/landlord/bank-account-holders
Request
Headers
Content-Type: application/json
Authorization: aa.bb.ccBody
{
"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
201Headers
Location: /api/bank-account-holders?bankAccountHolderIds[]=10029Response
401Headers
Content-Type: application/problem+jsonBody
{
"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
409Headers
Content-Type: application/problem+jsonBody
{
"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
422Headers
Content-Type: application/problem+jsonBody
{
"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 informationPUT/api/landlord/bank-account-holders
Example URI
PUT https://monolith.spotahome.com/api/landlord/bank-account-holders
Request
Headers
Content-Type: application/json
Authorization: aa.bb.ccBody
{
"signatoryFullName": "John Due",
"vatNumber": "H56787878878899",
"isMultiIban": false
}Response
204Response
401Headers
Content-Type: application/problem+jsonBody
{
"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
404Headers
Content-Type: application/problem+jsonBody
{
"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
422Headers
Content-Type: application/problem+jsonBody
{
"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 AccountPUT/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
- bankAccountId
string(required) Example: 8f2dbe69-b68f-4775-bc93-b8b036727a03
Request
Headers
Content-Type: application/json
Accept: application/json
Authorization: aa.bb.ccBody
{
"iban": "IT93Q0326803403052213115840",
"bic": "BSANADAD",
"currency": "EUR",
"address": {
"city": "madrid",
"zipCode": "80312",
"street": "Calle Gonzalez 12",
"country": "spain"
},
"accountHolderFullName": "John Due"
}Response
204Response
401Headers
Content-Type: application/problem+jsonBody
{
"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
404Headers
Content-Type: application/problem+jsonBody
{
"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
422Headers
Content-Type: application/problem+jsonBody
{
"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 AccountPOST/api/landlord/bank-account-holders/bank-accounts/
Example URI
POST https://monolith.spotahome.com/api/landlord/bank-account-holders/bank-accounts/
Request
Headers
Content-Type: application/json
Accept: application/json
Authorization: aa.bb.ccBody
{
"iban": "IT93Q0326803403052213115840",
"bic": "BSANADAD",
"currency": "EUR",
"address": {
"city": "madrid",
"zipCode": "80312",
"street": "Calle Gonzalez 12",
"country": "spain"
},
"accountHolderFullName": "John Due"
}Response
204Response
401Headers
Content-Type: application/problem+jsonBody
{
"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
404Headers
Content-Type: application/problem+jsonBody
{
"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
422Headers
Content-Type: application/problem+jsonBody
{
"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 currenciesGET/api/currencies{?page,itemsPerPage}
Example URI
GET https://monolith.spotahome.com/api/currencies?page=1&itemsPerPage=100
URI Parameters
- page
number(optional) Example: 1- itemsPerPage
number(optional) Example: 100
Request
Headers
Accept: application/json
Authorization: aa.bb.ccResponse
200Headers
Content-Type: application/jsonBody
{
"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
- $
}
}
}