Centene Query API

query elasticsearch

Operations 1

POST /query Send a query to Elasticsearch #

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/centene-query-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

centene-query-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Centene Query API
  version: '1.0'
  description: 'Operations tagged query across 2 of this provider''s published API definitions: centene-pces-openapi.yaml, centene-product-mapping-v2-openapi.yaml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://dev-int-api-gw.centene.com/pces
  description: Dev
- url: https://prod.api.centene.com/incoming/dev/pces
  description: Dev DMZ
- url: https://test-int-api-gw.centene.com/pces
  description: Test
- url: https://prod.api.centene.com/incoming/test/pces
  description: Test DMZ
- url: https://api-gateway-01.centene.com/pces
  description: Prod
- url: https://prod.api.centene.com/incoming/pces
  description: Prod DMZ
- url: https://dev-int-api-gw.centene.com/productmapping/v2/
  description: Dev Internal
- url: https://prod.api.centene.com/incoming/dev/productmapping/v2
  description: Dev DMZ External
- url: https://test-int-api-gw.centene.com/productmapping/v2/
  description: Test Internal
- url: https://prod.api.centene.com/incoming/test/productmapping/v2
  description: Test DMZ External
- url: https://api-gateway-01.centene.com/productmapping/v2/
  description: Prod Internal
- url: https://prod.api.centene.com/incoming/productmapping/v2
  description: Prod DMZ External
tags:
- name: Query
  description: query elasticsearch
  externalDocs:
    description: Centene Search DSL
    url: https://centene-search-dsl.ckp-dev.centene.com/
