Skip to Content
Open Retainer
Records

Write multiple records

POST
/v1/records/upsert

Process records in order. Each item returns its own result or error. Requires the write scope.

Authorization

bearerAuth
headerAuthorizationBearer <token>

A workspace API key.

Request Body

application/json
  1. body
items*array<>
Items1 <= items <= 50

Response Body

Successful response.

application/json
  1. response
results*array<|>
Example Request
curl -X POST 'https://retainer.tamloot.cc/v1/records/upsert' \  -H 'Authorization: Bearer YOUR_WORKSPACE_API_KEY' \  -H 'Content-Type: application/json' \  -d '{  "items": [    {      "object": "string"    }  ]}'
Example Response
{  "results": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "created": true,      "fields": {        "property1": "applied",        "property2": "applied"      },      "record": {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "object": "string",        "label": "string",        "fields": {          "property1": null,          "property2": null        },        "createdAt": "2019-08-24T14:15:22Z",        "updatedAt": "2019-08-24T14:15:22Z",        "createdBy": {          "via": "string",          "type": "user",          "id": "string",          "name": "string"        },        "updatedBy": {          "via": "string",          "type": "user",          "id": "string",          "name": "string"        },        "provenance": {          "property1": {            "pendingAssertion": {              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",              "recordId": "0470cfd4-dcf3-4d8c-ac28-58c6deeff25f",              "object": "string",              "recordLabel": "string",              "field": "string",              "value": null,              "currentValue": null,              "status": "active",              "reason": "outranked",              "actor": {                "via": "string",                "type": "user",                "id": "string",                "name": "string"              },              "confidence": 0,              "sourceRecordId": "799244ea-56f2-4870-bdb3-37032b615ea2",              "isInitial": true,              "observedAt": "2019-08-24T14:15:22Z",              "createdAt": "2019-08-24T14:15:22Z",              "source": {                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                "type": "string",                "title": "string",                "occurredAt": "2019-08-24T14:15:22Z"              },              "conflictingRecord": {                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                "object": "string",                "label": "string"              },              "relationReferences": {                "property1": {                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                  "object": "string",                  "label": "string"                },                "property2": {                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                  "object": "string",                  "label": "string"                }              },              "reviewedBy": {                "via": "string",                "type": "user",                "id": "string",                "name": "string"              },              "reviewedAt": "2019-08-24T14:15:22Z"            },            "assertion": {              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",              "recordId": "0470cfd4-dcf3-4d8c-ac28-58c6deeff25f",              "object": "string",              "recordLabel": "string",              "field": "string",              "value": null,              "currentValue": null,              "status": "active",              "reason": "outranked",              "actor": {                "via": "string",                "type": "user",                "id": "string",                "name": "string"              },              "confidence": 0,              "sourceRecordId": "799244ea-56f2-4870-bdb3-37032b615ea2",              "isInitial": true,              "observedAt": "2019-08-24T14:15:22Z",              "createdAt": "2019-08-24T14:15:22Z",              "source": {                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                "type": "string",                "title": "string",                "occurredAt": "2019-08-24T14:15:22Z"              },              "conflictingRecord": {                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                "object": "string",                "label": "string"              },              "relationReferences": {                "property1": {                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                  "object": "string",                  "label": "string"                },                "property2": {                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                  "object": "string",                  "label": "string"                }              },              "reviewedBy": {                "via": "string",                "type": "user",                "id": "string",                "name": "string"              },              "reviewedAt": "2019-08-24T14:15:22Z"            },            "pendingAssertionIds": [              "732649dc-43fe-487d-852b-96b1e8639ae4"            ]          },          "property2": {            "pendingAssertion": {              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",              "recordId": "0470cfd4-dcf3-4d8c-ac28-58c6deeff25f",              "object": "string",              "recordLabel": "string",              "field": "string",              "value": null,              "currentValue": null,              "status": "active",              "reason": "outranked",              "actor": {                "via": "string",                "type": "user",                "id": "string",                "name": "string"              },              "confidence": 0,              "sourceRecordId": "799244ea-56f2-4870-bdb3-37032b615ea2",              "isInitial": true,              "observedAt": "2019-08-24T14:15:22Z",              "createdAt": "2019-08-24T14:15:22Z",              "source": {                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                "type": "string",                "title": "string",                "occurredAt": "2019-08-24T14:15:22Z"              },              "conflictingRecord": {                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                "object": "string",                "label": "string"              },              "relationReferences": {                "property1": {                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                  "object": "string",                  "label": "string"                },                "property2": {                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                  "object": "string",                  "label": "string"                }              },              "reviewedBy": {                "via": "string",                "type": "user",                "id": "string",                "name": "string"              },              "reviewedAt": "2019-08-24T14:15:22Z"            },            "assertion": {              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",              "recordId": "0470cfd4-dcf3-4d8c-ac28-58c6deeff25f",              "object": "string",              "recordLabel": "string",              "field": "string",              "value": null,              "currentValue": null,              "status": "active",              "reason": "outranked",              "actor": {                "via": "string",                "type": "user",                "id": "string",                "name": "string"              },              "confidence": 0,              "sourceRecordId": "799244ea-56f2-4870-bdb3-37032b615ea2",              "isInitial": true,              "observedAt": "2019-08-24T14:15:22Z",              "createdAt": "2019-08-24T14:15:22Z",              "source": {                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                "type": "string",                "title": "string",                "occurredAt": "2019-08-24T14:15:22Z"              },              "conflictingRecord": {                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                "object": "string",                "label": "string"              },              "relationReferences": {                "property1": {                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                  "object": "string",                  "label": "string"                },                "property2": {                  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                  "object": "string",                  "label": "string"                }              },              "reviewedBy": {                "via": "string",                "type": "user",                "id": "string",                "name": "string"              },              "reviewedAt": "2019-08-24T14:15:22Z"            },            "pendingAssertionIds": [              "732649dc-43fe-487d-852b-96b1e8639ae4"            ]          }        },        "relationReferences": {          "property1": {            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",            "object": "string",            "label": "string"          },          "property2": {            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",            "object": "string",            "label": "string"          }        },        "counts": {          "comments": -9007199254740991,          "facts": -9007199254740991,          "linked": -9007199254740991,          "claims": -9007199254740991        },        "event": {          "occurredAt": "2019-08-24T14:15:22Z",          "channel": "string",          "externalId": "string",          "title": "string",          "summary": "string",          "participants": {            "matched": [              {                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                "handle": "string",                "role": "string",                "recordId": "0470cfd4-dcf3-4d8c-ac28-58c6deeff25f"              }            ],            "unmatched": [              {                "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",                "handle": "string",                "role": "string",                "reason": "no_match",                "candidates": [                  "ca3c6e0b-3eb2-4d6c-b8d9-7ce3bd020121"                ]              }            ]          },          "about": [            "dae22e5f-09ed-4916-9fa4-01d6902a20dd"          ],          "content": true,          "source": {            "sourceItemId": "f5556b82-7fa2-4511-87c1-adb3f77deeb7",            "revisionId": "bae12d01-48af-47b3-9304-b09ef0081cd6",            "current": true,            "previousEventId": "6aab701a-b5da-4540-bfbd-b77b75627881"          }        }      }    }  ]}