Record an RFQ response
Módulo Procurement
POST/rfq-responsesrfqResponses.create
Records a sealed response and its quoted lines in one call (app.record_rfq_response) for a holder of procurement.rfq.write on the project. Only an invited vendor responds while the RFQ is Issued (rfq_not_invited, 422) and a response quotes at least one line (rfq_response_lines_required, 422). Answers 201 with a receipt: the response stays unreadable until the RFQ closes. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.
- Requiere la capacidad procurement.rfq.read.
- Alcances de OAuth: procurement.
- Envía el encabezado Idempotency-Key. Una repetición con la misma clave devuelve la respuesta original.
- Estados de error: 400, 401, 409, 422, 429. Los errores son detalles de problema RFC 9457.
Cuerpo de la solicitud: RfqResponseCreate
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| rfq_id | string (uuid) | Sí | Identifier of the RFQ. |
| vendor_id | string (uuid) | Sí | Identifier of the responding vendor; must have been invited. |
| valid_until | string (date) | null | No | Last day the quoted prices hold. |
| currency_code | string | Sí | ISO 4217 currency of every quoted line.Restricciones: pattern ^[A-Z]{3}$ |
| lines | array of RfqResponseQuotedLine | Sí | Lines quoted, at least one. |
{
"rfq_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"vendor_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"valid_until": "2026-10-08",
"currency_code": "USD",
"lines": [
{
"description": "Line array, 12 boxes per side",
"element_id": "0000.01.01-XOS-001",
"quantity": 2,
"unit_price_minor": 1800000
}
]
}Respuesta 201: RfqResponseReceipt
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| rfq_response_id | string (uuid) | Sí | Identifier of the recorded response. |
| rfq_id | string (uuid) | Sí | Identifier of the RFQ. |
| vendor_id | string (uuid) | Sí | Identifier of the responding vendor. |
| line_count | integer | Sí | Lines recorded.Restricciones: range 1 to any |
| sealed | boolean | Sí | True while the RFQ is not Closed: the response stays unreadable until it closes. |
{
"rfq_response_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"rfq_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"vendor_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"line_count": 3,
"sealed": true
}Ejemplos de código
curl -X POST "$XOS_BASE_URL/rfq-responses" \
-H "Authorization: Bearer $XOS_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"rfq_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","vendor_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","valid_until":"2026-10-08","currency_code":"USD","lines":[{"description":"Line array, 12 boxes per side","element_id":"0000.01.01-XOS-001","quantity":2,"unit_price_minor":1800000}]}'const { data } = await xos.rfqResponses.create({
"rfq_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"vendor_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"valid_until": "2026-10-08",
"currency_code": "USD",
"lines": [
{
"description": "Line array, 12 boxes per side",
"element_id": "0000.01.01-XOS-001",
"quantity": 2,
"unit_price_minor": 1800000
}
]
});response = xos.rfq_responses.create({"rfq_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", "vendor_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", "valid_until": "2026-10-08", "currency_code": "USD", "lines": [{"description": "Line array, 12 boxes per side", "element_id": "0000.01.01-XOS-001", "quantity": 2, "unit_price_minor": 1800000}]})xos rfq-responses create --data '{"rfq_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","vendor_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","valid_until":"2026-10-08","currency_code":"USD","lines":[{"description":"Line array, 12 boxes per side","element_id":"0000.01.01-XOS-001","quantity":2,"unit_price_minor":1800000}]}'