paths:
  /query:
    post:
      tags:
      - Query
      summary: Send a query to Elasticsearch
      operationId: query
      parameters:
      - name: index
        in: query
        required: false
        description: query param to search the new index - carrier_entity_location_active
        schema:
          type: string
          enum:
          - cel
      requestBody:
        description: Centene Search DSL Request
        content:
          application/json:
            schema:
              anyOf:
              - $ref: '#/components/schemas/customQuery'
              - $ref: '#/components/schemas/aggs'
            examples:
              NameMatch Query:
                description: The nameMatch Query can be used to match against name fields in the JSON objects. The nameMatch query uses a predefined matching algorithm
                value:
                  customQuery:
                    nameMatch:
                      field: locations.name
                      value: Walgreens
                      boost: 1
              Value Query:
                description: Used to apply logic that restricts a provided field in the document to an **exact** value. The Value query should only be used against fields that have an exact value representation in Elasticsearch such as fields mapped as keyword or number.
                value:
                  customQuery:
                    value:
                      field: providerName
                      value: Allwell Behavioral Health Services
              Values Query:
                description: Used to apply logic that restricts a provided field in the document to an array of **exact** values. The Values query should only be used against fields that have an exact value representation in Elasticsearch such as keyword or number.
                value:
                  customQuery:
                    values:
                      field: providerName
                      values:
                      - Minute Clinic
                      - CVS
                      - Walgreens
              Range DateTime Query:
                description: Used to apply logic that restricts a provided field to a given dateTime range.
                value:
                  customQuery:
                    range:
                      field: locations.eligibleForDisplay.startDate
                      type: datetime
                      lte: '2017-01-01T12:00:00'
              Range Date Query:
                description: Used to apply logic that restricts a provided field to a given  date range.
                value:
                  customQuery:
                    range:
                      field: locations.eligibleForDisplay.endDate
                      type: date
                      gt: '2017-01-01'
              Range Time Query:
                description: Used to apply logic that restricts a provided field to a given time range.
                value:
                  customQuery:
                    range:
                      field: locations.providerOfficeHours.monday.search_isoClose
                      type: time
                      gt: '17:00:00'
                      lte: '19:00:00'
              Range Integer Query:
                description: Used to apply logic that restricts a provided field to a given numerical range.
                value:
                  customQuery:
                    range:
                      field: locations.panelCycles.lowestAge
                      type: integer
                      gte: '2'
                      lt: '18'
              Range Text Query:
                description: Used to apply logic that restricts a provided field to a given text range.
                value:
                  customQuery:
                    range:
                      field: modalities.modalityDescriptionFull
                      type: text
                      gte: a
                      lt: m
              GeoFilter Radius Query:
                description: Used to apply logic that restricts a provided field by a geometric-defined limit, ie radius, box, or other shape. Note that geoFilters can only be applied to fields mapped as geo_point.
                value:
                  customQuery:
                    geoFilter:
                      field: locations.address.search_coordinates
                      radius:
                        coordinates: 40, -80
                        distance: 200mi
              GeoFilter BoundingBox Query:
                description: Used to apply logic that restricts a provided field by a geometric-defined limit, ie radius, box, or other shape. Note that geoFilters can only be applied to fields mapped as geo_point.
                value:
                  customQuery:
                    geoFilter:
                      field: locations.address.search_coordinates
                      boundingBox:
                        topLeft: 41.12, -71.34
                        bottomRight: 41, -90
              Exists Query:
                description: Only includes results which have a value for the specified field.
                value:
                  customQuery:
                    exists:
                      field: locations.address.addressLine1
              Nested Query:
                description: Specifies a list where you can declare a nested path that corresponds to a list of documents on the main provider document (ie, locations is a list of locations documents for a provider), and whether to filter the API results to only include matching results for that list.
                value:
                  customQuery:
                    nested:
                      path: locations
                      query:
                        value:
                          field: locations.name
                          value: Mercy
              Nested Query With MatchedList:
                description: Specifies a list where you can declare a nested path that corresponds to a list of documents on the main provider document (ie, locations is a list of locations documents for a provider), and whether to filter the API results to only include matching results for that list.
                value:
                  customQuery:
                    nested:
                      path: locations
                      matchedList:
                        name: locationsNested
                        size: 100
                        fields:
                        - locations.name
                        - locations.locationId
                        - locations.taxIdNumber
                      query:
                        value:
                          field: locations.name
                          value: Mercy
              RelevancyByDistance Query:
                description: Documents will be sorted based on distance from the specified field, according to the custom parameters set.
                value:
                  customQuery:
                    relevancyByDistance:
                      field: locations.address.search_coordinates
                      origin: 38, -90
                      scale: 5mi
                      offset: 3mi
                      decay: 0.5
                      minDistanceScore: 1
                      query:
                        value:
                          field: locations.search_root_entityType
                          value: prac
              constantScore:
                description: Used to apply logic that Wraps a filter query and returns every matching document with a relevance score equal to the boost parameter value
                value:
                  customQuery:
                    constantScore:
                      boost: 2
                      query:
                        value:
                          field: locations.name
                          value: Mercy
              RequireAll Query:
                description: A document must match all criteria in a requireAll to show up in results.
                value:
                  customQuery:
                    requireAll:
                      criteria:
                      - value:
                          field: carrierId
                          value: '8135'
                      - value:
                          field: entityId
                          value: '3799665'
              RequireAny Query:
                description: Any criteria in a requireAny Query can be true for a document in order for that document to be returned. A minimum of one of the criteria must be true.
                value:
                  customQuery:
                    requireAny:
                      criteria:
                      - value:
                          field: carrierId
                          value: '8135'
                      - value:
                          field: entityId
                          value: '3799665'
              Exclude Query:
                description: An exclude query negates a query in its criteria. In other words, only documents that do not match the criteria will be returned in results.
                value:
                  customQuery:
                    exclude:
                      criteria:
                      - value:
                          field: carrierId
                          value: '8135'
              Filter Aggregation:
                description: Filter Aggregations are used to insert custom query syntax at an aggregation level to limit the scope of the matching documents for that aggregation and any pipelined aggregations.
                value:
                  customQuery:
                    value:
                      field: entityType
                      value: prac
                  aggs:
                  - name: carrierId
                    aggType:
                      filter:
                        value:
                          field: carrierId
                          value: '71'
              Nested Aggregation:
                description: Nested Aggregations are used to get aggregate values about the nested path.
                value:
                  customQuery:
                    value:
                      field: entityType
                      value: prac
                  aggs:
                  - name: hospitalAffiliations
                    aggType:
                      nested:
                        path: hospitalAffiliations
              Values Aggregation:
                description: Values Aggregations are used to get aggregate values about the results of a query. And example would be the top 500 unique specialties.
                value:
                  customQuery:
                    value:
                      field: entityType
                      value: prac
                  aggs:
                  - name: entityId
                    aggType:
                      valuesAgg:
                        field: entityId
                        size: 10
              Min Aggregation:
                description: A single-value metrics aggregation that keeps track and returns the minimum value among numeric values extracted from the aggregated documents, "missing filed is optional"
                value:
                  customQuery:
                    value:
                      field: entityType
                      value: prac
                  aggs:
                  - name: minUpdateTime
                    aggType:
                      minAgg:
                        field: updateTime
                        missing: 2022-10-06 03:47:29.193000+00:00
              Max Aggregation:
                description: A single-value metrics aggregation that keeps track and returns the minimum value among numeric values extracted from the aggregated documents, "missing filed is optional"
                value:
                  customQuery:
                    value:
                      field: entityType
                      value: prac
                  aggs:
                  - name: minUpdateTime
                    aggType:
                      maxAgg:
                        field: updateTime
                        missing: 2022-10-06 03:47:29.193000+00:00
              Cardinality Aggregation:
                description: A single-value metrics aggregation that calculates an approximate count of distinct values.The precision_threshold field is optional. It allows to trade memory for accuracy, and defines a unique count below which counts are expected to be close to accurate.  Above this value, counts might become a bit more fuzzy. The maximum supported value is 40000, thresholds above this number will have the same effect as a threshold of 40000. The default value is 3000
                value:
                  customQuery:
                    value:
                      field: entityId
                      value: 3248242
                  aggs:
                  - name: entityType
                    aggType:
                      cardinality:
                        field: search_entityTypeEntityId
                        precisionThreshold: 398
              Collapse:
                description: Collapse parameter collapses search results based on field values. The collapsing is done by selecting only the top sorted document per collapse key. If you need the count of hits to be accurate (approx.), then cardinality aggregation should be included for the same collapse field.
                value:
                  customQuery:
                    value:
                      field: entityId
                      value: 3248242
                  collapse:
                    field: search_entityTypeEntityId
                  aggs:
                  - name: entityType
                    aggType:
                      cardinality:
                        field: search_entityTypeEntityId
                        precisionThreshold: 398
              Multiple Aggregations:
                description: You can specify more than one aggregation in the aggs array
                value:
                  customQuery:
                    value:
                      field: entityType
                      value: prac
                  aggs:
                  - name: entityId
                    aggType:
                      valuesAgg:
                        field: entityId
                        size: 10
                  - name: carrierId
                    aggType:
                      valuesAgg:
                        field: carrierId
                        size: 10
              Pipelined Aggregations:
                description: Also known as subAggregations, pipelined aggs allow you to gather aggregate data off an already aggregated data set
                value:
                  customQuery:
                    value:
                      field: entityType
                      value: prac
                  aggs:
                  - name: locations.eligibleForDisplay
                    aggType:
                      filter:
                        value:
                          field: locations.eligibleForDisplay.eligibleIndicator
                          value: Y
                    aggs:
                    - name: locations.address
                      aggType:
                        valuesAgg:
                          field: locations.address.city
                          size: 100000000
              All Hidden Fields:
                description: The above is the JSON structure for every hidden field.  Please do not try to run it, it is not a valid query.
                value:
                  carrierEntity:
                    locations:
                      address:
                        search_coordinates: geo_point
                        practitionerOfficeHours:
                          friday:
                            search_isoClose: date (HH:mm:ss)
                            search_isoOpen: date (HH:mm:ss)
                          monday:
                            search_isoClose: date (HH:mm:ss)
                            search_isoOpen: date (HH:mm:ss)
                          saturday:
                            search_isoClose: date (HH:mm:ss)
                            search_isoOpen: date (HH:mm:ss)
                          sunday:
                            search_isoClose: date (HH:mm:ss)
                            search_isoOpen: date (HH:mm:ss)
                          thursday:
                            search_isoClose: date (HH:mm:ss)
                            search_isoOpen: date (HH:mm:ss)
                          tuesday:
                            search_isoClose: date (HH:mm:ss)
                            search_isoOpen: date (HH:mm:ss)
                          wednesday:
                            search_isoClose: date (HH:mm:ss)
                            search_isoOpen: date (HH:mm:ss)
                        providerOfficeHours:
                          friday:
                            search_isoClose: date (HH:mm:ss)
                            search_isoOpen: date (HH:mm:ss)
                          monday:
                            search_isoClose: date (HH:mm:ss)
                            search_isoOpen: date (HH:mm:ss)
                          saturday:
                            search_isoClose: date (HH:mm:ss)
                            search_isoOpen: date (HH:mm:ss)
                          sunday:
                            search_isoClose: date (HH:mm:ss)
                            search_isoOpen: date (HH:mm:ss)
                          thursday:
                            search_isoClose: date (HH:mm:ss)
                            search_isoOpen: date (HH:mm:ss)
                          tuesday:
                            search_isoClose: date (HH:mm:ss)
                            search_isoOpen: date (HH:mm:ss)
                          wednesday:
                            search_isoClose: date (HH:mm:ss)
                            search_isoOpen: date (HH:mm:ss)
                        search_root_attributes:
                          fields:
                            name: String
                            value: String
                            value_date: date
                            value_number: long
                          name: String
                        search_root_associatedProvAttributes:
                          type: object
                          $ref: '#/components/schemas/AssociatedProvAttribute'
                        search_root_entityType: String
                        search_root_pracFullAlternateName:
                          fields:
                            nameMatch: String
                            suggest: String
                        search_root_pracFullName:
                          fields:
                            nameMatch: String
                            suggest: String
                        search_root_providerName:
                          fields:
                            nameMatch: String
                            suggest: String
                    search_entityTypeEntityId: String
                    search_id: String
                    search_pracFullAlternateName:
                      fields:
                        nameMatch: String
                        suggest: String
                    search_pracFullName:
                      fields:
                        nameMatch: String
                        suggest: String
              AlphaFilter Query:
                description: The Alpha Filter Query can be used to Filter against name fields in the JSON objects. The Alpha Filter query uses prefix term to filter name fields by the first character, only documents that match the criteria will be returned in results.
                value:
                  customQuery:
                    alphaFilter:
                      field: providerName
                      value: a
              Prefix Query:
                description: The Prefix Query can be used to Filter against keyword fields in the JSON objects. The Prefix query uses prefix term to filter keyword fields by the prefix characters sent in the request, only documents that match the criteria will be returned in results.
                value:
                  customQuery:
                    prefix:
                      field: carrierId
                      value: '18'
              Nested attribute Query Pattern Multiple Fields:
                description: This pattern is an example of how to query a multi-field Portico UDA in the attributes arrays
                value:
                  customQuery:
                    nested:
                      path: locations.attributes
                      query:
                        constantScore:
                          boost: 1
                          query:
                            requireAll:
                              criteria:
                              - value:
                                  field: locations.attributes.name
                                  value: Medicare Advantage Required
                              - nested:
                                  path: locations.attributes.fields
                                  query:
                                    requireAll:
                                      criteria:
                                      - value:
                                          field: locations.attributes.fields.name
                                          value: PH Chain
                                      - value:
                                          field: locations.attributes.fields.value
                                          value: Y
                              - nested:
                                  path: locations.attributes.fields
                                  query:
                                    requireAll:
                                      criteria:
                                      - value:
                                          field: locations.attributes.fields.name
                                          value: PH Retail
                                      - value:
                                          field: locations.attributes.fields.value
                                          value: Y
              Nested attribute Query Pattern Single Field:
                description: This pattern is an example of how to query a multi-field Portico UDA in the attributes arrays
                value:
                  customQuery:
                    nested:
                      path: locations.attributes
                      query:
                        constantScore:
                          boost: 1
                          query:
                            requireAll:
                              criteria:
                              - value:
                                  field: locations.attributes.name
                                  value: Medicare Advantage Required
                              - nested:
                                  path: locations.attributes.fields
                                  query:
                                    requireAll:
                                      criteria:
                                      - value:
                                          field: locations.attributes.fields.name
                                          value: PH Chain
                                      - value:
                                          field: locations.attributes.fields.value
                                          value: Y
              FieldValueScore Query:
                description: The fieldValueScore Query allows you to modify the score of documents that are retrieved by a query. This works just with float values. The only modifier value accepted is 'none'
                value:
                  customQuery:
                    fieldValueScore:
                      field: locations.priScore
                      factor: 2
                      modifier: none
                      default: 1
        required: true
      responses:
        '200':
          description: Search accepted, executed, results returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CarrierEntityResults'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                type: object
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                type: string
    servers:
    - url: https://dev-int-api-gw.centene.com/pces
      description: Dev
    - url: https://prod.api.centene.com/incoming/dev/pces
      description: Dev DMZ
    - url: https://test-int-api-gw.centene.com/pces
      description: Test
    - url: https://prod.api.centene.com/incoming/test/pces
      description: Test DMZ
    - url: https://api-gateway-01.centene.com/pces
      description: Prod
    - url: https://prod.api.centene.com/incoming/pces
      description: Prod DMZ
