Repair tickets

Create a repair ticket

Opens a repair ticket with its lines.

Tool
filmo_repair_tickets_create
Access: Write

Result

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "filmo_repair_tickets_create",
    "arguments": {
      "lines": [
        {
          "id": "id_8f2a1c",
          "description": "<description>",
          "diagnosis": "<diagnosis>",
          "entityType": "item",
          "entityId": "enti_8f2a1c",
          "serializedItemId": "seri_8f2a1c",
          "incidentId": "inci_8f2a1c",
          "quantity": 1,
          "unitPrice": "1234.50",
          "notes": "<notes>"
        }
      ]
    }
  }
}

generated from the schema

unitPrice is what is quoted to the CUSTOMER; the repair cost for the company neither goes in nor comes out through this API. incidentIds converts existing incidents and the server ties each line to its own. Behind the incidence add-on: without it, 402. Returns the full repair ticket, the same projection as its GET.

Arguments

datestring<date-time>

Repair ticket date, in ISO 8601 with offset. Defaults to today.

orderIdstring

Order from which the broken material returns.

contactIdstring

Client invoiced for the repair.

linesobject[]Required

Repair ticket lines. At least one.

Limits: min 1 items

Show child attributes
lines.idstring

Existing line being modified. Omit it for a new line.

lines.descriptionstringRequired

What needs to be repaired.

Limits: min length 1, max length 500

lines.diagnosisstring

Technical diagnosis.

Limits: max length 5000

lines.entityTypestring | null

Type of element being repaired: item, space or kit. null or omitted for a free line.

Available options: item, space, kit

lines.entityIdstring

Element being repaired.

lines.serializedItemIdstring

Specific physical unit, when a serialized item is repaired.

lines.incidentIdstring

Incident that originates this line.

lines.quantitynumber

Affected units. Defaults to 1.

Limits: min 0

lines.unitPricestring

Net unit price quoted to the client, as a decimal string.

Limits: pattern ^\d{1,13}(\.\d{1,2})?$

lines.notesstring

Line notes.

Limits: max length 2000

notesstring

Repair ticket notes.

Limits: max length 5000

incidentIdsstring[]

Incidents this repair ticket converts. The server ties each line to its incident.

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 ticket identifier.

numberstring

Ticket number, for example "RT-2026-0001".

datestring<date-time>

Issue date in ISO 8601 UTC.

statusstring

Status of the ticket in its lifecycle.

Available options: draft, sent, partially_converted, fully_invoiced, closed

orderIdstring | null

Identifier of the order it comes from; null if it was created standalone.

orderNumberstring | null

Number of the order it comes from; null if it was created standalone.

contactIdstring | null

Identifier of the responsible client; null if none has been assigned.

contactNamestring | null

Name of the responsible client; null if not resolved.

subTotalstring

Sum of the lines before taxes, as a decimal string "1234.50".

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

taxTotalstring

Tax total, as a decimal string "1234.50".

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

totalstring

Total including taxes, as a decimal string "1234.50".

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

totalLinesinteger

Number of lines in the ticket.

notesstring | null

General remarks; null if it has none.

createdAtstring<date-time>

Creation date in ISO 8601 UTC.

updatedAtstring<date-time>

Last modification date in ISO 8601 UTC.

projectIdstring | null

Identifier of the associated project; null if it has none.

linesobject[]

Ticket lines.

Show child attributes
lines.idstring

Unique line identifier.

lines.entityTypestring | null

Type of element being repaired: item, serializedItem (a specific unit), space or kit; null for a free line (a service, a charge).

Available options: item, serializedItem, space, kit

lines.entityIdstring | null

Identifier of the element being repaired; null if it is a free line.

lines.entityNamestring | null

Name of the element being repaired; null if not resolved.

lines.descriptionstring

What needs to be repaired.

lines.diagnosisstring | null

Technical diagnosis; null if none has been recorded.

lines.quantitynumber | null

Affected units; null if not applicable.

lines.unitPricestring | null

NET unit price quoted to the client, as a decimal string "1234.50". It is not the repair cost: that one is not published. null if the line has no price.

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

lines.incidentIdstring | null

Identifier of the incident that originated this line; null if it does not come from one.

lines.notesstring | null

Line notes; null if it has none.

sourceIncidentIdsstring[]

Identifiers of the incidents that originated the ticket.

customFieldsobject<string, any>

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

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 POST /api/v1/repair-tickets.

  • Repair tickets

    Create a repair ticket

    Opens a repair ticket with its lines.

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