*MCP › Reference › Rentals › Orders*

# Update the header of an order

> Changes the header of an order: customer, project and rental dates (send only the fields to change; the rest stay as they were).

Changing `startDate` or `endDate` moves the WHOLE order: every line that inherits the order period moves with it (sections, type groups and lines already checked in keep theirs), together with its stock reservations and its delivery and return tasks; prices are not recalculated. If the stock does not fit the new period, or the order is cancelled or returned, it responds 409 `conflict` and nothing is written; sending the dates it already has changes nothing. It does NOT add, remove or edit lines: that goes through the editor. It does not accept amounts or status either, just like creation. The customer and the project are checked against the account of the API key before writing anything. Returns the full order, the same projection as its GET.

TOOL `filmo_orders_update` · `orders:write` · 120/min · Server annotation: Idempotent

## Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `orderId` | string | Yes | Order identifier. |
| `contactId` | string | No | Identifier of the order customer. It must belong to the account of the API key. |
| `projectId` | string | No | Project the order is assigned to; null unlinks it (standalone order). |
| `startDate` | string<date-time> | No | Rental start (ISO 8601 with offset). |
| `endDate` | string<date-time> | No | Rental end (ISO 8601 with offset); it must be later than startDate. |
| `idempotencyKey` | string | No | Idempotency key chosen by the client (a UUID is recommended). Repeating the same key with the same arguments within 24 h returns the stored response without executing again; with different arguments it responds 422. It is the safe way to retry after a network failure. |
| `ifMatch` | string | No | Optimistic locking: the meta.etag you got from the detail read of this resource (or "*"). If the resource changed since, the call fails with 412 precondition_failed before writing anything; read it again and retry. Omit it to write unconditionally. |

## Result

On success the result carries `structuredContent` with `data` and `meta`. These are the attributes of `data`.

| Name | Type | Description |
| --- | --- | --- |
| `id` | string | Unique order identifier. |
| `orderNumber` | string | Human-readable order number. |
| `externalReference` | string | External reference of the order (for example, from the customer system); null if not recorded. |
| `status` | string | Raw order status as stored in the database (12 values): draft, reserved, prepared_partially, prepared, picked_up_partially, picked_up, returned_partially, returned, checked_in_partially, checked_in, archived or cancelled. `archived` is part of the stored set but an archived order is not visible to the API, so you will not observe it. `draft`, `reserved`, `prepared_partially`, `prepared`, `picked_up_partially`, `picked_up`, `returned_partially`, `returned`, `checked_in_partially`, `checked_in`, `archived`, `cancelled` |
| `startDate` | string<date-time> | Start of the rental period in ISO 8601 with offset. |
| `endDate` | string<date-time> | End of the rental period in ISO 8601 with offset. |
| `rentalDays` | number | Number of billable rental days; null if not calculated. |
| `projectId` | string | Identifier of the project the order belongs to; null if not linked. |
| `projectName` | string | Name of the project the order belongs to; null if not linked. |
| `contact` | object | Compact reference to the order contact; null if none. |
| `contact.id` | string | Unique contact identifier. |
| `contact.name` | string | Contact name. |
| `itemsCount` | integer | Number of items in the order. |
| `subTotalPrice` | string | Subtotal before discounts and taxes, as a decimal string "1234.50" (ROUND_HALF_UP). |
| `discountTotal` | string | Total discounts as a decimal string "1234.50" (ROUND_HALF_UP); null if there is no discount. |
| `insuranceTotal` | string | Insurance total as a decimal string "1234.50" (ROUND_HALF_UP). |
| `depositTotal` | string | Deposit total as a decimal string "1234.50" (ROUND_HALF_UP). |
| `taxesPrice` | string | Tax total as a decimal string "1234.50" (ROUND_HALF_UP). |
| `netPrice` | string | Taxable base (net before taxes) as a decimal string "1234.50" (ROUND_HALF_UP). |
| `grossPrice` | string | Total including taxes, as a decimal string "1234.50" (ROUND_HALF_UP). |
| `tags` | object[] | Tags attached to the order, with their identifier and name. |
| `tags.id` | string | Unique identifier of the tag. |
| `tags.name` | string | Tag name. |
| `customFields` | object<string, any> | Custom field values by custom field identifier; the definitions are in `/api/v1/custom-fields`. |
| `source` | string | Source the order was created from (for example web, mobile, admin); null if not recorded. |
| `createdAt` | string<date-time> | Creation date in ISO 8601 with offset. |
| `updatedAt` | string<date-time> | Last update date in ISO 8601 with offset. |
| `billingAddress` | object | Billing address of the order; null if none. |
| `billingAddress.label` | string | Descriptive label of the address; null if not recorded. |
| `billingAddress.addressLine1` | string | First address line; null if not recorded. |
| `billingAddress.addressLine2` | string | Second address line; null if not recorded. |
| `billingAddress.city` | string | City; null if not recorded. |
| `billingAddress.province` | string | Province or region; null if not recorded. |
| `billingAddress.postcode` | string | Postal code; null if not recorded. |
| `billingAddress.country` | string | Country; null if not recorded. |
| `shippingAddress` | object | Shipping address of the order; null if none. |
| `shippingAddress.label` | string | Descriptive label of the address; null if not recorded. |
| `shippingAddress.addressLine1` | string | First address line; null if not recorded. |
| `shippingAddress.addressLine2` | string | Second address line; null if not recorded. |
| `shippingAddress.city` | string | City; null if not recorded. |
| `shippingAddress.province` | string | Province or region; null if not recorded. |
| `shippingAddress.postcode` | string | Postal code; null if not recorded. |
| `shippingAddress.country` | string | Country; null if not recorded. |
| `contactPerson` | object | Contact person linked to the order; null if none. |
| `contactPerson.id` | string | Unique contact identifier. |
| `contactPerson.name` | string | Contact name. |
| `quotes` | object[] | Informational references to quotes generated from the order. |
| `quotes.id` | string | Unique identifier of the referenced document. |
| `quotes.number` | string | Document number; null until it is numbered. |
| `quotes.status` | string | Document status at the time the reference was written; null if not recorded. Informational: it may be out of date. |
| `invoices` | object[] | Informational references to invoices generated from the order. |
| `invoices.id` | string | Unique identifier of the referenced document. |
| `invoices.number` | string | Document number; null until it is numbered. |
| `invoices.status` | string | Document status at the time the reference was written; null if not recorded. Informational: it may be out of date. |
| `proformas` | object[] | Informational references to proformas generated from the order. |
| `proformas.id` | string | Unique identifier of the referenced document. |
| `proformas.number` | string | Document number; null until it is numbered. |
| `proformas.status` | string | Document status at the time the reference was written; null if not recorded. Informational: it may be out of date. |

