Update Property
Update mutable fields on a property. field_key and data_type cannot be changed after creation.
Endpoint
PATCH /properties/:id
Returns: 200 OK
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The property ID |
Body Parameters
All fields optional. Only the fields you provide are updated.
| Parameter | Type | Description |
|---|---|---|
display_name | string | New display name. Max 255 characters. |
description | string | null | New description. Set to null to clear. Max 500 characters. |
fallback_value | string | null | New fallback for merge tags. Set to null to clear. Max 2000 characters. |
Immutable fields
field_key and data_type are fixed at creation. To change them, delete the property and create a new one.
Response
Returns the updated property — see Create Property for the shape.
Examples
- cURL
- JavaScript
- Python
- C#
- PHP
curl -X PATCH "https://api.arsel.sa/v1/properties/01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a" \
-H "Authorization: Bearer be_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"display_name": "Lifetime Revenue (USD)"
}'
const propertyId = "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a";
const response = await fetch(
`https://api.arsel.sa/v1/properties/${propertyId}`,
{
method: "PATCH",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer be_your_api_key",
},
body: JSON.stringify({ display_name: "Lifetime Revenue (USD)" }),
},
);
console.log(await response.json());
import requests
property_id = "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a"
response = requests.patch(
f"https://api.arsel.sa/v1/properties/{property_id}",
headers={
"Content-Type": "application/json",
"Authorization": "Bearer be_your_api_key",
},
json={"display_name": "Lifetime Revenue (USD)"},
)
print(response.json())
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer be_your_api_key");
var propertyId = "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a";
var payload = new { display_name = "Lifetime Revenue (USD)" };
var json = System.Text.Json.JsonSerializer.Serialize(payload);
var content = new StringContent(json, System.Text.Encoding.UTF8, "application/json");
var request = new HttpRequestMessage(HttpMethod.Patch, $"https://api.arsel.sa/v1/properties/{propertyId}")
{
Content = content
};
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
<?php
$propertyId = "01957e3a-4b5c-7d8e-9f0a-1b2c3d4e5f6a";
$ch = curl_init("https://api.arsel.sa/v1/properties/{$propertyId}");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"Authorization: Bearer be_your_api_key"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
"display_name" => "Lifetime Revenue (USD)"
]));
$response = curl_exec($ch);
echo $response;
curl_close($ch);
Error Responses
- 404 Not Found
{
"status_code": 404,
"name": "not_found",
"message": "Property with id \"...\" not found"
}