Custom properties
Update a custom property
Requires customPropertiesEnabled. Disabled organizations receive 403.
PATCH
/
custom-property
/
{id}
Update a custom property
curl --request PATCH \
--url https://{instance}/api/v2/custom-property/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"identifier": "<string>",
"isArchived": true,
"key": "<string>",
"name": "<string>",
"unitMeasureId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deliverableTypes": [
"order"
],
"options": [
"<string>"
],
"allowsAdHocOptions": true
}
'const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
identifier: '<string>',
isArchived: true,
key: '<string>',
name: '<string>',
unitMeasureId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
deliverableTypes: ['order'],
options: ['<string>'],
allowsAdHocOptions: true
})
};
fetch('https://{instance}/api/v2/custom-property/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{instance}/api/v2/custom-property/{id}"
payload = {
"identifier": "<string>",
"isArchived": True,
"key": "<string>",
"name": "<string>",
"unitMeasureId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deliverableTypes": ["order"],
"options": ["<string>"],
"allowsAdHocOptions": True
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"value": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isArchived": true,
"archivedAt": "2023-11-07T05:31:56Z",
"identifier": "<string>",
"key": "<string>",
"name": "<string>",
"dataType": "number",
"unitMeasureId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deliverableTypes": [
"order"
],
"options": [
"<string>"
],
"allowsAdHocOptions": true
}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}Authorizations
Organization-scoped API key. Create one in the BuildingSwell app under Organization settings, API keys.
Path Parameters
Record id.
Body
application/json
Immutable storage key, unique case-insensitively even across archived definitions.
Required string length:
1 - 64Pattern:
^[A-Za-z][A-Za-z0-9]*$Minimum string length:
1Available options:
number, text, boolean, single_select, multi_select Only number properties can have a unit.
Currently only ["order"] is supported; cannot be empty.
Available options:
order Select types only. Trimmed strings, unique case-insensitively; array position is display order.
Minimum string length:
1Select types only. Append unknown options on value writes when true.
Response
Successful response.
Show child attributes
Show child attributes
⌘I
Update a custom property
curl --request PATCH \
--url https://{instance}/api/v2/custom-property/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"identifier": "<string>",
"isArchived": true,
"key": "<string>",
"name": "<string>",
"unitMeasureId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deliverableTypes": [
"order"
],
"options": [
"<string>"
],
"allowsAdHocOptions": true
}
'const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
identifier: '<string>',
isArchived: true,
key: '<string>',
name: '<string>',
unitMeasureId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
deliverableTypes: ['order'],
options: ['<string>'],
allowsAdHocOptions: true
})
};
fetch('https://{instance}/api/v2/custom-property/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{instance}/api/v2/custom-property/{id}"
payload = {
"identifier": "<string>",
"isArchived": True,
"key": "<string>",
"name": "<string>",
"unitMeasureId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deliverableTypes": ["order"],
"options": ["<string>"],
"allowsAdHocOptions": True
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"value": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isArchived": true,
"archivedAt": "2023-11-07T05:31:56Z",
"identifier": "<string>",
"key": "<string>",
"name": "<string>",
"dataType": "number",
"unitMeasureId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deliverableTypes": [
"order"
],
"options": [
"<string>"
],
"allowsAdHocOptions": true
}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}