Contracts#
ContractManager
Contracts manager.
Obtained by calling GET /space-center/contract-manager.
A ContractManager object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/contract-manager/(id)/types#
A list of all contract types.
- Parameters:
id – The identifier of the ContractManager object.
- Response JSON Object:
value (set<string>)
- GET /space-center/contract-manager/(id)/all-contracts#
A list of all contracts.
- Parameters:
id – The identifier of the ContractManager object.
- Response JSON Object:
value (list<SpaceCenter.Contract>)
- GET /space-center/contract-manager/(id)/active-contracts#
A list of all active contracts.
- Parameters:
id – The identifier of the ContractManager object.
- Response JSON Object:
value (list<SpaceCenter.Contract>)
- GET /space-center/contract-manager/(id)/offered-contracts#
A list of all offered, but unaccepted, contracts.
- Parameters:
id – The identifier of the ContractManager object.
- Response JSON Object:
value (list<SpaceCenter.Contract>)
- GET /space-center/contract-manager/(id)/completed-contracts#
A list of all completed contracts.
- Parameters:
id – The identifier of the ContractManager object.
- Response JSON Object:
value (list<SpaceCenter.Contract>)
- GET /space-center/contract-manager/(id)/failed-contracts#
A list of all failed contracts.
- Parameters:
id – The identifier of the ContractManager object.
- Response JSON Object:
value (list<SpaceCenter.Contract>)
Contract
A contract. Can be accessed using GET /space-center/contract-manager.
A Contract object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/contract/(id)/type#
Type of the contract.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (string)
- GET /space-center/contract/(id)/title#
Title of the contract.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (string)
- GET /space-center/contract/(id)/description#
Description of the contract.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (string)
- GET /space-center/contract/(id)/notes#
Notes for the contract.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (string)
- GET /space-center/contract/(id)/synopsis#
Synopsis for the contract.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (string)
- GET /space-center/contract/(id)/keywords#
Keywords for the contract.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (list<string>)
- GET /space-center/contract/(id)/state#
State of the contract.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (SpaceCenter.ContractState)
- GET /space-center/contract/(id)/seen#
Whether the contract has been seen.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (bool)
- GET /space-center/contract/(id)/read#
Whether the contract has been read.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (bool)
- GET /space-center/contract/(id)/active#
Whether the contract is active.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (bool)
- GET /space-center/contract/(id)/failed#
Whether the contract has been failed.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (bool)
- GET /space-center/contract/(id)/can-be-canceled#
Whether the contract can be canceled.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (bool)
- GET /space-center/contract/(id)/can-be-declined#
Whether the contract can be declined.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (bool)
- GET /space-center/contract/(id)/can-be-failed#
Whether the contract can be failed.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (bool)
- POST /space-center/contract/(id)/accept#
Accept an offered contract.
- Parameters:
id – The identifier of the Contract object.
- POST /space-center/contract/(id)/cancel#
Cancel an active contract.
- Parameters:
id – The identifier of the Contract object.
- POST /space-center/contract/(id)/decline#
Decline an offered contract.
- Parameters:
id – The identifier of the Contract object.
- GET /space-center/contract/(id)/funds-advance#
Funds received when accepting the contract.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (double)
- GET /space-center/contract/(id)/funds-completion#
Funds received on completion of the contract.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (double)
- GET /space-center/contract/(id)/funds-failure#
Funds lost if the contract is failed.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (double)
- GET /space-center/contract/(id)/reputation-completion#
Reputation gained on completion of the contract.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (double)
- GET /space-center/contract/(id)/reputation-failure#
Reputation lost if the contract is failed.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (double)
- GET /space-center/contract/(id)/science-completion#
Science gained on completion of the contract.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (double)
- GET /space-center/contract/(id)/parameters#
Parameters for the contract.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (list<SpaceCenter.ContractParameter>)
- GET /space-center/contract/(id)/date-accepted#
Universal time at which the contract was accepted, in seconds. Zero if the contract has not been accepted.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (double)
- GET /space-center/contract/(id)/date-deadline#
Universal time by which the contract must be completed, in seconds. Zero if the contract has no deadline.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (double)
- GET /space-center/contract/(id)/date-expire#
Universal time at which the contract offer expires, in seconds. Zero if the contract has no expiry date.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (double)
- GET /space-center/contract/(id)/date-finished#
Universal time at which the contract was completed or failed, in seconds. Zero if the contract has not finished or KSP did not record a finish time.
- Parameters:
id – The identifier of the Contract object.
- Response JSON Object:
value (double)
ContractState
The state of a contract. See GET /space-center/contract/(id)/state.
Passed and returned as the name of one of its values:
"active"The contract is active.
"canceled"The contract has been canceled.
"completed"The contract has been completed.
"deadline_expired"The deadline for the contract has expired.
"declined"The contract has been declined.
"failed"The contract has been failed.
"generated"The contract has been generated.
"offered"The contract has been offered to the player.
"offer_expired"The contract was offered to the player, but the offer expired.
"withdrawn"The contract has been withdrawn.
ContractParameter
A contract parameter. See GET /space-center/contract/(id)/parameters.
A ContractParameter object is passed and returned as its identifier, a number. A path that acts on
an object takes it as (id).
- GET /space-center/contract-parameter/(id)/title#
Title of the parameter.
- Parameters:
id – The identifier of the ContractParameter object.
- Response JSON Object:
value (string)
- GET /space-center/contract-parameter/(id)/notes#
Notes for the parameter.
- Parameters:
id – The identifier of the ContractParameter object.
- Response JSON Object:
value (string)
- GET /space-center/contract-parameter/(id)/children#
Child contract parameters.
- Parameters:
id – The identifier of the ContractParameter object.
- Response JSON Object:
value (list<SpaceCenter.ContractParameter>)
- GET /space-center/contract-parameter/(id)/completed#
Whether the parameter has been completed.
- Parameters:
id – The identifier of the ContractParameter object.
- Response JSON Object:
value (bool)
- GET /space-center/contract-parameter/(id)/failed#
Whether the parameter has been failed.
- Parameters:
id – The identifier of the ContractParameter object.
- Response JSON Object:
value (bool)
- GET /space-center/contract-parameter/(id)/optional#
Whether the contract parameter is optional.
- Parameters:
id – The identifier of the ContractParameter object.
- Response JSON Object:
value (bool)
- GET /space-center/contract-parameter/(id)/funds-completion#
Funds received on completion of the contract parameter.
- Parameters:
id – The identifier of the ContractParameter object.
- Response JSON Object:
value (double)
- GET /space-center/contract-parameter/(id)/funds-failure#
Funds lost if the contract parameter is failed.
- Parameters:
id – The identifier of the ContractParameter object.
- Response JSON Object:
value (double)
- GET /space-center/contract-parameter/(id)/reputation-completion#
Reputation gained on completion of the contract parameter.
- Parameters:
id – The identifier of the ContractParameter object.
- Response JSON Object:
value (double)
- GET /space-center/contract-parameter/(id)/reputation-failure#
Reputation lost if the contract parameter is failed.
- Parameters:
id – The identifier of the ContractParameter object.
- Response JSON Object:
value (double)
- GET /space-center/contract-parameter/(id)/science-completion#
Science gained on completion of the contract parameter.
- Parameters:
id – The identifier of the ContractParameter object.
- Response JSON Object:
value (double)