Skip to main content
POST
/
contracts
/
{id}
/
schedules
/
{schedule_id}
/
transport-chains
/
{transport_chain_id}
/
transport-legs
Create Transport Leg
curl --request POST \
  --url https://v1.api.flux-os.com/contracts/{id}/schedules/{schedule_id}/transport-chains/{transport_chain_id}/transport-legs \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-user-id: <api-key>' \
  --data '
{
  "mode": "<unknown>",
  "source_land_description": "<unknown>",
  "destination_commercial_facility": "<unknown>",
  "volume": 123,
  "volume_measurement_unit": "<unknown>",
  "custodian_organization": "<unknown>",
  "position": 123,
  "source_well": "<unknown>",
  "source_commercial_facility": "<unknown>",
  "source_facility": "<unknown>",
  "destination_facility": "<unknown>",
  "custodian_entity": "<unknown>",
  "is_custody_transfer": false,
  "fob": false,
  "carrier_organization": "<unknown>",
  "carrier_entity": "<unknown>",
  "carrier_user": "<unknown>"
}
'
{
  "data": {
    "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"
  }
}

Authorizations

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

Path Parameters

id
integer
required

The contract ID.

schedule_id
integer
required

The schedule ID.

transport_chain_id
integer
required

The transport chain ID.

Body

application/json
mode
any
required
source_land_description
any
required
destination_commercial_facility
any
required
volume
number
required
volume_measurement_unit
any
required
custodian_organization
any
required
position
integer
source_well
unknown
source_commercial_facility
unknown
source_facility
unknown
destination_facility
unknown
custodian_entity
unknown
is_custody_transfer
boolean
default:false
fob
boolean
default:false
carrier_organization
unknown
carrier_entity
unknown
carrier_user
unknown

Response

Transport leg successfully created.

data
object