Deel: Retrieve Milestones by Contract
Deel milestones.getContractMilestones: arguments, response, policy and SDK examples.
← Milestones operations · Get started
Operation deel.milestones_getcontractmilestones
Provider route: GET /contracts/{contract_id}/milestones. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/deel with npm, or alter-sdk-deel with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { DeelIntegration } from "@alter-ai/deel";
async function execute(input: Parameters<DeelIntegration["milestones"]["getContractMilestones"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new DeelIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.milestones.getContractMilestones(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_deel import DeelIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = DeelIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.milestones.get_contract_milestones(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.contract_id | string | Required within parent |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Retrieve Milestones by Contract — 200 response body |
Referenced models: Retrieve Milestones by Contract — 200 response body
Schemas
Section titled “Schemas”Retrieve Milestones by Contract — 200 response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
data | array | Required within parent | An array of milestone objects associated with the contract. |
data[] | Model | Each item | Expand Retrieve Milestones by Contract — 200 response body — data item |
Referenced models: Retrieve Milestones by Contract — 200 response body — data item
Retrieve Milestones by Contract — 200 response body — data item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
amount | string | Required within parent | The amount to be paid for completing this milestone. |
approval_requested | boolean | Required within parent | Indicates whether approval has been requested for the milestone. |
created_at | JSON | Required within parent | |
created_at (anyOf 1) | string | Alternative | The creation date of the milestone in ISO-8601 format. Pattern: ^\d{4}-\d{2}-\d{2}([T ]\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:?\d{2})?)?$ |
created_at (anyOf 2) | null | Alternative | The creation date of the milestone in ISO-8601 format. Pattern: ^\d{4}-\d{2}-\d{2}([T ]\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:?\d{2})?)?$ |
description | string | Required within parent | A detailed description of the milestone. |
id | Model | Required within parent | Expand Retrieve a single milestone — 200 response body — data id |
reported_by | Model | Required within parent | Expand Retrieve Milestones by Contract — 200 response body — data item reported by Information about the creator of the milestone. |
reviewed_by | JSON | Required within parent | Information about the person who reviewed the milestone. |
reviewed_by (anyOf 1) | Model | Alternative | Expand Retrieve Milestones by Contract — 200 response body — data item reviewed by full name, id |
reviewed_by (anyOf 2) | null | Alternative | |
status | string | Required within parent | The current status of the milestone, such as 'Pending Approval', 'Approved', or 'Completed'. |
title | string | Required within parent | The title of the milestone. |
Referenced models: Retrieve a single milestone — 200 response body — data id, Retrieve Milestones by Contract — 200 response body — data item reported by, Retrieve Milestones by Contract — 200 response body — data item reviewed by full name, id
Retrieve a single milestone — 200 response body — data id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | string | Alternative | |
$ (anyOf 2) | JSON | Alternative | |
$ (anyOf 2) (anyOf 1) | integer | Alternative | Format: int64 |
$ (anyOf 2) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Retrieve Milestones by Contract — 200 response body — data item reported by
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Information about the creator of the milestone. |
full_name | string | Optional | The full name of the person who reported the milestone. |
id | Model | Required within parent | Expand Retrieve a single milestone — 200 response body — data id |
Referenced models: Retrieve a single milestone — 200 response body — data id
Retrieve Milestones by Contract — 200 response body — data item reviewed by full name, id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Information about the person who reviewed the milestone. |
full_name | string | Optional | The full name of the person who reviewed the milestone. |
id | Model | Required within parent | Expand Retrieve a single milestone — 200 response body — data id |
Referenced models: Retrieve a single milestone — 200 response body — data id
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: deel.milestones_getcontractmilestones. Catalog operation: milestones_getcontractmilestones. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["milestones:read"]
Pinned headers: {"X-Version": "2026-01-01"}