Update a deposit
Updates the deposit with the given ID.
curl --request POST \
--url https://api.yorlet.com/v1/deposits/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 1,
"assignee": "<string>",
"description": "<string>",
"handled_externally": true,
"metadata": {},
"scheme": {
"certificate": "<string>",
"registration_number": "<string>"
}
}
'import requests
url = "https://api.yorlet.com/v1/deposits/{id}"
payload = {
"amount": 1,
"assignee": "<string>",
"description": "<string>",
"handled_externally": True,
"metadata": {},
"scheme": {
"certificate": "<string>",
"registration_number": "<string>"
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 1,
assignee: '<string>',
description: '<string>',
handled_externally: true,
metadata: {},
scheme: {certificate: '<string>', registration_number: '<string>'}
})
};
fetch('https://api.yorlet.com/v1/deposits/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.yorlet.com/v1/deposits/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 1,
'assignee' => '<string>',
'description' => '<string>',
'handled_externally' => true,
'metadata' => [
],
'scheme' => [
'certificate' => '<string>',
'registration_number' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.yorlet.com/v1/deposits/{id}"
payload := strings.NewReader("{\n \"amount\": 1,\n \"assignee\": \"<string>\",\n \"description\": \"<string>\",\n \"handled_externally\": true,\n \"metadata\": {},\n \"scheme\": {\n \"certificate\": \"<string>\",\n \"registration_number\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.yorlet.com/v1/deposits/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 1,\n \"assignee\": \"<string>\",\n \"description\": \"<string>\",\n \"handled_externally\": true,\n \"metadata\": {},\n \"scheme\": {\n \"certificate\": \"<string>\",\n \"registration_number\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yorlet.com/v1/deposits/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 1,\n \"assignee\": \"<string>\",\n \"description\": \"<string>\",\n \"handled_externally\": true,\n \"metadata\": {},\n \"scheme\": {\n \"certificate\": \"<string>\",\n \"registration_number\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created": 123,
"object": "deposit",
"amount": 123,
"automatic_deposit": {
"enabled": true,
"last_error": {
"type": "<string>",
"message": "<string>"
},
"status": "<string>"
},
"application": "<string>",
"assignee": "<string>",
"certificate": "<string>",
"country": "<string>",
"currency": "<string>",
"customer": "<string>",
"description": "<string>",
"requirements": {
"additional": [
"<string>"
],
"currently_due": [
"<string>"
],
"minimum": [
"<string>"
]
},
"returned_at": 123,
"scheme": {
"certificate": "<string>",
"provider": "dps",
"registration_deadline": 123,
"registration_number": "<string>",
"type": "custodial"
},
"status": "pending",
"transferred_at": 123,
"unit": "<string>",
"account": "<string>",
"deleted": false,
"amount_refunded": 0,
"handled_externally": false,
"metadata": {},
"requires_external_transfer": false,
"returned": false,
"transferred": false
}Authorizations
API Key authentication. Use "Bearer YOUR_API_KEY".
Path Parameters
The id identifier.
Body
The amount of the deposit.
x >= 0An arbitrary string attached to the object. Often useful for displaying to users.
Whether the deposit is handled externally or not. Usually this means the landlord or a third party has registered the deposit and will handle it.
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Show child attributes
Show child attributes
A hash containing details of the deposit scheme.
Show child attributes
Show child attributes
Response
The updated deposit. Otherwise, this call throws an error.
Unique identifier for the object.
Time at which the object was created. Measured in seconds since the Unix epoch.
deposit The amount of the deposit, in the smallest currency unit.
Details of automatic deposit registration with a scheme provider.
Show child attributes
Show child attributes
The application the deposit is associated with.
The ID of the user the deposit is assigned to.
The certificate identifier for the deposit.
The ISO 3166-1 alpha-2 country code where the deposit is held.
The three-letter ISO currency code of the deposit.
The customer the deposit is associated with.
An arbitrary description attached to the deposit.
Requirements outstanding to complete the deposit.
Show child attributes
Show child attributes
The time at which the deposit was returned to the customer.
Details of the deposit scheme the deposit is registered with.
Show child attributes
Show child attributes
The status of the deposit.
pending, active, disputed, pending_return, returned, null The time at which the deposit was transferred to the owner.
The ID of the unit the deposit is associated with.
The account that the object belongs to. Only returned if the request is made with a valid Yorlet-Context header.
Only returned if the object has been deleted.
The amount of the deposit, in the smallest currency unit, that has been refunded to the customer.
Whether the deposit is handled externally (e.g. by the landlord or a third party).
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Show child attributes
Show child attributes
Whether the deposit must be transferred to a third-party scheme to be compliant.
Whether the deposit has been returned to the customer.
Whether the deposit has been transferred to the owner.
Was this page helpful?
curl --request POST \
--url https://api.yorlet.com/v1/deposits/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 1,
"assignee": "<string>",
"description": "<string>",
"handled_externally": true,
"metadata": {},
"scheme": {
"certificate": "<string>",
"registration_number": "<string>"
}
}
'import requests
url = "https://api.yorlet.com/v1/deposits/{id}"
payload = {
"amount": 1,
"assignee": "<string>",
"description": "<string>",
"handled_externally": True,
"metadata": {},
"scheme": {
"certificate": "<string>",
"registration_number": "<string>"
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 1,
assignee: '<string>',
description: '<string>',
handled_externally: true,
metadata: {},
scheme: {certificate: '<string>', registration_number: '<string>'}
})
};
fetch('https://api.yorlet.com/v1/deposits/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.yorlet.com/v1/deposits/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 1,
'assignee' => '<string>',
'description' => '<string>',
'handled_externally' => true,
'metadata' => [
],
'scheme' => [
'certificate' => '<string>',
'registration_number' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.yorlet.com/v1/deposits/{id}"
payload := strings.NewReader("{\n \"amount\": 1,\n \"assignee\": \"<string>\",\n \"description\": \"<string>\",\n \"handled_externally\": true,\n \"metadata\": {},\n \"scheme\": {\n \"certificate\": \"<string>\",\n \"registration_number\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.yorlet.com/v1/deposits/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 1,\n \"assignee\": \"<string>\",\n \"description\": \"<string>\",\n \"handled_externally\": true,\n \"metadata\": {},\n \"scheme\": {\n \"certificate\": \"<string>\",\n \"registration_number\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yorlet.com/v1/deposits/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 1,\n \"assignee\": \"<string>\",\n \"description\": \"<string>\",\n \"handled_externally\": true,\n \"metadata\": {},\n \"scheme\": {\n \"certificate\": \"<string>\",\n \"registration_number\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created": 123,
"object": "deposit",
"amount": 123,
"automatic_deposit": {
"enabled": true,
"last_error": {
"type": "<string>",
"message": "<string>"
},
"status": "<string>"
},
"application": "<string>",
"assignee": "<string>",
"certificate": "<string>",
"country": "<string>",
"currency": "<string>",
"customer": "<string>",
"description": "<string>",
"requirements": {
"additional": [
"<string>"
],
"currently_due": [
"<string>"
],
"minimum": [
"<string>"
]
},
"returned_at": 123,
"scheme": {
"certificate": "<string>",
"provider": "dps",
"registration_deadline": 123,
"registration_number": "<string>",
"type": "custodial"
},
"status": "pending",
"transferred_at": 123,
"unit": "<string>",
"account": "<string>",
"deleted": false,
"amount_refunded": 0,
"handled_externally": false,
"metadata": {},
"requires_external_transfer": false,
"returned": false,
"transferred": false
}