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).

Tool
filmo_orders_update
Access: Write

Result

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

generated from the schema

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.

Arguments

orderIdstringRequired

Order identifier.

Limits: min length 1

contactIdstring

Identifier of the order customer. It must belong to the account of the API key.

Limits: min length 1, max length 100

projectIdstring | null

Project the order is assigned to; null unlinks it (standalone order).

Limits: min length 1, max length 100

startDatestring<date-time>

Rental start (ISO 8601 with offset).

endDatestring<date-time>

Rental end (ISO 8601 with offset); it must be later than startDate.

idempotencyKeystring

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.

Limits: min length 1, max length 255

ifMatchstring

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.

Limits: min length 1

Result

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

Show the attributes of data
idstring

Unique order identifier.

orderNumberstring

Human-readable order number.

externalReferencestring | null

External reference of the order (for example, from the customer system); null if not recorded.

statusstring

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.

Available options: draft, reserved, prepared_partially, prepared, picked_up_partially, picked_up, returned_partially, returned, checked_in_partially, checked_in, archived, cancelled

startDatestring<date-time>

Start of the rental period in ISO 8601 with offset.

endDatestring<date-time>

End of the rental period in ISO 8601 with offset.

rentalDaysnumber | null

Number of billable rental days; null if not calculated.

projectIdstring | null

Identifier of the project the order belongs to; null if not linked.

projectNamestring | null

Name of the project the order belongs to; null if not linked.

contactobject | null

Compact reference to the order contact; null if none.

Show child attributes
contact.idstring

Unique contact identifier.

contact.namestring

Contact name.

itemsCountinteger

Number of items in the order.

subTotalPricestring

Subtotal before discounts and taxes, as a decimal string "1234.50" (ROUND_HALF_UP).

Limits: pattern ^-?\d+\.\d{2}$

discountTotalstring | null

Total discounts as a decimal string "1234.50" (ROUND_HALF_UP); null if there is no discount.

Limits: pattern ^-?\d+\.\d{2}$

insuranceTotalstring

Insurance total as a decimal string "1234.50" (ROUND_HALF_UP).

Limits: pattern ^-?\d+\.\d{2}$

depositTotalstring

Deposit total as a decimal string "1234.50" (ROUND_HALF_UP).

Limits: pattern ^-?\d+\.\d{2}$

taxesPricestring

Tax total as a decimal string "1234.50" (ROUND_HALF_UP).

Limits: pattern ^-?\d+\.\d{2}$

netPricestring

Taxable base (net before taxes) as a decimal string "1234.50" (ROUND_HALF_UP).

Limits: pattern ^-?\d+\.\d{2}$

grossPricestring

Total including taxes, as a decimal string "1234.50" (ROUND_HALF_UP).

Limits: pattern ^-?\d+\.\d{2}$

tagsobject[]

Tags attached to the order, with their identifier and name.

Show child attributes
tags.idstring

Unique identifier of the tag.

tags.namestring

Tag name.

customFieldsobject<string, any>

Custom field values by custom field identifier; the definitions are in /api/v1/custom-fields.

sourcestring | null

Source the order was created from (for example web, mobile, admin); null if not recorded.

createdAtstring<date-time>

Creation date in ISO 8601 with offset.

updatedAtstring<date-time>

Last update date in ISO 8601 with offset.

billingAddressobject | null

Billing address of the order; null if none.

Show child attributes
billingAddress.labelstring | null

Descriptive label of the address; null if not recorded.

billingAddress.addressLine1string | null

First address line; null if not recorded.

billingAddress.addressLine2string | null

Second address line; null if not recorded.

billingAddress.citystring | null

City; null if not recorded.

billingAddress.provincestring | null

Province or region; null if not recorded.

billingAddress.postcodestring | null

Postal code; null if not recorded.

billingAddress.countrystring | null

Country; null if not recorded.

shippingAddressobject | null

Shipping address of the order; null if none.

Show child attributes
shippingAddress.labelstring | null

Descriptive label of the address; null if not recorded.

shippingAddress.addressLine1string | null

First address line; null if not recorded.

shippingAddress.addressLine2string | null

Second address line; null if not recorded.

shippingAddress.citystring | null

City; null if not recorded.

shippingAddress.provincestring | null

Province or region; null if not recorded.

shippingAddress.postcodestring | null

Postal code; null if not recorded.

shippingAddress.countrystring | null

Country; null if not recorded.

contactPersonobject | null

Contact person linked to the order; null if none.

Show child attributes
contactPerson.idstring

Unique contact identifier.

contactPerson.namestring

Contact name.

quotesobject[]

Informational references to quotes generated from the order.

Show child attributes
quotes.idstring

Unique identifier of the referenced document.

quotes.numberstring | null

Document number; null until it is numbered.

quotes.statusstring | null

Document status at the time the reference was written; null if not recorded. Informational: it may be out of date.

invoicesobject[]

Informational references to invoices generated from the order.

Show child attributes
invoices.idstring

Unique identifier of the referenced document.

invoices.numberstring | null

Document number; null until it is numbered.

invoices.statusstring | null

Document status at the time the reference was written; null if not recorded. Informational: it may be out of date.

proformasobject[]

Informational references to proformas generated from the order.

Show child attributes
proformas.idstring

Unique identifier of the referenced document.

proformas.numberstring | null

Document number; null until it is numbered.

proformas.statusstring | null

Document status at the time the reference was written; null if not recorded. Informational: it may be out of date.

An error is a result with isError: true and the problem in content[0].text; there is no structuredContent. See Errors.

The same operation by REST

This tool runs PATCH /api/v1/orders/{orderId}.

  • 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).

  • Guides

    Safe writes

    An assistant that can write can also write the wrong thing. Decide which tools need a person, retry without duplicating, and know what a write sets in motion.

  • Guides

    Errors

    A tool error is a result with isError: true and the problem in the first text block. Branch on its code.