View Source ActiveCampaign.CustomObject.Record (active_campaign v0.2.4)
Documentation for ActiveCampaign.CustomObject.Record
.
Link to this section Summary
Functions
Create or update record
Delete a record by id
Delete a record by external ID
Get a record by id
Get a record by external id
List records by schema
Link to this section Functions
Create or update record
ActiveCampaign.CustomObject.Record.create "76a5a396-2705-48b4-9f8b-e50c11d6919a", %{externalId: "nexus_id_1", fields: [%{id: "disorder", value: "fingernailitis"}, %{id: "relationship", value: "healthcare_provider"}], relationships: %{"primary-contact" => [91025]}}
@spec delete(integer(), integer()) :: {:ok, map()} | {:error, any()}
@spec delete(integer(), integer()) :: {:ok, map()} | {:error, any()}
Delete a record by id
Delete a record by external ID
@spec get(integer(), integer()) :: {:ok, map()} | {:error, any()}
@spec get(integer(), integer()) :: {:ok, map()} | {:error, any()}
Get a record by id
Get a record by external id
List records by schema
iex(nex@2475ffae5951)27> ActiveCampaign.CustomObject.Record.list schema_id, %{"filters[relationships.primary-contact][eq]" => 91025} {:ok, %{ "meta" => %{"count" => 1, "limit" => 20, "offset" => 0, "total" => 1}, "records" => [
%{
"createdTimestamp" => "2022-12-05T21:38:15.471Z",
"fields" => [
%{"id" => "disorder", "value" => "orange kneecaps"},
%{"id" => "relationship", "value" => "caretaker"}
],
"id" => "4b59392a-1585-418b-8433-36b50c49ce91",
"relationships" => %{"primary-contact" => ["91025"]},
"schemaId" => "ea76ca04-78e2-45ae-9e13-abf208d17dbb",
"updatedTimestamp" => "2022-12-05T21:38:15.471Z"
}
] }}