> For the complete documentation index, see [llms.txt](https://rtkdocs.geodnet.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rtkdocs.geodnet.com/ppk-service/quick-start.md).

# Quick Start

<figure><img src="https://rtk.geodnet.com/iframe/doc0912v2/images/ppk_workflow.png" alt=""><figcaption></figcaption></figure>

## **Prerequisites**

* `curl` and `jq` are installed.
* You have a valid GEODNET PPK `username` and `password`.
* Examples use Bash syntax; adjust for PowerShell as needed.

### **(1) Sign in to obtain token**

```sh
TOKEN=$(curl -s -X POST "https://ppk.geodnet.com/api/user/signin" \
  -H "Content-Type: application/json" \
  -d '{"username":"geoduser","password":"geodpass"}' | jq -r '.data.token')
```

### **(2) Create download order**

```sh
ORDER=$(curl -s -X POST "https://ppk.geodnet.com/api/user/download" \
  -H "Content-Type: application/json" \
  -H "token: $TOKEN" \
  -d '{"startYear":2024,"startMonth":6,"startDay":22,"startHour":0,"endYear":2024,"endMonth":6,"endDay":23,"endHour":0,"stations":["G001"],"type":2}' \
  | jq -r '.data.orderId')
```

{% hint style="success" %}
**Note**

Steps are identical for NRCAN results, except step 2 uses `/api/user/estimation/download` with `startDate`, `endDate`, `station`.
{% endhint %}

### **(3) Poll status until completed**

```sh
while true; do
  STATUS=$(curl -s "https://ppk.geodnet.com/api/download/status/$ORDER" -H "token: $TOKEN" | jq -r '.data.status')
  if [ "$STATUS" = "2" ]; then
    echo "Completed"
    break
  elif [ "$STATUS" = "3" ]; then
    echo "Failed"
    exit 1
  else
    echo "Processing..."
    sleep 5
  fi
done
```

Status values: 1 = Processing, 2 = Completed, 3 = Failed.

### **(4) Download file**

```powershell
curl -L "https://ppk.geodnet.com/api/download/$ORDER" -H "token: $TOKEN" -o "geodnet_${ORDER}.zip"
```

### **(5) Convert to RINEX**

Download the open-source convert tool: [rtklib\_lte](https://github.com/geodnet/rtklib_lte). The Windows binary includes `convbin.exe`; build the project for Linux or macOS.

{% hint style="success" %}
**Note**

year, mon, day, hour, min, sec are the approximate time of the RTCM log file (not the time you download the file). use `-v 2.11` to output rinex 2.11 legacy version.
{% endhint %}

```sh
convbin.exe -r rtcm3 -tr year/mon/day hour:min:sec unziped_rtcm_file
```
