Add Organization
Nested custom-field value policy
When the request contains linked parent and child custom fields, use invalid_linked_custom_field_value_policy to control what happens when a child value is hidden by, or does not match, its effective parent value.
| Value | Behaviour |
|---|---|
keep | Preserves invalid child values. This is the default when the property is omitted. |
clear | Stores invalid non-file child values as null. File values are always retained. |
The operation completes successfully under either policy. A child-only update is evaluated against the parent value already stored on the record. A parent update also re-evaluates its descendants.
JSON example
{
"invalid_linked_custom_field_value_policy": "clear",
"custom_fields": [
{ "id": 12, "value": "EMEA" },
{ "id": 13, "value": "Germany" }
]
}Custom-field request IDs are the public IDs returned as id by GET /v1/custom-field. Use that endpoint to discover each child field's dependency, including the parent field's public parent_field_id, the visible_when values that make the child visible, and any allowed_child_options for dropdown or multiselect child fields.
The response envelope and entity response fields are unchanged; only the resulting child value may be retained or returned as null according to the selected policy.
Create a new organization.
Request
Body
- name
string>= 1 characters (required)
- website
string>= 1 characters
- upsert
booleanOptional. Default: false. Set to true to create a new organization or enrich an existing matching organization.
- match_by
Array[string] or stringOptional. Used only when upsert is true. Accepts an array of strings or a comma-separated string. Allowed values: website, linkedin_url, name. If omitted, all allowed values are used. Matching uses OR logic.
Upsert details
Use upsert when you want ATZ CRM to create an organization if no match exists, or enrich an existing matching organization if one is found.
- If
upsertis omitted or set tofalse, ATZ CRM creates a new organization. - If
upsertistrue, ATZ CRM searches using the selectedmatch_byfields. - If a match is found, only empty fields on the existing organization are filled from the request. Existing non-empty fields are not overwritten.
- If no match is found, ATZ CRM creates a new organization.
Allowed match_by values:
website,linkedin_url,name.Default matching: If
upsertistrueandmatch_byis not provided, ATZ CRM useswebsite,linkedin_url, andname.Matching works like an OR condition. If any one selected field matches an existing organization, that organization can be updated.
Example:
{ "upsert": true, "match_by": ["website"], "name": "Acme Corp", "website": "https://www.acme.com", "location": "New York" }- If
- location
string>= 1 characters
- address
string>= 1 characters
- industry_id
integer - description
string>= 1 characters
- xing_url
string>= 1 characters
- linkedin_url
string>= 1 characters
- owner_id
integer(required)
- created_by
integer - tags
stringAllowed Comma-separated values:- [Java,Leadership]
- custom fields:
Array[object]For Example:
"id": 1,
"value": "textfeild" - invalid_linked_custom_field_value_policy
stringOptional. Allowed values:
keep,clear. Default:keep. Controls whether invalid linked child custom-field values are retained or cleared.
Response
201
Body
- id
numberExample: 28
- slug
stringExample: organization_d1d6d8323f07a6615f95
- name
stringExample: Anjali kotwani
- website
stringExample: google.com
- location
stringExample: indore
- Address
stringExample: pipariya
- tags
stringExample: [leader,java]
- industry
objectExample:
"id": 1,
"name": "it", - description
stringExample: Experienced software engineer with a focus on frontend development.
- profile_picture
stringExample: img.jpg
- owner
objectExample:
"id": 17" - created_at
string (ISO 8601 date)Example: 2015-05-15T00:00:00Z
- updated_at
string (ISO 8601 date)Example: 2015-05-15T00:00:00Z
- created_by
objectExample:
"id": 1 - updated_by
objectExample:
"id": 1 - socials
objectExample:
"linkedin": "anjalilinkedin.com",
"xing": "anjali.com" - custom fields:
objectExample:
"id": 1,
"field_name": "textfeild",
"field_type": "string",
"value": "anjali"
401
Body
- unauthorised
400
Body
- Unprocessable Entity
Response Example
{
"id": 6,
"slug": "organization_931819e6d2e065d355ab",
"name": "TEs contact ",
"website": "",
"location": "",
"address": "",
"tags": null,
"industry": null,
"description": "",
"profile_picture": "",
"owner": {
"id": 1
},
"created_at": "2024-05-24T20:06:58.000Z",
"updated_at": "2024-05-24T20:06:58.000Z",
"created_by": {
"id": 1
},
"updated_by": {
"id": 1
},
"socials": {
"linkedin": "",
"xing": ""
},
"custom_fields": [
{
"id": 1,
"field_name": "C Text asasa",
"field_type": "text",
"value": "Some custom value"
},
{
"id": 2,
"field_name": "C Date",
"field_type": "date",
"value": null
}
]
}