Skip to content

Contract

Fabian Steiner edited this page Nov 4, 2026 · 2 revisions

Contract

from xurrent import Contract · module xurrent.contracts · API resource /contracts · Xurrent API docs

A contract with a customer or supplier organization, covering configuration items.

Back to the overview

Fields

The named arguments of the constructor. Every other field of the API response is set as an attribute as well.

Field Type Default Converted to
id int
name Optional[str] None
status Optional[str] None ContractStatus (unknown values stay text)
customer None Organization

Class methods

get_by_id

Contract.get_by_id(connection_object: XurrentApiHelper, id: int) -> T

API: GET /contracts/{id}

get_contracts

Contract.get_contracts(connection_object: XurrentApiHelper, predefinedFilter: ContractPredefinedFilter = None, queryfilter: dict = None) -> List[T]

API: GET /contracts · Enums: ContractPredefinedFilter

create

Contract.create(connection_object: XurrentApiHelper, data: dict) -> T

API: POST /contracts

Methods

ref_str

contract.ref_str() -> str

update

contract.update(data: dict) -> T

API: PATCH /contracts/{id}

get_cis

contract.get_cis(queryfilter: dict = None) -> List

API: GET /contracts/{id}/cis · Uses: ConfigurationItem

Enums

ContractPredefinedFilter

Used by: Contract.get_contracts

Value Description
active
inactive

ContractStatus

Used by: Contract.status

Value Description
being_prepared
scheduled_for_activation
active
expired

Cross references

Uses:

Used by:

Clone this wiki locally