Перейти к содержимому

Обновить счёт через singular-resource маршрут

PUT
/api/v1/bank_accounts
curl --request PUT \
--url https://core.example.com/api/v1/bank_accounts \
--header 'Content-Type: application/json' \
--header 'session-token: <session-token>' \
--data '{ "id": 1, "value": "example", "currency": "EUR", "token": "example", "status": "pending", "provider": "default", "swift_code": "example", "uk_sort_code": "example", "uk_account_number": "example", "approved": true, "details": { "beneficiary_type": "individual_stakeholder", "beneficiary_name": "example", "beneficiary_first_name": "example", "beneficiary_last_name": "example", "beneficiary_country": "example", "beneficiary_city": "example", "beneficiary_street": "example", "beneficiary_address": "example", "beneficiary_region": "example", "beneficiary_postalcode": "example", "beneficiary_bank": "example", "beneficiary_phone": "example", "beneficiary_email": "hello@example.com", "beneficiary_account_name": "example", "swift_code": "example", "corresponding_bank": "example", "corresponding_iban": "example", "corresponding_swift_code": "example", "corresponding_bank_country": "example", "corresponding_bank_address": "example", "account_number_compass": "example", "reference_code": "example" } }'

ID должен присутствовать среди полей запроса. services/banking-api вызывает этот маршрут только с app-token, однако Core-контроллер требует session-token; это расхождение отмечено в отчёте.

Media typeapplication/json
object
id
required
integer
value
string
currency
string
Example
EUR
token
string
status
string
Allowed values: pending pending_request approved declined closed
provider
string
Allowed values: default beneficiary iban cup redbanx coinspaid blockcypher rietumu card
swift_code
string
uk_sort_code
string
uk_account_number
string
approved
boolean
details
object
beneficiary_type
string
Allowed values: individual_stakeholder company_stakeholder
beneficiary_name
string
beneficiary_first_name
string
beneficiary_last_name
string
beneficiary_country
string
beneficiary_city
string
beneficiary_street
string
beneficiary_address
string
beneficiary_region
string
beneficiary_postalcode
string
beneficiary_bank
string
beneficiary_phone
string
beneficiary_email
string format: email
beneficiary_account_name
string
swift_code
string
corresponding_bank
string
corresponding_iban
string
corresponding_swift_code
string
corresponding_bank_country
string
corresponding_bank_address
string
account_number_compass
string
reference_code
string
key
additional properties
any
id
required
integer

Успешный ответ

Media typeapplication/json
object
success
required
boolean
status
required
integer
key
additional properties
any
Example
{
"success": true,
"status": 200
}

Ошибка авторизации, валидации или бизнес-правила

Media typeapplication/json
object
success
required
boolean
status
required
integer
errors
required
One of:
Array<object>
object
code
string
kind
string
nullable
expiration
string
nullable
session
string
nullable
key
additional properties
any
key
additional properties
any
Example
{
"success": false,
"status": 403
}