Skip to content
Go to Micro

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.

ParametersExpand Collapse
params PrismObjectContactBulkUpdateParams
TeamID param.Field[string]Optional

Path param

formatuuid
Items param.Field[[]PrismObjectContactBulkUpdateParamsItem]

Body param

ID string
formatuuid
IdempotencyKey param.Field[string]Optional

Header param: A unique key (UUID or any opaque string up to 255 chars) for an authenticated POST, PUT, or PATCH request. The server retains the initial claim for 24 hours and replays a completed non-5xx response only when the method, path, and request body all match. Reusing a non-expired key with a different method, path, or body returns 409 idempotency_key_mismatch; reusing it after expiry returns 409 idempotency_key_stale, so use a new key. Replays include the idempotent-replay: true response header.

minLength1
maxLength255
ReturnsExpand Collapse
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
One of the following:
const PrismObjectContactBulkUpdateResponseResultsStatusOk PrismObjectContactBulkUpdateResponseResultsStatus = "ok"
const PrismObjectContactBulkUpdateResponseResultsStatusError PrismObjectContactBulkUpdateResponseResultsStatus = "error"
Error PrismObjectContactBulkUpdateResponseResultsErrorOptional
Code stringOptional
Message stringOptional
Record PrismObjectContactBulkUpdateResponseResultsRecordOptional

Object returned by reads (get/create/patch/restore). id is always present.

ID string
formatuuid
Default map[string, unknown]Optional

Properties keyed by property slug.

List unknownOptional
Summary PrismObjectContactBulkUpdateResponseSummary
Failed int64
Succeeded int64
Total int64

Bulk update records (partial success)

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)
}
{
  "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
  }
}
Returns Examples
{
  "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
  }
}