# Objects # Contacts ## Create object `client.Prism.Objects.Contacts.New(ctx, params) (*PrismObjectContactNewResponse, error)` **post** `/v2/prism/{teamId}/contact` Create object ### Parameters - `params PrismObjectContactNewParams` - `TeamID param.Field[string]` Path param - `PrismObjectProperties param.Field[PrismObjectProperties]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectContactNewResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) contact, err := client.Prism.Objects.Contacts.New(context.TODO(), micro.PrismObjectContactNewParams{ PrismObjectProperties: micro.PrismObjectPropertiesParam{ }, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", contact.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## List records of an object type `client.Prism.Objects.Contacts.List(ctx, params) (*PrismObjectContactListResponse, error)` **get** `/v2/prism/{teamId}/contact` Convenience list endpoint. Equivalent to `POST /v2/prism/{teamId}/{objectType}/query` with an empty body, plus query-string sugar for the common cases. Any unrecognized query parameter is interpreted as an equality filter on a property of that name; pass arrays for `in`. Values are received as strings, so non-string property filters via this endpoint may not work — use the `query` endpoint for typed comparisons or anything beyond simple equality. ### Parameters - `params PrismObjectContactListParams` - `TeamID param.Field[string]` Path param - `Cursor param.Field[string]` Query param: Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged to fetch the next page. - `Deleted param.Field[bool]` Query param: Include soft-deleted records. Pass the literal string `true`. - `IncludeTotal param.Field[bool]` Query param: When set to `true`, the response includes a `total` field with the unpaginated row count. Costs an extra pass; prefer `GET .../count` for the unfiltered total. - `Limit param.Field[int64]` Query param: Maximum number of rows to return. Capped server-side at 50. - `ListID param.Field[string]` Query param: Scope properties to a specific list/app. - `Select param.Field[string]` Query param: Comma-separated property slugs to return. Use dot notation for relationships. `id` is always returned at the top level. Defaults to all properties. - `Sort param.Field[string]` Query param: Comma-separated list of slugs. Prefix with `-` for descending. Example: `sort=-updated_at,name`. ### Returns - `type PrismObjectContactListResponse struct{…}` - `Data []PrismObjectContactListResponseData` - `ID string` - `IsUserObject bool` - `Properties map[string, unknown]` Selected property values keyed by property slug. For select/multiselect properties, option slugs are returned. For reference properties, values are nested `{ id, properties }` objects. - `Source string` - `HasMore bool` Accurate end-of-data signal — false on the last page, never forces clients to overshoot. - `NextCursor string` - `Total int64` Populated only when `?include_total=true` was passed. ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) contacts, err := client.Prism.Objects.Contacts.List(context.TODO(), micro.PrismObjectContactListParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", contacts.Data) } ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "is_user_object": true, "properties": { "foo": "bar" }, "source": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "has_more": true, "next_cursor": "next_cursor", "total": 0 } ``` ## Get object `client.Prism.Objects.Contacts.Get(ctx, contactID, params) (*PrismObjectContactGetResponse, error)` **get** `/v2/prism/{teamId}/contact/{contactId}` Get object ### Parameters - `contactID string` - `params PrismObjectContactGetParams` - `TeamID param.Field[string]` Path param - `Select param.Field[string]` Query param: Comma-separated property slugs to return. Use dot notation for relationships. `id` is always returned at the top level. Defaults to all properties. ### Returns - `type PrismObjectContactGetResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) contact, err := client.Prism.Objects.Contacts.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectContactGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", contact.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Patch object `client.Prism.Objects.Contacts.Update(ctx, contactID, params) (*PrismObjectContactUpdateResponse, error)` **patch** `/v2/prism/{teamId}/contact/{contactId}` Patch object ### Parameters - `contactID string` - `params PrismObjectContactUpdateParams` - `TeamID param.Field[string]` Path param - `PrismObjectProperties param.Field[PrismObjectProperties]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. - `IfMatch param.Field[string]` Header param: Optimistic concurrency. Pass back the `etag` header from a previous GET of this record; the write only proceeds if the record hasn't changed since. Mismatch → 412 `precondition_failed`. Use `*` to require the record exists (any ETag accepted). ### Returns - `type PrismObjectContactUpdateResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) contact, err := client.Prism.Objects.Contacts.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectContactUpdateParams{ PrismObjectProperties: micro.PrismObjectPropertiesParam{ }, }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", contact.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Delete object `client.Prism.Objects.Contacts.Delete(ctx, contactID, params) error` **delete** `/v2/prism/{teamId}/contact/{contactId}` Delete object ### Parameters - `contactID string` - `params PrismObjectContactDeleteParams` - `TeamID param.Field[string]` Path param - `IfMatch param.Field[string]` Header param: Optimistic concurrency. Pass back the `etag` header from a previous GET of this record; the write only proceeds if the record hasn't changed since. Mismatch → 412 `precondition_failed`. Use `*` to require the record exists (any ETag accepted). ### Example ```go package main import ( "context" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) err := client.Prism.Objects.Contacts.Delete( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectContactDeleteParams{ }, ) if err != nil { panic(err.Error()) } } ``` ## Query `client.Prism.Objects.Contacts.Query(ctx, params) (*PrismObjectContactQueryResponse, error)` **post** `/v2/prism/{teamId}/contact/query` Query ### Parameters - `params PrismObjectContactQueryParams` - `TeamID param.Field[string]` Path param - `Query param.Field[PrismObjectContactQueryParamsQuery]` Body param - `Select []string` Property slugs to select. Use dot notation for relationships (e.g. attendee.contact.first_name). `id` is always returned at the top level of each row and does not need to be selected. - `Combinator PrismObjectContactQueryParamsQueryCombinator` Logical operator for combining filters - `const PrismObjectContactQueryParamsQueryCombinatorAnd PrismObjectContactQueryParamsQueryCombinator = "AND"` - `const PrismObjectContactQueryParamsQueryCombinatorOr PrismObjectContactQueryParamsQueryCombinator = "OR"` - `Cursor string` Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged to fetch the next page. When set, `page` and `limit` are derived from the cursor and any explicit values are ignored. - `Filter []map[string, PrismObjectContactQueryParamsQueryFilter]` Filters as [{ slug: { operator: value } }]. For select/multiselect properties, values may be option slugs or option UUIDs. - `type PrismObjectContactQueryParamsQueryFilterPrismQueryFilterEq struct{…}` - `Equals PrismObjectContactQueryParamsQueryFilterPrismQueryFilterEqUnion` - `UnionString` - `UnionBool` - `type PrismObjectContactQueryParamsQueryFilterPrismQueryFilterNe struct{…}` - `NotEquals PrismObjectContactQueryParamsQueryFilterPrismQueryFilterNeUnion` - `UnionString` - `UnionBool` - `type PrismObjectContactQueryParamsQueryFilterPrismQueryFilterLt struct{…}` - `Less string` - `type PrismObjectContactQueryParamsQueryFilterPrismQueryFilterGt struct{…}` - `Greater string` - `type PrismObjectContactQueryParamsQueryFilterPrismQueryFilterLte struct{…}` - `LessOrEquals string` - `type PrismObjectContactQueryParamsQueryFilterPrismQueryFilterGte struct{…}` - `GreaterOrEquals string` - `type PrismObjectContactQueryParamsQueryFilterContains struct{…}` - `Contains PrismObjectContactQueryParamsQueryFilterContainsContainsUnion` - `UnionString` - `UnionBool` - `type PrismObjectContactQueryParamsQueryFilterContainsContainsArray []string` - `type PrismObjectContactQueryParamsQueryFilterBeginsWith struct{…}` - `BeginsWith string` - `type PrismObjectContactQueryParamsQueryFilterEndsWith struct{…}` - `EndsWith string` - `type PrismObjectContactQueryParamsQueryFilterNotContains struct{…}` - `NotContains string` - `type PrismObjectContactQueryParamsQueryFilterExists struct{…}` - `Exists bool` - `type PrismObjectContactQueryParamsQueryFilterNotExists struct{…}` - `NotExists bool` - `type PrismObjectContactQueryParamsQueryFilterIsNull struct{…}` - `IsNull PrismObjectContactQueryParamsQueryFilterIsNullIsNullUnion` - `UnionString` - `UnionBool` - `type PrismObjectContactQueryParamsQueryFilterIsNullIsNullArray []string` - `type PrismObjectContactQueryParamsQueryFilterIsNotNull struct{…}` - `IsNotNull PrismObjectContactQueryParamsQueryFilterIsNotNullIsNotNullUnion` - `UnionString` - `UnionBool` - `type PrismObjectContactQueryParamsQueryFilterIsNotNullIsNotNullArray []string` - `type PrismObjectContactQueryParamsQueryFilterBetween struct{…}` - `Between PrismObjectContactQueryParamsQueryFilterBetweenBetweenUnion` - `UnionString` - `UnionBool` - `type PrismObjectContactQueryParamsQueryFilterBetweenBetweenArray []string` - `type PrismObjectContactQueryParamsQueryFilterIn struct{…}` - `In []string` - `type PrismObjectContactQueryParamsQueryFilterNotIn struct{…}` - `NotIn []string` - `Limit int64` Maximum number of rows to return. Capped server-side at 50; requests above the cap are rejected. - `ListID string` - `Page int64` Page number (1-based). Prefer `cursor`. Page-number pagination drifts under concurrent writes; use it only for one-shot exports. - `Sort []map[string, PrismObjectContactQueryParamsQuerySort]` Sort order as [{ slug: direction }]. Array order determines sort priority - `const PrismObjectContactQueryParamsQuerySortAsc PrismObjectContactQueryParamsQuerySort = "asc"` - `const PrismObjectContactQueryParamsQuerySortDesc PrismObjectContactQueryParamsQuerySort = "desc"` - `ID param.Field[PrismObjectContactQueryParamsIDUnion]` Body param - `UnionString` - `type PrismObjectContactQueryParamsIDArray []string` - `Boxes param.Field[[]string]` Body param - `Cursor param.Field[string]` Body param: Alternative location for the opaque cursor (sibling of `query`). Use whichever feels more natural; if both are present, `query.cursor` wins. - `Deleted param.Field[bool]` Body param - `IncludeTotal param.Field[bool]` Body param: When true, the response includes a `total` field with the unpaginated row count. Costs an additional pass over the result set — for unfiltered totals prefer `GET /v2/prism/{teamId}/{objectType}/count` instead. - `Sources param.Field[[]string]` Body param ### Returns - `type PrismObjectContactQueryResponse struct{…}` - `Data []PrismObjectContactQueryResponseData` - `ID string` - `IsUserObject bool` - `Properties map[string, unknown]` Selected property values keyed by property slug. For select/multiselect properties, option slugs are returned. For reference properties, values are nested `{ id, properties }` objects. - `Source string` - `HasMore bool` Accurate end-of-data signal. False when this page contains the last record; true only when at least one more record exists. (Implementation note: the server fetches one extra row internally to determine this — clients never need to overshoot to discover the end.) - `NextCursor string` Opaque cursor pointing at the next page. Pass it back unchanged in the request body (`cursor`) of the next call. Null when `has_more` is false. - `Total int64` Only populated when the request set `include_total: true`. Total number of records matching the query, ignoring pagination. Opt-in because it costs an additional pass over the result set. ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Contacts.Query(context.TODO(), micro.PrismObjectContactQueryParams{ Query: micro.F(micro.PrismObjectContactQueryParamsQuery{ Select: micro.F([]string{"string"}), }), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "is_user_object": true, "properties": { "foo": "bar" }, "source": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "has_more": true, "next_cursor": "next_cursor", "total": 0 } ``` ## Total record count for an object type `client.Prism.Objects.Contacts.Count(ctx, params) (*PrismObjectContactCountResponse, error)` **get** `/v2/prism/{teamId}/contact/count` Returns the total number of records of this object type that the caller can see. Avoids the page-overshoot anti-pattern — clients no longer need to keep paging until `has_more` flips false to discover the total. Currently does not apply query filters; for a filtered total, pass `include_total: true` in a POST `/query` body. ### Parameters - `params PrismObjectContactCountParams` - `TeamID param.Field[string]` Path param - `ListID param.Field[string]` Query param: Scope the count to a specific list/app. ### Returns - `type PrismObjectContactCountResponse struct{…}` - `Total int64` Number of records matching the access scope. ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Contacts.Count(context.TODO(), micro.PrismObjectContactCountParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Total) } ``` #### Response ```json { "total": 0 } ``` ## Find a record by property value `client.Prism.Objects.Contacts.Find(ctx, slug, value, params) (*PrismObjectContactFindResponse, error)` **get** `/v2/prism/{teamId}/contact/by/{slug}/{value}` Returns the single record whose property `{slug}` equals `{value}`. 404 if nothing matches; 409 if more than one record matches. ### Parameters - `slug string` - `value string` - `params PrismObjectContactFindParams` - `TeamID param.Field[string]` Path param - `ListID param.Field[string]` Query param: Scope the lookup to a specific list/app. ### Returns - `type PrismObjectContactFindResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Contacts.Find( context.TODO(), "slug", "value", micro.PrismObjectContactFindParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Upsert by property value `client.Prism.Objects.Contacts.Upsert(ctx, slug, value, params) (*PrismObjectContactUpsertResponse, error)` **put** `/v2/prism/{teamId}/contact/by/{slug}/{value}` Idempotent create-or-update keyed on `{slug}={value}`. If exactly one record matches, it is patched and 200 is returned. If none match, a new record is created (with the lookup property set if absent) and 201 is returned. If multiple records match, 409 is returned and you should patch by id instead. ### Parameters - `slug string` - `value string` - `params PrismObjectContactUpsertParams` - `TeamID param.Field[string]` Path param - `PrismObjectProperties param.Field[PrismObjectProperties]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectContactUpsertResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Contacts.Upsert( context.TODO(), "slug", "value", micro.PrismObjectContactUpsertParams{ PrismObjectProperties: micro.PrismObjectPropertiesParam{ }, }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Import objects `client.Prism.Objects.Contacts.BulkNew(ctx, params) (*PrismObjectContactBulkNewResponse, error)` **post** `/v2/prism/{teamId}/contact/import` Import multiple objects in batch. Properties are keyed by slug. Automatically routes based on size: small batches complete synchronously and return 200 with the final `ImportJob`; large batches start an async job, return 202 with `status: processing` and a `Location` header, and can be polled via `GET /v2/prism/{teamId}/imports/{jobId}`. ### Parameters - `params PrismObjectContactBulkNewParams` - `TeamID param.Field[string]` Path param - `Objects param.Field[[]PrismObjectProperties]` Body param: Array of objects to import with property values keyed by slug - `Default map[string, unknown]` Properties keyed by property slug. Values can be strings, numbers, booleans, arrays, or null. For select/multiselect properties, values may be option slugs or option UUIDs on write; option slugs are returned on read. - `List unknown` - `Options param.Field[PrismObjectContactBulkNewParamsOptions]` Body param - `CaseInsensitive bool` Whether deduplication should be case insensitive - `DedupeBy string` Property slug to deduplicate on - `ListID string` App/CRM ID for context (optional) - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectContactBulkNewResponse struct{…}` Status snapshot of an import job. Same shape used by the POST /import response and by GET /imports/{jobId}. - `JobID string` Null for sync imports (results inlined). Set for async imports. - `Status PrismObjectContactBulkNewResponseStatus` - `const PrismObjectContactBulkNewResponseStatusComplete PrismObjectContactBulkNewResponseStatus = "complete"` - `const PrismObjectContactBulkNewResponseStatusProcessing PrismObjectContactBulkNewResponseStatus = "processing"` - `const PrismObjectContactBulkNewResponseStatusFailed PrismObjectContactBulkNewResponseStatus = "failed"` - `Total int64` Total number of rows in the import. - `CreatedAt Time` - `Error PrismObjectContactBulkNewResponseError` Set when status=failed; describes the job-level failure (not per-row). - `Code string` - `Message string` - `ExpiresAt Time` - `Failed int64` - `Processed int64` Rows that have been attempted (succeeded + failed). - `Results []PrismObjectContactBulkNewResponseResult` Per-row outcomes. Always present for sync imports; populated for async imports once the job reaches `complete`. - `ID string` - `Created bool` - `Error PrismObjectContactBulkNewResponseResultsError` - `Code string` - `Message string` - `Existing bool` True if the row matched an existing record via the dedupe key. - `Succeeded int64` - `UpdatedAt Time` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Contacts.BulkNew(context.TODO(), micro.PrismObjectContactBulkNewParams{ Objects: micro.F([]micro.PrismObjectPropertiesParam{micro.PrismObjectPropertiesParam{ }}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.JobID) } ``` #### Response ```json { "job_id": "job_id", "status": "complete", "total": 0, "created_at": "2019-12-27T18:11:19.117Z", "error": { "code": "code", "message": "message" }, "expires_at": "2019-12-27T18:11:19.117Z", "failed": 0, "processed": 0, "results": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created": true, "error": { "code": "code", "message": "message" }, "existing": true } ], "succeeded": 0, "updated_at": "2019-12-27T18:11:19.117Z" } ``` ## Bulk update records (partial success) `client.Prism.Objects.Contacts.BulkUpdate(ctx, params) (*PrismObjectContactBulkUpdateResponse, error)` **post** `/v2/prism/{teamId}/contact/batch/update` Patch up to 100 records in a single call. Each item is attempted independently — failures don't abort the batch. Inspect `results[].status` per item. ### Parameters - `params PrismObjectContactBulkUpdateParams` - `TeamID param.Field[string]` Path param - `Items param.Field[[]PrismObjectContactBulkUpdateParamsItem]` Body param - `ID string` - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectContactBulkUpdateResponse struct{…}` Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed. - `Results []PrismObjectContactBulkUpdateResponseResult` - `ID string` Item ID, or null if the input was unparseable. - `Status PrismObjectContactBulkUpdateResponseResultsStatus` - `const PrismObjectContactBulkUpdateResponseResultsStatusOk PrismObjectContactBulkUpdateResponseResultsStatus = "ok"` - `const PrismObjectContactBulkUpdateResponseResultsStatusError PrismObjectContactBulkUpdateResponseResultsStatus = "error"` - `Error PrismObjectContactBulkUpdateResponseResultsError` - `Code string` - `Message string` - `Record PrismObjectContactBulkUpdateResponseResultsRecord` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` - `Summary PrismObjectContactBulkUpdateResponseSummary` - `Failed int64` - `Succeeded int64` - `Total int64` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Contacts.BulkUpdate(context.TODO(), micro.PrismObjectContactBulkUpdateParams{ Items: micro.F([]micro.PrismObjectContactBulkUpdateParamsItem{micro.PrismObjectContactBulkUpdateParamsItem{ ID: micro.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), }}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Results) } ``` #### Response ```json { "results": [ { "id": "id", "status": "ok", "error": { "code": "code", "message": "message" }, "record": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } } ], "summary": { "failed": 0, "succeeded": 0, "total": 0 } } ``` ## Bulk delete records (partial success) `client.Prism.Objects.Contacts.BulkDelete(ctx, params) (*PrismObjectContactBulkDeleteResponse, error)` **post** `/v2/prism/{teamId}/contact/batch/delete` Soft-delete up to 100 records in a single call. Same partial-success contract as batch/update. ### Parameters - `params PrismObjectContactBulkDeleteParams` - `TeamID param.Field[string]` Path param - `IDs param.Field[[]string]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectContactBulkDeleteResponse struct{…}` Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed. - `Results []PrismObjectContactBulkDeleteResponseResult` - `ID string` Item ID, or null if the input was unparseable. - `Status PrismObjectContactBulkDeleteResponseResultsStatus` - `const PrismObjectContactBulkDeleteResponseResultsStatusOk PrismObjectContactBulkDeleteResponseResultsStatus = "ok"` - `const PrismObjectContactBulkDeleteResponseResultsStatusError PrismObjectContactBulkDeleteResponseResultsStatus = "error"` - `Error PrismObjectContactBulkDeleteResponseResultsError` - `Code string` - `Message string` - `Record PrismObjectContactBulkDeleteResponseResultsRecord` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` - `Summary PrismObjectContactBulkDeleteResponseSummary` - `Failed int64` - `Succeeded int64` - `Total int64` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Contacts.BulkDelete(context.TODO(), micro.PrismObjectContactBulkDeleteParams{ IDs: micro.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Results) } ``` #### Response ```json { "results": [ { "id": "id", "status": "ok", "error": { "code": "code", "message": "message" }, "record": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } } ], "summary": { "failed": 0, "succeeded": 0, "total": 0 } } ``` ## Duplicate object `client.Prism.Objects.Contacts.Duplicate(ctx, contactID, params) (*PrismObjectContactDuplicateResponse, error)` **post** `/v2/prism/{teamId}/contact/{contactId}/duplicate` Duplicate object ### Parameters - `contactID string` - `params PrismObjectContactDuplicateParams` - `TeamID param.Field[string]` Path param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectContactDuplicateResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Contacts.Duplicate( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectContactDuplicateParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Restore object `client.Prism.Objects.Contacts.Restore(ctx, contactID, params) (*PrismObjectContactRestoreResponse, error)` **post** `/v2/prism/{teamId}/contact/{contactId}/restore` Restore object ### Parameters - `contactID string` - `params PrismObjectContactRestoreParams` - `TeamID param.Field[string]` Path param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectContactRestoreResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Contacts.Restore( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectContactRestoreParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Domain Types ### Contact - `type Contact struct{…}` - `Default map[string, unknown]` Properties keyed by property slug. Values can be strings, numbers, booleans, arrays, or null. For select/multiselect properties, values may be option slugs or option UUIDs on write; option slugs are returned on read. - `List unknown` # Organizations ## Create object `client.Prism.Objects.Organizations.New(ctx, params) (*PrismObjectOrganizationNewResponse, error)` **post** `/v2/prism/{teamId}/organization` Create object ### Parameters - `params PrismObjectOrganizationNewParams` - `TeamID param.Field[string]` Path param - `PrismObjectProperties param.Field[PrismObjectProperties]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectOrganizationNewResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) organization, err := client.Prism.Objects.Organizations.New(context.TODO(), micro.PrismObjectOrganizationNewParams{ PrismObjectProperties: micro.PrismObjectPropertiesParam{ }, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", organization.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## List records of an object type `client.Prism.Objects.Organizations.List(ctx, params) (*PrismObjectOrganizationListResponse, error)` **get** `/v2/prism/{teamId}/organization` Convenience list endpoint. Equivalent to `POST /v2/prism/{teamId}/{objectType}/query` with an empty body, plus query-string sugar for the common cases. Any unrecognized query parameter is interpreted as an equality filter on a property of that name; pass arrays for `in`. Values are received as strings, so non-string property filters via this endpoint may not work — use the `query` endpoint for typed comparisons or anything beyond simple equality. ### Parameters - `params PrismObjectOrganizationListParams` - `TeamID param.Field[string]` Path param - `Cursor param.Field[string]` Query param: Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged to fetch the next page. - `Deleted param.Field[bool]` Query param: Include soft-deleted records. Pass the literal string `true`. - `IncludeTotal param.Field[bool]` Query param: When set to `true`, the response includes a `total` field with the unpaginated row count. Costs an extra pass; prefer `GET .../count` for the unfiltered total. - `Limit param.Field[int64]` Query param: Maximum number of rows to return. Capped server-side at 50. - `ListID param.Field[string]` Query param: Scope properties to a specific list/app. - `Select param.Field[string]` Query param: Comma-separated property slugs to return. Use dot notation for relationships. `id` is always returned at the top level. Defaults to all properties. - `Sort param.Field[string]` Query param: Comma-separated list of slugs. Prefix with `-` for descending. Example: `sort=-updated_at,name`. ### Returns - `type PrismObjectOrganizationListResponse struct{…}` - `Data []PrismObjectOrganizationListResponseData` - `ID string` - `IsUserObject bool` - `Properties map[string, unknown]` Selected property values keyed by property slug. For select/multiselect properties, option slugs are returned. For reference properties, values are nested `{ id, properties }` objects. - `Source string` - `HasMore bool` Accurate end-of-data signal — false on the last page, never forces clients to overshoot. - `NextCursor string` - `Total int64` Populated only when `?include_total=true` was passed. ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) organizations, err := client.Prism.Objects.Organizations.List(context.TODO(), micro.PrismObjectOrganizationListParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", organizations.Data) } ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "is_user_object": true, "properties": { "foo": "bar" }, "source": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "has_more": true, "next_cursor": "next_cursor", "total": 0 } ``` ## Get object `client.Prism.Objects.Organizations.Get(ctx, organizationID, params) (*PrismObjectOrganizationGetResponse, error)` **get** `/v2/prism/{teamId}/organization/{organizationId}` Get object ### Parameters - `organizationID string` - `params PrismObjectOrganizationGetParams` - `TeamID param.Field[string]` Path param - `Select param.Field[string]` Query param: Comma-separated property slugs to return. Use dot notation for relationships. `id` is always returned at the top level. Defaults to all properties. ### Returns - `type PrismObjectOrganizationGetResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) organization, err := client.Prism.Objects.Organizations.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectOrganizationGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", organization.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Patch object `client.Prism.Objects.Organizations.Update(ctx, organizationID, params) (*PrismObjectOrganizationUpdateResponse, error)` **patch** `/v2/prism/{teamId}/organization/{organizationId}` Patch object ### Parameters - `organizationID string` - `params PrismObjectOrganizationUpdateParams` - `TeamID param.Field[string]` Path param - `PrismObjectProperties param.Field[PrismObjectProperties]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. - `IfMatch param.Field[string]` Header param: Optimistic concurrency. Pass back the `etag` header from a previous GET of this record; the write only proceeds if the record hasn't changed since. Mismatch → 412 `precondition_failed`. Use `*` to require the record exists (any ETag accepted). ### Returns - `type PrismObjectOrganizationUpdateResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) organization, err := client.Prism.Objects.Organizations.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectOrganizationUpdateParams{ PrismObjectProperties: micro.PrismObjectPropertiesParam{ }, }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", organization.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Delete object `client.Prism.Objects.Organizations.Delete(ctx, organizationID, params) error` **delete** `/v2/prism/{teamId}/organization/{organizationId}` Delete object ### Parameters - `organizationID string` - `params PrismObjectOrganizationDeleteParams` - `TeamID param.Field[string]` Path param - `IfMatch param.Field[string]` Header param: Optimistic concurrency. Pass back the `etag` header from a previous GET of this record; the write only proceeds if the record hasn't changed since. Mismatch → 412 `precondition_failed`. Use `*` to require the record exists (any ETag accepted). ### Example ```go package main import ( "context" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) err := client.Prism.Objects.Organizations.Delete( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectOrganizationDeleteParams{ }, ) if err != nil { panic(err.Error()) } } ``` ## Query `client.Prism.Objects.Organizations.Query(ctx, params) (*PrismObjectOrganizationQueryResponse, error)` **post** `/v2/prism/{teamId}/organization/query` Query ### Parameters - `params PrismObjectOrganizationQueryParams` - `TeamID param.Field[string]` Path param - `Query param.Field[PrismObjectOrganizationQueryParamsQuery]` Body param - `Select []string` Property slugs to select. Use dot notation for relationships (e.g. attendee.contact.first_name). `id` is always returned at the top level of each row and does not need to be selected. - `Combinator PrismObjectOrganizationQueryParamsQueryCombinator` Logical operator for combining filters - `const PrismObjectOrganizationQueryParamsQueryCombinatorAnd PrismObjectOrganizationQueryParamsQueryCombinator = "AND"` - `const PrismObjectOrganizationQueryParamsQueryCombinatorOr PrismObjectOrganizationQueryParamsQueryCombinator = "OR"` - `Cursor string` Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged to fetch the next page. When set, `page` and `limit` are derived from the cursor and any explicit values are ignored. - `Filter []map[string, PrismObjectOrganizationQueryParamsQueryFilter]` Filters as [{ slug: { operator: value } }]. For select/multiselect properties, values may be option slugs or option UUIDs. - `type PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterEq struct{…}` - `Equals PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterEqUnion` - `UnionString` - `UnionBool` - `type PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterNe struct{…}` - `NotEquals PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterNeUnion` - `UnionString` - `UnionBool` - `type PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterLt struct{…}` - `Less string` - `type PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterGt struct{…}` - `Greater string` - `type PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterLte struct{…}` - `LessOrEquals string` - `type PrismObjectOrganizationQueryParamsQueryFilterPrismQueryFilterGte struct{…}` - `GreaterOrEquals string` - `type PrismObjectOrganizationQueryParamsQueryFilterContains struct{…}` - `Contains PrismObjectOrganizationQueryParamsQueryFilterContainsContainsUnion` - `UnionString` - `UnionBool` - `type PrismObjectOrganizationQueryParamsQueryFilterContainsContainsArray []string` - `type PrismObjectOrganizationQueryParamsQueryFilterBeginsWith struct{…}` - `BeginsWith string` - `type PrismObjectOrganizationQueryParamsQueryFilterEndsWith struct{…}` - `EndsWith string` - `type PrismObjectOrganizationQueryParamsQueryFilterNotContains struct{…}` - `NotContains string` - `type PrismObjectOrganizationQueryParamsQueryFilterExists struct{…}` - `Exists bool` - `type PrismObjectOrganizationQueryParamsQueryFilterNotExists struct{…}` - `NotExists bool` - `type PrismObjectOrganizationQueryParamsQueryFilterIsNull struct{…}` - `IsNull PrismObjectOrganizationQueryParamsQueryFilterIsNullIsNullUnion` - `UnionString` - `UnionBool` - `type PrismObjectOrganizationQueryParamsQueryFilterIsNullIsNullArray []string` - `type PrismObjectOrganizationQueryParamsQueryFilterIsNotNull struct{…}` - `IsNotNull PrismObjectOrganizationQueryParamsQueryFilterIsNotNullIsNotNullUnion` - `UnionString` - `UnionBool` - `type PrismObjectOrganizationQueryParamsQueryFilterIsNotNullIsNotNullArray []string` - `type PrismObjectOrganizationQueryParamsQueryFilterBetween struct{…}` - `Between PrismObjectOrganizationQueryParamsQueryFilterBetweenBetweenUnion` - `UnionString` - `UnionBool` - `type PrismObjectOrganizationQueryParamsQueryFilterBetweenBetweenArray []string` - `type PrismObjectOrganizationQueryParamsQueryFilterIn struct{…}` - `In []string` - `type PrismObjectOrganizationQueryParamsQueryFilterNotIn struct{…}` - `NotIn []string` - `Limit int64` Maximum number of rows to return. Capped server-side at 50; requests above the cap are rejected. - `ListID string` - `Page int64` Page number (1-based). Prefer `cursor`. Page-number pagination drifts under concurrent writes; use it only for one-shot exports. - `Sort []map[string, PrismObjectOrganizationQueryParamsQuerySort]` Sort order as [{ slug: direction }]. Array order determines sort priority - `const PrismObjectOrganizationQueryParamsQuerySortAsc PrismObjectOrganizationQueryParamsQuerySort = "asc"` - `const PrismObjectOrganizationQueryParamsQuerySortDesc PrismObjectOrganizationQueryParamsQuerySort = "desc"` - `ID param.Field[PrismObjectOrganizationQueryParamsIDUnion]` Body param - `UnionString` - `type PrismObjectOrganizationQueryParamsIDArray []string` - `Boxes param.Field[[]string]` Body param - `Cursor param.Field[string]` Body param: Alternative location for the opaque cursor (sibling of `query`). Use whichever feels more natural; if both are present, `query.cursor` wins. - `Deleted param.Field[bool]` Body param - `IncludeTotal param.Field[bool]` Body param: When true, the response includes a `total` field with the unpaginated row count. Costs an additional pass over the result set — for unfiltered totals prefer `GET /v2/prism/{teamId}/{objectType}/count` instead. - `Sources param.Field[[]string]` Body param ### Returns - `type PrismObjectOrganizationQueryResponse struct{…}` - `Data []PrismObjectOrganizationQueryResponseData` - `ID string` - `IsUserObject bool` - `Properties map[string, unknown]` Selected property values keyed by property slug. For select/multiselect properties, option slugs are returned. For reference properties, values are nested `{ id, properties }` objects. - `Source string` - `HasMore bool` Accurate end-of-data signal. False when this page contains the last record; true only when at least one more record exists. (Implementation note: the server fetches one extra row internally to determine this — clients never need to overshoot to discover the end.) - `NextCursor string` Opaque cursor pointing at the next page. Pass it back unchanged in the request body (`cursor`) of the next call. Null when `has_more` is false. - `Total int64` Only populated when the request set `include_total: true`. Total number of records matching the query, ignoring pagination. Opt-in because it costs an additional pass over the result set. ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Organizations.Query(context.TODO(), micro.PrismObjectOrganizationQueryParams{ Query: micro.F(micro.PrismObjectOrganizationQueryParamsQuery{ Select: micro.F([]string{"string"}), }), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "is_user_object": true, "properties": { "foo": "bar" }, "source": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "has_more": true, "next_cursor": "next_cursor", "total": 0 } ``` ## Total record count for an object type `client.Prism.Objects.Organizations.Count(ctx, params) (*PrismObjectOrganizationCountResponse, error)` **get** `/v2/prism/{teamId}/organization/count` Returns the total number of records of this object type that the caller can see. Avoids the page-overshoot anti-pattern — clients no longer need to keep paging until `has_more` flips false to discover the total. Currently does not apply query filters; for a filtered total, pass `include_total: true` in a POST `/query` body. ### Parameters - `params PrismObjectOrganizationCountParams` - `TeamID param.Field[string]` Path param - `ListID param.Field[string]` Query param: Scope the count to a specific list/app. ### Returns - `type PrismObjectOrganizationCountResponse struct{…}` - `Total int64` Number of records matching the access scope. ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Organizations.Count(context.TODO(), micro.PrismObjectOrganizationCountParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Total) } ``` #### Response ```json { "total": 0 } ``` ## Find a record by property value `client.Prism.Objects.Organizations.Find(ctx, slug, value, params) (*PrismObjectOrganizationFindResponse, error)` **get** `/v2/prism/{teamId}/organization/by/{slug}/{value}` Returns the single record whose property `{slug}` equals `{value}`. 404 if nothing matches; 409 if more than one record matches. ### Parameters - `slug string` - `value string` - `params PrismObjectOrganizationFindParams` - `TeamID param.Field[string]` Path param - `ListID param.Field[string]` Query param: Scope the lookup to a specific list/app. ### Returns - `type PrismObjectOrganizationFindResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Organizations.Find( context.TODO(), "slug", "value", micro.PrismObjectOrganizationFindParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Upsert by property value `client.Prism.Objects.Organizations.Upsert(ctx, slug, value, params) (*PrismObjectOrganizationUpsertResponse, error)` **put** `/v2/prism/{teamId}/organization/by/{slug}/{value}` Idempotent create-or-update keyed on `{slug}={value}`. If exactly one record matches, it is patched and 200 is returned. If none match, a new record is created (with the lookup property set if absent) and 201 is returned. If multiple records match, 409 is returned and you should patch by id instead. ### Parameters - `slug string` - `value string` - `params PrismObjectOrganizationUpsertParams` - `TeamID param.Field[string]` Path param - `PrismObjectProperties param.Field[PrismObjectProperties]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectOrganizationUpsertResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Organizations.Upsert( context.TODO(), "slug", "value", micro.PrismObjectOrganizationUpsertParams{ PrismObjectProperties: micro.PrismObjectPropertiesParam{ }, }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Import objects `client.Prism.Objects.Organizations.BulkNew(ctx, params) (*PrismObjectOrganizationBulkNewResponse, error)` **post** `/v2/prism/{teamId}/organization/import` Import multiple objects in batch. Properties are keyed by slug. Automatically routes based on size: small batches complete synchronously and return 200 with the final `ImportJob`; large batches start an async job, return 202 with `status: processing` and a `Location` header, and can be polled via `GET /v2/prism/{teamId}/imports/{jobId}`. ### Parameters - `params PrismObjectOrganizationBulkNewParams` - `TeamID param.Field[string]` Path param - `Objects param.Field[[]PrismObjectProperties]` Body param: Array of objects to import with property values keyed by slug - `Default map[string, unknown]` Properties keyed by property slug. Values can be strings, numbers, booleans, arrays, or null. For select/multiselect properties, values may be option slugs or option UUIDs on write; option slugs are returned on read. - `List unknown` - `Options param.Field[PrismObjectOrganizationBulkNewParamsOptions]` Body param - `CaseInsensitive bool` Whether deduplication should be case insensitive - `DedupeBy string` Property slug to deduplicate on - `ListID string` App/CRM ID for context (optional) - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectOrganizationBulkNewResponse struct{…}` Status snapshot of an import job. Same shape used by the POST /import response and by GET /imports/{jobId}. - `JobID string` Null for sync imports (results inlined). Set for async imports. - `Status PrismObjectOrganizationBulkNewResponseStatus` - `const PrismObjectOrganizationBulkNewResponseStatusComplete PrismObjectOrganizationBulkNewResponseStatus = "complete"` - `const PrismObjectOrganizationBulkNewResponseStatusProcessing PrismObjectOrganizationBulkNewResponseStatus = "processing"` - `const PrismObjectOrganizationBulkNewResponseStatusFailed PrismObjectOrganizationBulkNewResponseStatus = "failed"` - `Total int64` Total number of rows in the import. - `CreatedAt Time` - `Error PrismObjectOrganizationBulkNewResponseError` Set when status=failed; describes the job-level failure (not per-row). - `Code string` - `Message string` - `ExpiresAt Time` - `Failed int64` - `Processed int64` Rows that have been attempted (succeeded + failed). - `Results []PrismObjectOrganizationBulkNewResponseResult` Per-row outcomes. Always present for sync imports; populated for async imports once the job reaches `complete`. - `ID string` - `Created bool` - `Error PrismObjectOrganizationBulkNewResponseResultsError` - `Code string` - `Message string` - `Existing bool` True if the row matched an existing record via the dedupe key. - `Succeeded int64` - `UpdatedAt Time` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Organizations.BulkNew(context.TODO(), micro.PrismObjectOrganizationBulkNewParams{ Objects: micro.F([]micro.PrismObjectPropertiesParam{micro.PrismObjectPropertiesParam{ }}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.JobID) } ``` #### Response ```json { "job_id": "job_id", "status": "complete", "total": 0, "created_at": "2019-12-27T18:11:19.117Z", "error": { "code": "code", "message": "message" }, "expires_at": "2019-12-27T18:11:19.117Z", "failed": 0, "processed": 0, "results": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created": true, "error": { "code": "code", "message": "message" }, "existing": true } ], "succeeded": 0, "updated_at": "2019-12-27T18:11:19.117Z" } ``` ## Bulk update records (partial success) `client.Prism.Objects.Organizations.BulkUpdate(ctx, params) (*PrismObjectOrganizationBulkUpdateResponse, error)` **post** `/v2/prism/{teamId}/organization/batch/update` Patch up to 100 records in a single call. Each item is attempted independently — failures don't abort the batch. Inspect `results[].status` per item. ### Parameters - `params PrismObjectOrganizationBulkUpdateParams` - `TeamID param.Field[string]` Path param - `Items param.Field[[]PrismObjectOrganizationBulkUpdateParamsItem]` Body param - `ID string` - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectOrganizationBulkUpdateResponse struct{…}` Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed. - `Results []PrismObjectOrganizationBulkUpdateResponseResult` - `ID string` Item ID, or null if the input was unparseable. - `Status PrismObjectOrganizationBulkUpdateResponseResultsStatus` - `const PrismObjectOrganizationBulkUpdateResponseResultsStatusOk PrismObjectOrganizationBulkUpdateResponseResultsStatus = "ok"` - `const PrismObjectOrganizationBulkUpdateResponseResultsStatusError PrismObjectOrganizationBulkUpdateResponseResultsStatus = "error"` - `Error PrismObjectOrganizationBulkUpdateResponseResultsError` - `Code string` - `Message string` - `Record PrismObjectOrganizationBulkUpdateResponseResultsRecord` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` - `Summary PrismObjectOrganizationBulkUpdateResponseSummary` - `Failed int64` - `Succeeded int64` - `Total int64` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Organizations.BulkUpdate(context.TODO(), micro.PrismObjectOrganizationBulkUpdateParams{ Items: micro.F([]micro.PrismObjectOrganizationBulkUpdateParamsItem{micro.PrismObjectOrganizationBulkUpdateParamsItem{ ID: micro.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), }}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Results) } ``` #### Response ```json { "results": [ { "id": "id", "status": "ok", "error": { "code": "code", "message": "message" }, "record": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } } ], "summary": { "failed": 0, "succeeded": 0, "total": 0 } } ``` ## Bulk delete records (partial success) `client.Prism.Objects.Organizations.BulkDelete(ctx, params) (*PrismObjectOrganizationBulkDeleteResponse, error)` **post** `/v2/prism/{teamId}/organization/batch/delete` Soft-delete up to 100 records in a single call. Same partial-success contract as batch/update. ### Parameters - `params PrismObjectOrganizationBulkDeleteParams` - `TeamID param.Field[string]` Path param - `IDs param.Field[[]string]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectOrganizationBulkDeleteResponse struct{…}` Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed. - `Results []PrismObjectOrganizationBulkDeleteResponseResult` - `ID string` Item ID, or null if the input was unparseable. - `Status PrismObjectOrganizationBulkDeleteResponseResultsStatus` - `const PrismObjectOrganizationBulkDeleteResponseResultsStatusOk PrismObjectOrganizationBulkDeleteResponseResultsStatus = "ok"` - `const PrismObjectOrganizationBulkDeleteResponseResultsStatusError PrismObjectOrganizationBulkDeleteResponseResultsStatus = "error"` - `Error PrismObjectOrganizationBulkDeleteResponseResultsError` - `Code string` - `Message string` - `Record PrismObjectOrganizationBulkDeleteResponseResultsRecord` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` - `Summary PrismObjectOrganizationBulkDeleteResponseSummary` - `Failed int64` - `Succeeded int64` - `Total int64` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Organizations.BulkDelete(context.TODO(), micro.PrismObjectOrganizationBulkDeleteParams{ IDs: micro.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Results) } ``` #### Response ```json { "results": [ { "id": "id", "status": "ok", "error": { "code": "code", "message": "message" }, "record": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } } ], "summary": { "failed": 0, "succeeded": 0, "total": 0 } } ``` ## Duplicate object `client.Prism.Objects.Organizations.Duplicate(ctx, organizationID, params) (*PrismObjectOrganizationDuplicateResponse, error)` **post** `/v2/prism/{teamId}/organization/{organizationId}/duplicate` Duplicate object ### Parameters - `organizationID string` - `params PrismObjectOrganizationDuplicateParams` - `TeamID param.Field[string]` Path param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectOrganizationDuplicateResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Organizations.Duplicate( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectOrganizationDuplicateParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Restore object `client.Prism.Objects.Organizations.Restore(ctx, organizationID, params) (*PrismObjectOrganizationRestoreResponse, error)` **post** `/v2/prism/{teamId}/organization/{organizationId}/restore` Restore object ### Parameters - `organizationID string` - `params PrismObjectOrganizationRestoreParams` - `TeamID param.Field[string]` Path param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectOrganizationRestoreResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Organizations.Restore( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectOrganizationRestoreParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Domain Types ### Organization - `type Organization struct{…}` - `Default map[string, unknown]` Properties keyed by property slug. Values can be strings, numbers, booleans, arrays, or null. For select/multiselect properties, values may be option slugs or option UUIDs on write; option slugs are returned on read. - `List unknown` # Identities ## Create object `client.Prism.Objects.Identities.New(ctx, params) (*PrismObjectIdentityNewResponse, error)` **post** `/v2/prism/{teamId}/identity` Create object ### Parameters - `params PrismObjectIdentityNewParams` - `TeamID param.Field[string]` Path param - `PrismObjectProperties param.Field[PrismObjectProperties]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectIdentityNewResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) identity, err := client.Prism.Objects.Identities.New(context.TODO(), micro.PrismObjectIdentityNewParams{ PrismObjectProperties: micro.PrismObjectPropertiesParam{ }, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", identity.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## List records of an object type `client.Prism.Objects.Identities.List(ctx, params) (*PrismObjectIdentityListResponse, error)` **get** `/v2/prism/{teamId}/identity` Convenience list endpoint. Equivalent to `POST /v2/prism/{teamId}/{objectType}/query` with an empty body, plus query-string sugar for the common cases. Any unrecognized query parameter is interpreted as an equality filter on a property of that name; pass arrays for `in`. Values are received as strings, so non-string property filters via this endpoint may not work — use the `query` endpoint for typed comparisons or anything beyond simple equality. ### Parameters - `params PrismObjectIdentityListParams` - `TeamID param.Field[string]` Path param - `Cursor param.Field[string]` Query param: Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged to fetch the next page. - `Deleted param.Field[bool]` Query param: Include soft-deleted records. Pass the literal string `true`. - `IncludeTotal param.Field[bool]` Query param: When set to `true`, the response includes a `total` field with the unpaginated row count. Costs an extra pass; prefer `GET .../count` for the unfiltered total. - `Limit param.Field[int64]` Query param: Maximum number of rows to return. Capped server-side at 50. - `ListID param.Field[string]` Query param: Scope properties to a specific list/app. - `Select param.Field[string]` Query param: Comma-separated property slugs to return. Use dot notation for relationships. `id` is always returned at the top level. Defaults to all properties. - `Sort param.Field[string]` Query param: Comma-separated list of slugs. Prefix with `-` for descending. Example: `sort=-updated_at,name`. ### Returns - `type PrismObjectIdentityListResponse struct{…}` - `Data []PrismObjectIdentityListResponseData` - `ID string` - `IsUserObject bool` - `Properties map[string, unknown]` Selected property values keyed by property slug. For select/multiselect properties, option slugs are returned. For reference properties, values are nested `{ id, properties }` objects. - `Source string` - `HasMore bool` Accurate end-of-data signal — false on the last page, never forces clients to overshoot. - `NextCursor string` - `Total int64` Populated only when `?include_total=true` was passed. ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) identities, err := client.Prism.Objects.Identities.List(context.TODO(), micro.PrismObjectIdentityListParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", identities.Data) } ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "is_user_object": true, "properties": { "foo": "bar" }, "source": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "has_more": true, "next_cursor": "next_cursor", "total": 0 } ``` ## Get object `client.Prism.Objects.Identities.Get(ctx, identityID, params) (*PrismObjectIdentityGetResponse, error)` **get** `/v2/prism/{teamId}/identity/{identityId}` Get object ### Parameters - `identityID string` - `params PrismObjectIdentityGetParams` - `TeamID param.Field[string]` Path param - `Select param.Field[string]` Query param: Comma-separated property slugs to return. Use dot notation for relationships. `id` is always returned at the top level. Defaults to all properties. ### Returns - `type PrismObjectIdentityGetResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) identity, err := client.Prism.Objects.Identities.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectIdentityGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", identity.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Patch object `client.Prism.Objects.Identities.Update(ctx, identityID, params) (*PrismObjectIdentityUpdateResponse, error)` **patch** `/v2/prism/{teamId}/identity/{identityId}` Patch object ### Parameters - `identityID string` - `params PrismObjectIdentityUpdateParams` - `TeamID param.Field[string]` Path param - `PrismObjectProperties param.Field[PrismObjectProperties]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. - `IfMatch param.Field[string]` Header param: Optimistic concurrency. Pass back the `etag` header from a previous GET of this record; the write only proceeds if the record hasn't changed since. Mismatch → 412 `precondition_failed`. Use `*` to require the record exists (any ETag accepted). ### Returns - `type PrismObjectIdentityUpdateResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) identity, err := client.Prism.Objects.Identities.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectIdentityUpdateParams{ PrismObjectProperties: micro.PrismObjectPropertiesParam{ }, }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", identity.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Delete object `client.Prism.Objects.Identities.Delete(ctx, identityID, params) error` **delete** `/v2/prism/{teamId}/identity/{identityId}` Delete object ### Parameters - `identityID string` - `params PrismObjectIdentityDeleteParams` - `TeamID param.Field[string]` Path param - `IfMatch param.Field[string]` Header param: Optimistic concurrency. Pass back the `etag` header from a previous GET of this record; the write only proceeds if the record hasn't changed since. Mismatch → 412 `precondition_failed`. Use `*` to require the record exists (any ETag accepted). ### Example ```go package main import ( "context" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) err := client.Prism.Objects.Identities.Delete( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectIdentityDeleteParams{ }, ) if err != nil { panic(err.Error()) } } ``` ## Query `client.Prism.Objects.Identities.Query(ctx, params) (*PrismObjectIdentityQueryResponse, error)` **post** `/v2/prism/{teamId}/identity/query` Query ### Parameters - `params PrismObjectIdentityQueryParams` - `TeamID param.Field[string]` Path param - `Query param.Field[PrismObjectIdentityQueryParamsQuery]` Body param - `Select []string` Property slugs to select. Use dot notation for relationships (e.g. attendee.contact.first_name). `id` is always returned at the top level of each row and does not need to be selected. - `Combinator PrismObjectIdentityQueryParamsQueryCombinator` Logical operator for combining filters - `const PrismObjectIdentityQueryParamsQueryCombinatorAnd PrismObjectIdentityQueryParamsQueryCombinator = "AND"` - `const PrismObjectIdentityQueryParamsQueryCombinatorOr PrismObjectIdentityQueryParamsQueryCombinator = "OR"` - `Cursor string` Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged to fetch the next page. When set, `page` and `limit` are derived from the cursor and any explicit values are ignored. - `Filter []map[string, PrismObjectIdentityQueryParamsQueryFilter]` Filters as [{ slug: { operator: value } }]. For select/multiselect properties, values may be option slugs or option UUIDs. - `type PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterEq struct{…}` - `Equals PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterEqUnion` - `UnionString` - `UnionBool` - `type PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterNe struct{…}` - `NotEquals PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterNeUnion` - `UnionString` - `UnionBool` - `type PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterLt struct{…}` - `Less string` - `type PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterGt struct{…}` - `Greater string` - `type PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterLte struct{…}` - `LessOrEquals string` - `type PrismObjectIdentityQueryParamsQueryFilterPrismQueryFilterGte struct{…}` - `GreaterOrEquals string` - `type PrismObjectIdentityQueryParamsQueryFilterContains struct{…}` - `Contains PrismObjectIdentityQueryParamsQueryFilterContainsContainsUnion` - `UnionString` - `UnionBool` - `type PrismObjectIdentityQueryParamsQueryFilterContainsContainsArray []string` - `type PrismObjectIdentityQueryParamsQueryFilterBeginsWith struct{…}` - `BeginsWith string` - `type PrismObjectIdentityQueryParamsQueryFilterEndsWith struct{…}` - `EndsWith string` - `type PrismObjectIdentityQueryParamsQueryFilterNotContains struct{…}` - `NotContains string` - `type PrismObjectIdentityQueryParamsQueryFilterExists struct{…}` - `Exists bool` - `type PrismObjectIdentityQueryParamsQueryFilterNotExists struct{…}` - `NotExists bool` - `type PrismObjectIdentityQueryParamsQueryFilterIsNull struct{…}` - `IsNull PrismObjectIdentityQueryParamsQueryFilterIsNullIsNullUnion` - `UnionString` - `UnionBool` - `type PrismObjectIdentityQueryParamsQueryFilterIsNullIsNullArray []string` - `type PrismObjectIdentityQueryParamsQueryFilterIsNotNull struct{…}` - `IsNotNull PrismObjectIdentityQueryParamsQueryFilterIsNotNullIsNotNullUnion` - `UnionString` - `UnionBool` - `type PrismObjectIdentityQueryParamsQueryFilterIsNotNullIsNotNullArray []string` - `type PrismObjectIdentityQueryParamsQueryFilterBetween struct{…}` - `Between PrismObjectIdentityQueryParamsQueryFilterBetweenBetweenUnion` - `UnionString` - `UnionBool` - `type PrismObjectIdentityQueryParamsQueryFilterBetweenBetweenArray []string` - `type PrismObjectIdentityQueryParamsQueryFilterIn struct{…}` - `In []string` - `type PrismObjectIdentityQueryParamsQueryFilterNotIn struct{…}` - `NotIn []string` - `Limit int64` Maximum number of rows to return. Capped server-side at 50; requests above the cap are rejected. - `ListID string` - `Page int64` Page number (1-based). Prefer `cursor`. Page-number pagination drifts under concurrent writes; use it only for one-shot exports. - `Sort []map[string, PrismObjectIdentityQueryParamsQuerySort]` Sort order as [{ slug: direction }]. Array order determines sort priority - `const PrismObjectIdentityQueryParamsQuerySortAsc PrismObjectIdentityQueryParamsQuerySort = "asc"` - `const PrismObjectIdentityQueryParamsQuerySortDesc PrismObjectIdentityQueryParamsQuerySort = "desc"` - `ID param.Field[PrismObjectIdentityQueryParamsIDUnion]` Body param - `UnionString` - `type PrismObjectIdentityQueryParamsIDArray []string` - `Boxes param.Field[[]string]` Body param - `Cursor param.Field[string]` Body param: Alternative location for the opaque cursor (sibling of `query`). Use whichever feels more natural; if both are present, `query.cursor` wins. - `Deleted param.Field[bool]` Body param - `IncludeTotal param.Field[bool]` Body param: When true, the response includes a `total` field with the unpaginated row count. Costs an additional pass over the result set — for unfiltered totals prefer `GET /v2/prism/{teamId}/{objectType}/count` instead. - `Sources param.Field[[]string]` Body param ### Returns - `type PrismObjectIdentityQueryResponse struct{…}` - `Data []PrismObjectIdentityQueryResponseData` - `ID string` - `IsUserObject bool` - `Properties map[string, unknown]` Selected property values keyed by property slug. For select/multiselect properties, option slugs are returned. For reference properties, values are nested `{ id, properties }` objects. - `Source string` - `HasMore bool` Accurate end-of-data signal. False when this page contains the last record; true only when at least one more record exists. (Implementation note: the server fetches one extra row internally to determine this — clients never need to overshoot to discover the end.) - `NextCursor string` Opaque cursor pointing at the next page. Pass it back unchanged in the request body (`cursor`) of the next call. Null when `has_more` is false. - `Total int64` Only populated when the request set `include_total: true`. Total number of records matching the query, ignoring pagination. Opt-in because it costs an additional pass over the result set. ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Identities.Query(context.TODO(), micro.PrismObjectIdentityQueryParams{ Query: micro.F(micro.PrismObjectIdentityQueryParamsQuery{ Select: micro.F([]string{"string"}), }), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "is_user_object": true, "properties": { "foo": "bar" }, "source": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "has_more": true, "next_cursor": "next_cursor", "total": 0 } ``` ## Total record count for an object type `client.Prism.Objects.Identities.Count(ctx, params) (*PrismObjectIdentityCountResponse, error)` **get** `/v2/prism/{teamId}/identity/count` Returns the total number of records of this object type that the caller can see. Avoids the page-overshoot anti-pattern — clients no longer need to keep paging until `has_more` flips false to discover the total. Currently does not apply query filters; for a filtered total, pass `include_total: true` in a POST `/query` body. ### Parameters - `params PrismObjectIdentityCountParams` - `TeamID param.Field[string]` Path param - `ListID param.Field[string]` Query param: Scope the count to a specific list/app. ### Returns - `type PrismObjectIdentityCountResponse struct{…}` - `Total int64` Number of records matching the access scope. ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Identities.Count(context.TODO(), micro.PrismObjectIdentityCountParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Total) } ``` #### Response ```json { "total": 0 } ``` ## Find a record by property value `client.Prism.Objects.Identities.Find(ctx, slug, value, params) (*PrismObjectIdentityFindResponse, error)` **get** `/v2/prism/{teamId}/identity/by/{slug}/{value}` Returns the single record whose property `{slug}` equals `{value}`. 404 if nothing matches; 409 if more than one record matches. ### Parameters - `slug string` - `value string` - `params PrismObjectIdentityFindParams` - `TeamID param.Field[string]` Path param - `ListID param.Field[string]` Query param: Scope the lookup to a specific list/app. ### Returns - `type PrismObjectIdentityFindResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Identities.Find( context.TODO(), "slug", "value", micro.PrismObjectIdentityFindParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Upsert by property value `client.Prism.Objects.Identities.Upsert(ctx, slug, value, params) (*PrismObjectIdentityUpsertResponse, error)` **put** `/v2/prism/{teamId}/identity/by/{slug}/{value}` Idempotent create-or-update keyed on `{slug}={value}`. If exactly one record matches, it is patched and 200 is returned. If none match, a new record is created (with the lookup property set if absent) and 201 is returned. If multiple records match, 409 is returned and you should patch by id instead. ### Parameters - `slug string` - `value string` - `params PrismObjectIdentityUpsertParams` - `TeamID param.Field[string]` Path param - `PrismObjectProperties param.Field[PrismObjectProperties]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectIdentityUpsertResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Identities.Upsert( context.TODO(), "slug", "value", micro.PrismObjectIdentityUpsertParams{ PrismObjectProperties: micro.PrismObjectPropertiesParam{ }, }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Import objects `client.Prism.Objects.Identities.BulkNew(ctx, params) (*PrismObjectIdentityBulkNewResponse, error)` **post** `/v2/prism/{teamId}/identity/import` Import multiple objects in batch. Properties are keyed by slug. Automatically routes based on size: small batches complete synchronously and return 200 with the final `ImportJob`; large batches start an async job, return 202 with `status: processing` and a `Location` header, and can be polled via `GET /v2/prism/{teamId}/imports/{jobId}`. ### Parameters - `params PrismObjectIdentityBulkNewParams` - `TeamID param.Field[string]` Path param - `Objects param.Field[[]PrismObjectProperties]` Body param: Array of objects to import with property values keyed by slug - `Default map[string, unknown]` Properties keyed by property slug. Values can be strings, numbers, booleans, arrays, or null. For select/multiselect properties, values may be option slugs or option UUIDs on write; option slugs are returned on read. - `List unknown` - `Options param.Field[PrismObjectIdentityBulkNewParamsOptions]` Body param - `CaseInsensitive bool` Whether deduplication should be case insensitive - `DedupeBy string` Property slug to deduplicate on - `ListID string` App/CRM ID for context (optional) - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectIdentityBulkNewResponse struct{…}` Status snapshot of an import job. Same shape used by the POST /import response and by GET /imports/{jobId}. - `JobID string` Null for sync imports (results inlined). Set for async imports. - `Status PrismObjectIdentityBulkNewResponseStatus` - `const PrismObjectIdentityBulkNewResponseStatusComplete PrismObjectIdentityBulkNewResponseStatus = "complete"` - `const PrismObjectIdentityBulkNewResponseStatusProcessing PrismObjectIdentityBulkNewResponseStatus = "processing"` - `const PrismObjectIdentityBulkNewResponseStatusFailed PrismObjectIdentityBulkNewResponseStatus = "failed"` - `Total int64` Total number of rows in the import. - `CreatedAt Time` - `Error PrismObjectIdentityBulkNewResponseError` Set when status=failed; describes the job-level failure (not per-row). - `Code string` - `Message string` - `ExpiresAt Time` - `Failed int64` - `Processed int64` Rows that have been attempted (succeeded + failed). - `Results []PrismObjectIdentityBulkNewResponseResult` Per-row outcomes. Always present for sync imports; populated for async imports once the job reaches `complete`. - `ID string` - `Created bool` - `Error PrismObjectIdentityBulkNewResponseResultsError` - `Code string` - `Message string` - `Existing bool` True if the row matched an existing record via the dedupe key. - `Succeeded int64` - `UpdatedAt Time` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Identities.BulkNew(context.TODO(), micro.PrismObjectIdentityBulkNewParams{ Objects: micro.F([]micro.PrismObjectPropertiesParam{micro.PrismObjectPropertiesParam{ }}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.JobID) } ``` #### Response ```json { "job_id": "job_id", "status": "complete", "total": 0, "created_at": "2019-12-27T18:11:19.117Z", "error": { "code": "code", "message": "message" }, "expires_at": "2019-12-27T18:11:19.117Z", "failed": 0, "processed": 0, "results": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created": true, "error": { "code": "code", "message": "message" }, "existing": true } ], "succeeded": 0, "updated_at": "2019-12-27T18:11:19.117Z" } ``` ## Bulk update records (partial success) `client.Prism.Objects.Identities.BulkUpdate(ctx, params) (*PrismObjectIdentityBulkUpdateResponse, error)` **post** `/v2/prism/{teamId}/identity/batch/update` Patch up to 100 records in a single call. Each item is attempted independently — failures don't abort the batch. Inspect `results[].status` per item. ### Parameters - `params PrismObjectIdentityBulkUpdateParams` - `TeamID param.Field[string]` Path param - `Items param.Field[[]PrismObjectIdentityBulkUpdateParamsItem]` Body param - `ID string` - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectIdentityBulkUpdateResponse struct{…}` Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed. - `Results []PrismObjectIdentityBulkUpdateResponseResult` - `ID string` Item ID, or null if the input was unparseable. - `Status PrismObjectIdentityBulkUpdateResponseResultsStatus` - `const PrismObjectIdentityBulkUpdateResponseResultsStatusOk PrismObjectIdentityBulkUpdateResponseResultsStatus = "ok"` - `const PrismObjectIdentityBulkUpdateResponseResultsStatusError PrismObjectIdentityBulkUpdateResponseResultsStatus = "error"` - `Error PrismObjectIdentityBulkUpdateResponseResultsError` - `Code string` - `Message string` - `Record PrismObjectIdentityBulkUpdateResponseResultsRecord` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` - `Summary PrismObjectIdentityBulkUpdateResponseSummary` - `Failed int64` - `Succeeded int64` - `Total int64` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Identities.BulkUpdate(context.TODO(), micro.PrismObjectIdentityBulkUpdateParams{ Items: micro.F([]micro.PrismObjectIdentityBulkUpdateParamsItem{micro.PrismObjectIdentityBulkUpdateParamsItem{ ID: micro.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), }}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Results) } ``` #### Response ```json { "results": [ { "id": "id", "status": "ok", "error": { "code": "code", "message": "message" }, "record": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } } ], "summary": { "failed": 0, "succeeded": 0, "total": 0 } } ``` ## Bulk delete records (partial success) `client.Prism.Objects.Identities.BulkDelete(ctx, params) (*PrismObjectIdentityBulkDeleteResponse, error)` **post** `/v2/prism/{teamId}/identity/batch/delete` Soft-delete up to 100 records in a single call. Same partial-success contract as batch/update. ### Parameters - `params PrismObjectIdentityBulkDeleteParams` - `TeamID param.Field[string]` Path param - `IDs param.Field[[]string]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectIdentityBulkDeleteResponse struct{…}` Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed. - `Results []PrismObjectIdentityBulkDeleteResponseResult` - `ID string` Item ID, or null if the input was unparseable. - `Status PrismObjectIdentityBulkDeleteResponseResultsStatus` - `const PrismObjectIdentityBulkDeleteResponseResultsStatusOk PrismObjectIdentityBulkDeleteResponseResultsStatus = "ok"` - `const PrismObjectIdentityBulkDeleteResponseResultsStatusError PrismObjectIdentityBulkDeleteResponseResultsStatus = "error"` - `Error PrismObjectIdentityBulkDeleteResponseResultsError` - `Code string` - `Message string` - `Record PrismObjectIdentityBulkDeleteResponseResultsRecord` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` - `Summary PrismObjectIdentityBulkDeleteResponseSummary` - `Failed int64` - `Succeeded int64` - `Total int64` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Identities.BulkDelete(context.TODO(), micro.PrismObjectIdentityBulkDeleteParams{ IDs: micro.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Results) } ``` #### Response ```json { "results": [ { "id": "id", "status": "ok", "error": { "code": "code", "message": "message" }, "record": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } } ], "summary": { "failed": 0, "succeeded": 0, "total": 0 } } ``` ## Duplicate object `client.Prism.Objects.Identities.Duplicate(ctx, identityID, params) (*PrismObjectIdentityDuplicateResponse, error)` **post** `/v2/prism/{teamId}/identity/{identityId}/duplicate` Duplicate object ### Parameters - `identityID string` - `params PrismObjectIdentityDuplicateParams` - `TeamID param.Field[string]` Path param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectIdentityDuplicateResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Identities.Duplicate( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectIdentityDuplicateParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Restore object `client.Prism.Objects.Identities.Restore(ctx, identityID, params) (*PrismObjectIdentityRestoreResponse, error)` **post** `/v2/prism/{teamId}/identity/{identityId}/restore` Restore object ### Parameters - `identityID string` - `params PrismObjectIdentityRestoreParams` - `TeamID param.Field[string]` Path param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectIdentityRestoreResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Identities.Restore( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectIdentityRestoreParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Domain Types ### Identity - `type Identity struct{…}` - `Default map[string, unknown]` Properties keyed by property slug. Values can be strings, numbers, booleans, arrays, or null. For select/multiselect properties, values may be option slugs or option UUIDs on write; option slugs are returned on read. - `List unknown` # Deals ## Create object `client.Prism.Objects.Deals.New(ctx, params) (*PrismObjectDealNewResponse, error)` **post** `/v2/prism/{teamId}/deal` Create object ### Parameters - `params PrismObjectDealNewParams` - `TeamID param.Field[string]` Path param - `PrismObjectProperties param.Field[PrismObjectProperties]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectDealNewResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) deal, err := client.Prism.Objects.Deals.New(context.TODO(), micro.PrismObjectDealNewParams{ PrismObjectProperties: micro.PrismObjectPropertiesParam{ }, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", deal.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## List records of an object type `client.Prism.Objects.Deals.List(ctx, params) (*PrismObjectDealListResponse, error)` **get** `/v2/prism/{teamId}/deal` Convenience list endpoint. Equivalent to `POST /v2/prism/{teamId}/{objectType}/query` with an empty body, plus query-string sugar for the common cases. Any unrecognized query parameter is interpreted as an equality filter on a property of that name; pass arrays for `in`. Values are received as strings, so non-string property filters via this endpoint may not work — use the `query` endpoint for typed comparisons or anything beyond simple equality. ### Parameters - `params PrismObjectDealListParams` - `TeamID param.Field[string]` Path param - `Cursor param.Field[string]` Query param: Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged to fetch the next page. - `Deleted param.Field[bool]` Query param: Include soft-deleted records. Pass the literal string `true`. - `IncludeTotal param.Field[bool]` Query param: When set to `true`, the response includes a `total` field with the unpaginated row count. Costs an extra pass; prefer `GET .../count` for the unfiltered total. - `Limit param.Field[int64]` Query param: Maximum number of rows to return. Capped server-side at 50. - `ListID param.Field[string]` Query param: Scope properties to a specific list/app. - `Select param.Field[string]` Query param: Comma-separated property slugs to return. Use dot notation for relationships. `id` is always returned at the top level. Defaults to all properties. - `Sort param.Field[string]` Query param: Comma-separated list of slugs. Prefix with `-` for descending. Example: `sort=-updated_at,name`. ### Returns - `type PrismObjectDealListResponse struct{…}` - `Data []PrismObjectDealListResponseData` - `ID string` - `IsUserObject bool` - `Properties map[string, unknown]` Selected property values keyed by property slug. For select/multiselect properties, option slugs are returned. For reference properties, values are nested `{ id, properties }` objects. - `Source string` - `HasMore bool` Accurate end-of-data signal — false on the last page, never forces clients to overshoot. - `NextCursor string` - `Total int64` Populated only when `?include_total=true` was passed. ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) deals, err := client.Prism.Objects.Deals.List(context.TODO(), micro.PrismObjectDealListParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", deals.Data) } ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "is_user_object": true, "properties": { "foo": "bar" }, "source": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "has_more": true, "next_cursor": "next_cursor", "total": 0 } ``` ## Get object `client.Prism.Objects.Deals.Get(ctx, dealID, params) (*PrismObjectDealGetResponse, error)` **get** `/v2/prism/{teamId}/deal/{dealId}` Get object ### Parameters - `dealID string` - `params PrismObjectDealGetParams` - `TeamID param.Field[string]` Path param - `Select param.Field[string]` Query param: Comma-separated property slugs to return. Use dot notation for relationships. `id` is always returned at the top level. Defaults to all properties. ### Returns - `type PrismObjectDealGetResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) deal, err := client.Prism.Objects.Deals.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectDealGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", deal.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Patch object `client.Prism.Objects.Deals.Update(ctx, dealID, params) (*PrismObjectDealUpdateResponse, error)` **patch** `/v2/prism/{teamId}/deal/{dealId}` Patch object ### Parameters - `dealID string` - `params PrismObjectDealUpdateParams` - `TeamID param.Field[string]` Path param - `PrismObjectProperties param.Field[PrismObjectProperties]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. - `IfMatch param.Field[string]` Header param: Optimistic concurrency. Pass back the `etag` header from a previous GET of this record; the write only proceeds if the record hasn't changed since. Mismatch → 412 `precondition_failed`. Use `*` to require the record exists (any ETag accepted). ### Returns - `type PrismObjectDealUpdateResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) deal, err := client.Prism.Objects.Deals.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectDealUpdateParams{ PrismObjectProperties: micro.PrismObjectPropertiesParam{ }, }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", deal.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Delete object `client.Prism.Objects.Deals.Delete(ctx, dealID, params) error` **delete** `/v2/prism/{teamId}/deal/{dealId}` Delete object ### Parameters - `dealID string` - `params PrismObjectDealDeleteParams` - `TeamID param.Field[string]` Path param - `IfMatch param.Field[string]` Header param: Optimistic concurrency. Pass back the `etag` header from a previous GET of this record; the write only proceeds if the record hasn't changed since. Mismatch → 412 `precondition_failed`. Use `*` to require the record exists (any ETag accepted). ### Example ```go package main import ( "context" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) err := client.Prism.Objects.Deals.Delete( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectDealDeleteParams{ }, ) if err != nil { panic(err.Error()) } } ``` ## Query `client.Prism.Objects.Deals.Query(ctx, params) (*PrismObjectDealQueryResponse, error)` **post** `/v2/prism/{teamId}/deal/query` Query ### Parameters - `params PrismObjectDealQueryParams` - `TeamID param.Field[string]` Path param - `Query param.Field[PrismObjectDealQueryParamsQuery]` Body param - `Select []string` Property slugs to select. Use dot notation for relationships (e.g. attendee.contact.first_name). `id` is always returned at the top level of each row and does not need to be selected. - `Combinator PrismObjectDealQueryParamsQueryCombinator` Logical operator for combining filters - `const PrismObjectDealQueryParamsQueryCombinatorAnd PrismObjectDealQueryParamsQueryCombinator = "AND"` - `const PrismObjectDealQueryParamsQueryCombinatorOr PrismObjectDealQueryParamsQueryCombinator = "OR"` - `Cursor string` Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged to fetch the next page. When set, `page` and `limit` are derived from the cursor and any explicit values are ignored. - `Filter []map[string, PrismObjectDealQueryParamsQueryFilter]` Filters as [{ slug: { operator: value } }]. For select/multiselect properties, values may be option slugs or option UUIDs. - `type PrismObjectDealQueryParamsQueryFilterPrismQueryFilterEq struct{…}` - `Equals PrismObjectDealQueryParamsQueryFilterPrismQueryFilterEqUnion` - `UnionString` - `UnionBool` - `type PrismObjectDealQueryParamsQueryFilterPrismQueryFilterNe struct{…}` - `NotEquals PrismObjectDealQueryParamsQueryFilterPrismQueryFilterNeUnion` - `UnionString` - `UnionBool` - `type PrismObjectDealQueryParamsQueryFilterPrismQueryFilterLt struct{…}` - `Less string` - `type PrismObjectDealQueryParamsQueryFilterPrismQueryFilterGt struct{…}` - `Greater string` - `type PrismObjectDealQueryParamsQueryFilterPrismQueryFilterLte struct{…}` - `LessOrEquals string` - `type PrismObjectDealQueryParamsQueryFilterPrismQueryFilterGte struct{…}` - `GreaterOrEquals string` - `type PrismObjectDealQueryParamsQueryFilterContains struct{…}` - `Contains PrismObjectDealQueryParamsQueryFilterContainsContainsUnion` - `UnionString` - `UnionBool` - `type PrismObjectDealQueryParamsQueryFilterContainsContainsArray []string` - `type PrismObjectDealQueryParamsQueryFilterBeginsWith struct{…}` - `BeginsWith string` - `type PrismObjectDealQueryParamsQueryFilterEndsWith struct{…}` - `EndsWith string` - `type PrismObjectDealQueryParamsQueryFilterNotContains struct{…}` - `NotContains string` - `type PrismObjectDealQueryParamsQueryFilterExists struct{…}` - `Exists bool` - `type PrismObjectDealQueryParamsQueryFilterNotExists struct{…}` - `NotExists bool` - `type PrismObjectDealQueryParamsQueryFilterIsNull struct{…}` - `IsNull PrismObjectDealQueryParamsQueryFilterIsNullIsNullUnion` - `UnionString` - `UnionBool` - `type PrismObjectDealQueryParamsQueryFilterIsNullIsNullArray []string` - `type PrismObjectDealQueryParamsQueryFilterIsNotNull struct{…}` - `IsNotNull PrismObjectDealQueryParamsQueryFilterIsNotNullIsNotNullUnion` - `UnionString` - `UnionBool` - `type PrismObjectDealQueryParamsQueryFilterIsNotNullIsNotNullArray []string` - `type PrismObjectDealQueryParamsQueryFilterBetween struct{…}` - `Between PrismObjectDealQueryParamsQueryFilterBetweenBetweenUnion` - `UnionString` - `UnionBool` - `type PrismObjectDealQueryParamsQueryFilterBetweenBetweenArray []string` - `type PrismObjectDealQueryParamsQueryFilterIn struct{…}` - `In []string` - `type PrismObjectDealQueryParamsQueryFilterNotIn struct{…}` - `NotIn []string` - `Limit int64` Maximum number of rows to return. Capped server-side at 50; requests above the cap are rejected. - `ListID string` - `Page int64` Page number (1-based). Prefer `cursor`. Page-number pagination drifts under concurrent writes; use it only for one-shot exports. - `Sort []map[string, PrismObjectDealQueryParamsQuerySort]` Sort order as [{ slug: direction }]. Array order determines sort priority - `const PrismObjectDealQueryParamsQuerySortAsc PrismObjectDealQueryParamsQuerySort = "asc"` - `const PrismObjectDealQueryParamsQuerySortDesc PrismObjectDealQueryParamsQuerySort = "desc"` - `ID param.Field[PrismObjectDealQueryParamsIDUnion]` Body param - `UnionString` - `type PrismObjectDealQueryParamsIDArray []string` - `Boxes param.Field[[]string]` Body param - `Cursor param.Field[string]` Body param: Alternative location for the opaque cursor (sibling of `query`). Use whichever feels more natural; if both are present, `query.cursor` wins. - `Deleted param.Field[bool]` Body param - `IncludeTotal param.Field[bool]` Body param: When true, the response includes a `total` field with the unpaginated row count. Costs an additional pass over the result set — for unfiltered totals prefer `GET /v2/prism/{teamId}/{objectType}/count` instead. - `Sources param.Field[[]string]` Body param ### Returns - `type PrismObjectDealQueryResponse struct{…}` - `Data []PrismObjectDealQueryResponseData` - `ID string` - `IsUserObject bool` - `Properties map[string, unknown]` Selected property values keyed by property slug. For select/multiselect properties, option slugs are returned. For reference properties, values are nested `{ id, properties }` objects. - `Source string` - `HasMore bool` Accurate end-of-data signal. False when this page contains the last record; true only when at least one more record exists. (Implementation note: the server fetches one extra row internally to determine this — clients never need to overshoot to discover the end.) - `NextCursor string` Opaque cursor pointing at the next page. Pass it back unchanged in the request body (`cursor`) of the next call. Null when `has_more` is false. - `Total int64` Only populated when the request set `include_total: true`. Total number of records matching the query, ignoring pagination. Opt-in because it costs an additional pass over the result set. ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Deals.Query(context.TODO(), micro.PrismObjectDealQueryParams{ Query: micro.F(micro.PrismObjectDealQueryParamsQuery{ Select: micro.F([]string{"string"}), }), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "is_user_object": true, "properties": { "foo": "bar" }, "source": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "has_more": true, "next_cursor": "next_cursor", "total": 0 } ``` ## Total record count for an object type `client.Prism.Objects.Deals.Count(ctx, params) (*PrismObjectDealCountResponse, error)` **get** `/v2/prism/{teamId}/deal/count` Returns the total number of records of this object type that the caller can see. Avoids the page-overshoot anti-pattern — clients no longer need to keep paging until `has_more` flips false to discover the total. Currently does not apply query filters; for a filtered total, pass `include_total: true` in a POST `/query` body. ### Parameters - `params PrismObjectDealCountParams` - `TeamID param.Field[string]` Path param - `ListID param.Field[string]` Query param: Scope the count to a specific list/app. ### Returns - `type PrismObjectDealCountResponse struct{…}` - `Total int64` Number of records matching the access scope. ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Deals.Count(context.TODO(), micro.PrismObjectDealCountParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Total) } ``` #### Response ```json { "total": 0 } ``` ## Find a record by property value `client.Prism.Objects.Deals.Find(ctx, slug, value, params) (*PrismObjectDealFindResponse, error)` **get** `/v2/prism/{teamId}/deal/by/{slug}/{value}` Returns the single record whose property `{slug}` equals `{value}`. 404 if nothing matches; 409 if more than one record matches. ### Parameters - `slug string` - `value string` - `params PrismObjectDealFindParams` - `TeamID param.Field[string]` Path param - `ListID param.Field[string]` Query param: Scope the lookup to a specific list/app. ### Returns - `type PrismObjectDealFindResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Deals.Find( context.TODO(), "slug", "value", micro.PrismObjectDealFindParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Upsert by property value `client.Prism.Objects.Deals.Upsert(ctx, slug, value, params) (*PrismObjectDealUpsertResponse, error)` **put** `/v2/prism/{teamId}/deal/by/{slug}/{value}` Idempotent create-or-update keyed on `{slug}={value}`. If exactly one record matches, it is patched and 200 is returned. If none match, a new record is created (with the lookup property set if absent) and 201 is returned. If multiple records match, 409 is returned and you should patch by id instead. ### Parameters - `slug string` - `value string` - `params PrismObjectDealUpsertParams` - `TeamID param.Field[string]` Path param - `PrismObjectProperties param.Field[PrismObjectProperties]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectDealUpsertResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Deals.Upsert( context.TODO(), "slug", "value", micro.PrismObjectDealUpsertParams{ PrismObjectProperties: micro.PrismObjectPropertiesParam{ }, }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Import objects `client.Prism.Objects.Deals.BulkNew(ctx, params) (*PrismObjectDealBulkNewResponse, error)` **post** `/v2/prism/{teamId}/deal/import` Import multiple objects in batch. Properties are keyed by slug. Automatically routes based on size: small batches complete synchronously and return 200 with the final `ImportJob`; large batches start an async job, return 202 with `status: processing` and a `Location` header, and can be polled via `GET /v2/prism/{teamId}/imports/{jobId}`. ### Parameters - `params PrismObjectDealBulkNewParams` - `TeamID param.Field[string]` Path param - `Objects param.Field[[]PrismObjectProperties]` Body param: Array of objects to import with property values keyed by slug - `Default map[string, unknown]` Properties keyed by property slug. Values can be strings, numbers, booleans, arrays, or null. For select/multiselect properties, values may be option slugs or option UUIDs on write; option slugs are returned on read. - `List unknown` - `Options param.Field[PrismObjectDealBulkNewParamsOptions]` Body param - `CaseInsensitive bool` Whether deduplication should be case insensitive - `DedupeBy string` Property slug to deduplicate on - `ListID string` App/CRM ID for context (optional) - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectDealBulkNewResponse struct{…}` Status snapshot of an import job. Same shape used by the POST /import response and by GET /imports/{jobId}. - `JobID string` Null for sync imports (results inlined). Set for async imports. - `Status PrismObjectDealBulkNewResponseStatus` - `const PrismObjectDealBulkNewResponseStatusComplete PrismObjectDealBulkNewResponseStatus = "complete"` - `const PrismObjectDealBulkNewResponseStatusProcessing PrismObjectDealBulkNewResponseStatus = "processing"` - `const PrismObjectDealBulkNewResponseStatusFailed PrismObjectDealBulkNewResponseStatus = "failed"` - `Total int64` Total number of rows in the import. - `CreatedAt Time` - `Error PrismObjectDealBulkNewResponseError` Set when status=failed; describes the job-level failure (not per-row). - `Code string` - `Message string` - `ExpiresAt Time` - `Failed int64` - `Processed int64` Rows that have been attempted (succeeded + failed). - `Results []PrismObjectDealBulkNewResponseResult` Per-row outcomes. Always present for sync imports; populated for async imports once the job reaches `complete`. - `ID string` - `Created bool` - `Error PrismObjectDealBulkNewResponseResultsError` - `Code string` - `Message string` - `Existing bool` True if the row matched an existing record via the dedupe key. - `Succeeded int64` - `UpdatedAt Time` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Deals.BulkNew(context.TODO(), micro.PrismObjectDealBulkNewParams{ Objects: micro.F([]micro.PrismObjectPropertiesParam{micro.PrismObjectPropertiesParam{ }}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.JobID) } ``` #### Response ```json { "job_id": "job_id", "status": "complete", "total": 0, "created_at": "2019-12-27T18:11:19.117Z", "error": { "code": "code", "message": "message" }, "expires_at": "2019-12-27T18:11:19.117Z", "failed": 0, "processed": 0, "results": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created": true, "error": { "code": "code", "message": "message" }, "existing": true } ], "succeeded": 0, "updated_at": "2019-12-27T18:11:19.117Z" } ``` ## Bulk update records (partial success) `client.Prism.Objects.Deals.BulkUpdate(ctx, params) (*PrismObjectDealBulkUpdateResponse, error)` **post** `/v2/prism/{teamId}/deal/batch/update` Patch up to 100 records in a single call. Each item is attempted independently — failures don't abort the batch. Inspect `results[].status` per item. ### Parameters - `params PrismObjectDealBulkUpdateParams` - `TeamID param.Field[string]` Path param - `Items param.Field[[]PrismObjectDealBulkUpdateParamsItem]` Body param - `ID string` - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectDealBulkUpdateResponse struct{…}` Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed. - `Results []PrismObjectDealBulkUpdateResponseResult` - `ID string` Item ID, or null if the input was unparseable. - `Status PrismObjectDealBulkUpdateResponseResultsStatus` - `const PrismObjectDealBulkUpdateResponseResultsStatusOk PrismObjectDealBulkUpdateResponseResultsStatus = "ok"` - `const PrismObjectDealBulkUpdateResponseResultsStatusError PrismObjectDealBulkUpdateResponseResultsStatus = "error"` - `Error PrismObjectDealBulkUpdateResponseResultsError` - `Code string` - `Message string` - `Record PrismObjectDealBulkUpdateResponseResultsRecord` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` - `Summary PrismObjectDealBulkUpdateResponseSummary` - `Failed int64` - `Succeeded int64` - `Total int64` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Deals.BulkUpdate(context.TODO(), micro.PrismObjectDealBulkUpdateParams{ Items: micro.F([]micro.PrismObjectDealBulkUpdateParamsItem{micro.PrismObjectDealBulkUpdateParamsItem{ ID: micro.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), }}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Results) } ``` #### Response ```json { "results": [ { "id": "id", "status": "ok", "error": { "code": "code", "message": "message" }, "record": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } } ], "summary": { "failed": 0, "succeeded": 0, "total": 0 } } ``` ## Bulk delete records (partial success) `client.Prism.Objects.Deals.BulkDelete(ctx, params) (*PrismObjectDealBulkDeleteResponse, error)` **post** `/v2/prism/{teamId}/deal/batch/delete` Soft-delete up to 100 records in a single call. Same partial-success contract as batch/update. ### Parameters - `params PrismObjectDealBulkDeleteParams` - `TeamID param.Field[string]` Path param - `IDs param.Field[[]string]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectDealBulkDeleteResponse struct{…}` Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed. - `Results []PrismObjectDealBulkDeleteResponseResult` - `ID string` Item ID, or null if the input was unparseable. - `Status PrismObjectDealBulkDeleteResponseResultsStatus` - `const PrismObjectDealBulkDeleteResponseResultsStatusOk PrismObjectDealBulkDeleteResponseResultsStatus = "ok"` - `const PrismObjectDealBulkDeleteResponseResultsStatusError PrismObjectDealBulkDeleteResponseResultsStatus = "error"` - `Error PrismObjectDealBulkDeleteResponseResultsError` - `Code string` - `Message string` - `Record PrismObjectDealBulkDeleteResponseResultsRecord` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` - `Summary PrismObjectDealBulkDeleteResponseSummary` - `Failed int64` - `Succeeded int64` - `Total int64` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Deals.BulkDelete(context.TODO(), micro.PrismObjectDealBulkDeleteParams{ IDs: micro.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Results) } ``` #### Response ```json { "results": [ { "id": "id", "status": "ok", "error": { "code": "code", "message": "message" }, "record": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } } ], "summary": { "failed": 0, "succeeded": 0, "total": 0 } } ``` ## Duplicate object `client.Prism.Objects.Deals.Duplicate(ctx, dealID, params) (*PrismObjectDealDuplicateResponse, error)` **post** `/v2/prism/{teamId}/deal/{dealId}/duplicate` Duplicate object ### Parameters - `dealID string` - `params PrismObjectDealDuplicateParams` - `TeamID param.Field[string]` Path param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectDealDuplicateResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Deals.Duplicate( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectDealDuplicateParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Restore object `client.Prism.Objects.Deals.Restore(ctx, dealID, params) (*PrismObjectDealRestoreResponse, error)` **post** `/v2/prism/{teamId}/deal/{dealId}/restore` Restore object ### Parameters - `dealID string` - `params PrismObjectDealRestoreParams` - `TeamID param.Field[string]` Path param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectDealRestoreResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Deals.Restore( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectDealRestoreParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Domain Types ### Deal - `type Deal struct{…}` - `Default map[string, unknown]` Properties keyed by property slug. Values can be strings, numbers, booleans, arrays, or null. For select/multiselect properties, values may be option slugs or option UUIDs on write; option slugs are returned on read. - `List unknown` # Grant ## Get grant `client.Prism.Objects.Deals.Grant.Get(ctx, dealID, query) (*PrismObjectDealGrantGetResponse, error)` **get** `/v2/prism/{teamId}/deal/{dealId}/grant` Get grant ### Parameters - `dealID string` - `query PrismObjectDealGrantGetParams` - `TeamID param.Field[string]` ### Returns - `type PrismObjectDealGrantGetResponse struct{…}` - `TeamGroupID []map[string, PrismObjectDealGrantGetResponseTeamGroupID]` - `const PrismObjectDealGrantGetResponseTeamGroupIDA PrismObjectDealGrantGetResponseTeamGroupID = "a"` - `const PrismObjectDealGrantGetResponseTeamGroupIDR PrismObjectDealGrantGetResponseTeamGroupID = "r"` - `const PrismObjectDealGrantGetResponseTeamGroupIDW PrismObjectDealGrantGetResponseTeamGroupID = "w"` - `TeamID map[string, PrismObjectDealGrantGetResponseTeamID]` - `const PrismObjectDealGrantGetResponseTeamIDA PrismObjectDealGrantGetResponseTeamID = "a"` - `const PrismObjectDealGrantGetResponseTeamIDR PrismObjectDealGrantGetResponseTeamID = "r"` - `const PrismObjectDealGrantGetResponseTeamIDW PrismObjectDealGrantGetResponseTeamID = "w"` - `UserID []map[string, PrismObjectDealGrantGetResponseUserID]` - `const PrismObjectDealGrantGetResponseUserIDA PrismObjectDealGrantGetResponseUserID = "a"` - `const PrismObjectDealGrantGetResponseUserIDR PrismObjectDealGrantGetResponseUserID = "r"` - `const PrismObjectDealGrantGetResponseUserIDW PrismObjectDealGrantGetResponseUserID = "w"` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) grant, err := client.Prism.Objects.Deals.Grant.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectDealGrantGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", grant.TeamGroupID) } ``` #### Response ```json { "team_group_id": [ { "foo": "a" } ], "team_id": { "foo": "a" }, "user_id": [ { "foo": "a" } ] } ``` ## Update grant `client.Prism.Objects.Deals.Grant.Update(ctx, dealID, params) (*PrismObjectDealGrantUpdateResponse, error)` **put** `/v2/prism/{teamId}/deal/{dealId}/grant` Update grant ### Parameters - `dealID string` - `params PrismObjectDealGrantUpdateParams` - `PathTeamID param.Field[string]` Path param - `TeamGroupID param.Field[[]map[string, PrismObjectDealGrantUpdateParamsTeamGroupID]]` Body param - `const PrismObjectDealGrantUpdateParamsTeamGroupIDA PrismObjectDealGrantUpdateParamsTeamGroupID = "a"` - `const PrismObjectDealGrantUpdateParamsTeamGroupIDR PrismObjectDealGrantUpdateParamsTeamGroupID = "r"` - `const PrismObjectDealGrantUpdateParamsTeamGroupIDW PrismObjectDealGrantUpdateParamsTeamGroupID = "w"` - `BodyTeamID param.Field[map[string, PrismObjectDealGrantUpdateParamsTeamID]]` Body param - `const PrismObjectDealGrantUpdateParamsTeamIDA PrismObjectDealGrantUpdateParamsTeamID = "a"` - `const PrismObjectDealGrantUpdateParamsTeamIDR PrismObjectDealGrantUpdateParamsTeamID = "r"` - `const PrismObjectDealGrantUpdateParamsTeamIDW PrismObjectDealGrantUpdateParamsTeamID = "w"` - `UserID param.Field[[]map[string, PrismObjectDealGrantUpdateParamsUserID]]` Body param - `const PrismObjectDealGrantUpdateParamsUserIDA PrismObjectDealGrantUpdateParamsUserID = "a"` - `const PrismObjectDealGrantUpdateParamsUserIDR PrismObjectDealGrantUpdateParamsUserID = "r"` - `const PrismObjectDealGrantUpdateParamsUserIDW PrismObjectDealGrantUpdateParamsUserID = "w"` - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectDealGrantUpdateResponse struct{…}` - `TeamGroupID []map[string, PrismObjectDealGrantUpdateResponseTeamGroupID]` - `const PrismObjectDealGrantUpdateResponseTeamGroupIDA PrismObjectDealGrantUpdateResponseTeamGroupID = "a"` - `const PrismObjectDealGrantUpdateResponseTeamGroupIDR PrismObjectDealGrantUpdateResponseTeamGroupID = "r"` - `const PrismObjectDealGrantUpdateResponseTeamGroupIDW PrismObjectDealGrantUpdateResponseTeamGroupID = "w"` - `TeamID map[string, PrismObjectDealGrantUpdateResponseTeamID]` - `const PrismObjectDealGrantUpdateResponseTeamIDA PrismObjectDealGrantUpdateResponseTeamID = "a"` - `const PrismObjectDealGrantUpdateResponseTeamIDR PrismObjectDealGrantUpdateResponseTeamID = "r"` - `const PrismObjectDealGrantUpdateResponseTeamIDW PrismObjectDealGrantUpdateResponseTeamID = "w"` - `UserID []map[string, PrismObjectDealGrantUpdateResponseUserID]` - `const PrismObjectDealGrantUpdateResponseUserIDA PrismObjectDealGrantUpdateResponseUserID = "a"` - `const PrismObjectDealGrantUpdateResponseUserIDR PrismObjectDealGrantUpdateResponseUserID = "r"` - `const PrismObjectDealGrantUpdateResponseUserIDW PrismObjectDealGrantUpdateResponseUserID = "w"` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) grant, err := client.Prism.Objects.Deals.Grant.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectDealGrantUpdateParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", grant.TeamGroupID) } ``` #### Response ```json { "team_group_id": [ { "foo": "a" } ], "team_id": { "foo": "a" }, "user_id": [ { "foo": "a" } ] } ``` # Actions ## Create object `client.Prism.Objects.Actions.New(ctx, params) (*PrismObjectActionNewResponse, error)` **post** `/v2/prism/{teamId}/action` Create object ### Parameters - `params PrismObjectActionNewParams` - `TeamID param.Field[string]` Path param - `PrismObjectProperties param.Field[PrismObjectProperties]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectActionNewResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) action, err := client.Prism.Objects.Actions.New(context.TODO(), micro.PrismObjectActionNewParams{ PrismObjectProperties: micro.PrismObjectPropertiesParam{ }, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", action.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## List records of an object type `client.Prism.Objects.Actions.List(ctx, params) (*PrismObjectActionListResponse, error)` **get** `/v2/prism/{teamId}/action` Convenience list endpoint. Equivalent to `POST /v2/prism/{teamId}/{objectType}/query` with an empty body, plus query-string sugar for the common cases. Any unrecognized query parameter is interpreted as an equality filter on a property of that name; pass arrays for `in`. Values are received as strings, so non-string property filters via this endpoint may not work — use the `query` endpoint for typed comparisons or anything beyond simple equality. ### Parameters - `params PrismObjectActionListParams` - `TeamID param.Field[string]` Path param - `Cursor param.Field[string]` Query param: Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged to fetch the next page. - `Deleted param.Field[bool]` Query param: Include soft-deleted records. Pass the literal string `true`. - `IncludeTotal param.Field[bool]` Query param: When set to `true`, the response includes a `total` field with the unpaginated row count. Costs an extra pass; prefer `GET .../count` for the unfiltered total. - `Limit param.Field[int64]` Query param: Maximum number of rows to return. Capped server-side at 50. - `ListID param.Field[string]` Query param: Scope properties to a specific list/app. - `Select param.Field[string]` Query param: Comma-separated property slugs to return. Use dot notation for relationships. `id` is always returned at the top level. Defaults to all properties. - `Sort param.Field[string]` Query param: Comma-separated list of slugs. Prefix with `-` for descending. Example: `sort=-updated_at,name`. ### Returns - `type PrismObjectActionListResponse struct{…}` - `Data []PrismObjectActionListResponseData` - `ID string` - `IsUserObject bool` - `Properties map[string, unknown]` Selected property values keyed by property slug. For select/multiselect properties, option slugs are returned. For reference properties, values are nested `{ id, properties }` objects. - `Source string` - `HasMore bool` Accurate end-of-data signal — false on the last page, never forces clients to overshoot. - `NextCursor string` - `Total int64` Populated only when `?include_total=true` was passed. ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) actions, err := client.Prism.Objects.Actions.List(context.TODO(), micro.PrismObjectActionListParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", actions.Data) } ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "is_user_object": true, "properties": { "foo": "bar" }, "source": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "has_more": true, "next_cursor": "next_cursor", "total": 0 } ``` ## Get object `client.Prism.Objects.Actions.Get(ctx, actionID, params) (*PrismObjectActionGetResponse, error)` **get** `/v2/prism/{teamId}/action/{actionId}` Get object ### Parameters - `actionID string` - `params PrismObjectActionGetParams` - `TeamID param.Field[string]` Path param - `Select param.Field[string]` Query param: Comma-separated property slugs to return. Use dot notation for relationships. `id` is always returned at the top level. Defaults to all properties. ### Returns - `type PrismObjectActionGetResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) action, err := client.Prism.Objects.Actions.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectActionGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", action.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Patch object `client.Prism.Objects.Actions.Update(ctx, actionID, params) (*PrismObjectActionUpdateResponse, error)` **patch** `/v2/prism/{teamId}/action/{actionId}` Patch object ### Parameters - `actionID string` - `params PrismObjectActionUpdateParams` - `TeamID param.Field[string]` Path param - `PrismObjectProperties param.Field[PrismObjectProperties]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. - `IfMatch param.Field[string]` Header param: Optimistic concurrency. Pass back the `etag` header from a previous GET of this record; the write only proceeds if the record hasn't changed since. Mismatch → 412 `precondition_failed`. Use `*` to require the record exists (any ETag accepted). ### Returns - `type PrismObjectActionUpdateResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) action, err := client.Prism.Objects.Actions.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectActionUpdateParams{ PrismObjectProperties: micro.PrismObjectPropertiesParam{ }, }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", action.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Delete object `client.Prism.Objects.Actions.Delete(ctx, actionID, params) error` **delete** `/v2/prism/{teamId}/action/{actionId}` Delete object ### Parameters - `actionID string` - `params PrismObjectActionDeleteParams` - `TeamID param.Field[string]` Path param - `IfMatch param.Field[string]` Header param: Optimistic concurrency. Pass back the `etag` header from a previous GET of this record; the write only proceeds if the record hasn't changed since. Mismatch → 412 `precondition_failed`. Use `*` to require the record exists (any ETag accepted). ### Example ```go package main import ( "context" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) err := client.Prism.Objects.Actions.Delete( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectActionDeleteParams{ }, ) if err != nil { panic(err.Error()) } } ``` ## Query `client.Prism.Objects.Actions.Query(ctx, params) (*PrismObjectActionQueryResponse, error)` **post** `/v2/prism/{teamId}/action/query` Query ### Parameters - `params PrismObjectActionQueryParams` - `TeamID param.Field[string]` Path param - `Query param.Field[PrismObjectActionQueryParamsQuery]` Body param - `Select []string` Property slugs to select. Use dot notation for relationships (e.g. attendee.contact.first_name). `id` is always returned at the top level of each row and does not need to be selected. - `Combinator PrismObjectActionQueryParamsQueryCombinator` Logical operator for combining filters - `const PrismObjectActionQueryParamsQueryCombinatorAnd PrismObjectActionQueryParamsQueryCombinator = "AND"` - `const PrismObjectActionQueryParamsQueryCombinatorOr PrismObjectActionQueryParamsQueryCombinator = "OR"` - `Cursor string` Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged to fetch the next page. When set, `page` and `limit` are derived from the cursor and any explicit values are ignored. - `Filter []map[string, PrismObjectActionQueryParamsQueryFilter]` Filters as [{ slug: { operator: value } }]. For select/multiselect properties, values may be option slugs or option UUIDs. - `type PrismObjectActionQueryParamsQueryFilterPrismQueryFilterEq struct{…}` - `Equals PrismObjectActionQueryParamsQueryFilterPrismQueryFilterEqUnion` - `UnionString` - `UnionBool` - `type PrismObjectActionQueryParamsQueryFilterPrismQueryFilterNe struct{…}` - `NotEquals PrismObjectActionQueryParamsQueryFilterPrismQueryFilterNeUnion` - `UnionString` - `UnionBool` - `type PrismObjectActionQueryParamsQueryFilterPrismQueryFilterLt struct{…}` - `Less string` - `type PrismObjectActionQueryParamsQueryFilterPrismQueryFilterGt struct{…}` - `Greater string` - `type PrismObjectActionQueryParamsQueryFilterPrismQueryFilterLte struct{…}` - `LessOrEquals string` - `type PrismObjectActionQueryParamsQueryFilterPrismQueryFilterGte struct{…}` - `GreaterOrEquals string` - `type PrismObjectActionQueryParamsQueryFilterContains struct{…}` - `Contains PrismObjectActionQueryParamsQueryFilterContainsContainsUnion` - `UnionString` - `UnionBool` - `type PrismObjectActionQueryParamsQueryFilterContainsContainsArray []string` - `type PrismObjectActionQueryParamsQueryFilterBeginsWith struct{…}` - `BeginsWith string` - `type PrismObjectActionQueryParamsQueryFilterEndsWith struct{…}` - `EndsWith string` - `type PrismObjectActionQueryParamsQueryFilterNotContains struct{…}` - `NotContains string` - `type PrismObjectActionQueryParamsQueryFilterExists struct{…}` - `Exists bool` - `type PrismObjectActionQueryParamsQueryFilterNotExists struct{…}` - `NotExists bool` - `type PrismObjectActionQueryParamsQueryFilterIsNull struct{…}` - `IsNull PrismObjectActionQueryParamsQueryFilterIsNullIsNullUnion` - `UnionString` - `UnionBool` - `type PrismObjectActionQueryParamsQueryFilterIsNullIsNullArray []string` - `type PrismObjectActionQueryParamsQueryFilterIsNotNull struct{…}` - `IsNotNull PrismObjectActionQueryParamsQueryFilterIsNotNullIsNotNullUnion` - `UnionString` - `UnionBool` - `type PrismObjectActionQueryParamsQueryFilterIsNotNullIsNotNullArray []string` - `type PrismObjectActionQueryParamsQueryFilterBetween struct{…}` - `Between PrismObjectActionQueryParamsQueryFilterBetweenBetweenUnion` - `UnionString` - `UnionBool` - `type PrismObjectActionQueryParamsQueryFilterBetweenBetweenArray []string` - `type PrismObjectActionQueryParamsQueryFilterIn struct{…}` - `In []string` - `type PrismObjectActionQueryParamsQueryFilterNotIn struct{…}` - `NotIn []string` - `Limit int64` Maximum number of rows to return. Capped server-side at 50; requests above the cap are rejected. - `ListID string` - `Page int64` Page number (1-based). Prefer `cursor`. Page-number pagination drifts under concurrent writes; use it only for one-shot exports. - `Sort []map[string, PrismObjectActionQueryParamsQuerySort]` Sort order as [{ slug: direction }]. Array order determines sort priority - `const PrismObjectActionQueryParamsQuerySortAsc PrismObjectActionQueryParamsQuerySort = "asc"` - `const PrismObjectActionQueryParamsQuerySortDesc PrismObjectActionQueryParamsQuerySort = "desc"` - `ID param.Field[PrismObjectActionQueryParamsIDUnion]` Body param - `UnionString` - `type PrismObjectActionQueryParamsIDArray []string` - `Boxes param.Field[[]string]` Body param - `Cursor param.Field[string]` Body param: Alternative location for the opaque cursor (sibling of `query`). Use whichever feels more natural; if both are present, `query.cursor` wins. - `Deleted param.Field[bool]` Body param - `IncludeTotal param.Field[bool]` Body param: When true, the response includes a `total` field with the unpaginated row count. Costs an additional pass over the result set — for unfiltered totals prefer `GET /v2/prism/{teamId}/{objectType}/count` instead. - `Sources param.Field[[]string]` Body param ### Returns - `type PrismObjectActionQueryResponse struct{…}` - `Data []PrismObjectActionQueryResponseData` - `ID string` - `IsUserObject bool` - `Properties map[string, unknown]` Selected property values keyed by property slug. For select/multiselect properties, option slugs are returned. For reference properties, values are nested `{ id, properties }` objects. - `Source string` - `HasMore bool` Accurate end-of-data signal. False when this page contains the last record; true only when at least one more record exists. (Implementation note: the server fetches one extra row internally to determine this — clients never need to overshoot to discover the end.) - `NextCursor string` Opaque cursor pointing at the next page. Pass it back unchanged in the request body (`cursor`) of the next call. Null when `has_more` is false. - `Total int64` Only populated when the request set `include_total: true`. Total number of records matching the query, ignoring pagination. Opt-in because it costs an additional pass over the result set. ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Actions.Query(context.TODO(), micro.PrismObjectActionQueryParams{ Query: micro.F(micro.PrismObjectActionQueryParamsQuery{ Select: micro.F([]string{"string"}), }), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "is_user_object": true, "properties": { "foo": "bar" }, "source": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "has_more": true, "next_cursor": "next_cursor", "total": 0 } ``` ## Total record count for an object type `client.Prism.Objects.Actions.Count(ctx, params) (*PrismObjectActionCountResponse, error)` **get** `/v2/prism/{teamId}/action/count` Returns the total number of records of this object type that the caller can see. Avoids the page-overshoot anti-pattern — clients no longer need to keep paging until `has_more` flips false to discover the total. Currently does not apply query filters; for a filtered total, pass `include_total: true` in a POST `/query` body. ### Parameters - `params PrismObjectActionCountParams` - `TeamID param.Field[string]` Path param - `ListID param.Field[string]` Query param: Scope the count to a specific list/app. ### Returns - `type PrismObjectActionCountResponse struct{…}` - `Total int64` Number of records matching the access scope. ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Actions.Count(context.TODO(), micro.PrismObjectActionCountParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Total) } ``` #### Response ```json { "total": 0 } ``` ## Find a record by property value `client.Prism.Objects.Actions.Find(ctx, slug, value, params) (*PrismObjectActionFindResponse, error)` **get** `/v2/prism/{teamId}/action/by/{slug}/{value}` Returns the single record whose property `{slug}` equals `{value}`. 404 if nothing matches; 409 if more than one record matches. ### Parameters - `slug string` - `value string` - `params PrismObjectActionFindParams` - `TeamID param.Field[string]` Path param - `ListID param.Field[string]` Query param: Scope the lookup to a specific list/app. ### Returns - `type PrismObjectActionFindResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Actions.Find( context.TODO(), "slug", "value", micro.PrismObjectActionFindParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Upsert by property value `client.Prism.Objects.Actions.Upsert(ctx, slug, value, params) (*PrismObjectActionUpsertResponse, error)` **put** `/v2/prism/{teamId}/action/by/{slug}/{value}` Idempotent create-or-update keyed on `{slug}={value}`. If exactly one record matches, it is patched and 200 is returned. If none match, a new record is created (with the lookup property set if absent) and 201 is returned. If multiple records match, 409 is returned and you should patch by id instead. ### Parameters - `slug string` - `value string` - `params PrismObjectActionUpsertParams` - `TeamID param.Field[string]` Path param - `PrismObjectProperties param.Field[PrismObjectProperties]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectActionUpsertResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Actions.Upsert( context.TODO(), "slug", "value", micro.PrismObjectActionUpsertParams{ PrismObjectProperties: micro.PrismObjectPropertiesParam{ }, }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Import objects `client.Prism.Objects.Actions.BulkNew(ctx, params) (*PrismObjectActionBulkNewResponse, error)` **post** `/v2/prism/{teamId}/action/import` Import multiple objects in batch. Properties are keyed by slug. Automatically routes based on size: small batches complete synchronously and return 200 with the final `ImportJob`; large batches start an async job, return 202 with `status: processing` and a `Location` header, and can be polled via `GET /v2/prism/{teamId}/imports/{jobId}`. ### Parameters - `params PrismObjectActionBulkNewParams` - `TeamID param.Field[string]` Path param - `Objects param.Field[[]PrismObjectProperties]` Body param: Array of objects to import with property values keyed by slug - `Default map[string, unknown]` Properties keyed by property slug. Values can be strings, numbers, booleans, arrays, or null. For select/multiselect properties, values may be option slugs or option UUIDs on write; option slugs are returned on read. - `List unknown` - `Options param.Field[PrismObjectActionBulkNewParamsOptions]` Body param - `CaseInsensitive bool` Whether deduplication should be case insensitive - `DedupeBy string` Property slug to deduplicate on - `ListID string` App/CRM ID for context (optional) - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectActionBulkNewResponse struct{…}` Status snapshot of an import job. Same shape used by the POST /import response and by GET /imports/{jobId}. - `JobID string` Null for sync imports (results inlined). Set for async imports. - `Status PrismObjectActionBulkNewResponseStatus` - `const PrismObjectActionBulkNewResponseStatusComplete PrismObjectActionBulkNewResponseStatus = "complete"` - `const PrismObjectActionBulkNewResponseStatusProcessing PrismObjectActionBulkNewResponseStatus = "processing"` - `const PrismObjectActionBulkNewResponseStatusFailed PrismObjectActionBulkNewResponseStatus = "failed"` - `Total int64` Total number of rows in the import. - `CreatedAt Time` - `Error PrismObjectActionBulkNewResponseError` Set when status=failed; describes the job-level failure (not per-row). - `Code string` - `Message string` - `ExpiresAt Time` - `Failed int64` - `Processed int64` Rows that have been attempted (succeeded + failed). - `Results []PrismObjectActionBulkNewResponseResult` Per-row outcomes. Always present for sync imports; populated for async imports once the job reaches `complete`. - `ID string` - `Created bool` - `Error PrismObjectActionBulkNewResponseResultsError` - `Code string` - `Message string` - `Existing bool` True if the row matched an existing record via the dedupe key. - `Succeeded int64` - `UpdatedAt Time` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Actions.BulkNew(context.TODO(), micro.PrismObjectActionBulkNewParams{ Objects: micro.F([]micro.PrismObjectPropertiesParam{micro.PrismObjectPropertiesParam{ }}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.JobID) } ``` #### Response ```json { "job_id": "job_id", "status": "complete", "total": 0, "created_at": "2019-12-27T18:11:19.117Z", "error": { "code": "code", "message": "message" }, "expires_at": "2019-12-27T18:11:19.117Z", "failed": 0, "processed": 0, "results": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created": true, "error": { "code": "code", "message": "message" }, "existing": true } ], "succeeded": 0, "updated_at": "2019-12-27T18:11:19.117Z" } ``` ## Bulk update records (partial success) `client.Prism.Objects.Actions.BulkUpdate(ctx, params) (*PrismObjectActionBulkUpdateResponse, error)` **post** `/v2/prism/{teamId}/action/batch/update` Patch up to 100 records in a single call. Each item is attempted independently — failures don't abort the batch. Inspect `results[].status` per item. ### Parameters - `params PrismObjectActionBulkUpdateParams` - `TeamID param.Field[string]` Path param - `Items param.Field[[]PrismObjectActionBulkUpdateParamsItem]` Body param - `ID string` - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectActionBulkUpdateResponse struct{…}` Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed. - `Results []PrismObjectActionBulkUpdateResponseResult` - `ID string` Item ID, or null if the input was unparseable. - `Status PrismObjectActionBulkUpdateResponseResultsStatus` - `const PrismObjectActionBulkUpdateResponseResultsStatusOk PrismObjectActionBulkUpdateResponseResultsStatus = "ok"` - `const PrismObjectActionBulkUpdateResponseResultsStatusError PrismObjectActionBulkUpdateResponseResultsStatus = "error"` - `Error PrismObjectActionBulkUpdateResponseResultsError` - `Code string` - `Message string` - `Record PrismObjectActionBulkUpdateResponseResultsRecord` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` - `Summary PrismObjectActionBulkUpdateResponseSummary` - `Failed int64` - `Succeeded int64` - `Total int64` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Actions.BulkUpdate(context.TODO(), micro.PrismObjectActionBulkUpdateParams{ Items: micro.F([]micro.PrismObjectActionBulkUpdateParamsItem{micro.PrismObjectActionBulkUpdateParamsItem{ ID: micro.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), }}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Results) } ``` #### Response ```json { "results": [ { "id": "id", "status": "ok", "error": { "code": "code", "message": "message" }, "record": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } } ], "summary": { "failed": 0, "succeeded": 0, "total": 0 } } ``` ## Bulk delete records (partial success) `client.Prism.Objects.Actions.BulkDelete(ctx, params) (*PrismObjectActionBulkDeleteResponse, error)` **post** `/v2/prism/{teamId}/action/batch/delete` Soft-delete up to 100 records in a single call. Same partial-success contract as batch/update. ### Parameters - `params PrismObjectActionBulkDeleteParams` - `TeamID param.Field[string]` Path param - `IDs param.Field[[]string]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectActionBulkDeleteResponse struct{…}` Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed. - `Results []PrismObjectActionBulkDeleteResponseResult` - `ID string` Item ID, or null if the input was unparseable. - `Status PrismObjectActionBulkDeleteResponseResultsStatus` - `const PrismObjectActionBulkDeleteResponseResultsStatusOk PrismObjectActionBulkDeleteResponseResultsStatus = "ok"` - `const PrismObjectActionBulkDeleteResponseResultsStatusError PrismObjectActionBulkDeleteResponseResultsStatus = "error"` - `Error PrismObjectActionBulkDeleteResponseResultsError` - `Code string` - `Message string` - `Record PrismObjectActionBulkDeleteResponseResultsRecord` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` - `Summary PrismObjectActionBulkDeleteResponseSummary` - `Failed int64` - `Succeeded int64` - `Total int64` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Actions.BulkDelete(context.TODO(), micro.PrismObjectActionBulkDeleteParams{ IDs: micro.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Results) } ``` #### Response ```json { "results": [ { "id": "id", "status": "ok", "error": { "code": "code", "message": "message" }, "record": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } } ], "summary": { "failed": 0, "succeeded": 0, "total": 0 } } ``` ## Duplicate object `client.Prism.Objects.Actions.Duplicate(ctx, actionID, params) (*PrismObjectActionDuplicateResponse, error)` **post** `/v2/prism/{teamId}/action/{actionId}/duplicate` Duplicate object ### Parameters - `actionID string` - `params PrismObjectActionDuplicateParams` - `TeamID param.Field[string]` Path param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectActionDuplicateResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Actions.Duplicate( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectActionDuplicateParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Restore object `client.Prism.Objects.Actions.Restore(ctx, actionID, params) (*PrismObjectActionRestoreResponse, error)` **post** `/v2/prism/{teamId}/action/{actionId}/restore` Restore object ### Parameters - `actionID string` - `params PrismObjectActionRestoreParams` - `TeamID param.Field[string]` Path param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectActionRestoreResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Actions.Restore( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectActionRestoreParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Domain Types ### Action - `type Action struct{…}` - `Default map[string, unknown]` Properties keyed by property slug. Values can be strings, numbers, booleans, arrays, or null. For select/multiselect properties, values may be option slugs or option UUIDs on write; option slugs are returned on read. - `List unknown` # Grant ## Get grant `client.Prism.Objects.Actions.Grant.Get(ctx, actionID, query) (*PrismObjectActionGrantGetResponse, error)` **get** `/v2/prism/{teamId}/action/{actionId}/grant` Get grant ### Parameters - `actionID string` - `query PrismObjectActionGrantGetParams` - `TeamID param.Field[string]` ### Returns - `type PrismObjectActionGrantGetResponse struct{…}` - `TeamGroupID []map[string, PrismObjectActionGrantGetResponseTeamGroupID]` - `const PrismObjectActionGrantGetResponseTeamGroupIDA PrismObjectActionGrantGetResponseTeamGroupID = "a"` - `const PrismObjectActionGrantGetResponseTeamGroupIDR PrismObjectActionGrantGetResponseTeamGroupID = "r"` - `const PrismObjectActionGrantGetResponseTeamGroupIDW PrismObjectActionGrantGetResponseTeamGroupID = "w"` - `TeamID map[string, PrismObjectActionGrantGetResponseTeamID]` - `const PrismObjectActionGrantGetResponseTeamIDA PrismObjectActionGrantGetResponseTeamID = "a"` - `const PrismObjectActionGrantGetResponseTeamIDR PrismObjectActionGrantGetResponseTeamID = "r"` - `const PrismObjectActionGrantGetResponseTeamIDW PrismObjectActionGrantGetResponseTeamID = "w"` - `UserID []map[string, PrismObjectActionGrantGetResponseUserID]` - `const PrismObjectActionGrantGetResponseUserIDA PrismObjectActionGrantGetResponseUserID = "a"` - `const PrismObjectActionGrantGetResponseUserIDR PrismObjectActionGrantGetResponseUserID = "r"` - `const PrismObjectActionGrantGetResponseUserIDW PrismObjectActionGrantGetResponseUserID = "w"` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) grant, err := client.Prism.Objects.Actions.Grant.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectActionGrantGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", grant.TeamGroupID) } ``` #### Response ```json { "team_group_id": [ { "foo": "a" } ], "team_id": { "foo": "a" }, "user_id": [ { "foo": "a" } ] } ``` ## Update grant `client.Prism.Objects.Actions.Grant.Update(ctx, actionID, params) (*PrismObjectActionGrantUpdateResponse, error)` **put** `/v2/prism/{teamId}/action/{actionId}/grant` Update grant ### Parameters - `actionID string` - `params PrismObjectActionGrantUpdateParams` - `PathTeamID param.Field[string]` Path param - `TeamGroupID param.Field[[]map[string, PrismObjectActionGrantUpdateParamsTeamGroupID]]` Body param - `const PrismObjectActionGrantUpdateParamsTeamGroupIDA PrismObjectActionGrantUpdateParamsTeamGroupID = "a"` - `const PrismObjectActionGrantUpdateParamsTeamGroupIDR PrismObjectActionGrantUpdateParamsTeamGroupID = "r"` - `const PrismObjectActionGrantUpdateParamsTeamGroupIDW PrismObjectActionGrantUpdateParamsTeamGroupID = "w"` - `BodyTeamID param.Field[map[string, PrismObjectActionGrantUpdateParamsTeamID]]` Body param - `const PrismObjectActionGrantUpdateParamsTeamIDA PrismObjectActionGrantUpdateParamsTeamID = "a"` - `const PrismObjectActionGrantUpdateParamsTeamIDR PrismObjectActionGrantUpdateParamsTeamID = "r"` - `const PrismObjectActionGrantUpdateParamsTeamIDW PrismObjectActionGrantUpdateParamsTeamID = "w"` - `UserID param.Field[[]map[string, PrismObjectActionGrantUpdateParamsUserID]]` Body param - `const PrismObjectActionGrantUpdateParamsUserIDA PrismObjectActionGrantUpdateParamsUserID = "a"` - `const PrismObjectActionGrantUpdateParamsUserIDR PrismObjectActionGrantUpdateParamsUserID = "r"` - `const PrismObjectActionGrantUpdateParamsUserIDW PrismObjectActionGrantUpdateParamsUserID = "w"` - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectActionGrantUpdateResponse struct{…}` - `TeamGroupID []map[string, PrismObjectActionGrantUpdateResponseTeamGroupID]` - `const PrismObjectActionGrantUpdateResponseTeamGroupIDA PrismObjectActionGrantUpdateResponseTeamGroupID = "a"` - `const PrismObjectActionGrantUpdateResponseTeamGroupIDR PrismObjectActionGrantUpdateResponseTeamGroupID = "r"` - `const PrismObjectActionGrantUpdateResponseTeamGroupIDW PrismObjectActionGrantUpdateResponseTeamGroupID = "w"` - `TeamID map[string, PrismObjectActionGrantUpdateResponseTeamID]` - `const PrismObjectActionGrantUpdateResponseTeamIDA PrismObjectActionGrantUpdateResponseTeamID = "a"` - `const PrismObjectActionGrantUpdateResponseTeamIDR PrismObjectActionGrantUpdateResponseTeamID = "r"` - `const PrismObjectActionGrantUpdateResponseTeamIDW PrismObjectActionGrantUpdateResponseTeamID = "w"` - `UserID []map[string, PrismObjectActionGrantUpdateResponseUserID]` - `const PrismObjectActionGrantUpdateResponseUserIDA PrismObjectActionGrantUpdateResponseUserID = "a"` - `const PrismObjectActionGrantUpdateResponseUserIDR PrismObjectActionGrantUpdateResponseUserID = "r"` - `const PrismObjectActionGrantUpdateResponseUserIDW PrismObjectActionGrantUpdateResponseUserID = "w"` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) grant, err := client.Prism.Objects.Actions.Grant.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectActionGrantUpdateParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", grant.TeamGroupID) } ``` #### Response ```json { "team_group_id": [ { "foo": "a" } ], "team_id": { "foo": "a" }, "user_id": [ { "foo": "a" } ] } ``` # Documents ## Create object `client.Prism.Objects.Documents.New(ctx, params) (*PrismObjectDocumentNewResponse, error)` **post** `/v2/prism/{teamId}/document` Create object ### Parameters - `params PrismObjectDocumentNewParams` - `TeamID param.Field[string]` Path param - `PrismObjectProperties param.Field[PrismObjectProperties]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectDocumentNewResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) document, err := client.Prism.Objects.Documents.New(context.TODO(), micro.PrismObjectDocumentNewParams{ PrismObjectProperties: micro.PrismObjectPropertiesParam{ }, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", document.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## List records of an object type `client.Prism.Objects.Documents.List(ctx, params) (*PrismObjectDocumentListResponse, error)` **get** `/v2/prism/{teamId}/document` Convenience list endpoint. Equivalent to `POST /v2/prism/{teamId}/{objectType}/query` with an empty body, plus query-string sugar for the common cases. Any unrecognized query parameter is interpreted as an equality filter on a property of that name; pass arrays for `in`. Values are received as strings, so non-string property filters via this endpoint may not work — use the `query` endpoint for typed comparisons or anything beyond simple equality. ### Parameters - `params PrismObjectDocumentListParams` - `TeamID param.Field[string]` Path param - `Cursor param.Field[string]` Query param: Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged to fetch the next page. - `Deleted param.Field[bool]` Query param: Include soft-deleted records. Pass the literal string `true`. - `IncludeTotal param.Field[bool]` Query param: When set to `true`, the response includes a `total` field with the unpaginated row count. Costs an extra pass; prefer `GET .../count` for the unfiltered total. - `Limit param.Field[int64]` Query param: Maximum number of rows to return. Capped server-side at 50. - `ListID param.Field[string]` Query param: Scope properties to a specific list/app. - `Select param.Field[string]` Query param: Comma-separated property slugs to return. Use dot notation for relationships. `id` is always returned at the top level. Defaults to all properties. - `Sort param.Field[string]` Query param: Comma-separated list of slugs. Prefix with `-` for descending. Example: `sort=-updated_at,name`. ### Returns - `type PrismObjectDocumentListResponse struct{…}` - `Data []PrismObjectDocumentListResponseData` - `ID string` - `IsUserObject bool` - `Properties map[string, unknown]` Selected property values keyed by property slug. For select/multiselect properties, option slugs are returned. For reference properties, values are nested `{ id, properties }` objects. - `Source string` - `HasMore bool` Accurate end-of-data signal — false on the last page, never forces clients to overshoot. - `NextCursor string` - `Total int64` Populated only when `?include_total=true` was passed. ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) documents, err := client.Prism.Objects.Documents.List(context.TODO(), micro.PrismObjectDocumentListParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", documents.Data) } ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "is_user_object": true, "properties": { "foo": "bar" }, "source": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "has_more": true, "next_cursor": "next_cursor", "total": 0 } ``` ## Get object `client.Prism.Objects.Documents.Get(ctx, documentID, params) (*PrismObjectDocumentGetResponse, error)` **get** `/v2/prism/{teamId}/document/{documentId}` Get object ### Parameters - `documentID string` - `params PrismObjectDocumentGetParams` - `TeamID param.Field[string]` Path param - `Select param.Field[string]` Query param: Comma-separated property slugs to return. Use dot notation for relationships. `id` is always returned at the top level. Defaults to all properties. ### Returns - `type PrismObjectDocumentGetResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) document, err := client.Prism.Objects.Documents.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectDocumentGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", document.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Patch object `client.Prism.Objects.Documents.Update(ctx, documentID, params) (*PrismObjectDocumentUpdateResponse, error)` **patch** `/v2/prism/{teamId}/document/{documentId}` Patch object ### Parameters - `documentID string` - `params PrismObjectDocumentUpdateParams` - `TeamID param.Field[string]` Path param - `PrismObjectProperties param.Field[PrismObjectProperties]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. - `IfMatch param.Field[string]` Header param: Optimistic concurrency. Pass back the `etag` header from a previous GET of this record; the write only proceeds if the record hasn't changed since. Mismatch → 412 `precondition_failed`. Use `*` to require the record exists (any ETag accepted). ### Returns - `type PrismObjectDocumentUpdateResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) document, err := client.Prism.Objects.Documents.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectDocumentUpdateParams{ PrismObjectProperties: micro.PrismObjectPropertiesParam{ }, }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", document.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Delete object `client.Prism.Objects.Documents.Delete(ctx, documentID, params) error` **delete** `/v2/prism/{teamId}/document/{documentId}` Delete object ### Parameters - `documentID string` - `params PrismObjectDocumentDeleteParams` - `TeamID param.Field[string]` Path param - `IfMatch param.Field[string]` Header param: Optimistic concurrency. Pass back the `etag` header from a previous GET of this record; the write only proceeds if the record hasn't changed since. Mismatch → 412 `precondition_failed`. Use `*` to require the record exists (any ETag accepted). ### Example ```go package main import ( "context" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) err := client.Prism.Objects.Documents.Delete( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectDocumentDeleteParams{ }, ) if err != nil { panic(err.Error()) } } ``` ## Query `client.Prism.Objects.Documents.Query(ctx, params) (*PrismObjectDocumentQueryResponse, error)` **post** `/v2/prism/{teamId}/document/query` Query ### Parameters - `params PrismObjectDocumentQueryParams` - `TeamID param.Field[string]` Path param - `Query param.Field[PrismObjectDocumentQueryParamsQuery]` Body param - `Select []string` Property slugs to select. Use dot notation for relationships (e.g. attendee.contact.first_name). `id` is always returned at the top level of each row and does not need to be selected. - `Combinator PrismObjectDocumentQueryParamsQueryCombinator` Logical operator for combining filters - `const PrismObjectDocumentQueryParamsQueryCombinatorAnd PrismObjectDocumentQueryParamsQueryCombinator = "AND"` - `const PrismObjectDocumentQueryParamsQueryCombinatorOr PrismObjectDocumentQueryParamsQueryCombinator = "OR"` - `Cursor string` Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged to fetch the next page. When set, `page` and `limit` are derived from the cursor and any explicit values are ignored. - `Filter []map[string, PrismObjectDocumentQueryParamsQueryFilter]` Filters as [{ slug: { operator: value } }]. For select/multiselect properties, values may be option slugs or option UUIDs. - `type PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterEq struct{…}` - `Equals PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterEqUnion` - `UnionString` - `UnionBool` - `type PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterNe struct{…}` - `NotEquals PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterNeUnion` - `UnionString` - `UnionBool` - `type PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterLt struct{…}` - `Less string` - `type PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterGt struct{…}` - `Greater string` - `type PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterLte struct{…}` - `LessOrEquals string` - `type PrismObjectDocumentQueryParamsQueryFilterPrismQueryFilterGte struct{…}` - `GreaterOrEquals string` - `type PrismObjectDocumentQueryParamsQueryFilterContains struct{…}` - `Contains PrismObjectDocumentQueryParamsQueryFilterContainsContainsUnion` - `UnionString` - `UnionBool` - `type PrismObjectDocumentQueryParamsQueryFilterContainsContainsArray []string` - `type PrismObjectDocumentQueryParamsQueryFilterBeginsWith struct{…}` - `BeginsWith string` - `type PrismObjectDocumentQueryParamsQueryFilterEndsWith struct{…}` - `EndsWith string` - `type PrismObjectDocumentQueryParamsQueryFilterNotContains struct{…}` - `NotContains string` - `type PrismObjectDocumentQueryParamsQueryFilterExists struct{…}` - `Exists bool` - `type PrismObjectDocumentQueryParamsQueryFilterNotExists struct{…}` - `NotExists bool` - `type PrismObjectDocumentQueryParamsQueryFilterIsNull struct{…}` - `IsNull PrismObjectDocumentQueryParamsQueryFilterIsNullIsNullUnion` - `UnionString` - `UnionBool` - `type PrismObjectDocumentQueryParamsQueryFilterIsNullIsNullArray []string` - `type PrismObjectDocumentQueryParamsQueryFilterIsNotNull struct{…}` - `IsNotNull PrismObjectDocumentQueryParamsQueryFilterIsNotNullIsNotNullUnion` - `UnionString` - `UnionBool` - `type PrismObjectDocumentQueryParamsQueryFilterIsNotNullIsNotNullArray []string` - `type PrismObjectDocumentQueryParamsQueryFilterBetween struct{…}` - `Between PrismObjectDocumentQueryParamsQueryFilterBetweenBetweenUnion` - `UnionString` - `UnionBool` - `type PrismObjectDocumentQueryParamsQueryFilterBetweenBetweenArray []string` - `type PrismObjectDocumentQueryParamsQueryFilterIn struct{…}` - `In []string` - `type PrismObjectDocumentQueryParamsQueryFilterNotIn struct{…}` - `NotIn []string` - `Limit int64` Maximum number of rows to return. Capped server-side at 50; requests above the cap are rejected. - `ListID string` - `Page int64` Page number (1-based). Prefer `cursor`. Page-number pagination drifts under concurrent writes; use it only for one-shot exports. - `Sort []map[string, PrismObjectDocumentQueryParamsQuerySort]` Sort order as [{ slug: direction }]. Array order determines sort priority - `const PrismObjectDocumentQueryParamsQuerySortAsc PrismObjectDocumentQueryParamsQuerySort = "asc"` - `const PrismObjectDocumentQueryParamsQuerySortDesc PrismObjectDocumentQueryParamsQuerySort = "desc"` - `ID param.Field[PrismObjectDocumentQueryParamsIDUnion]` Body param - `UnionString` - `type PrismObjectDocumentQueryParamsIDArray []string` - `Boxes param.Field[[]string]` Body param - `Cursor param.Field[string]` Body param: Alternative location for the opaque cursor (sibling of `query`). Use whichever feels more natural; if both are present, `query.cursor` wins. - `Deleted param.Field[bool]` Body param - `IncludeTotal param.Field[bool]` Body param: When true, the response includes a `total` field with the unpaginated row count. Costs an additional pass over the result set — for unfiltered totals prefer `GET /v2/prism/{teamId}/{objectType}/count` instead. - `Sources param.Field[[]string]` Body param ### Returns - `type PrismObjectDocumentQueryResponse struct{…}` - `Data []PrismObjectDocumentQueryResponseData` - `ID string` - `IsUserObject bool` - `Properties map[string, unknown]` Selected property values keyed by property slug. For select/multiselect properties, option slugs are returned. For reference properties, values are nested `{ id, properties }` objects. - `Source string` - `HasMore bool` Accurate end-of-data signal. False when this page contains the last record; true only when at least one more record exists. (Implementation note: the server fetches one extra row internally to determine this — clients never need to overshoot to discover the end.) - `NextCursor string` Opaque cursor pointing at the next page. Pass it back unchanged in the request body (`cursor`) of the next call. Null when `has_more` is false. - `Total int64` Only populated when the request set `include_total: true`. Total number of records matching the query, ignoring pagination. Opt-in because it costs an additional pass over the result set. ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Documents.Query(context.TODO(), micro.PrismObjectDocumentQueryParams{ Query: micro.F(micro.PrismObjectDocumentQueryParamsQuery{ Select: micro.F([]string{"string"}), }), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "is_user_object": true, "properties": { "foo": "bar" }, "source": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "has_more": true, "next_cursor": "next_cursor", "total": 0 } ``` ## Total record count for an object type `client.Prism.Objects.Documents.Count(ctx, params) (*PrismObjectDocumentCountResponse, error)` **get** `/v2/prism/{teamId}/document/count` Returns the total number of records of this object type that the caller can see. Avoids the page-overshoot anti-pattern — clients no longer need to keep paging until `has_more` flips false to discover the total. Currently does not apply query filters; for a filtered total, pass `include_total: true` in a POST `/query` body. ### Parameters - `params PrismObjectDocumentCountParams` - `TeamID param.Field[string]` Path param - `ListID param.Field[string]` Query param: Scope the count to a specific list/app. ### Returns - `type PrismObjectDocumentCountResponse struct{…}` - `Total int64` Number of records matching the access scope. ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Documents.Count(context.TODO(), micro.PrismObjectDocumentCountParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Total) } ``` #### Response ```json { "total": 0 } ``` ## Find a record by property value `client.Prism.Objects.Documents.Find(ctx, slug, value, params) (*PrismObjectDocumentFindResponse, error)` **get** `/v2/prism/{teamId}/document/by/{slug}/{value}` Returns the single record whose property `{slug}` equals `{value}`. 404 if nothing matches; 409 if more than one record matches. ### Parameters - `slug string` - `value string` - `params PrismObjectDocumentFindParams` - `TeamID param.Field[string]` Path param - `ListID param.Field[string]` Query param: Scope the lookup to a specific list/app. ### Returns - `type PrismObjectDocumentFindResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Documents.Find( context.TODO(), "slug", "value", micro.PrismObjectDocumentFindParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Upsert by property value `client.Prism.Objects.Documents.Upsert(ctx, slug, value, params) (*PrismObjectDocumentUpsertResponse, error)` **put** `/v2/prism/{teamId}/document/by/{slug}/{value}` Idempotent create-or-update keyed on `{slug}={value}`. If exactly one record matches, it is patched and 200 is returned. If none match, a new record is created (with the lookup property set if absent) and 201 is returned. If multiple records match, 409 is returned and you should patch by id instead. ### Parameters - `slug string` - `value string` - `params PrismObjectDocumentUpsertParams` - `TeamID param.Field[string]` Path param - `PrismObjectProperties param.Field[PrismObjectProperties]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectDocumentUpsertResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Documents.Upsert( context.TODO(), "slug", "value", micro.PrismObjectDocumentUpsertParams{ PrismObjectProperties: micro.PrismObjectPropertiesParam{ }, }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Import objects `client.Prism.Objects.Documents.BulkNew(ctx, params) (*PrismObjectDocumentBulkNewResponse, error)` **post** `/v2/prism/{teamId}/document/import` Import multiple objects in batch. Properties are keyed by slug. Automatically routes based on size: small batches complete synchronously and return 200 with the final `ImportJob`; large batches start an async job, return 202 with `status: processing` and a `Location` header, and can be polled via `GET /v2/prism/{teamId}/imports/{jobId}`. ### Parameters - `params PrismObjectDocumentBulkNewParams` - `TeamID param.Field[string]` Path param - `Objects param.Field[[]PrismObjectProperties]` Body param: Array of objects to import with property values keyed by slug - `Default map[string, unknown]` Properties keyed by property slug. Values can be strings, numbers, booleans, arrays, or null. For select/multiselect properties, values may be option slugs or option UUIDs on write; option slugs are returned on read. - `List unknown` - `Options param.Field[PrismObjectDocumentBulkNewParamsOptions]` Body param - `CaseInsensitive bool` Whether deduplication should be case insensitive - `DedupeBy string` Property slug to deduplicate on - `ListID string` App/CRM ID for context (optional) - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectDocumentBulkNewResponse struct{…}` Status snapshot of an import job. Same shape used by the POST /import response and by GET /imports/{jobId}. - `JobID string` Null for sync imports (results inlined). Set for async imports. - `Status PrismObjectDocumentBulkNewResponseStatus` - `const PrismObjectDocumentBulkNewResponseStatusComplete PrismObjectDocumentBulkNewResponseStatus = "complete"` - `const PrismObjectDocumentBulkNewResponseStatusProcessing PrismObjectDocumentBulkNewResponseStatus = "processing"` - `const PrismObjectDocumentBulkNewResponseStatusFailed PrismObjectDocumentBulkNewResponseStatus = "failed"` - `Total int64` Total number of rows in the import. - `CreatedAt Time` - `Error PrismObjectDocumentBulkNewResponseError` Set when status=failed; describes the job-level failure (not per-row). - `Code string` - `Message string` - `ExpiresAt Time` - `Failed int64` - `Processed int64` Rows that have been attempted (succeeded + failed). - `Results []PrismObjectDocumentBulkNewResponseResult` Per-row outcomes. Always present for sync imports; populated for async imports once the job reaches `complete`. - `ID string` - `Created bool` - `Error PrismObjectDocumentBulkNewResponseResultsError` - `Code string` - `Message string` - `Existing bool` True if the row matched an existing record via the dedupe key. - `Succeeded int64` - `UpdatedAt Time` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Documents.BulkNew(context.TODO(), micro.PrismObjectDocumentBulkNewParams{ Objects: micro.F([]micro.PrismObjectPropertiesParam{micro.PrismObjectPropertiesParam{ }}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.JobID) } ``` #### Response ```json { "job_id": "job_id", "status": "complete", "total": 0, "created_at": "2019-12-27T18:11:19.117Z", "error": { "code": "code", "message": "message" }, "expires_at": "2019-12-27T18:11:19.117Z", "failed": 0, "processed": 0, "results": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created": true, "error": { "code": "code", "message": "message" }, "existing": true } ], "succeeded": 0, "updated_at": "2019-12-27T18:11:19.117Z" } ``` ## Bulk update records (partial success) `client.Prism.Objects.Documents.BulkUpdate(ctx, params) (*PrismObjectDocumentBulkUpdateResponse, error)` **post** `/v2/prism/{teamId}/document/batch/update` Patch up to 100 records in a single call. Each item is attempted independently — failures don't abort the batch. Inspect `results[].status` per item. ### Parameters - `params PrismObjectDocumentBulkUpdateParams` - `TeamID param.Field[string]` Path param - `Items param.Field[[]PrismObjectDocumentBulkUpdateParamsItem]` Body param - `ID string` - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectDocumentBulkUpdateResponse struct{…}` Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed. - `Results []PrismObjectDocumentBulkUpdateResponseResult` - `ID string` Item ID, or null if the input was unparseable. - `Status PrismObjectDocumentBulkUpdateResponseResultsStatus` - `const PrismObjectDocumentBulkUpdateResponseResultsStatusOk PrismObjectDocumentBulkUpdateResponseResultsStatus = "ok"` - `const PrismObjectDocumentBulkUpdateResponseResultsStatusError PrismObjectDocumentBulkUpdateResponseResultsStatus = "error"` - `Error PrismObjectDocumentBulkUpdateResponseResultsError` - `Code string` - `Message string` - `Record PrismObjectDocumentBulkUpdateResponseResultsRecord` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` - `Summary PrismObjectDocumentBulkUpdateResponseSummary` - `Failed int64` - `Succeeded int64` - `Total int64` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Documents.BulkUpdate(context.TODO(), micro.PrismObjectDocumentBulkUpdateParams{ Items: micro.F([]micro.PrismObjectDocumentBulkUpdateParamsItem{micro.PrismObjectDocumentBulkUpdateParamsItem{ ID: micro.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"), }}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Results) } ``` #### Response ```json { "results": [ { "id": "id", "status": "ok", "error": { "code": "code", "message": "message" }, "record": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } } ], "summary": { "failed": 0, "succeeded": 0, "total": 0 } } ``` ## Bulk delete records (partial success) `client.Prism.Objects.Documents.BulkDelete(ctx, params) (*PrismObjectDocumentBulkDeleteResponse, error)` **post** `/v2/prism/{teamId}/document/batch/delete` Soft-delete up to 100 records in a single call. Same partial-success contract as batch/update. ### Parameters - `params PrismObjectDocumentBulkDeleteParams` - `TeamID param.Field[string]` Path param - `IDs param.Field[[]string]` Body param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectDocumentBulkDeleteResponse struct{…}` Partial-success bulk operation result. Inspect `results[].status` per item; the operation as a whole returns 200 even if some items failed. - `Results []PrismObjectDocumentBulkDeleteResponseResult` - `ID string` Item ID, or null if the input was unparseable. - `Status PrismObjectDocumentBulkDeleteResponseResultsStatus` - `const PrismObjectDocumentBulkDeleteResponseResultsStatusOk PrismObjectDocumentBulkDeleteResponseResultsStatus = "ok"` - `const PrismObjectDocumentBulkDeleteResponseResultsStatusError PrismObjectDocumentBulkDeleteResponseResultsStatus = "error"` - `Error PrismObjectDocumentBulkDeleteResponseResultsError` - `Code string` - `Message string` - `Record PrismObjectDocumentBulkDeleteResponseResultsRecord` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` - `Summary PrismObjectDocumentBulkDeleteResponseSummary` - `Failed int64` - `Succeeded int64` - `Total int64` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Documents.BulkDelete(context.TODO(), micro.PrismObjectDocumentBulkDeleteParams{ IDs: micro.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Results) } ``` #### Response ```json { "results": [ { "id": "id", "status": "ok", "error": { "code": "code", "message": "message" }, "record": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } } ], "summary": { "failed": 0, "succeeded": 0, "total": 0 } } ``` ## Duplicate object `client.Prism.Objects.Documents.Duplicate(ctx, documentID, params) (*PrismObjectDocumentDuplicateResponse, error)` **post** `/v2/prism/{teamId}/document/{documentId}/duplicate` Duplicate object ### Parameters - `documentID string` - `params PrismObjectDocumentDuplicateParams` - `TeamID param.Field[string]` Path param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectDocumentDuplicateResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Documents.Duplicate( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectDocumentDuplicateParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Restore object `client.Prism.Objects.Documents.Restore(ctx, documentID, params) (*PrismObjectDocumentRestoreResponse, error)` **post** `/v2/prism/{teamId}/document/{documentId}/restore` Restore object ### Parameters - `documentID string` - `params PrismObjectDocumentRestoreParams` - `TeamID param.Field[string]` Path param - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectDocumentRestoreResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Documents.Restore( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectDocumentRestoreParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Domain Types ### Document - `type Document struct{…}` - `Default map[string, unknown]` Properties keyed by property slug. Values can be strings, numbers, booleans, arrays, or null. For select/multiselect properties, values may be option slugs or option UUIDs on write; option slugs are returned on read. - `List unknown` # Grant ## Get grant `client.Prism.Objects.Documents.Grant.Get(ctx, documentID, query) (*PrismObjectDocumentGrantGetResponse, error)` **get** `/v2/prism/{teamId}/document/{documentId}/grant` Get grant ### Parameters - `documentID string` - `query PrismObjectDocumentGrantGetParams` - `TeamID param.Field[string]` ### Returns - `type PrismObjectDocumentGrantGetResponse struct{…}` - `TeamGroupID []map[string, PrismObjectDocumentGrantGetResponseTeamGroupID]` - `const PrismObjectDocumentGrantGetResponseTeamGroupIDA PrismObjectDocumentGrantGetResponseTeamGroupID = "a"` - `const PrismObjectDocumentGrantGetResponseTeamGroupIDR PrismObjectDocumentGrantGetResponseTeamGroupID = "r"` - `const PrismObjectDocumentGrantGetResponseTeamGroupIDW PrismObjectDocumentGrantGetResponseTeamGroupID = "w"` - `TeamID map[string, PrismObjectDocumentGrantGetResponseTeamID]` - `const PrismObjectDocumentGrantGetResponseTeamIDA PrismObjectDocumentGrantGetResponseTeamID = "a"` - `const PrismObjectDocumentGrantGetResponseTeamIDR PrismObjectDocumentGrantGetResponseTeamID = "r"` - `const PrismObjectDocumentGrantGetResponseTeamIDW PrismObjectDocumentGrantGetResponseTeamID = "w"` - `UserID []map[string, PrismObjectDocumentGrantGetResponseUserID]` - `const PrismObjectDocumentGrantGetResponseUserIDA PrismObjectDocumentGrantGetResponseUserID = "a"` - `const PrismObjectDocumentGrantGetResponseUserIDR PrismObjectDocumentGrantGetResponseUserID = "r"` - `const PrismObjectDocumentGrantGetResponseUserIDW PrismObjectDocumentGrantGetResponseUserID = "w"` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) grant, err := client.Prism.Objects.Documents.Grant.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectDocumentGrantGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", grant.TeamGroupID) } ``` #### Response ```json { "team_group_id": [ { "foo": "a" } ], "team_id": { "foo": "a" }, "user_id": [ { "foo": "a" } ] } ``` ## Update grant `client.Prism.Objects.Documents.Grant.Update(ctx, documentID, params) (*PrismObjectDocumentGrantUpdateResponse, error)` **put** `/v2/prism/{teamId}/document/{documentId}/grant` Update grant ### Parameters - `documentID string` - `params PrismObjectDocumentGrantUpdateParams` - `PathTeamID param.Field[string]` Path param - `TeamGroupID param.Field[[]map[string, PrismObjectDocumentGrantUpdateParamsTeamGroupID]]` Body param - `const PrismObjectDocumentGrantUpdateParamsTeamGroupIDA PrismObjectDocumentGrantUpdateParamsTeamGroupID = "a"` - `const PrismObjectDocumentGrantUpdateParamsTeamGroupIDR PrismObjectDocumentGrantUpdateParamsTeamGroupID = "r"` - `const PrismObjectDocumentGrantUpdateParamsTeamGroupIDW PrismObjectDocumentGrantUpdateParamsTeamGroupID = "w"` - `BodyTeamID param.Field[map[string, PrismObjectDocumentGrantUpdateParamsTeamID]]` Body param - `const PrismObjectDocumentGrantUpdateParamsTeamIDA PrismObjectDocumentGrantUpdateParamsTeamID = "a"` - `const PrismObjectDocumentGrantUpdateParamsTeamIDR PrismObjectDocumentGrantUpdateParamsTeamID = "r"` - `const PrismObjectDocumentGrantUpdateParamsTeamIDW PrismObjectDocumentGrantUpdateParamsTeamID = "w"` - `UserID param.Field[[]map[string, PrismObjectDocumentGrantUpdateParamsUserID]]` Body param - `const PrismObjectDocumentGrantUpdateParamsUserIDA PrismObjectDocumentGrantUpdateParamsUserID = "a"` - `const PrismObjectDocumentGrantUpdateParamsUserIDR PrismObjectDocumentGrantUpdateParamsUserID = "r"` - `const PrismObjectDocumentGrantUpdateParamsUserIDW PrismObjectDocumentGrantUpdateParamsUserID = "w"` - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectDocumentGrantUpdateResponse struct{…}` - `TeamGroupID []map[string, PrismObjectDocumentGrantUpdateResponseTeamGroupID]` - `const PrismObjectDocumentGrantUpdateResponseTeamGroupIDA PrismObjectDocumentGrantUpdateResponseTeamGroupID = "a"` - `const PrismObjectDocumentGrantUpdateResponseTeamGroupIDR PrismObjectDocumentGrantUpdateResponseTeamGroupID = "r"` - `const PrismObjectDocumentGrantUpdateResponseTeamGroupIDW PrismObjectDocumentGrantUpdateResponseTeamGroupID = "w"` - `TeamID map[string, PrismObjectDocumentGrantUpdateResponseTeamID]` - `const PrismObjectDocumentGrantUpdateResponseTeamIDA PrismObjectDocumentGrantUpdateResponseTeamID = "a"` - `const PrismObjectDocumentGrantUpdateResponseTeamIDR PrismObjectDocumentGrantUpdateResponseTeamID = "r"` - `const PrismObjectDocumentGrantUpdateResponseTeamIDW PrismObjectDocumentGrantUpdateResponseTeamID = "w"` - `UserID []map[string, PrismObjectDocumentGrantUpdateResponseUserID]` - `const PrismObjectDocumentGrantUpdateResponseUserIDA PrismObjectDocumentGrantUpdateResponseUserID = "a"` - `const PrismObjectDocumentGrantUpdateResponseUserIDR PrismObjectDocumentGrantUpdateResponseUserID = "r"` - `const PrismObjectDocumentGrantUpdateResponseUserIDW PrismObjectDocumentGrantUpdateResponseUserID = "w"` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) grant, err := client.Prism.Objects.Documents.Grant.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectDocumentGrantUpdateParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", grant.TeamGroupID) } ``` #### Response ```json { "team_group_id": [ { "foo": "a" } ], "team_id": { "foo": "a" }, "user_id": [ { "foo": "a" } ] } ``` # Events ## List records of an object type `client.Prism.Objects.Events.List(ctx, params) (*PrismObjectEventListResponse, error)` **get** `/v2/prism/{teamId}/event` Convenience list endpoint. Equivalent to `POST /v2/prism/{teamId}/{objectType}/query` with an empty body, plus query-string sugar for the common cases. Any unrecognized query parameter is interpreted as an equality filter on a property of that name; pass arrays for `in`. Values are received as strings, so non-string property filters via this endpoint may not work — use the `query` endpoint for typed comparisons or anything beyond simple equality. ### Parameters - `params PrismObjectEventListParams` - `TeamID param.Field[string]` Path param - `Cursor param.Field[string]` Query param: Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged to fetch the next page. - `Deleted param.Field[bool]` Query param: Include soft-deleted records. Pass the literal string `true`. - `IncludeTotal param.Field[bool]` Query param: When set to `true`, the response includes a `total` field with the unpaginated row count. Costs an extra pass; prefer `GET .../count` for the unfiltered total. - `Limit param.Field[int64]` Query param: Maximum number of rows to return. Capped server-side at 50. - `ListID param.Field[string]` Query param: Scope properties to a specific list/app. - `Select param.Field[string]` Query param: Comma-separated property slugs to return. Use dot notation for relationships. `id` is always returned at the top level. Defaults to all properties. - `Sort param.Field[string]` Query param: Comma-separated list of slugs. Prefix with `-` for descending. Example: `sort=-updated_at,name`. ### Returns - `type PrismObjectEventListResponse struct{…}` - `Data []PrismObjectEventListResponseData` - `ID string` - `IsUserObject bool` - `Properties map[string, unknown]` Selected property values keyed by property slug. For select/multiselect properties, option slugs are returned. For reference properties, values are nested `{ id, properties }` objects. - `Source string` - `HasMore bool` Accurate end-of-data signal — false on the last page, never forces clients to overshoot. - `NextCursor string` - `Total int64` Populated only when `?include_total=true` was passed. ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) events, err := client.Prism.Objects.Events.List(context.TODO(), micro.PrismObjectEventListParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", events.Data) } ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "is_user_object": true, "properties": { "foo": "bar" }, "source": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "has_more": true, "next_cursor": "next_cursor", "total": 0 } ``` ## Get object `client.Prism.Objects.Events.Get(ctx, eventID, params) (*PrismObjectEventGetResponse, error)` **get** `/v2/prism/{teamId}/event/{eventId}` Get object ### Parameters - `eventID string` - `params PrismObjectEventGetParams` - `TeamID param.Field[string]` Path param - `Select param.Field[string]` Query param: Comma-separated property slugs to return. Use dot notation for relationships. `id` is always returned at the top level. Defaults to all properties. ### Returns - `type PrismObjectEventGetResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) event, err := client.Prism.Objects.Events.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectEventGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", event.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Query `client.Prism.Objects.Events.Query(ctx, params) (*PrismObjectEventQueryResponse, error)` **post** `/v2/prism/{teamId}/event/query` Query ### Parameters - `params PrismObjectEventQueryParams` - `TeamID param.Field[string]` Path param - `Query param.Field[PrismObjectEventQueryParamsQuery]` Body param - `Select []string` Property slugs to select. Use dot notation for relationships (e.g. attendee.contact.first_name). `id` is always returned at the top level of each row and does not need to be selected. - `Combinator PrismObjectEventQueryParamsQueryCombinator` Logical operator for combining filters - `const PrismObjectEventQueryParamsQueryCombinatorAnd PrismObjectEventQueryParamsQueryCombinator = "AND"` - `const PrismObjectEventQueryParamsQueryCombinatorOr PrismObjectEventQueryParamsQueryCombinator = "OR"` - `Cursor string` Opaque cursor from a previous response's `next_cursor`. Pass it back unchanged to fetch the next page. When set, `page` and `limit` are derived from the cursor and any explicit values are ignored. - `Filter []map[string, PrismObjectEventQueryParamsQueryFilter]` Filters as [{ slug: { operator: value } }]. For select/multiselect properties, values may be option slugs or option UUIDs. - `type PrismObjectEventQueryParamsQueryFilterPrismQueryFilterEq struct{…}` - `Equals PrismObjectEventQueryParamsQueryFilterPrismQueryFilterEqUnion` - `UnionString` - `UnionBool` - `type PrismObjectEventQueryParamsQueryFilterPrismQueryFilterNe struct{…}` - `NotEquals PrismObjectEventQueryParamsQueryFilterPrismQueryFilterNeUnion` - `UnionString` - `UnionBool` - `type PrismObjectEventQueryParamsQueryFilterPrismQueryFilterLt struct{…}` - `Less string` - `type PrismObjectEventQueryParamsQueryFilterPrismQueryFilterGt struct{…}` - `Greater string` - `type PrismObjectEventQueryParamsQueryFilterPrismQueryFilterLte struct{…}` - `LessOrEquals string` - `type PrismObjectEventQueryParamsQueryFilterPrismQueryFilterGte struct{…}` - `GreaterOrEquals string` - `type PrismObjectEventQueryParamsQueryFilterContains struct{…}` - `Contains PrismObjectEventQueryParamsQueryFilterContainsContainsUnion` - `UnionString` - `UnionBool` - `type PrismObjectEventQueryParamsQueryFilterContainsContainsArray []string` - `type PrismObjectEventQueryParamsQueryFilterBeginsWith struct{…}` - `BeginsWith string` - `type PrismObjectEventQueryParamsQueryFilterEndsWith struct{…}` - `EndsWith string` - `type PrismObjectEventQueryParamsQueryFilterNotContains struct{…}` - `NotContains string` - `type PrismObjectEventQueryParamsQueryFilterExists struct{…}` - `Exists bool` - `type PrismObjectEventQueryParamsQueryFilterNotExists struct{…}` - `NotExists bool` - `type PrismObjectEventQueryParamsQueryFilterIsNull struct{…}` - `IsNull PrismObjectEventQueryParamsQueryFilterIsNullIsNullUnion` - `UnionString` - `UnionBool` - `type PrismObjectEventQueryParamsQueryFilterIsNullIsNullArray []string` - `type PrismObjectEventQueryParamsQueryFilterIsNotNull struct{…}` - `IsNotNull PrismObjectEventQueryParamsQueryFilterIsNotNullIsNotNullUnion` - `UnionString` - `UnionBool` - `type PrismObjectEventQueryParamsQueryFilterIsNotNullIsNotNullArray []string` - `type PrismObjectEventQueryParamsQueryFilterBetween struct{…}` - `Between PrismObjectEventQueryParamsQueryFilterBetweenBetweenUnion` - `UnionString` - `UnionBool` - `type PrismObjectEventQueryParamsQueryFilterBetweenBetweenArray []string` - `type PrismObjectEventQueryParamsQueryFilterIn struct{…}` - `In []string` - `type PrismObjectEventQueryParamsQueryFilterNotIn struct{…}` - `NotIn []string` - `Limit int64` Maximum number of rows to return. Capped server-side at 50; requests above the cap are rejected. - `ListID string` - `Page int64` Page number (1-based). Prefer `cursor`. Page-number pagination drifts under concurrent writes; use it only for one-shot exports. - `Sort []map[string, PrismObjectEventQueryParamsQuerySort]` Sort order as [{ slug: direction }]. Array order determines sort priority - `const PrismObjectEventQueryParamsQuerySortAsc PrismObjectEventQueryParamsQuerySort = "asc"` - `const PrismObjectEventQueryParamsQuerySortDesc PrismObjectEventQueryParamsQuerySort = "desc"` - `ID param.Field[PrismObjectEventQueryParamsIDUnion]` Body param - `UnionString` - `type PrismObjectEventQueryParamsIDArray []string` - `Boxes param.Field[[]string]` Body param - `Cursor param.Field[string]` Body param: Alternative location for the opaque cursor (sibling of `query`). Use whichever feels more natural; if both are present, `query.cursor` wins. - `Deleted param.Field[bool]` Body param - `IncludeTotal param.Field[bool]` Body param: When true, the response includes a `total` field with the unpaginated row count. Costs an additional pass over the result set — for unfiltered totals prefer `GET /v2/prism/{teamId}/{objectType}/count` instead. - `Sources param.Field[[]string]` Body param ### Returns - `type PrismObjectEventQueryResponse struct{…}` - `Data []PrismObjectEventQueryResponseData` - `ID string` - `IsUserObject bool` - `Properties map[string, unknown]` Selected property values keyed by property slug. For select/multiselect properties, option slugs are returned. For reference properties, values are nested `{ id, properties }` objects. - `Source string` - `HasMore bool` Accurate end-of-data signal. False when this page contains the last record; true only when at least one more record exists. (Implementation note: the server fetches one extra row internally to determine this — clients never need to overshoot to discover the end.) - `NextCursor string` Opaque cursor pointing at the next page. Pass it back unchanged in the request body (`cursor`) of the next call. Null when `has_more` is false. - `Total int64` Only populated when the request set `include_total: true`. Total number of records matching the query, ignoring pagination. Opt-in because it costs an additional pass over the result set. ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Events.Query(context.TODO(), micro.PrismObjectEventQueryParams{ Query: micro.F(micro.PrismObjectEventQueryParamsQuery{ Select: micro.F([]string{"string"}), }), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "is_user_object": true, "properties": { "foo": "bar" }, "source": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ], "has_more": true, "next_cursor": "next_cursor", "total": 0 } ``` ## Total record count for an object type `client.Prism.Objects.Events.Count(ctx, params) (*PrismObjectEventCountResponse, error)` **get** `/v2/prism/{teamId}/event/count` Returns the total number of records of this object type that the caller can see. Avoids the page-overshoot anti-pattern — clients no longer need to keep paging until `has_more` flips false to discover the total. Currently does not apply query filters; for a filtered total, pass `include_total: true` in a POST `/query` body. ### Parameters - `params PrismObjectEventCountParams` - `TeamID param.Field[string]` Path param - `ListID param.Field[string]` Query param: Scope the count to a specific list/app. ### Returns - `type PrismObjectEventCountResponse struct{…}` - `Total int64` Number of records matching the access scope. ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Events.Count(context.TODO(), micro.PrismObjectEventCountParams{ }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Total) } ``` #### Response ```json { "total": 0 } ``` ## Find a record by property value `client.Prism.Objects.Events.Find(ctx, slug, value, params) (*PrismObjectEventFindResponse, error)` **get** `/v2/prism/{teamId}/event/by/{slug}/{value}` Returns the single record whose property `{slug}` equals `{value}`. 404 if nothing matches; 409 if more than one record matches. ### Parameters - `slug string` - `value string` - `params PrismObjectEventFindParams` - `TeamID param.Field[string]` Path param - `ListID param.Field[string]` Query param: Scope the lookup to a specific list/app. ### Returns - `type PrismObjectEventFindResponse struct{…}` Object returned by reads (get/create/patch/restore). id is always present. - `ID string` - `Default map[string, unknown]` Properties keyed by property slug. - `List unknown` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) response, err := client.Prism.Objects.Events.Find( context.TODO(), "slug", "value", micro.PrismObjectEventFindParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.ID) } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "default": { "foo": "bar" }, "list": {} } ``` ## Domain Types ### Event - `type Event struct{…}` - `Default map[string, unknown]` Properties keyed by property slug. Values can be strings, numbers, booleans, arrays, or null. For select/multiselect properties, values may be option slugs or option UUIDs on write; option slugs are returned on read. - `List unknown` # Grant ## Get grant `client.Prism.Objects.Events.Grant.Get(ctx, eventID, query) (*PrismObjectEventGrantGetResponse, error)` **get** `/v2/prism/{teamId}/event/{eventId}/grant` Get grant ### Parameters - `eventID string` - `query PrismObjectEventGrantGetParams` - `TeamID param.Field[string]` ### Returns - `type PrismObjectEventGrantGetResponse struct{…}` - `TeamGroupID []map[string, PrismObjectEventGrantGetResponseTeamGroupID]` - `const PrismObjectEventGrantGetResponseTeamGroupIDA PrismObjectEventGrantGetResponseTeamGroupID = "a"` - `const PrismObjectEventGrantGetResponseTeamGroupIDR PrismObjectEventGrantGetResponseTeamGroupID = "r"` - `const PrismObjectEventGrantGetResponseTeamGroupIDW PrismObjectEventGrantGetResponseTeamGroupID = "w"` - `TeamID map[string, PrismObjectEventGrantGetResponseTeamID]` - `const PrismObjectEventGrantGetResponseTeamIDA PrismObjectEventGrantGetResponseTeamID = "a"` - `const PrismObjectEventGrantGetResponseTeamIDR PrismObjectEventGrantGetResponseTeamID = "r"` - `const PrismObjectEventGrantGetResponseTeamIDW PrismObjectEventGrantGetResponseTeamID = "w"` - `UserID []map[string, PrismObjectEventGrantGetResponseUserID]` - `const PrismObjectEventGrantGetResponseUserIDA PrismObjectEventGrantGetResponseUserID = "a"` - `const PrismObjectEventGrantGetResponseUserIDR PrismObjectEventGrantGetResponseUserID = "r"` - `const PrismObjectEventGrantGetResponseUserIDW PrismObjectEventGrantGetResponseUserID = "w"` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) grant, err := client.Prism.Objects.Events.Grant.Get( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectEventGrantGetParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", grant.TeamGroupID) } ``` #### Response ```json { "team_group_id": [ { "foo": "a" } ], "team_id": { "foo": "a" }, "user_id": [ { "foo": "a" } ] } ``` ## Update grant `client.Prism.Objects.Events.Grant.Update(ctx, eventID, params) (*PrismObjectEventGrantUpdateResponse, error)` **put** `/v2/prism/{teamId}/event/{eventId}/grant` Update grant ### Parameters - `eventID string` - `params PrismObjectEventGrantUpdateParams` - `PathTeamID param.Field[string]` Path param - `TeamGroupID param.Field[[]map[string, PrismObjectEventGrantUpdateParamsTeamGroupID]]` Body param - `const PrismObjectEventGrantUpdateParamsTeamGroupIDA PrismObjectEventGrantUpdateParamsTeamGroupID = "a"` - `const PrismObjectEventGrantUpdateParamsTeamGroupIDR PrismObjectEventGrantUpdateParamsTeamGroupID = "r"` - `const PrismObjectEventGrantUpdateParamsTeamGroupIDW PrismObjectEventGrantUpdateParamsTeamGroupID = "w"` - `BodyTeamID param.Field[map[string, PrismObjectEventGrantUpdateParamsTeamID]]` Body param - `const PrismObjectEventGrantUpdateParamsTeamIDA PrismObjectEventGrantUpdateParamsTeamID = "a"` - `const PrismObjectEventGrantUpdateParamsTeamIDR PrismObjectEventGrantUpdateParamsTeamID = "r"` - `const PrismObjectEventGrantUpdateParamsTeamIDW PrismObjectEventGrantUpdateParamsTeamID = "w"` - `UserID param.Field[[]map[string, PrismObjectEventGrantUpdateParamsUserID]]` Body param - `const PrismObjectEventGrantUpdateParamsUserIDA PrismObjectEventGrantUpdateParamsUserID = "a"` - `const PrismObjectEventGrantUpdateParamsUserIDR PrismObjectEventGrantUpdateParamsUserID = "r"` - `const PrismObjectEventGrantUpdateParamsUserIDW PrismObjectEventGrantUpdateParamsUserID = "w"` - `IdempotencyKey param.Field[string]` Header param: A unique key (UUID or any opaque string up to 255 chars) that identifies this logical request. The server caches the first response under this key for 24 hours and replays it on retry — safe to use on every POST/PUT/PATCH to make network retries deterministic. Reusing the same key with a different body returns 409 `idempotency_key_mismatch`. Replays include the `idempotent-replay: true` response header. ### Returns - `type PrismObjectEventGrantUpdateResponse struct{…}` - `TeamGroupID []map[string, PrismObjectEventGrantUpdateResponseTeamGroupID]` - `const PrismObjectEventGrantUpdateResponseTeamGroupIDA PrismObjectEventGrantUpdateResponseTeamGroupID = "a"` - `const PrismObjectEventGrantUpdateResponseTeamGroupIDR PrismObjectEventGrantUpdateResponseTeamGroupID = "r"` - `const PrismObjectEventGrantUpdateResponseTeamGroupIDW PrismObjectEventGrantUpdateResponseTeamGroupID = "w"` - `TeamID map[string, PrismObjectEventGrantUpdateResponseTeamID]` - `const PrismObjectEventGrantUpdateResponseTeamIDA PrismObjectEventGrantUpdateResponseTeamID = "a"` - `const PrismObjectEventGrantUpdateResponseTeamIDR PrismObjectEventGrantUpdateResponseTeamID = "r"` - `const PrismObjectEventGrantUpdateResponseTeamIDW PrismObjectEventGrantUpdateResponseTeamID = "w"` - `UserID []map[string, PrismObjectEventGrantUpdateResponseUserID]` - `const PrismObjectEventGrantUpdateResponseUserIDA PrismObjectEventGrantUpdateResponseUserID = "a"` - `const PrismObjectEventGrantUpdateResponseUserIDR PrismObjectEventGrantUpdateResponseUserID = "r"` - `const PrismObjectEventGrantUpdateResponseUserIDW PrismObjectEventGrantUpdateResponseUserID = "w"` ### Example ```go package main import ( "context" "fmt" "github.com/micro-so/micro-sdk-go" "github.com/micro-so/micro-sdk-go/option" ) func main() { client := micro.NewClient( option.WithAPIKey("My API Key"), option.WithTeamID("My Team ID"), ) grant, err := client.Prism.Objects.Events.Grant.Update( context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", micro.PrismObjectEventGrantUpdateParams{ }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", grant.TeamGroupID) } ``` #### Response ```json { "team_group_id": [ { "foo": "a" } ], "team_id": { "foo": "a" }, "user_id": [ { "foo": "a" } ] } ```