*REST API › Endpoint reference › Rentals › Projects*

# Unlink an order from a project

> Takes the order out of the project.

It is idempotent: if it was not linked, nothing happens and the response is the same. It does NOT delete or cancel the order: it only undoes the link, which is remade with the POST. DELETE because what disappears is the link, not either of the two entities. Returns the full project, the same projection as its GET.

`DELETE /api/v1/projects/{projectId}/orders/{orderId}` — scope `projects:write`

Scope: `projects:write` · 120/min · Inherited tenancy · Idempotency-Key · If-Match · MCP: `filmo_projects_orders_unlink`

## Authorizations

Bearer API key with the scope below. `projects:write`

## Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | No | Unique identifier of the request, chosen by the client (a UUID works). Between 1 and 255 characters: an empty header is rejected with 400 `validation_error`, because the client would believe itself protected. Repeating the same key with the SAME body within 24 h returns the stored response without executing again, with the `Idempotent-Replay: true` header. With a DIFFERENT body it returns 422. It is the safe way to retry after a network timeout. |
| `If-Match` | string | No | Optimistic locking: the `ETag` you read from the resource (or `*`). If the resource changed since, the write is rejected with `412 precondition_failed` before doing anything; read it again and retry. Without the header the write always proceeds. |

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | Project identifier. |
| `orderId` | string | Yes | Order identifier. |

## Request examples

*Unlink an order from a project*

**cURL**

```bash
curl https://app.filmo.io/api/v1/projects/proj_8f2a1c/orders/orde_8f2a1c \
  --request DELETE \
  --header "Authorization: Bearer $FILMO_API_KEY" \
  --header "Idempotency-Key: $(uuidgen 2>/dev/null || cat /proc/sys/kernel/random/uuid)"
```

**Node.js**

```javascript
fetch('https://app.filmo.io/api/v1/projects/proj_8f2a1c/orders/orde_8f2a1c', {
  method: 'DELETE',
  headers: {
    Authorization: 'Bearer YOUR_FILMO_API_KEY',
    'Idempotency-Key': crypto.randomUUID()
  }
})
```

**Python**

```python
import uuid
import requests

requests.delete(
    "https://app.filmo.io/api/v1/projects/proj_8f2a1c/orders/orde_8f2a1c",
    headers={
      "Authorization": "Bearer YOUR_FILMO_API_KEY",
      "Idempotency-Key": str(uuid.uuid4())
    }
)
```

## Response

Response schema: `ProjectDetailDto`

| Status | Description |
| --- | --- |
| 200 | Successful response. |
| 401 | Authentication failed (unauthorized, api_key_invalid, api_key_revoked, api_key_expired, api_key_owner_inactive, api_key_owner_not_admin). |
| 403 | Not allowed (insufficient_scope: the API key does not have the required scope, named in `requiredScope`; forbidden: the owner of the key lacks the permission the operation requires). `insufficient_scope` is answered before the request counts against the rate limit, so it carries no `RateLimit-*` headers; `forbidden` does. |
| 404 | Resource not found (not_found): it does not exist or is outside the scope of the API key. |
| 409 | Conflict (conflict): the current state of the resource prevents the operation, a request with that Idempotency-Key is already in progress, or another conditional write (`If-Match`) held the resource for more than five seconds. `errors[0].code` says which: `in_progress` and `lock_timeout` are solved by retrying; `invalid_state` is not, because the state of the resource forbids the operation. |
| 412 | Precondition failed (precondition_failed): the `If-Match` entity tag does not match the current representation. Read the resource again and retry. |
| 422 | Idempotency-Key reused (idempotency_key_reused): the same key was used before with a different body. Change the key. |
| 429 | Rate limit exceeded (rate_limited): retry after `Retry-After` seconds; `RateLimit-*` says which quota ran out. |
| 500 | Internal error (internal_error). |

**200**

