# Fetching a list of Estimates

This endpoint returns structured Estimate objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the estimates top-level JSON key.
Please see our Response Format section for more information.

Endpoint: GET /estimates
Version: 1.0.0

## Query parameters:

  - `by_custom_choice_value` (string)
    Filter by a custom field choice value, represented as a string with the custom field ID, followed by a
colon, and then comma-separated custom field choice value IDs. The custom field choice value can also be
the word blank. Multiple custom fields can be delimited by semicolons or by parentheses and colons.

The following formats are supported:

- custom_field_ID:choice_value_ID
- custom_field_ID:choice_value_1_ID,choice_value_2_ID
- custom_field_ID:blank
- (custom_field_1_ID:choice_value_1_ID,choice_value_2_ID):(custom_field_2_ID:choice_value_3_ID).

  - `by_custom_currency_value` (string)
    Filter by a custom field currency value, represented as a string with the custom field ID, followed by a
colon, and then the currency value. Optionally, the currency ISO code can be supplied as well, separated
from the currency value by another colon. Multiple custom fields can be delimited by semicolons or by parentheses and colons.
The following formats are supported:

- (1:200.2:USD):(2:100).

  - `by_custom_date_value` (string)
    Filter by a custom field date value, represented as a string with the custom field ID, followed by a
colon, the starting date, another colon, and then the ending date. You can provide both a starting date
and ending date, or provide just one. Multiple custom fields can be delimited by semicolons or by parentheses and colons.
The following formats are supported:

- (1:2014-12-05:2014-12-25):(2:2014-12-05).

  - `by_custom_number_value` (string)
    Filter by a custom field number value, represented as a string with the custom field ID, followed by a
colon, and then the number value. Multiple custom fields can be delimited by semicolons or by parentheses and colons.
The following formats are supported:

- (1:200):(2:101).

  - `by_custom_text_value` (string)
    Filter by a custom field text value, represented as a string with the custom field ID, followed by a
colon, and then the text value. Multiple custom fields can be delimited by semicolons or by parentheses and colons.
The following formats are supported:

- (1:something):(2:else).

  - `created_after` (string)
    Filter for records created after a specified datetime. The datetime must be in ISO 8601 format.

  - `created_before` (string)
    Filter for records created before a specified datetime. The datetime must be in ISO 8601 format.

  - `creator` (string)
    Only includes estimates in which the specified set IDs belong to the creator of the estimates. For example, '10,20'.

  - `external_reference_external_message` (string)
    Filter the objects based on the external message of their associated external references. This is an exact match.

  - `external_reference_external_status` (string)
    Filter by the status of the external object in the external system.

  - `external_reference_service_model` (string)
    Filter by the type of the external object this external reference belongs to.

  - `external_reference_service_model_ref` (integer)
    Filter by the id of the external object this external reference belongs to.

  - `external_reference_service_model_refs` (string)
    Filter for objects that correlate to the specified external object IDs. Provide a comma-separated list of up to 200 external IDs.

  - `external_reference_service_name` (string)
    Filter by the name of the provider for integration.

  - `external_reference_status` (string)
    Filter by the status of the integration, this can be successful or fail.

  - `has_external_references` (boolean)
    Filter by whether or not the object has external references.

  - `has_value_for_custom_field_ids` (string)
    Filter by the presence of a custom field value for the specified comma-separated custom field ID(s).

  - `include` (string)
    Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.
- creator (User) - The user who created the estimate.
- custom_field_values (CustomFieldValue) - The value set on estimate custom fields.
- estimate_scenarios (EstimateScenario) - The EstimateScenarios of the estimate.
- external_references (ExternalReference) - Includes references to external integrations for this object.
- workspace (Workspace) - The Workspace that was created from the Project.
- workspace_group (WorkspaceGroup) - The WorkspaceGroup (client) of the estimate.

  - `matching` (string)

  - `only` (string)
    Allows you to request one or more resources directly by ID. Multiple IDs can be supplied
in a comma separated list, like GET /api/v1/workspaces.json?only=5,6,7.

  - `order` (string)
    Supply order with the name of a valid sort field for the endpoint and a direction.

Valid values: created_at:asc, created_at:desc, name:asc, and name:desc.

  - `page` (integer)

  - `per_page` (integer)

  - `updated_after` (string)
    Filter for records updated after a specified datetime. The datetime must be in ISO 8601 format.

  - `updated_before` (string)
    Filter for records updated before a specified datetime. The datetime must be in ISO 8601 format.

  - `with_workspace_group_ids` (string)
    Only includes estimates for the specified workspace group IDs. For example, '1,2,3'.

  - `without_external_reference_service_name` (string)
    Exclude by the existence of an external reference with the specified service name.

## Response 200 fields (application/json):

  - `count` (integer)

  - `meta` (object)

  - `meta.count` (integer)

  - `meta.page_count` (integer)

  - `meta.page_number` (integer)

  - `meta.page_size` (integer)

  - `results` (array)

  - `results.key` (string)

  - `results.id` (string)

  - `estimates` (object)

  - `external_references` (object)

  - `users` (object)

  - `workspace_groups` (object)

  - `estimate_scenarios` (object)

  - `workspaces` (object)

  - `custom_field_values` (object)

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)


