Write to the client: message, question or resume
All field references · Fulfiller
POST /v1/fulfillment/orders/{id}/messages
action=message writes to the client (optional reply_to = a client message). action=question asks the client and needs reason: the order goes to status query and its automations hold until you resume. action=resume settles open questions and lifts paused/on hold; the status follows production again (body = optional note; 409 reason=not_held if nothing holds). The same idempotency_key with the same text answers 200 with the same message. Requires a live API key.
Required scopes: "fulfillment:write".
#Parameters
#path: id
Required. Meykt id of an order you received as a fulfiller (from GET /v1/fulfillment/orders).
| Field | Type | Presence | null | Meaning, limits and examples |
|---|---|---|---|---|
| $ (whole value) | string | Whole value | Not allowed | format: "uuid". |
#Request body
Request body required.
Content type: application/json
| Field | Type | Presence | null | Meaning, limits and examples |
|---|---|---|---|---|
| $ (whole value) | object | Whole value | Not allowed | Examples: [{"idempotency_key":"33333333-3333-4333-8333-333333333333","action":"question","body":"Which engraving text should we use?","reason":"personalization_unclear"}]. Additional properties are not allowed. |
| idempotency_key | string | Required when parent is present | Not allowed | New UUID for this intended command; retry unchanged with the same UUID. format: "uuid". |
| action | string | Optional | Not allowed | message sends text; question holds the order and asks the client; resume resolves questions and resumes the held order. Default: "message". enum: ["message","question","resume"]. |
| body | string | Optional | Not allowed | Message text, required for message and question; optional note for resume. minLength: 1. maxLength: 2000. |
| reason | string | Optional | Not allowed | Reason for the question or held/failed status. A question requires a reason; resume forbids it. enum: ["address_undeliverable","file_unusable","personalization_unclear","item_unavailable","deadline_at_risk","other"]. |
| reply_to | string | Optional | Not allowed | Identifier of a message from the other party on this order; forbidden for resume. format: "uuid". |
| $ (whole value) | any JSON value | Conditional: allOf 1/2 | Not allowed | allOf 1/2: All rules must match. When {"properties":{"action":{"const":"resume"}},"required":["action"]} matches, the then rules apply; otherwise the else rules apply. |
| $ (whole value) | any JSON value | Conditional: then | Not allowed | allOf 1/2: All rules must match. When {"properties":{"action":{"const":"resume"}},"required":["action"]} matches. not: {"anyOf":[{"required":["reason"]},{"required":["reply_to"]}]}. |
| $ (whole value) | any JSON value | Conditional: else | Allowed by schema | allOf 1/2: All rules must match. Unless {"properties":{"action":{"const":"resume"}},"required":["action"]} matches. |
| $ | requirement | Required: body | See field type | allOf 1/2: All rules must match. Unless {"properties":{"action":{"const":"resume"}},"required":["action"]} matches. |
| $ (whole value) | any JSON value | Conditional: allOf 2/2 | Allowed by schema | allOf 2/2: All rules must match. When {"properties":{"action":{"const":"question"}},"required":["action"]} matches, the then rules apply; otherwise the else rules apply. |
| $ (whole value) | any JSON value | Conditional: then | Allowed by schema | allOf 2/2: All rules must match. When {"properties":{"action":{"const":"question"}},"required":["action"]} matches. |
| $ | requirement | Required: reason | See field type | allOf 2/2: All rules must match. When {"properties":{"action":{"const":"question"}},"required":["action"]} matches. |
#Response 200, 201
200: Success; see the status meaning of the operation. 201: Success
Content type: application/json
| Field | Type | Presence | null | Meaning, limits and examples |
|---|---|---|---|---|
| $ (whole value) | object | Whole value | Not allowed | — |
| data | object | Required when parent is present | Not allowed | Authorized response payload or documented event data. Additional properties are not allowed. |
| data.id | string | Required when parent is present | Not allowed | Stable entry identifier. format: "uuid". |
| data.from | string | Required when parent is present | Not allowed | you = your system or your team, partner = the fulfiller. enum: ["you","partner"]. |
| data.kind | string | Required when parent is present | Not allowed | question = a question from the fulfiller (the order is waiting), status = a status report from the fulfiller, return = a return or parcel card. enum: ["message","question","status","return"]. |
| data.reason | string or null | Required when parent is present | Allowed by schema | Recorded reason. enum: ["address_undeliverable","file_unusable","personalization_unclear","item_unavailable","deadline_at_risk","other",null]. |
| data.status_change | string or null | Required when parent is present | Allowed by schema | Fulfillment status change reported with this message; null for ordinary messages. enum: ["query","paused","on_hold","failed","resumed","cancelled",null]. |
| data.body | string or null | Required when parent is present | Allowed by schema | Message text shown to the other party. |
| data.reply_to | string or null | Required when parent is present | Allowed by schema | Identifier of the earlier message this answers; null for a new message. format: "uuid". |
| data.shipping_address_changed | boolean | Required when parent is present | Not allowed | A new shipping address was passed on with this message. |
| data.partner_order_number | string or null | Required when parent is present | Allowed by schema | Order number at the fulfiller. |
| data.created_at | string | Required when parent is present | Not allowed | Created at, with time-zone offset. format: "date-time". |
| data.read_at | string or null | Required when parent is present | Allowed by schema | Read by the other side. format: "date-time". |
| data.resolved_at | string or null | Required when parent is present | Allowed by schema | Questions only: resolved by the fulfiller. format: "date-time". |
| data.return_event | string or null | Optional | Allowed by schema | Present only when kind is return. Which return card this row is. enum: ["registered","decision_needed","decided","reshipped","unpacked","scrapped","restocked","reminder",null]. |
| data.return_parcel_id | string or null | Optional | Allowed by schema | Present only when kind is return and the card is about a parcel. Otherwise omitted or null. format: "uuid". |
| data.return_id | string or null | Optional | Allowed by schema | Present only when kind is return and the card is about a customer return. Otherwise omitted or null. format: "uuid". |
#Response 400, 401, 403, 404, 409, 422, 429, 500, 503
400: The request is not valid JSON. 401: The key is missing, unknown, revoked or expired. 403: The key lacks a required scope, or the operation requires a live key. 404: Not found. Also applies to IDs that belong to another organization — we deliberately do not distinguish between "does not exist" and "does not belong to you". 409: The same ID already exists with different content. It is never overwritten. 422: Content validation failed. The response lists all affected locations at once. 429: A rate limit was reached and the request did not run. Wait for Retry-After, then repeat it unchanged. X-RateLimit-Scope names the limit: key (120 requests per minute), organization (300 per minute across all keys), write (1,000 at once, refilling at 60 per minute) or list (300 unfiltered list pages at once, refilling at 10 per minute). 500: Unexpected error on our side. 503: Temporarily unavailable. Repeat the same request with the same business identity.
Content type: application/json
| Field | Type | Presence | null | Meaning, limits and examples |
|---|---|---|---|---|
| $ (whole value) | object | Whole value | Not allowed | — |
| error | object | Required when parent is present | Not allowed | Machine-readable error code; use it to select the documented recovery path. |
| error.code | string | Required when parent is present | Not allowed | Machine-readable, permanently stable error code. Program against it, not against message. |
| error.message | string | Required when parent is present | Not allowed | Explanation for humans. May change at any time. |
| error.field | string | Optional | Not allowed | Affected location in the request, if it can be determined. |
| error.doc_url | string | Required when parent is present | Not allowed | Documentation link explaining this API error. format: "uri". |
Machine-readable version of this page: https://www.meykt.com/developers/fields-create-fulfillment-order-message.md