{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/benchling/main/json-schema/benchling-custom-entities-bulk-upsert-request-schema.json", "title": "CustomEntitiesBulkUpsertRequest", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/benchling-custom-entities-api-openapi.yml#/components/schemas/CustomEntitiesBulkUpsertRequest", "additionalProperties": false, "properties": { "customEntities": { "items": { "$ref": "#/$defs/CustomEntityBulkUpsertRequest" }, "maxItems": 2500, "type": "array" } }, "required": [ "customEntities" ], "type": "object", "$defs": { "ArchiveRecordSet": { "additionalProperties": false, "description": "Currently, we only support setting a null value for archiveRecord, which unarchives the item", "type": [ "object", "null" ] }, "CustomEntityBaseRequest": { "properties": { "aliases": { "description": "Aliases to add to the custom entity", "items": { "type": "string" }, "type": "array" }, "authorIds": { "description": "IDs of users to set as the custom entity's authors.", "items": { "type": "string" }, "type": "array" }, "customFields": { "allOf": [ { "$ref": "#/$defs/CustomFields" } ], "description": "Custom fields to add to the custom entity. Every field should have its name as a key, mapping to an object with information about the value of the field.\n" }, "fields": { "allOf": [ { "$ref": "#/$defs/Fields" } ], "description": "Schema fields to set on the custom entity. Must correspond with the schema's field definitions. Every field should have its name as a key, mapping to an object with information about the value of the field.\n" }, "folderId": { "description": "ID of the folder that the entity is moved into", "type": "string" }, "name": { "type": "string" }, "schemaId": { "type": "string" } }, "type": "object" }, "CustomEntityBaseRequestForCreate": { "allOf": [ { "$ref": "#/$defs/CustomEntityBaseRequest" }, { "required": [ "name", "schemaId" ] } ] }, "CustomEntityBulkUpsertRequest": { "allOf": [ { "$ref": "#/$defs/EntityBulkUpsertBaseRequest" }, { "$ref": "#/$defs/CustomEntityBaseRequestForCreate" } ] }, "CustomField": { "properties": { "value": { "type": "string" } }, "type": "object" }, "CustomFields": { "additionalProperties": { "$ref": "#/$defs/CustomField" }, "type": "object" }, "EntityBulkUpsertBaseRequest": { "allOf": [ { "$ref": "#/$defs/EntityUpsertBaseRequest" }, { "properties": { "entityRegistryId": { "description": "Registry ID of the entity in Benchling.", "type": "string" } } }, { "required": [ "entityRegistryId" ] } ] }, "EntityUpsertBaseRequest": { "properties": { "archiveRecord": { "$ref": "#/$defs/ArchiveRecordSet" }, "fields": { "$ref": "#/$defs/FieldsWithResolution" }, "name": { "type": "string" }, "registryId": { "type": "string" }, "schemaId": { "type": "string" } }, "required": [ "registryId", "name", "schemaId" ], "type": "object" }, "Field": { "properties": { "displayValue": { "readOnly": true, "type": [ "string", "null" ] }, "isMulti": { "readOnly": true, "type": "boolean" }, "textValue": { "readOnly": true, "type": [ "string", "null" ] }, "type": { "allOf": [ { "$ref": "#/$defs/FieldType" } ], "readOnly": true }, "value": { "description": "For single link fields, use the id of the item you want to link (eg. \"seq_jdf8BV24\").\nFor multi-link fields, use an array of ids of the items you want to link (eg. [\"seq_jdf8BV24\"])\n", "oneOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "number" }, { "type": "object" }, { "items": { "type": "string" }, "type": "array" } ] } }, "required": [ "value" ], "type": "object" }, "FieldType": { "enum": [ "dna_sequence_link", "aa_sequence_link", "custom_entity_link", "entity_link", "mixture_link", "molecule_link", "dropdown", "part_link", "translation_link", "aa_part_link", "base_molecule_link", "blob_link", "text", "long_text", "batch_link", "storage_link", "entry_link", "assay_request_link", "assay_result_link", "assay_run_link", "boolean", "float", "integer", "datetime", "date", "json" ], "type": "string" }, "FieldValueWithResolution": { "oneOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "number" }, { "items": { "type": "string" }, "type": "array" }, { "additionalProperties": false, "description": "Look up an entity by its entity registry ID", "properties": { "entityRegistryId": { "type": "string" } }, "required": [ "entityRegistryId" ], "type": "object" } ] }, "FieldWithResolution": { "allOf": [ { "$ref": "#/$defs/Field" }, { "properties": { "value": { "allOf": [ { "$ref": "#/$defs/FieldValueWithResolution" } ] } }, "type": "object" } ] }, "Fields": { "additionalProperties": { "$ref": "#/$defs/Field" }, "type": "object" }, "FieldsWithResolution": { "additionalProperties": { "$ref": "#/$defs/FieldWithResolution" }, "type": "object" } } }