> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.cail.health/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.cail.health/_mcp/server.

# Get the current node of a pathway execution

GET https://staging.cail.health/v1/pathway-executions/{id}/current

Returns the node the execution is currently pointing at. Useful after a client restart, a network blip, or a node-mismatch error on `submitAnswer`. Prompt and option text are flattened against the locale the execution was started with. Returns the question, info, or terminal payload as appropriate; renderers branch on `kind` before reading the optional payloads.

Reference: https://docs.cail.health/api-references/api-reference/navigate-to-care/get-current-node

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: cail-api
  version: 1.0.0
paths:
  /v1/pathway-executions/{id}/current:
    get:
      operationId: get-current-node
      summary: Get the current node of a pathway execution
      description: >-
        Returns the node the execution is currently pointing at. Useful after a
        client restart, a network blip, or a node-mismatch error on
        `submitAnswer`. Prompt and option text are flattened against the locale
        the execution was started with. Returns the question, info, or terminal
        payload as appropriate; renderers branch on `kind` before reading the
        optional payloads.
      tags:
        - subpackage_navigateToCare
      parameters:
        - name: id
          in: path
          description: Stable identifier of the pathway execution.
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The current node of the execution.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PathwayNodeDescriptor'
servers:
  - url: https://staging.cail.health
    description: https://staging.cail.health
components:
  schemas:
    PathwayNodeDescriptorKind:
      type: string
      enum:
        - question
        - info
        - terminal
      description: >-
        Discriminator for how to render this node. Renderers branch on this
        value before looking at the optional payloads.
      title: PathwayNodeDescriptorKind
    PathwayPromptDescriptor:
      type: object
      properties:
        code:
          type: string
          description: >-
            Authoring-time opaque identifier for the prompt. Stable across
            locales and useful for analytics correlation.
        text:
          type: string
          description: >-
            Locale-flattened rendered prompt for the request’s Accept-Language.
            Plain text only.
      required:
        - code
        - text
      title: PathwayPromptDescriptor
    PathwayOptionDescriptor:
      type: object
      properties:
        code:
          type: string
          description: >-
            Opaque branch identifier the client echoes back when submitting an
            answer.
        text:
          type: string
          description: Locale-flattened rendered option label.
      required:
        - code
        - text
      title: PathwayOptionDescriptor
    PathwayTerminalDescriptor:
      type: object
      properties:
        outcomeCode:
          type: string
          description: >-
            Outcome code from a terminal node in the pathway tree. Mirrors the
            value the engine records on the encounter row.
        routingHint:
          type: string
          description: >-
            Opaque routing hint a renderer may use to choose follow-up UX (e.g.
            show a provider list). Does not affect engine semantics.
      required:
        - outcomeCode
      title: PathwayTerminalDescriptor
    PathwayNodeDescriptor:
      type: object
      properties:
        nodeId:
          type: string
          description: Stable identifier for the current node.
        kind:
          $ref: '#/components/schemas/PathwayNodeDescriptorKind'
          description: >-
            Discriminator for how to render this node. Renderers branch on this
            value before looking at the optional payloads.
        prompt:
          $ref: '#/components/schemas/PathwayPromptDescriptor'
        options:
          type: array
          items:
            $ref: '#/components/schemas/PathwayOptionDescriptor'
          description: >-
            Selectable answers, present when kind is `question`. Order is stable
            and matches the published tree.
        terminal:
          $ref: '#/components/schemas/PathwayTerminalDescriptor'
          description: >-
            Terminal payload, present when kind is `terminal`. The engine has
            already transitioned the execution to `completed` on a response
            carrying this payload.
      required:
        - nodeId
        - kind
        - prompt
      title: PathwayNodeDescriptor
  securitySchemes:
    firebaseBearer:
      type: http
      scheme: bearer

```

## Examples

### The current node is a multiple-choice question



**Response**

```json
{
  "nodeId": "q.acute_chest_pain",
  "kind": "question",
  "prompt": {
    "code": "q.acute_chest_pain",
    "text": "Do you have chest pain right now?"
  },
  "options": [
    {
      "code": "yes",
      "text": "Yes"
    },
    {
      "code": "no",
      "text": "No"
    }
  ]
}
```

**SDK Code**

```python The current node is a multiple-choice question
import requests

url = "https://staging.cail.health/v1/pathway-executions/2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f/current"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript The current node is a multiple-choice question
const url = 'https://staging.cail.health/v1/pathway-executions/2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f/current';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go The current node is a multiple-choice question
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://staging.cail.health/v1/pathway-executions/2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f/current"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby The current node is a multiple-choice question
require 'uri'
require 'net/http'

url = URI("https://staging.cail.health/v1/pathway-executions/2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f/current")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java The current node is a multiple-choice question
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://staging.cail.health/v1/pathway-executions/2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f/current")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php The current node is a multiple-choice question
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://staging.cail.health/v1/pathway-executions/2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f/current', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp The current node is a multiple-choice question
using RestSharp;

var client = new RestClient("https://staging.cail.health/v1/pathway-executions/2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f/current");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift The current node is a multiple-choice question
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://staging.cail.health/v1/pathway-executions/2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f/current")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### The execution has reached a terminal outcome



**Response**

```json
{
  "nodeId": "t.pharmacy",
  "kind": "terminal",
  "prompt": {
    "code": "t.pharmacy",
    "text": "A pharmacist can help with this. Find a pharmacy near you."
  },
  "terminal": {
    "outcomeCode": "pharmacy",
    "routingHint": "show_provider_list"
  }
}
```

**SDK Code**

```python The execution has reached a terminal outcome
import requests

url = "https://staging.cail.health/v1/pathway-executions/2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f/current"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript The execution has reached a terminal outcome
const url = 'https://staging.cail.health/v1/pathway-executions/2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f/current';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go The execution has reached a terminal outcome
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://staging.cail.health/v1/pathway-executions/2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f/current"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby The execution has reached a terminal outcome
require 'uri'
require 'net/http'

url = URI("https://staging.cail.health/v1/pathway-executions/2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f/current")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java The execution has reached a terminal outcome
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://staging.cail.health/v1/pathway-executions/2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f/current")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php The execution has reached a terminal outcome
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://staging.cail.health/v1/pathway-executions/2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f/current', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp The execution has reached a terminal outcome
using RestSharp;

var client = new RestClient("https://staging.cail.health/v1/pathway-executions/2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f/current");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift The execution has reached a terminal outcome
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://staging.cail.health/v1/pathway-executions/2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f/current")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```