Skip to content
Go to Micro

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.

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

Path param

formatuuid
IDs param.Field[[]string]

Body param

IdempotencyKey param.Field[string]Optional

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.

minLength1
maxLength255
ReturnsExpand Collapse
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
One of the following:
const PrismObjectDocumentBulkDeleteResponseResultsStatusOk PrismObjectDocumentBulkDeleteResponseResultsStatus = "ok"
const PrismObjectDocumentBulkDeleteResponseResultsStatusError PrismObjectDocumentBulkDeleteResponseResultsStatus = "error"
Error PrismObjectDocumentBulkDeleteResponseResultsErrorOptional
Code stringOptional
Message stringOptional
Record PrismObjectDocumentBulkDeleteResponseResultsRecordOptional

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 PrismObjectDocumentBulkDeleteResponseSummary
Failed int64
Succeeded int64
Total int64

Bulk delete 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.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)
}
{
  "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
  }
}