components:
  schemas:
    constantScore:
      description: Used to apply logic that Wraps a filter query and returns every matching document with a relevance score equal to the boost parameter value
      type: object
      properties:
        nested:
          type: object
          allOf:
          - $ref: '#/components/schemas/Condition'
          - type: object
            required:
            - query
            properties:
              boost:
                type: number
                format: float
              query:
                $ref: '#/components/schemas/Condition'
    PanelCycle:
      type: object
      properties:
        ageRestriction:
          type: string
        endDate:
          type: string
          format: date-time
        genderLimitation:
          type: string
        highestAge:
          type: string
        highestUnits:
          type: string
        lowestAge:
          type: string
        lowestUnits:
          type: string
        panelCode:
          type: string
        panelLimit:
          type: string
        panelStatus:
          type: string
        startDate:
          type: string
          format: date-time
    BoundingBox:
      description: Provide coordinates as comma separated strings ("lat, lon") for <topLeft> point of the box, and <bottomRight> point.
      type: object
      properties:
        boundingBox:
          type: object
          required:
          - topLeft
          - bottomRight
          properties:
            topLeft:
              type: string
            bottomRight:
              type: string
    Day:
      type: object
      properties:
        open:
          type: string
        close:
          type: string
        isoOpen:
          type: string
          format: date-time
        isoClose:
          type: string
          format: date-time
    MedicaidNumber:
      type: object
      properties:
        effectiveDate:
          type: string
          format: date-time
        expirationDate:
          type: string
          format: date-time
        number:
          type: string
        state:
          type: string
    NationalProviderIdentifiers:
      type: object
      properties:
        effectiveDate:
          type: string
          format: date-time
        number:
          type: string
        terminationDate:
          type: string
          format: date-time
        terminationReason:
          type: string
        type:
          type: string
    Location:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/Address'
        areaNetworkServices:
          type: array
          items:
            $ref: '#/components/schemas/AreaNetworkService'
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/UDA'
        eligibleForDisplay:
          type: array
          items:
            $ref: '#/components/schemas/EligibleForDisplay'
        handicap:
          type: string
        healthNetLegacyLocId:
          type: string
        locationEndDate:
          type: string
          format: date-time
        locationId:
          type: string
        locationStartDate:
          type: string
          format: date-time
        name:
          type: string
        networkLocationCycles:
          type: array
          items:
            $ref: '#/components/schemas/NetworkLocationCycle'
        panelCycles:
          type: array
          items:
            $ref: '#/components/schemas/PanelCycle'
        phone:
          $ref: '#/components/schemas/Phone'
        pracPhone:
          $ref: '#/components/schemas/PracPhone'
        practitionerOfficeHours:
          $ref: '#/components/schemas/OfficeHours'
        primary:
          type: string
        participatingPhysicianGroupIdentifiers:
          $ref: '#/components/schemas/ParticipatingPhysicianGroupIdentifiers'
        priScore:
          type: string
        providerId:
          type: string
        providerName:
          type: string
        providerOfficeHours:
          $ref: '#/components/schemas/OfficeHours'
        provPhones:
          $ref: '#/components/schemas/ProvPhones'
        publicTransportation:
          $ref: '#/components/schemas/PublicTransportation'
        specialties:
          type: array
          items:
            $ref: '#/components/schemas/Specialty'
        taxIdNumber:
          type: string
    Shape:
      description: Provide an array of latitude, longitude points for your shape.
      type: object
      properties:
        shape:
          type: array
          minItems: 1
          items:
            type: string
    License:
      type: object
      properties:
        effectiveDate:
          type: string
          format: date-time
        expirationDate:
          type: string
          format: date-time
        licenseNumber:
          type: string
        licenseType:
          type: string
        licensureStatus:
          type: string
        state:
          type: string
    UDA:
      type: object
      properties:
        name:
          type: string
        fields:
          type: array
          items:
            $ref: '#/components/schemas/UDAField'
    Address:
      type: object
      properties:
        addressEndDate:
          type: string
          format: date-time
        addressLine1:
          type: string
        addressLine2:
          type: string
        addressLine3:
          type: string
        addressStartDate:
          type: string
          format: date-time
        city:
          type: string
        country:
          type: string
        countryCode:
          type: string
        county:
          type: string
        fipsCountyCode:
          type: string
        latitude:
          type: string
        longitude:
          type: string
        postalCode:
          type: string
        state:
          type: string
        stateCode:
          type: str

# --- truncated at 32 KB (66 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/centene/refs/heads/main/openapi/centene-query-api-openapi.yml