---
title: Network Source Definition
slug: network-source-definition
docTags: 
createdAt: 2023-11-14T00:08:54.057Z
---

The Network Source Definition table defines third-party sources into the network (wells or other networks). These sources must have a forecast defined in [Network Source Forecast](docId\:vDgMNl8_ewwaWBuFhCdNb). The unique constraint on network source definitions is **sourceNetworkId + sourceId** — re-posting the same network and source upserts the existing record.

| **Variable**       | **Data Type**  | **Unit of Measure** | **Is Nullable?** | **Default Value** | **Description**                                                                                                                                     |
| ------------------ | -------------- | ------------------- | ---------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| sourceNetworkId    | String         | -                   | No               | -                 | Source ID of the [Network Header](docId\:irXj-Rg5lEh701vW2okjL) the network source belongs to                                                       |
| sourceId           | String         | -                   | No               | -                 | Source ID for the network source definition. This sourceId enables upsert functionality from client source systems of record.                       |
| date               | DateTimeOffset | -                   | No               | -                 | Date at which the network source becomes part of the network. Datetime offset (with timezone) in ISO 8601 format. Example: 2022-09-27T16:28:37+0000 |
| downstreamSourceId | String         | -                   | No               | -                 | Source ID of the downstream node. Most commonly a [Network Pipe Definition](docId\:NM2btVSv7hAiitak2O9Yw) sourceId.                                 |
| enabled            | Bool           | -                   | No               | -                 | Whether the network source should participate in the network (false is the equivalent of a mask in GAP)                                             |
| fluidGravityApi    | Double         | API degrees         | No               | -                 | Oil API gravity                                                                                                                                     |
| fluidGravityGas    | Double         | specific gravity    | No               | -                 | Gas specific gravity                                                                                                                                |
| fluidSalinityWater | Double         | ppm                 | No               | -                 | Water salinity                                                                                                                                      |
| rsi                | Double         | scf/STB             | No               | -                 | Initial solution gas oil ratio                                                                                                                      |
| fluidMolarFracN2   | Double         | decimal percent     | No               | -                 | Molar fraction N2                                                                                                                                   |
| fluidMolarFracCO2  | Double         | decimal percent     | No               | -                 | Molar fraction CO2                                                                                                                                  |
| fluidMolarFracH2S  | Double         | decimal percent     | No               | -                 | Molar fraction H2S                                                                                                                                  |
| condensateGasRatio | Double         | STB/scf             | No               | -                 | Condensate gas ratio                                                                                                                                |
| waterGasRatio      | Double         | STB/scf             | No               | -                 | Water gas ratio                                                                                                                                     |

***

# Data Integrity Checks

| **Condition**                                   | **Response**    |
| ----------------------------------------------- | --------------- |
| Any non-nullable field is NULL or empty         | Record Rejected |
| sourceNetworkId does not match a Network Header | Record Rejected |

***

# Common Error Messages

| **API**                     | **Scenario**            | **Error Response**                      |
| --------------------------- | ----------------------- | --------------------------------------- |
| Add / Upsert network source | Unknown sourceNetworkId | network was not found for source id xxx |
