View Source ActiveCampaign.CustomObject.Schema (active_campaign v0.2.4)
Documentation for ActiveCampaign.CustomObject.Schema
.
Link to this section Summary
Functions
Create a schema
Create a public schema
Create a public schema
Delete a schema
Delete a field
Retrieve a schema
List all schemas
Update a schema
Link to this section Functions
Create a schema
iex(nex@2475ffae5951)29> ActiveCampaign.CustomObject.Schema.create %{slug: "disorder-relationship", fields: [%{id: "disorder", slug: "disorder", type: "text", labels: %{singular: "Disorder", plural: "Disorders"}}, %{id: "relationship", slug: "relationship", type: "dropdown", options: [%{id: "patient", value: "patient"}, %{id: "caregiver", value: "caregiver"}, %{id: "healthcare_provider", value: "healthcare_provider"}, %{id: "other", value: "other"}], labels: %{singular: "Relationship", plural: "Relationships"}}], labels: %{singular: "Disorder Relationship", plural: "Disorder Relationships"}, relationships: [%{id: "primary-contact", namespace: "contacts", hasMany: false, labels: %{singular: "Contact Disorder Relationship", plural: "Contact Disorder Relationships"}}]} {:ok, %{ "schema" => %{
"createdTimestamp" => "2022-12-05T22:11:23.493594210Z",
"fields" => [
%{
"id" => "disorder",
"inherited" => false,
"labels" => %{"plural" => "Disorders", "singular" => "Disorder"},
"required" => false,
"type" => "text"
},
%{
"id" => "relationship",
"inherited" => false,
"labels" => %{
"plural" => "Relationships",
"singular" => "Relationship"
},
"options" => [
%{
"id" => "c6ef017a-4f03-4cf0-a918-d397a1be5a50",
"value" => "patient"
},
%{
"id" => "a3392140-824a-47c1-9164-bf85f3d30386",
"value" => "caregiver"
},
%{
"id" => "39d418cd-7553-4b46-b769-ad9ce1e5f0cd",
"value" => "healthcare_provider"
},
%{"id" => "300c3732-13dd-4d00-989a-f2670c950da6", "value" => "other"}
],
"required" => false,
"type" => "dropdown"
}
],
"icons" => %{
"default" => "https://d226aj4ao1t61q.cloudfront.net/n9mayqo2d_customobject.png"
},
"id" => "76a5a396-2705-48b4-9f8b-e50c11d6919a",
"labels" => %{
"plural" => "Disorder Relationships",
"singular" => "Disorder Relationship"
},
"relationships" => [
%{
"hasMany" => false,
"id" => "primary-contact",
"inherited" => false,
"labels" => %{
"plural" => "Contact Disorder Relationships",
"singular" => "Contact Disorder Relationship"
},
"namespace" => "contacts"
}
],
"slug" => "disorder-relationship",
"updatedTimestamp" => "2022-12-05T22:11:23.493594210Z",
"visibility" => "private"
} }}
Create a public schema
Create a public schema
Delete a schema
Delete a field
Retrieve a schema
List all schemas
Update a schema