---
title: Bulk Add / Update Formation Property Data
slug: bulk-add-update-formation-property-data
docTags: 
createdAt: 2023-05-03T20:15:30.000Z
---

{
  "id": "BlDeDqlAW9eO4gjoeg4EQ",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://data.onxecta.com/api/production/formation",
    "servers": [
      {
        "url": "https://data.onxecta.com/api/production/formation",
        "description": "AWS Cloud API Endpoint"
      },
      {
        "url": "http://localhost/api/production/formation",
        "description": "Local Testing API Endpoint"
      }
    ],
    "name": "Bulk Add / Update Formation Property Data",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "array",
          "description": "",
          "customType": "FormationInput[]",
          "schema": [
            {
              "name": "sourceWellId",
              "kind": "required",
              "type": "string",
              "description": "SourceWellId of the well which owns the formation",
              "maxLength": 100
            },
            {
              "name": "sourceWellboreId",
              "kind": "required",
              "type": "string",
              "description": "SourceWellboreId of the wellbore which owns the formation",
              "maxLength": 100
            },
            {
              "name": "sourceId",
              "kind": "required",
              "type": "string",
              "description": "SourceId of the formation to enable upsert",
              "maxLength": 100
            },
            {
              "name": "name",
              "kind": "required",
              "type": "string",
              "description": "Formation name"
            },
            {
              "name": "allocationFactor",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>Allocation factor (0.0 - 1.0) of the formation</p>",
              "default": 1,
              "format": "double"
            },
            {
              "name": "compressibilityRock",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>Rock compressibility, 1/psi</p>",
              "default": 0.000003,
              "format": "double"
            },
            {
              "name": "pressureFormationInitialDatum",
              "kind": "required",
              "type": "number<double>",
              "description": "<p>Initial formation pressure, psia</p>",
              "format": "double"
            },
            {
              "name": "temperatureFormationDatum",
              "kind": "required",
              "type": "number<double>",
              "description": "<p>Initial formation temperature, degF</p>",
              "format": "double"
            },
            {
              "name": "depth",
              "kind": "required",
              "type": "number<double>",
              "description": "<p>Top depth of the formation, ft</p>",
              "format": "double"
            },
            {
              "name": "thicknessFormation",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>Thickness, ft</p>",
              "format": "double"
            },
            {
              "name": "porosity",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>Porosity, decimal percent</p>",
              "format": "double"
            },
            {
              "name": "saturationWaterInitial",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>Initial water saturation, decimal percent</p>",
              "format": "double"
            },
            {
              "name": "saturationGasInitial",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>Initial gas saturation, decimal percent</p>",
              "format": "double"
            },
            {
              "name": "saturationOilInitial",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>Initial oil saturation, decimal percent</p>",
              "format": "double"
            },
            {
              "name": "primaryFluidType",
              "kind": "required",
              "type": "string",
              "description": "<p>OIL, GAS, WATER</p>",
              "default": "OIL",
              "modelRef": "#/components/schemas/FormationPrimaryFluidType",
              "customType": "FormationPrimaryFluidType",
              "schema": []
            },
            {
              "name": "rsi",
              "kind": "required",
              "type": "number<double>",
              "description": "",
              "format": "double"
            },
            {
              "name": "condensateGasRatio",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>Deprecated. Condensate gas ratio for gas wells, STB/scf</p>",
              "format": "double"
            },
            {
              "name": "waterGasRatio",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>Deprecated. Water gas ratio for gas wells, STB/scf</p>",
              "format": "double"
            },
            {
              "name": "originalGasInPlace",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>Estimated initial gas in place, scf</p>",
              "format": "double"
            },
            {
              "name": "originalOilInPlace",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>Estimated initial oil in place, STB</p>",
              "format": "double"
            },
            {
              "name": "volumeAcquiferInitial",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>Estimated initial aquifer volume, STB</p>",
              "format": "double"
            },
            {
              "name": "fluidGravityApi",
              "kind": "required",
              "type": "number<double>",
              "description": "<p>Oil API gravity, degAPI</p>",
              "format": "double"
            },
            {
              "name": "fluidGravityGas",
              "kind": "required",
              "type": "number<double>",
              "description": "<p>Gas specific gravity, decimal</p>",
              "format": "double"
            },
            {
              "name": "fluidSalinityWater",
              "kind": "required",
              "type": "number<double>",
              "description": "<p>Water salinity, ppm</p>",
              "format": "double"
            },
            {
              "name": "fluidComingledGOR",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>Deprecated. Commingled gas oil ratio in multi-wellbore wells, scf/STB</p>",
              "format": "double"
            },
            {
              "name": "fluidMolarFracN2",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>N2 molar fraction, decimal percent</p>",
              "default": 0,
              "format": "double"
            },
            {
              "name": "fluidMolarFracCO2",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>CO2 molar fraction, decimal percent</p>",
              "default": 0,
              "format": "double"
            },
            {
              "name": "fluidMolarFracH2S",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>H2S molar fraction, decimal percent</p>",
              "default": 0,
              "format": "double"
            },
            {
              "name": "startDate",
              "kind": "optional",
              "type": "string<date-time>",
              "nullable": true,
              "description": "<p>Start date of this instance of the formation. Datetime offset (with timezone) in ISO 8601 format. Example: 2022-09-27T16:28</p><div></div>+0000<p></p>",
              "format": "date-time"
            },
            {
              "name": "langmuirPressure",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>Langmuir pressure (for coal seam gas reservoirs)</p>",
              "format": "double"
            },
            {
              "name": "langmuirVolume",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>Langmuir volume (for coal seam gas reservoirs)</p>",
              "format": "double"
            },
            {
              "name": "initialGasContent",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>Initial gas content (for coal seam gas reservoirs)</p>",
              "format": "double"
            },
            {
              "name": "bulkDensity",
              "kind": "optional",
              "type": "number<double>",
              "nullable": true,
              "description": "<p>Bulk density (for coal seam gas reservoirs)</p>",
              "format": "double"
            }
          ],
          "modelRef": "#/components/schemas/FormationInput",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "bearerAuth",
          "name": "bearerAuth",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "description": "",
            "customType": "Formation[]",
            "schema": [
              {
                "name": "xid",
                "kind": "required",
                "type": "string<uuid>",
                "description": "This is the xecta identifier",
                "format": "uuid"
              },
              {
                "name": "sourceId",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "nullable": true,
                "description": ""
              },
              {
                "name": "allocationFactor",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "",
                "default": 1,
                "format": "double"
              },
              {
                "name": "compressibilityRock",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "Formation rock compressibility",
                "format": "double"
              },
              {
                "name": "pressureFormationInitialDatum",
                "kind": "required",
                "type": "number<double>",
                "description": "The initial reservoir pressure value",
                "format": "double"
              },
              {
                "name": "temperatureFormationDatum",
                "kind": "required",
                "type": "number<double>",
                "description": "The reservoir temperature value",
                "format": "double"
              },
              {
                "name": "depth",
                "kind": "required",
                "type": "number<double>",
                "description": "<p>Depth of the formation, ft</p>",
                "format": "double"
              },
              {
                "name": "thicknessFormation",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "Thickness of the formation",
                "format": "double"
              },
              {
                "name": "porosity",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "Porosity of the formation",
                "format": "double"
              },
              {
                "name": "saturationWaterInitial",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "Initial water saturation",
                "format": "double"
              },
              {
                "name": "saturationGasInitial",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "Initial gas saturation",
                "format": "double"
              },
              {
                "name": "saturationOilInitial",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "Initial oil saturation",
                "format": "double"
              },
              {
                "name": "primaryFluidType",
                "kind": "optional",
                "type": "string",
                "description": "<p>OIL, GAS, WATER</p>",
                "default": "OIL",
                "modelRef": "#/components/schemas/FormationPrimaryFluidType",
                "customType": "FormationPrimaryFluidType",
                "schema": []
              },
              {
                "name": "rsi",
                "kind": "required",
                "type": "number<double>",
                "description": "Initial solution gas oil ratio",
                "format": "double"
              },
              {
                "name": "condensateGasRatio",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "Condensate gas Ratio",
                "format": "double"
              },
              {
                "name": "waterGasRatio",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "Water gas ratio",
                "format": "double"
              },
              {
                "name": "originalGasInPlace",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "Original Gas in Place",
                "format": "double"
              },
              {
                "name": "originalOilInPlace",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "Original Oil In Place",
                "format": "double"
              },
              {
                "name": "volumeAquiferInitial",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "Initial aquifer volume",
                "format": "double"
              },
              {
                "name": "fluidGravityApi",
                "kind": "required",
                "type": "number<double>",
                "description": "Oil API gravity",
                "format": "double"
              },
              {
                "name": "fluidGravityGas",
                "kind": "required",
                "type": "number<double>",
                "description": "Gas specific gravity",
                "format": "double"
              },
              {
                "name": "fluidSalinityWater",
                "kind": "required",
                "type": "number<double>",
                "description": "Water salinity",
                "format": "double"
              },
              {
                "name": "fluidCommingledGOR",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "<p>Gas Oil Ratio of the co-mingled fluid in multi wellbore wells</p>",
                "format": "double"
              },
              {
                "name": "fluidMolarFracN2",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "Molar fraction N2",
                "default": 0,
                "format": "double"
              },
              {
                "name": "fluidMolarFracCO2",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "Molar fraction CO2",
                "default": 0,
                "format": "double"
              },
              {
                "name": "fluidMolarFracH2S",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "Molar fraction H2S",
                "default": 0,
                "format": "double"
              },
              {
                "name": "startDate",
                "kind": "optional",
                "type": "string<date-time>",
                "nullable": true,
                "description": "This is the valid date of the formation",
                "format": "date-time"
              },
              {
                "name": "langmuirPressure",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "<p>Langmuir pressure (for coal seam gas reservoirs)</p>",
                "format": "double"
              },
              {
                "name": "langmuirVolume",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "<p>Langmuir volume (for coal seam gas reservoirs)</p>",
                "format": "double"
              },
              {
                "name": "initialGasContent",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "<p>Initial gas content (for coal seam gas reservoirs)</p>",
                "format": "double"
              },
              {
                "name": "bulkDensity",
                "kind": "optional",
                "type": "number<double>",
                "nullable": true,
                "description": "<p>Bulk density (for coal seam gas reservoirs)</p>",
                "format": "double"
              }
            ],
            "modelRef": "#/components/schemas/Formation",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "K_nxUeYxxfkfFs_wq_kUM",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://data.onxecta.com/api/production/formation \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '[\n     {\n     \"sourceWellId\": \"\",\n     \"sourceWellboreId\": \"\",\n     \"sourceId\": \"\",\n     \"name\": \"\",\n     \"allocationFactor\": 1,\n     \"compressibilityRock\": 0.000003,\n     \"pressureFormationInitialDatum\": \"\",\n     \"temperatureFormationDatum\": \"\",\n     \"depth\": \"\",\n     \"primaryFluidType\": \"OIL\",\n     \"rsi\": \"\",\n     \"fluidGravityApi\": \"\",\n     \"fluidGravityGas\": \"\",\n     \"fluidSalinityWater\": \"\"\n     }\n     ]'"
        },
        {
          "id": "TRH3VUSg0BGl6GiulPcUv",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify([\n   {\n      \"sourceWellId\": \"\",\n      \"sourceWellboreId\": \"\",\n      \"sourceId\": \"\",\n      \"name\": \"\",\n      \"allocationFactor\": 1,\n      \"compressibilityRock\": 0.000003,\n      \"pressureFormationInitialDatum\": \"\",\n      \"temperatureFormationDatum\": \"\",\n      \"depth\": \"\",\n      \"primaryFluidType\": \"OIL\",\n      \"rsi\": \"\",\n      \"fluidGravityApi\": \"\",\n      \"fluidGravityGas\": \"\",\n      \"fluidSalinityWater\": \"\"\n   }\n]);\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://data.onxecta.com/api/production/formation\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "boQin1uB-OsmV5_UrBxEz",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://data.onxecta.com/api/production/formation\"\n\npayload = json.dumps([\n   {\n      \"sourceWellId\": \"\",\n      \"sourceWellboreId\": \"\",\n      \"sourceId\": \"\",\n      \"name\": \"\",\n      \"allocationFactor\": 1,\n      \"compressibilityRock\": 0.000003,\n      \"pressureFormationInitialDatum\": \"\",\n      \"temperatureFormationDatum\": \"\",\n      \"depth\": \"\",\n      \"primaryFluidType\": \"OIL\",\n      \"rsi\": \"\",\n      \"fluidGravityApi\": \"\",\n      \"fluidGravityGas\": \"\",\n      \"fluidSalinityWater\": \"\"\n   }\n])\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        },
        {
          "id": "9HpWpP9mkelEcjHYTr6G3",
          "language": "csharp",
          "label": "C#",
          "code": "var options = new RestClientOptions(\"https://data.onxecta.com\")\n{\n   MaxTimeout = -1,\n};\nvar client = new RestClient(options);\nvar request = new RestRequest(\"/api/production/formation\", Method.Post);\nrequest.AddHeader(\"accept\", \"application/json\");\nrequest.AddHeader(\"content-type\", \"application/json\");\nvar body = @\"[\" + \"\\n\" +\n@\"  {\" + \"\\n\" +\n@\"    \"\"sourceWellId\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"sourceWellboreId\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"sourceId\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"name\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"allocationFactor\"\": 1,\" + \"\\n\" +\n@\"    \"\"compressibilityRock\"\": 0.000003,\" + \"\\n\" +\n@\"    \"\"pressureFormationInitialDatum\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"temperatureFormationDatum\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"depth\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"primaryFluidType\"\": \"\"OIL\"\",\" + \"\\n\" +\n@\"    \"\"rsi\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"fluidGravityApi\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"fluidGravityGas\"\": \"\"\"\",\" + \"\\n\" +\n@\"    \"\"fluidSalinityWater\"\": \"\"\"\"\" + \"\\n\" +\n@\"  }\" + \"\\n\" +\n@\"]\";\nrequest.AddStringBody(body, DataFormat.Json);\nRestResponse response = await client.ExecuteAsync(request);\nConsole.WriteLine(response.Content);"
        },
        {
          "id": "35n4XPxIVwSfLmKPSrwDf",
          "language": "java",
          "label": "Java",
          "code": "OkHttpClient client = new OkHttpClient().newBuilder()\n   .build();\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"[\\n  {\\n    \\\"sourceWellId\\\": \\\"\\\",\\n    \\\"sourceWellboreId\\\": \\\"\\\",\\n    \\\"sourceId\\\": \\\"\\\",\\n    \\\"name\\\": \\\"\\\",\\n    \\\"allocationFactor\\\": 1,\\n    \\\"compressibilityRock\\\": 0.000003,\\n    \\\"pressureFormationInitialDatum\\\": \\\"\\\",\\n    \\\"temperatureFormationDatum\\\": \\\"\\\",\\n    \\\"depth\\\": \\\"\\\",\\n    \\\"primaryFluidType\\\": \\\"OIL\\\",\\n    \\\"rsi\\\": \\\"\\\",\\n    \\\"fluidGravityApi\\\": \\\"\\\",\\n    \\\"fluidGravityGas\\\": \\\"\\\",\\n    \\\"fluidSalinityWater\\\": \\\"\\\"\\n  }\\n]\");\nRequest request = new Request.Builder()\n   .url(\"https://data.onxecta.com/api/production/formation\")\n   .method(\"POST\", body)\n   .addHeader(\"accept\", \"application/json\")\n   .addHeader(\"content-type\", \"application/json\")\n   .build();\nResponse response = client.newCall(request).execute();"
        }
      ],
      "selectedLanguageId": "K_nxUeYxxfkfFs_wq_kUM"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n[\n  {\n    \"xid\": \"\",\n    \"sourceId\": \"\",\n    \"name\": \"\",\n    \"allocationFactor\": \"\",\n    \"compressibilityRock\": \"\",\n    \"pressureFormationInitialDatum\": \"\",\n    \"temperatureFormationDatum\": \"\",\n    \"depth\": \"\",\n    \"thicknessFormation\": \"\",\n    \"porosity\": \"\",\n    \"saturationWaterInitial\": \"\",\n    \"saturationGasInitial\": \"\",\n    \"saturationOilInitial\": \"\",\n    \"primaryFluidType\": \"\",\n    \"rsi\": \"\",\n    \"condensateGasRatio\": \"\",\n    \"waterGasRatio\": \"\",\n    \"originalGasInPlace\": \"\",\n    \"originalOilInPlace\": \"\",\n    \"volumeAquiferInitial\": \"\",\n    \"fluidGravityApi\": \"\",\n    \"fluidGravityGas\": \"\",\n    \"fluidSalinityWater\": \"\",\n    \"fluidCommingledGOR\": \"\",\n    \"fluidMolarFracN2\": \"\",\n    \"fluidMolarFracCO2\": \"\",\n    \"fluidMolarFracH2S\": \"\",\n    \"startDate\": \"\",\n    \"langmuirPressure\": \"\",\n    \"langmuirVolume\": \"\",\n    \"initialGasContent\": \"\",\n    \"bulkDensity\": \"\"\n  }\n]"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}