---
title: Network Compressor Definition
slug: network-compressor-definition
docTags: 
createdAt: 2023-11-14T00:09:21.495Z
---

The Network Compressor Definition table defines a compressor in the network. The compressor must have a performance curve defined in [Network Screw Compressor Curve](docId\:y3Co3llaFQsNEKdJgslTU). The unique constraint on network compressor definitions is **sourceNetworkId + sourceId** — re-posting the same network and compressor 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 compressor belongs to                                                       |
| sourceId           | String         | -                   | No               | -                 | Source ID for the compressor definition. This sourceId enables upsert functionality from client source systems of record.                       |
| date               | DateTimeOffset | -                   | No               | -                 | Date at which the compressor becomes part of the network. Datetime offset (with timezone) in ISO 8601 format. Example: 2022-09-27T16:28:37+0000 |
| type               | String         | -                   | No               | SCREW             | Compressor type:<br /><br />SCREW<br />RECIPROCATING<br />CENTRIFUGAL                                                                           |
| upstreamSourceId   | String         | -                   | No               | -                 | Source ID of the node upstream of the compressor                                                                                                |
| downstreamSourceId | String         | -                   | No               | -                 | Source ID of the node downstream of the compressor                                                                                              |
| enabled            | Bool           | -                   | No               | -                 | Whether the compressor should participate in the network (false is the equivalent of a mask in GAP)                                             |

***

# Data Integrity Checks

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

***

# Common Error Messages

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