Order new geospatial data to be captured over a specific area and at a given time.
Constants
| Constant | Description | Value |
|---|---|---|
QuotationDecision | An acceptable decision for a not decided quotation. | Literal["ACCEPTED", "REJECTED"] |
QuotationStatus | Decision statuses for quotations. | Union[Literal["NOT_DECIDED"], QuotationDecision] |
FeasibilityStatus | Decision statuses for feasibility studies. | Literal["NOT_DECIDED", "ACCEPTED"] |
A class that provides sorting options for quotations.
Attributes
| Attribute | Description |
|---|---|
created_at | utils.SortingField Sorts by creation date. The default order is ascending. |
updated_at | utils.SortingField Sorts by update date. The default order is ascending. |
decided_at | utils.SortingField Sorts by decision date. The default order is ascending. |
credits_price | utils.SortingField Sorts by price, in credits. The default order is ascending. |
from itertools import islice
# Sort by creation date, from the most recent to the earliestquotations_sorted = up42.Quotation.all(sort_by=up42.QuotationSorting.created_at.desc)10 collapsed lines
# Sort by the last update date, from the most recent to the earliest# quotations_sorted = up42.Quotation.all(sort_by=up42.QuotationSorting.updated_at.desc)
# Sort by decision date, from the most recent to the earliest# quotations_sorted = up42.Quotation.all(sort_by=up42.QuotationSorting.decided_at.desc)
# Sort by price, from the highest to the lowest# quotations_sorted = up42.Quotation.all(sort_by=up42.QuotationSorting.credits_price.desc)
# Define output for one of the sorting examplesfor quotation in islice(quotations_sorted, 0, 5): # Print first 5 results print(f"- Quotation ID: {quotation.id}") print(f" Decision: {quotation.decision}") print(f" Price: {quotation.credits_price} credits") print(f" Created at: {quotation.created_at}\n")A data class that represents a quotation for a tasking order.
Attributes
| Attribute | Description |
|---|---|
id | str The quotation ID. |
created_at | str The time the quotation was created. |
updated_at | str The last time the quotation data was changed. |
decided_at | Optional[str] The time the decision was made on this quotation. |
account_id | str The account ID. |
workspace_id | str The workspace ID. |
order_id | str The order ID. |
credits_price | int The amount of credits that will be charged. |
decision | QuotationStatus The decision for this quotation. |
# Select a quotationquotation_id = "a3210ea7-1570-4c28-9052-d3fbe45ae30c"
# Get the specific quotation by its IDquotation = next(up42.Quotation.all(quotation_id=quotation_id))
# Define outputprint(f"Quotation details for ID: {quotation.id}")print(f"Created at: {quotation.created_at}")print(f"Decided at: {quotation.decided_at}")print(f"Order ID: {quotation.order_id}")print(f"Price: {quotation.credits_price} credits")print(f"Decision: {quotation.decision}")Methods
Marks the quotation as accepted by setting its decision attribute to ACCEPTED. Use save to apply the change.
# Select a quotationquotation_id = "b3b17f05-d9b5-47a1-a8d6-e15196f1204e"
quotation = next(up42.Quotation.all(quotation_id=quotation_id))print(f"Fetched quotation: {quotation.id}")print(f"Initial decision: {quotation.decision}")
# Accept the quotation locallyquotation.accept()
# Save the decision to the serverquotation.save()
# The object is updated with the server responseprint(f"Final decision: {quotation.decision}")print(f"Decided at: {quotation.decided_at}")Marks the quotation as accepted by setting its decision attribute to REJECTED. Use save to apply the change.
# Select a quotationquotation_id = "b3b17f05-d9b5-47a1-a8d6-e15196f1204e"
quotation = next(up42.Quotation.all(quotation_id=quotation_id))print(f"Fetched quotation: {quotation.id}")print(f"Initial decision: {quotation.decision}")
# Reject the quotation locallyquotation.reject()
# Save the decision to the serverquotation.save()
# The object is updated with the server responseprint(f"Final decision: {quotation.decision}")print(f"Decided at: {quotation.decided_at}")Saves any changes to the decision status of the quotation and updates the properties.
# Select a quotationquotation_id = "b3b17f05-d9b5-47a1-a8d6-e15196f1204e"
quotation = next(up42.Quotation.all(quotation_id=quotation_id))print(f"Fetched quotation: {quotation.id}")print(f"Initial decision: {quotation.decision}")
# Accept the quotation locallyquotation.accept()
# Save the decision to the serverquotation.save()
# The object is updated with the server responseprint(f"Final decision: {quotation.decision}")print(f"Decided at: {quotation.decided_at}")Retrieves quotations based on optional filter parameters. Returns Iterator["Quotation"]. Use itertools.islice to offset and limit the results.
| Parameter | Description |
|---|---|
quotation_id | Optional[str] The quotation ID. |
workspace_id | Optional[str] The workspace ID. Use to get objects from a specific workspace. Otherwise, objects from the entire account will be returned. |
order_id | Optional[str] The order ID. |
decision | Optional[List[QuotationStatus]] The status of quotations. |
sort_by | Optional[utils.SortingField] The results sorting method that arranges elements in ascending or descending order based on a chosen field. |
from itertools import islice
# Search for quotationsquotations = up42.Quotation.all( decision=["NOT_DECIDED"], order_id="ea36dee9-fed6-457e-8400-2c20ebd30f44",)
# Define outputfor quotation in islice(quotations, 0, 5): # Print first 5 results print(f"- Quotation ID: {quotation.id}") print(f" Created at: {quotation.created_at}") print(f" Decided at: {quotation.decided_at}") print(f" Order ID: {quotation.order_id}") print(f" Price: {quotation.credits_price} credits") print(f" Decision: {quotation.decision}\n")A class that provides sorting options for feasibility studies.
Attributes
| Attribute | Description |
|---|---|
created_at | utils.SortingField Sorts by creation date. The default order is ascending. |
updated_at | utils.SortingField Sorts by update date. The default order is ascending. |
decided_at | utils.SortingField Sorts by decision date. The default order is ascending. |
from itertools import islice
# Sort by creation date, from the most recent to the earliestfeasibility_studies_sorted = up42.FeasibilityStudy.all(sort_by=up42.FeasibilityStudySorting.created_at.desc)7 collapsed lines
# Sort by the last update date, from the most recent to the earliest# feasibility_studies_sorted = up42.FeasibilityStudy.all(sort_by=up42.FeasibilityStudySorting.updated_at.desc)
# Sort by decision date, from the most recent to the earliest# feasibility_studies_sorted = up42.FeasibilityStudy.all(sort_by=up42.FeasibilityStudySorting.decided_at.desc)
for feasibility_study in islice(feasibility_studies_sorted, 0, 5): # Print 5 print(f"- Feasibility study ID: {feasibility_study.id}") print(f" Order ID: {feasibility_study.order_id}") print(f" Status: {feasibility_study.status}") print(f" Study decision: {feasibility_study.decision}") print(f" Available options: {feasibility_study.options}") print(f" Accepted option ID: {feasibility_study.decision_option.id}") print(f" Accepted option description: {feasibility_study.decision_option.description}\n")A data class that represents the option of the feasibility study that was accepted for a given order.
Attributes
| Attribute | Description |
|---|---|
id | str The feasibility study option ID. |
description | Optional[str] A description of the feasibility study option. |
# Select a feasibility studyfeasibility_study_id = "ea36dee9-fed6-457e-8400-2c20ebd30f44"
# Fetch feasibility study infofeasibility_study = next(up42.FeasibilityStudy.all(feasibility_study_id=feasibility_study_id))
# Define outputprint(f"Feasibility study details for ID: {feasibility_study.id}")print(f"Order ID: {feasibility_study.order_id}")print(f"Status: {feasibility_study.status}")print(f"Study decision: {feasibility_study.decision}")print(f"Available options: {feasibility_study.options}")print(f"Accepted option ID: {feasibility_study.decision_option.id}")print(f"Accepted option description: {feasibility_study.decision_option.description}\n")A data class that represents a feasibility study for a tasking order.
Attributes
| Attribute | Description |
|---|---|
id | str The feasibility study ID. |
created_at | str The time the feasibility study was created. |
updated_at | str The last time the feasibility study was changed. |
account_id | str The account ID. |
workspace_id | str The workspace ID. |
order_id | str The order ID. |
decision | FeasibilityStatus The decision for this feasibility study. |
options | List[dict] Options available for the feasibility study. |
decided_at | Optional[str] The time the decision was made on this feasibility study. |
decision_option | Optional[FeasibilityStudyDecisionOption] The option of the feasibility study that was accepted. |
# Select a feasibility studyfeasibility_study_id = "ea36dee9-fed6-457e-8400-2c20ebd30f44"
# Fetch feasibility study infofeasibility_study = next(up42.FeasibilityStudy.all(feasibility_study_id=feasibility_study_id))
# Define outputprint(f"Feasibility study details for ID: {feasibility_study.id}")print(f"Order ID: {feasibility_study.order_id}")print(f"Status: {feasibility_study.status}")print(f"Study decision: {feasibility_study.decision}")print(f"Available options: {feasibility_study.options}")print(f"Accepted option ID: {feasibility_study.decision_option.id}")print(f"Accepted option description: {feasibility_study.decision_option.description}\n")Methods
Retrieves feasibility studies based on optional filter parameters. Returns Iterator["FeasibilityStudy"]. Use itertools.islice to offset and limit the results.
| Parameter | Description |
|---|---|
feasibility_study_id | Optional[str] The feasibility study ID. |
workspace_id | Optional[str] The workspace ID. |
order_id | Optional[str] The order ID. |
decision | Optional[List[FeasibilityStatus]] The decision for this feasibility study. |
sort_by | Optional[utils.SortingField]] The results sorting method that arranges elements in ascending or descending order based on a chosen field. |
from itertools import islice
# Select an orderorder_id = "ea36dee9-fed6-457e-8400-2c20ebd30f44"
# Search for feasibility studiesfeasibility_studies = up42.FeasibilityStudy.all( order_id=order_id, decision=["NOT_DECIDED"],)
# Define outputfor feasibility_study in islice(feasibility_studies, 0, 5): # Print first 5 results print(f"- Feasibility study ID: {feasibility_study.id}") print(f" Order ID: {feasibility_study.order_id}") print(f" Status: {feasibility_study.status}") print(f" Study decision: {feasibility_study.decision}") print(f" Available options: {feasibility_study.options}") print(f" Accepted option ID: {feasibility_study.decision_option.id}") print(f" Accepted option description: {feasibility_study.decision_option.description}\n")Selects a feasibility study option for acceptance. Use save to apply the change.
| Parameter | Description |
|---|---|
option_id | str The ID of the option to accept. |
# Select a feasibility study6 collapsed lines
feasibility_study_id = "ea36dee9-fed6-457e-8400-2c20ebd30f44"
# Get the specific feasibility study by its IDfeasibility_study = next(up42.FeasibilityStudy.all(feasibility_study_id=feasibility_study_id))print(f"Fetched feasibility study: {feasibility_study.id}")print(f"Initial decision: {feasibility_study.decision}")
# Print available options6 collapsed lines
available_options = feasibility_study.optionsprint("\nAvailable options:")for option in available_options: description = option.get('description', 'No description') print(f" - ID: {option['id']}") print(f" Description: {description}")
# Accept a specific feasibility study option locallyoption_to_accept_id = "033b4a5a-c492-4eba-915e-2000a0a84049"feasibility_study.accept(option_id=option_to_accept_id)
# Save the decision to the serverfeasibility_study.save()
# The object is updated with the server responseprint(f"Final decision: {feasibility_study.decision}")print(f"Chosen option ID: {feasibility_study.decision_option.id}")print(f"Decided at: {feasibility_study.decided_at}")Saves any changes to the decision status of the feasibility study option and updates the properties.
# Select a feasibility study6 collapsed lines
feasibility_study_id = "ea36dee9-fed6-457e-8400-2c20ebd30f44"
# Get the specific feasibility study by its IDfeasibility_study = next(up42.FeasibilityStudy.all(feasibility_study_id=feasibility_study_id))print(f"Fetched feasibility study: {feasibility_study.id}")print(f"Initial decision: {feasibility_study.decision}")
# Print available options6 collapsed lines
available_options = feasibility_study.optionsprint("\nAvailable options:")for option in available_options: description = option.get('description', 'No description') print(f" - ID: {option['id']}") print(f" Description: {description}")
# Accept a specific feasibility study option locallyoption_to_accept_id = "033b4a5a-c492-4eba-915e-2000a0a84049"feasibility_study.accept(option_id=option_to_accept_id)
# Save the decision to the serverfeasibility_study.save()
# The object is updated with the server responseprint(f"Final decision: {feasibility_study.decision}")print(f"Chosen option ID: {feasibility_study.decision_option.id}")print(f"Decided at: {feasibility_study.decided_at}")