Skip to main content
POST
/
contracts
Create Contract
curl --request POST \
  --url https://v1.api.flux-os.com/contracts \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-user-id: <api-key>' \
  --data '
{
  "external_id": "<string>",
  "term": "<unknown>",
  "transaction_type": "<unknown>",
  "type": "<unknown>",
  "start_date": "2023-12-25",
  "volume": 123,
  "volume_measurement_unit": "<unknown>",
  "measurement_type": "<unknown>",
  "pricing_basis": "<unknown>",
  "settlement_currency": "<unknown>",
  "payment_term": "<unknown>",
  "end_date": "2023-12-25",
  "differential_unit_amount": null,
  "differential_currency": "<unknown>",
  "differential_measurement_unit": "<unknown>",
  "percentage_of_index": null,
  "percentage_of_index_measurement_unit": "<unknown>",
  "percentage_of_benchmark": null,
  "percentage_of_benchmark_measurement_unit": "<unknown>",
  "eq": "<unknown>",
  "index": "<unknown>",
  "product_category": "<unknown>",
  "stream": "<unknown>",
  "benchmark": "<unknown>",
  "stream_wadf": "<unknown>",
  "feeder_wadf": "<unknown>",
  "broker_transaction_id": null
}
'
{
  "data": {
    "external_id": "<string>",
    "start_date": "2023-12-25",
    "volume": 123,
    "id": "<string>",
    "organization": {
      "name": "<string>",
      "id": "<string>",
      "image_url": null
    },
    "status": {
      "name": "<string>",
      "short_code": "<string>",
      "id": "<string>"
    },
    "term": {
      "name": "<string>",
      "short_code": "<string>",
      "id": "<string>"
    },
    "transaction_type": {
      "name": "<string>",
      "short_code": "<string>",
      "id": "<string>"
    },
    "type": {
      "name": "<string>",
      "short_code": "<string>",
      "id": "<string>"
    },
    "end_date": null,
    "volume_measurement_unit": {
      "name": "<string>",
      "abbreviation": "<string>",
      "id": "<string>",
      "html_symbol": null
    },
    "measurement_type": {
      "name": "<string>",
      "short_code": "<string>",
      "id": "<string>"
    },
    "pricing_basis": {
      "name": "<string>",
      "short_code": "<string>",
      "id": "<string>"
    },
    "differential_unit_amount": null,
    "differential_currency": {
      "name": "<string>",
      "symbol": "<string>",
      "id": "<string>"
    },
    "differential_measurement_unit": {
      "name": "<string>",
      "abbreviation": "<string>",
      "id": "<string>",
      "html_symbol": null
    },
    "percentage_of_index": null,
    "percentage_of_index_measurement_unit": {
      "name": "<string>",
      "abbreviation": "<string>",
      "id": "<string>",
      "html_symbol": null
    },
    "percentage_of_benchmark": null,
    "percentage_of_benchmark_measurement_unit": "<unknown>",
    "settlement_currency": {
      "name": "<string>",
      "symbol": "<string>",
      "id": "<string>"
    },
    "payment_term": {
      "name": "<string>",
      "short_code": "<string>",
      "id": "<string>"
    },
    "eq": {
      "name": "<string>",
      "id": "<string>",
      "currency": "<unknown>",
      "measurement_unit": "<unknown>"
    },
    "index": {
      "name": "<string>",
      "stream": "<unknown>",
      "id": "<string>",
      "currency": "<unknown>",
      "measurement_unit": "<unknown>"
    },
    "product_category": {
      "name": "<string>",
      "short_code": "<string>",
      "id": "<string>"
    },
    "stream": {
      "name": "<string>",
      "short_code": "<string>",
      "product_category": "<unknown>",
      "id": "<string>"
    },
    "benchmark": {
      "name": "<string>",
      "short_code": "<string>",
      "measurement_unit": "<unknown>",
      "id": "<string>",
      "currency": "<unknown>"
    },
    "stream_wadf": {
      "name": "<string>",
      "amount": 123,
      "currency": "<unknown>",
      "measurement_unit": "<unknown>",
      "id": "<string>"
    },
    "feeder_wadf": {
      "name": "<string>",
      "amount": 123,
      "currency": "<unknown>",
      "measurement_unit": "<unknown>",
      "id": "<string>"
    },
    "broker_transaction_id": null,
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "parties": [
      {
        "id": "<string>",
        "organization": {
          "name": "<string>",
          "id": "<string>",
          "image_url": null
        },
        "entity": {
          "legal_name": "<string>",
          "id": "<string>"
        },
        "role": {
          "name": "<string>",
          "short_code": "<string>",
          "id": "<string>"
        },
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "users": [
          {
            "party": "<unknown>",
            "id": "<string>",
            "user": {
              "first_name": "<string>",
              "last_name": "<string>",
              "id": "<string>",
              "roles": "<unknown>"
            },
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z"
          }
        ]
      }
    ],
    "schedules": [
      {
        "production_month": "2023-12-25",
        "volume": 123,
        "id": "<string>",
        "status": {
          "name": "<string>",
          "short_code": "<string>",
          "id": "<string>"
        },
        "volume_measurement_unit": {
          "name": "<string>",
          "abbreviation": "<string>",
          "id": "<string>",
          "html_symbol": null
        },
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "estimated_qualities": [
          {
            "value": 123,
            "id": "<string>",
            "measurement_property": {
              "name": "<string>",
              "short_code": "<string>",
              "id": "<string>"
            },
            "measurement_unit": {
              "name": "<string>",
              "abbreviation": "<string>",
              "id": "<string>",
              "html_symbol": null
            },
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z"
          }
        ],
        "chains": [
          {
            "id": "<string>",
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z",
            "legs": [
              {
                "position": 123,
                "chain": "<unknown>",
                "volume": 123,
                "id": "<string>",
                "mode": {
                  "name": "<string>",
                  "short_code": "<string>",
                  "id": "<string>"
                },
                "source_well": {
                  "id": "<string>",
                  "name": null
                },
                "source_commercial_facility": {
                  "name": "<string>",
                  "id": "<string>",
                  "lsd": null,
                  "section": null,
                  "township": null,
                  "range": null,
                  "meridian": null
                },
                "source_facility": {
                  "name": "<string>",
                  "id": "<string>"
                },
                "source_land_description": {
                  "description": "<string>",
                  "latitude": 123,
                  "longitude": 123,
                  "id": "<string>",
                  "survey_system": {
                    "name": "<string>",
                    "short_code": "<string>",
                    "id": "<string>"
                  },
                  "unit": {
                    "name": "<string>",
                    "short_code": "<string>",
                    "id": "<string>"
                  }
                },
                "destination_commercial_facility": {
                  "name": "<string>",
                  "id": "<string>",
                  "lsd": null,
                  "section": null,
                  "township": null,
                  "range": null,
                  "meridian": null
                },
                "destination_facility": {
                  "name": "<string>",
                  "id": "<string>"
                },
                "volume_measurement_unit": {
                  "name": "<string>",
                  "abbreviation": "<string>",
                  "id": "<string>",
                  "html_symbol": null
                },
                "custodian_organization": {
                  "name": "<string>",
                  "id": "<string>",
                  "image_url": null
                },
                "custodian_entity": {
                  "legal_name": "<string>",
                  "id": "<string>"
                },
                "is_custody_transfer": false,
                "is_chain_source": false,
                "is_chain_destination": false,
                "fob": false,
                "carrier_organization": {
                  "name": "<string>",
                  "id": "<string>",
                  "image_url": null
                },
                "carrier_entity": {
                  "legal_name": "<string>",
                  "id": "<string>"
                },
                "carrier_user": {
                  "first_name": "<string>",
                  "last_name": "<string>",
                  "id": "<string>"
                },
                "created_at": "2023-11-07T05:31:56Z",
                "updated_at": "2023-11-07T05:31:56Z"
              }
            ]
          }
        ]
      }
    ],
    "profit_shares": [
      {
        "value": 123,
        "id": "<string>",
        "paid_by": {
          "name": "<string>",
          "id": "<string>",
          "image_url": null
        },
        "paid_to": {
          "name": "<string>",
          "id": "<string>",
          "image_url": null
        },
        "settlement_currency": {
          "name": "<string>",
          "symbol": "<string>",
          "id": "<string>"
        },
        "measurement_unit": {
          "name": "<string>",
          "abbreviation": "<string>",
          "id": "<string>",
          "html_symbol": null
        },
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ],
    "paper": {
      "id": "<string>",
      "paper_from": {
        "name": "<string>",
        "id": "<string>",
        "image_url": null
      },
      "external_id": null,
      "governing_gtc": {
        "name": "<string>",
        "short_code": "<string>",
        "id": "<string>"
      },
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "legal_provisions": [
        {
          "id": "<string>",
          "provision": {
            "name": "<string>",
            "short_code": "<string>",
            "content": "<string>",
            "organization": "<unknown>",
            "id": "<string>"
          },
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z"
        }
      ]
    },
    "fees": [
      {
        "id": "<string>",
        "type": {
          "name": "<string>",
          "short_code": "<string>",
          "id": "<string>"
        },
        "fee_category": {
          "name": "<string>",
          "short_code": "<string>",
          "id": "<string>"
        },
        "currency": {
          "name": "<string>",
          "symbol": "<string>",
          "id": "<string>"
        },
        "amount": null,
        "transport_leg": "<unknown>",
        "measurement_unit": {
          "name": "<string>",
          "abbreviation": "<string>",
          "id": "<string>",
          "html_symbol": null
        },
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "total_cost": 123
      }
    ],
    "premiums": [
      {
        "amount": 123,
        "id": "<string>",
        "name": "Premium",
        "currency": {
          "name": "<string>",
          "symbol": "<string>",
          "id": "<string>"
        },
        "measurement_unit": {
          "name": "<string>",
          "abbreviation": "<string>",
          "id": "<string>",
          "html_symbol": null
        },
        "paid_by": {
          "name": "<string>",
          "id": "<string>",
          "image_url": null
        },
        "paid_to": {
          "name": "<string>",
          "id": "<string>",
          "image_url": null
        },
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z"
      }
    ],
    "pricing_provisions": [
      {
        "id": "<string>",
        "type": {
          "name": "<string>",
          "short_code": "<string>",
          "id": "<string>"
        },
        "description": null,
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "fee": {
          "type": "<unknown>",
          "fee_category": "<unknown>",
          "currency": "<unknown>",
          "id": "<string>",
          "amount": null,
          "transport_leg": "<unknown>",
          "measurement_unit": "<unknown>",
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z"
        },
        "groups": [
          {
            "id": "<string>",
            "provision": {
              "type": "<unknown>",
              "contract": "<unknown>",
              "fee": "<unknown>",
              "id": "<string>",
              "description": null,
              "created_at": "2023-11-07T05:31:56Z",
              "updated_at": "2023-11-07T05:31:56Z"
            },
            "parent_group": "<unknown>",
            "logical_operator": {
              "name": "<string>",
              "symbol": "<string>",
              "id": "<string>"
            },
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z",
            "conditions": [
              {
                "value": 123,
                "id": "<string>",
                "measurement_property": {
                  "name": "<string>",
                  "short_code": "<string>",
                  "id": "<string>"
                },
                "measurement_unit": {
                  "name": "<string>",
                  "abbreviation": "<string>",
                  "id": "<string>",
                  "html_symbol": null
                },
                "comparison_operator": {
                  "name": "<string>",
                  "symbol": "<string>",
                  "id": "<string>"
                },
                "created_at": "2023-11-07T05:31:56Z",
                "updated_at": "2023-11-07T05:31:56Z"
              }
            ]
          }
        ]
      }
    ]
  }
}

Authorizations

x-api-key
string
header
required
x-user-id
string
header
required

Body

application/json
external_id
string
required
Maximum string length: 255
term
any
required
transaction_type
any
required
type
any
required
start_date
string<date>
required
volume
number
required
volume_measurement_unit
any
required
measurement_type
any
required
pricing_basis
any
required
settlement_currency
any
required
payment_term
any
required
end_date
string<date>
differential_unit_amount
number | null
differential_currency
unknown
differential_measurement_unit
unknown
percentage_of_index
number | null
percentage_of_index_measurement_unit
unknown
percentage_of_benchmark
number | null
percentage_of_benchmark_measurement_unit
unknown
eq
unknown
index
unknown
product_category
unknown
stream
unknown
benchmark
unknown
stream_wadf
unknown
feeder_wadf
unknown
broker_transaction_id
string | null
Maximum string length: 255

Response

Contract successfully created.

data
object