Errors
conflict
409. The current state of the resource prevents the operation, a request with the same Idempotency-Key is still in flight, or another write held the resource, or the database aborted the transaction on a transient conflict, so nothing was written. The cause is in errors[0].: invalid_state for the first, in_progress for the second and lock_timeout for the third. detail is not for deciding. HTTP 409.
- HTTP status
- 409
- Problem type
- https://docs.filmo.io/errors/conflict
Example
When it happens
409. The current state of the resource prevents the operation, a request with the same Idempotency-Key is still in flight, or another write held the resource, or the database aborted the transaction on a transient conflict, so nothing was written. The cause is in errors[0].: invalid_state for the first, in_progress for the second and lock_timeout for the third. detail is not for deciding.
What to do
Branch on errors[0].. For in_progress and lock_timeout, wait and send the same request again with the same Idempotency-Key; with backoff for lock_timeout. If an in_progress 409 persists for about two minutes, the reservation is treated as abandoned and the next attempt with the same key runs, so read the resource before retrying. For invalid_state, do not retry unchanged: read the resource and, if the request still fits, you may send it again; otherwise change it to fit its state; examples are archiving an order that is neither a draft nor cancelled, unreserving a cancelled order, or cancelling one already checked in.
Retry
Retry with the same key409 conflict · in_progress · Idempotency-Key: Yes
errors[0].iscode in_progress: another request with the sameIdempotency-Keyis still running. Wait and retry with the same key (exponential backoff, up to 3 times): you get its stored response when it finishes. If the 409 persists for about two minutes, the reservation is treated as abandoned and the next attempt with the same key runs; read the resource before retrying.Retry with backoff409 conflict · lock_timeout
errors[0].iscode lock_timeout: another write held the resource, or the database aborted the transaction on a transient conflict; nothing was written. Retry with the same key and an exponential backoff, up to 3 times; if it persists, read the resource again.Read the resource first409 conflict · invalid_state
errors[0].iscode invalid_state: the state of the resource forbids the operation (a unique violation, a line of an atomic batch, an item deleted while saving). Do not retry unchanged: waiting never fixes it. Read the resource again; if the request still fits, you may send it again.
Fields of errors[]
Stable code of the field error (required, must_not_be_null, invalid_type, invalid_value, too_small, too_big, unknown_field, invalid_format, not_found, must_be_after…). On a 409 conflict it says the cause: in_progress (another request with the same Idempotency-Key is still running), lock_timeout (another conditional write held the resource for more than five seconds) or invalid_state (the state of the resource forbids the operation).
Returned by
98 operations
POST /api/v1/contacts— Create a contactPATCH /api/v1/contacts/{contactId}— Update a contactDELETE /api/v1/contacts/{contactId}— Delete a contactPATCH /api/v1/contacts/{contactId}/preferences— Update the commercial terms of a contactPOST /api/v1/contacts/{contactId}/addresses— Add an address to a contactPATCH /api/v1/contacts/{contactId}/addresses/{addressId}— Update an address of a contactDELETE /api/v1/contacts/{contactId}/addresses/{addressId}— Remove an address from a contactPOST /api/v1/contacts/{contactId}/related-contacts— Relate two contactsPATCH /api/v1/contacts/{contactId}/related-contacts/{relatedContactId}— Change the role of a relationshipDELETE /api/v1/contacts/{contactId}/related-contacts/{relatedContactId}— Unrelate two contactsPOST /api/v1/items— Create an itemPATCH /api/v1/items/{itemId}— Update an itemDELETE /api/v1/items/{itemId}— Delete an itemPATCH /api/v1/items/{itemId}/physical-properties— Update weight and dimensionsPATCH /api/v1/items/{itemId}/pricing— Update the pricing of an itemPOST /api/v1/availability/check— Check item availabilityPOST /api/v1/orders— Create an orderPATCH /api/v1/orders/{orderId}— Update the header of an orderPOST /api/v1/projects— Create a projectPUT /api/v1/projects/{projectId}/archive— Archive or restore a projectPATCH /api/v1/projects/{projectId}— Update a projectPATCH /api/v1/serialized-items/{serializedItemId}— Update a serialized itemPATCH /api/v1/spaces/{spaceId}— Update a warehouse or spaceDELETE /api/v1/spaces/{spaceId}— Delete a spacePUT /api/v1/spaces/{spaceId}/amenities— Replace the amenities and equipmentPATCH /api/v1/spaces/{spaceId}/pricing— Update the pricing of a spacePOST /api/v1/repair-tickets— Create a repair ticketPATCH /api/v1/repair-tickets/{ticketId}— Update a repair ticketPOST /api/v1/vehicles— Create a vehiclePATCH /api/v1/vehicles/{vehicleId}— Update a vehicleDELETE /api/v1/vehicles/{vehicleId}— Delete a vehiclePOST /api/v1/staff— Create a staff memberPATCH /api/v1/staff/{staffId}— Update a staff memberDELETE /api/v1/staff/{staffId}— Delete a staff memberPATCH /api/v1/subrents/{subrentId}— Update a subrentPATCH /api/v1/purchase-orders/{purchaseOrderId}— Update a purchase orderPOST /api/v1/staff/availability— Check staff availabilityPOST /api/v1/vehicles/availability— Check fleet availabilityPOST /api/v1/tags— Create a tagDELETE /api/v1/tags/{tagId}— Delete a tagPOST /api/v1/tags/{tagId}/assignments— Assign a tag to an entityDELETE /api/v1/tags/{tagId}/assignments— Remove a tag from an entityPOST /api/v1/kits— Create a kitPATCH /api/v1/kits/{kitId}— Update a kitPOST /api/v1/collections— Create a collectionPATCH /api/v1/collections/{collectionId}— Update a collectionPOST /api/v1/services— Create a servicePATCH /api/v1/services/{serviceId}— Update a servicePOST /api/v1/internal-services— Create an internal servicePATCH /api/v1/internal-services/{internalServiceId}— Update an internal servicePOST /api/v1/planner/assignments— Assign a resource to a servicePOST /api/v1/planner/assignments/remove— Remove a resource from a servicePOST /api/v1/availability/unavailabilities— Declare an unavailabilityPATCH /api/v1/availability/unavailabilities/{unavailabilityId}— Correct or close an unavailabilityDELETE /api/v1/availability/unavailabilities/{unavailabilityId}— Delete an unavailabilityPOST /api/v1/incidents— Open an incidentPATCH /api/v1/incidents/{incidentId}— Update an incidentPOST /api/v1/incidents/{incidentId}/comments— Comment on an incidentPOST /api/v1/notes— Write a note on an entityPOST /api/v1/tasks— Create a taskPATCH /api/v1/tasks/{taskId}— Update a taskDELETE /api/v1/tasks/{taskId}— Delete a taskPOST /api/v1/crm/opportunities— Create an opportunityPATCH /api/v1/crm/opportunities/{opportunityId}— Update an opportunityPATCH /api/v1/crm/opportunities/{opportunityId}/stage— Move an opportunity to another stagePOST /api/v1/crm/opportunities/{opportunityId}/close— Close an opportunityPOST /api/v1/crm/opportunities/{opportunityId}/links— Link a document to an opportunityPOST /api/v1/purchase-orders/{purchaseOrderId}/approve— Approve a purchase orderPOST /api/v1/purchase-orders/{purchaseOrderId}/receive— Receive material from a purchase orderPOST /api/v1/treasury/payments— Record an incoming or outgoing paymentPATCH /api/v1/treasury/payments/{paymentId}— Update a paymentPOST /api/v1/treasury/payments/{paymentId}/links— Link a payment to a documentPOST /api/v1/orders/{orderId}/cancel— Cancel an orderPUT /api/v1/orders/{orderId}/archive— Archive or restore an orderPUT /api/v1/items/{itemId}/accessories— Update the accessories of an itemPUT /api/v1/items/{itemId}/alternatives— Update the alternatives of an itemPATCH /api/v1/items/{itemId}/variants/{variantId}— Update a variant of an itemPOST /api/v1/contacts/lookup— Look up contacts by external referencePOST /api/v1/orders/line-items/returns— Return order linesPOST /api/v1/ai/ask— Ask the AI about your dataPOST /api/v1/workflows/{workflowId}/runs— Run a workflowPOST /api/v1/orders/{orderId}/reserve— Reserve an orderPOST /api/v1/orders/{orderId}/unreserve— Unreserve an orderPOST /api/v1/projects/{projectId}/orders/{orderId}— Link an order to a projectDELETE /api/v1/projects/{projectId}/orders/{orderId}— Unlink an order from a projectPOST /api/v1/invoices/{invoiceId}/validate— Validate an invoicePOST /api/v1/invoices/{invoiceId}/void— Void an invoicePUT /api/v1/invoices/external/{originSystem}/{originExternalId}— Create or update the mirror of an externally issued invoicePOST /api/v1/credit-notes/{creditNoteId}/validate— Validate a credit notePOST /api/v1/credit-notes/{creditNoteId}/void— Void a credit notePATCH /api/v1/proformas/{proformaId}/status— Change the commercial status of a proformaPATCH /api/v1/quotes/{quoteId}/status— Change the commercial status of a quotePOST /api/v1/contracts/{contractId}/validate— Validate a contractPOST /api/v1/contracts/{contractId}/sign— Record the signature of a contractPOST /api/v1/contracts/{contractId}/void— Void a contractPOST /api/v1/contracts/{contractId}/cancel— Cancel a contract operativelyPOST /api/v1/supplier-invoices/{supplierInvoiceId}/validate— Validate a supplier invoicePOST /api/v1/supplier-invoices/{supplierInvoiceId}/void— Void a supplier invoice
Through MCP
A tool call that fails comes back with `isError` set and the problem as structured content, with the same `code`.
Was this page helpful?