How to add Custom Properties to Organization.
Introduction
This article explains how to add custom properties to Organizations using the API. Understanding this process will help you extend Organization data with custom fields to support your business requirements and integrate with external systems.
In this article:
Prerequisites
Before adding custom properties to Organizations, ensure that:
- You have custom property templates defined with ObjectType "Organization"
- You have the Organization ID for the target Organization
- You have a valid Bearer token for authorization
- You have your platform URL for the Referer header
- You know the available template IDs and their valid values
API endpoint details
Method: POST
URL:
https://rethink-back-api-prod.azurewebsites.net/api/v1/customproperties/:organizationId
-
organizationId: The ID of the Organization you would like to add custom properties for
-
Referer: Your platform URL -
Authorization: Bearer token
204 No Content - No response body will be returned upon successful request
Request structure
The request body should be a JSON object containing:
- OrganizationId: The Organization ID
- ObjectType: "Organization" (required)
- CustomProperties: Array of custom property objects
Each custom property object includes:
- CustomPropertiesTemplateId: The template ID for the custom property
- Value: The value for the custom property (must match available options defined by the template)
Important requirements
When adding custom properties to Organizations, ensure the following:
ObjectType
field is required in all requests.
CustomPropertiesTemplateId must
match an available template for this Organization.
Value must be in the available
options defined by the template. Not all templates allow free-form text;
some require selecting from predefined options.
Example request
Scenario: You want to add custom property values for an
Organization with ID
652482A2-B28B-4009-8338-8879E8F0C766. You're
adding a value for a "Test List" property template and another custom property.
{ "OrganizationId": "652482A2-B28B-4009-8338-8879E8F0C766", "ObjectType": "Organization", "CustomProperties": [ { "CustomPropertiesTemplateId": "0AB1535A-146D-4191-9A85-03F9777FE74A", "Value": "Item1" }, { "CustomPropertiesTemplateId": "{{some other template id}}", "Value": "{{value}}" } ] }
In this example:
- The first custom property uses template ID
0AB1535A-146D-4191-9A85-03F9777FE74Awith value "Item1" - The second custom property uses a different template ID with its corresponding value
- Both values must be valid according to their respective template definitions
Summary
To add custom properties to Organizations, send a POST request to the customproperties API endpoint with the Organization ID, ObjectType set to "Organization", and an array of custom property objects. Each custom property requires a valid CustomPropertiesTemplateId that matches an available template for the Organization, and a Value that conforms to the options defined by that template. The API returns a 204 No Content response upon success with no response body. Ensure you have custom property templates defined with ObjectType "Organization" and know the valid values for each template before making requests.
Was this article helpful?
Articles in this section
- Reporting API v1 - overview
- Reporting API v2 - overview
- Reporting API v1/v2 - requesting access
- Reporting API v1 - data model
- Reporting API v1 - how to map your invoice data
- Reporting API v1 - detailed invoice line items
- Reporting API v2 - Invoice Taxes
- Reporting API v1 - how to identify organizations in your sales channel
- Reporting API v1 - currencies within the invoices
- Reporting API v1 - preview invoices in status 'New'
Add comment
Please sign in to leave a comment.