| Name | Type | Description |
| --- | --- | --- |
| `data` | object | The project in full, as returned by the API. |
| `data.id` | string | Unique project identifier. |
| `data.projectNumber` | string | Human-readable project number; null if not numbered. |
| `data.name` | string | Project name. |
| `data.color` | string | Color associated with the project (for the UI); null if none. |
| `data.externalReference` | string | External reference of the project (for example, from the customer system); null if not recorded. |
| `data.projectTypeId` | string | Project type identifier; null if the project has no type. |
| `data.projectType` | object | Compact reference to the project type; null if none. |
| `data.projectType.id` | string | Unique project type identifier. |
| `data.projectType.name` | string | Project type name. |
| `data.projectType.color` | string | Color associated with the project type (for the UI); null if none. |
| `data.contact` | object | Compact reference to the project contact; null if none. |
| `data.contact.id` | string | Unique contact identifier. |
| `data.contact.name` | string | Contact name. |
| `data.location` | object | Project location; its inner fields are null when not recorded. |
| `data.location.name` | string | Name of the place/location; null if not recorded. |
| `data.location.address` | string | Address of the location; null if not recorded. |
| `data.location.city` | string | City of the location; null if not recorded. |
| `data.location.postalCode` | string | Postal code of the location; null if not recorded. |
| `data.location.province` | string | Province or region of the location; null if not recorded. |
| `data.location.country` | string | Country of the location; null if not recorded. |
| `data.location.lat` | number | Latitude of the location; null if not recorded. |
| `data.location.lng` | number | Longitude of the location; null if not recorded. |
| `data.startDate` | string<date-time> | Project start date in ISO 8601 with offset. |
| `data.endDate` | string<date-time> | Project end date in ISO 8601 with offset. |
| `data.status` | string | Project status: draft, budgeted, confirmed, in_progress, invoiced, completed, cancelled or archived. `archived` is a LEGACY status that appears in old data; the current archived state is expressed by the `archived` boolean of this same DTO. `draft`, `budgeted`, `confirmed`, `in_progress`, `invoiced`, `completed`, `cancelled`, `archived` |
| `data.archived` | boolean | Whether the project is archived. |
| `data.orderIds` | string[] | Identifiers of the project orders. Order details are obtained from [`GET /api/v1/orders`](https://docs.filmo.io/rest-api/endpoint-reference/orders/list-orders)?projectId=. |
| `data.totalOrders` | integer | Total number of orders in the project (equals orderIds.length). |
| `data.tags` | object[] | Tags attached to the project, with their identifier and name. |
| `data.tags.id` | string | Unique identifier of the tag. |
| `data.tags.name` | string | Tag name. |
| `data.customFields` | object<string, any> | Custom field values by custom field identifier; the definitions are in `/api/v1/custom-fields`. |
| `data.source` | string | Source the project was created from; null if not recorded. |
| `data.createdAt` | string<date-time> | Creation date in ISO 8601 with offset. |
| `data.updatedAt` | string<date-time> | Last update date in ISO 8601 with offset. |
| `meta` | object | Additional information about the response. |
| `meta.warnings` | object[] | Lifecycle warnings; present only when the operation is deprecated. |
| `meta.warnings.code` | string | Stable warning code. `deprecated` |
| `meta.warnings.message` | string | For people: what is deprecated, until when, and what to use. |
| `meta.warnings.sunset` | string | Day (YYYY-MM-DD) the operation stops being served. |
| `meta.warnings.replacement` | string | `operationId` of the operation to use instead, or null if there is none. |
| `meta.warnings.link` | string | Where the deprecation is documented (the changelog). |

*Example response · 200*

```json
{
  "data": {
    "id": "project_9f3a2b",
    "projectNumber": "2026-0001",
    "name": "Example project",
    "color": "Example color",
    "externalReference": "2026-0001",
    "projectTypeId": "project_type_9f3a2b",
    "projectType": {
      "id": "project_type_9f3a2b",
      "name": "Example project type",
      "color": "Example color"
    },
    "contact": {
      "id": "contact_9f3a2b",
      "name": "Example contact"
    },
    "location": {
      "name": "Example location",
      "address": "Example address",
      "city": "Madrid",
      "postalCode": "28001",
      "province": "Madrid",
      "country": "ES",
      "lat": 1,
      "lng": 1
    },
    "startDate": "2026-09-01T08:00:00.000Z",
    "endDate": "2026-09-01T08:00:00.000Z",
    "status": "draft",
    "archived": true,
    "orderIds": [
      "order_9f3a2b"
    ],
    "totalOrders": 1,
    "tags": [
      {
        "id": "tag_9f3a2b",
        "name": "Example tag"
      }
    ],
    "customFields": {
      "example": "example"
    },
    "source": "Example source",
    "createdAt": "2026-09-01T08:00:00.000Z",
    "updatedAt": "2026-09-01T08:00:00.000Z"
  }
}
```

## Errors

| Status | Codes | Meaning |
| --- | --- | --- |
| 404 | `not_found` | It does not exist or is outside the scope of the API key. |
| 409 | `conflict` | The current state of the resource prevents the operation, a request with that Idempotency-Key is already in progress, or another conditional write (`If-Match`) held the resource for more than five seconds. `errors[0].code` says which: `in_progress` and `lock_timeout` are solved by retrying; `invalid_state` is not, because the state of the resource forbids the operation. |
| 412 | `precondition_failed` | The `If-Match` entity tag does not match the current representation. Read the resource again and retry. |
| 422 | `idempotency_key_reused` | The same key was used before with a different body. Change the key. |

## Deprecation

This operation is not deprecated. Deprecations are announced with a Deprecation header and a sunset date.

---

Canonical URL: https://docs.filmo.io/rest-api/endpoint-reference/projects/unlink-an-order-from-a-project  
Last updated: 2026-10-25