---
title: "Saves the referral hierarchy for a project"
method: PUT
path: "/api/v1/projects/{projectId}/referrals/save"
tags: ["ProjectReferral"]
---

# Saves the referral hierarchy for a project

`PUT /api/v1/projects/{projectId}/referrals/save`

## Request

- Base URL: `https://api.fireserviceusa.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.fireserviceusa.com/api/v1/projects/{projectId}/referrals/save`
- Auth: none declared

## Path parameters

- `projectId` integer, required

## Query parameters

- `version` string
- `overwrite` boolean

## Request body

- ReferralHierarchyData: Data transfer object for referral hierarchy data
  - `Nodes` ReferralNode[], nullable
    - `Id` integer
    - `Name` string, nullable
    - `IsRoot` boolean
    - `IsRewardBeneficiary` boolean
    - `CommissionPercentage` number, double, nullable
    - `EntityTypeDisplay` string, nullable
    - `EntityTypes` string[], nullable
    - `IsEnrolledInLoyaltyRewardsProgram` boolean
    - `LoyaltyRewardsBalance` number, double
  - `Edges` ReferralEdge[], nullable
    - `From` integer
    - `To` integer
    - `RelationshipType` string, nullable
    - `CommissionPercentage` number, double, nullable
    - `IsRewardBeneficiary` boolean
  - `UpdateProjectJobs` boolean
  - `Initial` integer, nullable: Entity ID of the main referrer (IsRewardBeneficiary=true). Used by the frontend as vm.graph.initial.
  - `Version` string, nullable

## Response `200`

Success

---

[API](https://skmtc.dev/fireserviceusa/apis/fireservice-usa-p2-api.md) - [All operations](https://skmtc.dev/fireserviceusa/apis/fireservice-usa-p2-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fireserviceusa/apis/fireservice-usa-p2-api/revisions/96ea2ea68d87?raw)
