Update a resource
curl --request PATCH \
--url https://api.venezuelateayuda.com/v1/resources/{resource_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"region": "<string>",
"city": "<string>",
"address": "<string>",
"name": "<string>",
"description": "<string>",
"links": [
{
"label": "<string>",
"value": "<string>"
}
]
}
'import requests
url = "https://api.venezuelateayuda.com/v1/resources/{resource_id}"
payload = {
"region": "<string>",
"city": "<string>",
"address": "<string>",
"name": "<string>",
"description": "<string>",
"links": [
{
"label": "<string>",
"value": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
region: '<string>',
city: '<string>',
address: '<string>',
name: '<string>',
description: '<string>',
links: [{label: '<string>', value: '<string>'}]
})
};
fetch('https://api.venezuelateayuda.com/v1/resources/{resource_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.venezuelateayuda.com/v1/resources/{resource_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'region' => '<string>',
'city' => '<string>',
'address' => '<string>',
'name' => '<string>',
'description' => '<string>',
'links' => [
[
'label' => '<string>',
'value' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.venezuelateayuda.com/v1/resources/{resource_id}"
payload := strings.NewReader("{\n \"region\": \"<string>\",\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"links\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.venezuelateayuda.com/v1/resources/{resource_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"region\": \"<string>\",\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"links\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venezuelateayuda.com/v1/resources/{resource_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"region\": \"<string>\",\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"links\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"country": {
"code": "VE",
"label": "<string>"
},
"region": "<string>",
"city": "<string>",
"address": "<string>",
"type": {
"handle": "website",
"label": "<string>"
},
"name": "<string>",
"description": "<string>",
"links": [
{
"type": {
"handle": "phone",
"label": "<string>"
},
"label": "<string>",
"value": "<string>",
"href": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "Person not found."
}{
"error": "Person not found."
}{
"error": "Person not found."
}{
"error": "Person not found."
}{
"error": "Person not found."
}{
"error": "Person not found."
}{
"errors": {
"first_name": [
"First name is required."
]
}
}{
"error": "Person not found."
}{
"error": "Backend is temporarily unavailable. Try again shortly."
}Resources
Update a resource
PATCH
/
resources
/
{resource_id}
Update a resource
curl --request PATCH \
--url https://api.venezuelateayuda.com/v1/resources/{resource_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"region": "<string>",
"city": "<string>",
"address": "<string>",
"name": "<string>",
"description": "<string>",
"links": [
{
"label": "<string>",
"value": "<string>"
}
]
}
'import requests
url = "https://api.venezuelateayuda.com/v1/resources/{resource_id}"
payload = {
"region": "<string>",
"city": "<string>",
"address": "<string>",
"name": "<string>",
"description": "<string>",
"links": [
{
"label": "<string>",
"value": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
region: '<string>',
city: '<string>',
address: '<string>',
name: '<string>',
description: '<string>',
links: [{label: '<string>', value: '<string>'}]
})
};
fetch('https://api.venezuelateayuda.com/v1/resources/{resource_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.venezuelateayuda.com/v1/resources/{resource_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'region' => '<string>',
'city' => '<string>',
'address' => '<string>',
'name' => '<string>',
'description' => '<string>',
'links' => [
[
'label' => '<string>',
'value' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.venezuelateayuda.com/v1/resources/{resource_id}"
payload := strings.NewReader("{\n \"region\": \"<string>\",\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"links\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.venezuelateayuda.com/v1/resources/{resource_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"region\": \"<string>\",\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"links\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venezuelateayuda.com/v1/resources/{resource_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"region\": \"<string>\",\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"links\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"country": {
"code": "VE",
"label": "<string>"
},
"region": "<string>",
"city": "<string>",
"address": "<string>",
"type": {
"handle": "website",
"label": "<string>"
},
"name": "<string>",
"description": "<string>",
"links": [
{
"type": {
"handle": "phone",
"label": "<string>"
},
"label": "<string>",
"value": "<string>",
"href": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "Person not found."
}{
"error": "Person not found."
}{
"error": "Person not found."
}{
"error": "Person not found."
}{
"error": "Person not found."
}{
"error": "Person not found."
}{
"errors": {
"first_name": [
"First name is required."
]
}
}{
"error": "Person not found."
}{
"error": "Backend is temporarily unavailable. Try again shortly."
}Authorizations
Send the API key as Authorization: Bearer <api_key>.
Path Parameters
Body
application/json
Available options:
VE, XX Minimum string length:
1Minimum string length:
1Minimum string length:
1Available options:
website, organization, hospital, hotline, shelter, government, volunteer, other Minimum string length:
1Minimum string length:
1Show child attributes
Show child attributes
Response
Updated resource response.
Show child attributes
Show child attributes