*Call · filmo_orders_update*

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "filmo_orders_update",
    "arguments": {
      "orderId": "orde_8f2a1c"
    }
  }
}
```

*Result (generated from the schema)*

```json
{
  "structuredContent": {
    "data": {
      "id": "id_8f2a1c",
      "orderNumber": "<orderNumber>",
      "externalReference": "<externalReference>",
      "status": "draft",
      "startDate": "2026-09-01T08:00:00Z",
      "endDate": "2026-09-01T08:00:00Z",
      "rentalDays": 1,
      "projectId": "proj_8f2a1c",
      "projectName": "Example",
      "contact": {
        "id": "id_8f2a1c",
        "name": "Example"
      },
      "itemsCount": 1,
      "subTotalPrice": "1234.50",
      "discountTotal": "1234.50",
      "insuranceTotal": "1234.50",
      "depositTotal": "1234.50",
      "taxesPrice": "1234.50",
      "netPrice": "1234.50",
      "grossPrice": "1234.50",
      "tags": [
        {
          "id": "id_8f2a1c",
          "name": "Example"
        }
      ],
      "customFields": {
        "key": "<key>"
      },
      "source": "<source>",
      "createdAt": "2026-09-01T08:00:00Z",
      "updatedAt": "2026-09-01T08:00:00Z",
      "billingAddress": {
        "label": "Example",
        "addressLine1": "<addressLine1>",
        "addressLine2": "<addressLine2>",
        "city": "<city>",
        "province": "<province>",
        "postcode": "<postcode>",
        "country": "ES"
      },
      "shippingAddress": {
        "label": "Example",
        "addressLine1": "<addressLine1>",
        "addressLine2": "<addressLine2>",
        "city": "<city>",
        "province": "<province>",
        "postcode": "<postcode>",
        "country": "ES"
      },
      "contactPerson": {
        "id": "id_8f2a1c",
        "name": "Example"
      },
      "quotes": [
        {
          "id": "id_8f2a1c",
          "number": "<number>",
          "status": "<status>"
        }
      ],
      "invoices": [
        {
          "id": "id_8f2a1c",
          "number": "<number>",
          "status": "<status>"
        }
      ],
      "proformas": [
        {
          "id": "id_8f2a1c",
          "number": "<number>",
          "status": "<status>"
        }
      ]
    },
    "meta": {
      "idempotencyKey": "<the key you sent, or the one the server generated>",
      "rateLimit": {
        "limit": 120,
        "remaining": 119,
        "reset": 42
      }
    }
  }
}
```

## The same operation by REST

This tool runs [`PATCH /api/v1/orders/{orderId}`](https://docs.filmo.io/rest-api/endpoint-reference/orders/update-the-header-of-an-order).

---

Canonical URL: https://docs.filmo.io/mcp/tools/orders/filmo-orders-update  
Last updated: 2026-10-25