---
updatedAt: 2025-06-05T01:07:10.000Z
agentTools:
  projectIndex: https://api.portal.xpertdoc.com/llms.txt
---

# Create

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "odata4-v6",
    "version": "5.0"
  },
  "servers": [
    {
      "url": "https://portal.xpertdoc.com/odata4/v6"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/Batches()": {
      "post": {
        "summary": "Create",
        "description": "",
        "operationId": "create-batches",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "BatchGroupId": {
                    "type": "string",
                    "default": "00000000-0000-0000-0000-000000000000"
                  },
                  "Name": {
                    "type": "string",
                    "default": "Batch Name"
                  },
                  "Status": {
                    "type": "string",
                    "default": "Created"
                  }
                }
              },
              "examples": {
                "Request Example": {
                  "value": {
                    "odata.type": "Xpertdoc.Portal.Batch",
                    "BatchGroupId": "00000000-0000-0000-0000-000000000000",
                    "BatchId": "00000000-0000-0000-0000-000000000000",
                    "CreatedByUserProfileId": null,
                    "CreatedDate": "0001-01-01T00:00:00Z",
                    "Description": null,
                    "EndTime": null,
                    "ErrorMessage": null,
                    "ExecutedByUserProfileId": null,
                    "InputMetadata": null,
                    "IsArchived": null,
                    "ModifiedByUserProfileId": null,
                    "ModifiedDate": "0001-01-01T00:00:00Z",
                    "Name": "BatchName",
                    "OutputMetadata": null,
                    "StartTime": null,
                    "Status": "Created",
                    "Timestamp": null,
                    "WorkerName": null
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"@odata.context\": \"http://portal.xpertdoc.com/odata4/v6/$metadata#Batches/$entity\",\n    \"BatchId\": \"00000000-0000-0000-0000-000000000000e\",\n    \"BatchGroupId\": \"00000000-0000-0000-0000-000000000000\",\n    \"Name\": \"New Name\",\n    \"Description\": null,\n    \"Status\": \"Created\",\n    \"StartTime\": null,\n    \"EndTime\": null,\n    \"InputMetadata\": null,\n    \"OutputMetadata\": null,\n    \"IsArchived\": false,\n    \"WorkerName\": null,\n    \"ErrorMessage\": null,\n    \"ExecutedByUserProfileId\": null,\n    \"CreatedByUserProfileId\": \"00000000-0000-0000-0000-000000000000\",\n    \"CreatedDate\": \"2015-01-01T00:00:00.0000000Z\",\n    \"ModifiedByUserProfileId\": \"00000000-0000-0000-0000-000000000000\",\n    \"ModifiedDate\": \"2015-01-01T00:00:00.0000000Z\",\n    \"Timestamp\": \"AAAAAAABjhM=\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "@odata.context": {
                      "type": "string",
                      "example": "http://portal.xpertdoc.com/odata4/v6/$metadata#Batches/$entity"
                    },
                    "BatchId": {
                      "type": "string",
                      "example": "00000000-0000-0000-0000-000000000000e"
                    },
                    "BatchGroupId": {
                      "type": "string",
                      "example": "00000000-0000-0000-0000-000000000000"
                    },
                    "Name": {
                      "type": "string",
                      "example": "New Name"
                    },
                    "Description": {},
                    "Status": {
                      "type": "string",
                      "example": "Created"
                    },
                    "StartTime": {},
                    "EndTime": {},
                    "InputMetadata": {},
                    "OutputMetadata": {},
                    "IsArchived": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    },
                    "WorkerName": {},
                    "ErrorMessage": {},
                    "ExecutedByUserProfileId": {},
                    "CreatedByUserProfileId": {
                      "type": "string",
                      "example": "00000000-0000-0000-0000-000000000000"
                    },
                    "CreatedDate": {
                      "type": "string",
                      "example": "2015-01-01T00:00:00.0000000Z"
                    },
                    "ModifiedByUserProfileId": {
                      "type": "string",
                      "example": "00000000-0000-0000-0000-000000000000"
                    },
                    "ModifiedDate": {
                      "type": "string",
                      "example": "2015-01-01T00:00:00.0000000Z"
                    },
                    "Timestamp": {
                      "type": "string",
                      "example": "AAAAAAABjhM="
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "500",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"odata.error\": {\n        \"code\": \"\",\n        \"message\": {\n            \"lang\": \"en-US\",\n            \"value\": \"An error has occurred.\"\n        }\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "odata.error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": ""
                        },
                        "message": {
                          "type": "object",
                          "properties": {
                            "lang": {
                              "type": "string",
                              "example": "en-US"
                            },
                            "value": {
                              "type": "string",
                              "example": "An error has occurred."
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "csharp",
              "code": "var batch = new Batch()\n{\n\t\tBatchGroupId = Guid.Parse(\"00000000-0000-0000-0000-000000000000\"),\n\t\tName = \"Batch Name\",\n\t\tStatus = BatchStatus.Created\n};\nportalContext.AddToBatches(batch);\nportalContext.SaveChanges();",
              "name": "C#"
            }
          ],
          "samples-languages": [
            "csharp"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```