orders

Retrieve a list of orders that the currently logged in user can access.

Arguments

external_ids ([ExternalID!])

Optional IDs of the desired orders in an external system.

organization_filter (OrganizationFilterInput)

Optional filter to narrow the results to an organization, optionally exclude the organization's descendants.

pagination (Pagination!)

Pagination parameters for the query results.

product_key (ProductKey)
Deprecation notice

Please use the product_keys filter instead.

The product key you are interested in.

product_keys ([ProductKey!])

The product keys you are interested in.

sentera_ids ([ID!])

Optionally filter results by a list of Order IDs

statuses ([OrderStatus!])

The list of order statuses you are interested in. If not provided all orders are returned.

Return fields

page (Int!)

The page of results returned in this structure when using pagination.

page_size (Int!)

The number of results returned in this structure when using pagination.

present (Boolean!)

Whether or not there are any results in this structure.

results ([Order!]!)

A collection of orders matching the query constraints.

total_count (Int!)

The total number of items matching the query constraints.

Examples

Query for orders

Retrieve a list of orders you can access. Automatically traverses down your organization hierarchy.

Try this example in GraphiQL
query Orders {
  orders(pagination: { page: 1, page_size: 10}) {
  results {
    organization {
      sentera_id
    }
    settings {
      row_fill
      row_spacing {
        value
        unit
      }
      crop_type
      male_row_count
    }
    task {
      status
    }
  }
  }
}

{
  "data": {
  "orders": {
    "results": [
      {
        "organization": {
          "sentera_id": "121amqh_OR_phgrAcme_CV_deve_a7f4fbad8_221216_115034"
        },
        "settings": {
          "row_fill": null,
          "row_spacing": {
            "value": 12,
            "unit": "INCHES"
          },
          "crop_type": null,
          "male_row_count": null,
          "male_seed_rate": null
        },
        "task": {
          "status": "OPEN"
        }
      }
    ]
  }
  }
}

Orders by External ID

Retrieve a list of orders you can access filtered to a specific external ID.

Try this example in GraphiQL
query Orders {
  orders(external_ids: "abc.123", pagination: { page: 1, page_size: 10}) {
  results {
    organization_sentera_id
    external_id
    settings {
      row_fill
      row_spacing {
        value
        unit
      }
      crop_type
      male_row_count
    }
    task {
      status
    }
  }
  }
}

{
  "data": {
  "orders": {
    "results": [
      {
        "organization_sentera_id": "121amqh_OR_phgrAcme_CV_deve_a7f4fbad8_221216_115034",
        "external_id": "abc.123",
        "settings": {
          "row_fill": null,
          "row_spacing": {
            "value": 12,
            "unit": "INCHES"
          },
          "crop_type": null,
          "male_row_count": null,
          "male_seed_rate": null
        },
        "task": {
          "status": "OPEN"
        }
      }
    ]
  }
  }
}

Orders by Status

Retrieve a list of orders you can access filtered to one or more statuses.

Try this example in GraphiQL
query Orders {
  orders(statuses: [PENDING, PROCESSING], pagination: { page: 1, page_size: 10}) {
  results {
    organization_sentera_id
    status
    external_id
    settings {
      row_fill
      row_spacing {
        value
        unit
      }
      crop_type
      male_row_count
    }
    task {
      status
    }
  }
  }
}

{
  "data": {
  "orders": {
    "results": [
      {
        "organization_sentera_id": "121amqh_OR_phgrAcme_CV_deve_a7f4fbad8_221216_115034",
        "status": "PENDING",
        "external_id": "abc.123",
        "settings": {
          "row_fill": null,
          "row_spacing": {
            "value": 12,
            "unit": "INCHES"
          },
          "crop_type": null,
          "male_row_count": null,
          "male_seed_rate": null
        },
        "task": {
          "status": "OPEN"
        }
      }
    ]
  }
  }
}

Orders with deal information

Retrive the information on the deal against which orders have been placed.

Try this example in GraphiQL
query Orders {
  orders(pagination: { page: 1, page_size: 10}) {
  results {
    organization_sentera_id
    deal {
      deal_number
    }
    settings {
      row_fill
      row_spacing {
        value
        unit
      }
      crop_type
      male_row_count
    }
    task {
      status
    }
  }
  }
}

{
  "data": {
  "orders": {
    "results": [
      {
        "organization_sentera_id": "121amqh_OR_phgrAcme_CV_deve_a7f4fbad8_221216_115034",
        "deal": {
          "deal_number": "231213001"
        },
        "settings": {
          "row_fill": null,
          "row_spacing": {
            "value": 12,
            "unit": "INCHES"
          },
          "crop_type": null,
          "male_row_count": null,
          "male_seed_rate": null
        },
        "task": {
          "status": "OPEN"
        }
      }
    ]
  }
  }
}