Record a standing partner grant
Módulo Platform
POST/partner-standing-grants/recordpartnerStandingGrants.record
The client Owner (org.support_session.grant) records a grant the partner and client agreement provides (app.record_standing_grant): one read capability a support session may grant, an expiry within a year and the clause. A scope outside those, an expiry past a year and an org without a partner answer 422. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.
- Requiere la capacidad org.support_session.grant.
- Alcances de OAuth: org.
- 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: PartnerStandingGrantRecordRequest
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| capability_code | string | Sí | The read capability the grant covers.Restricciones: pattern ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$ |
| valid_to | string (date-time) | Sí | When the grant ends, within a year. |
| agreement_reference | string | Sí | The clause of the agreement.Restricciones: length 1 to 300 |
{
"capability_code": "org.settings.read",
"valid_to": "2026-10-08T14:30:00Z",
"agreement_reference": "Partner agreement, clause 7.2"
}Respuesta 201: PartnerStandingGrant
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| id | string (uuid) | Sí | Identifier of the partner standing grant. |
| org_id | string (uuid) | Sí | Identifier of the owning organization, derived from the parent row and never accepted from the caller. |
| created_at | string (date-time) | Sí | When the row was created. |
| created_by | string (uuid) | null | Sí | Identifier of the person who created the row. |
| updated_at | string (date-time) | Sí | When the row was last updated. |
| updated_by | string (uuid) | null | Sí | Identifier of the person who last updated the row. |
| partner_org_id | string (uuid) | Sí | Identifier of the partner org whose staff may read. |
| capability_code | string | Sí | The scope: one read capability a support session may grant.Restricciones: pattern ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$ |
| agreement_reference | string | Sí | The clause of the agreement that provides the grant.Restricciones: length 1 to 300 |
| valid_from | string (date-time) | Sí | When access began. |
| valid_to | string (date-time) | Sí | When access ends on its own. |
| record_grant_id | string (uuid) | Sí | Identifier of the org-level record grant the standing grant issued. |
| ended_at | string (date-time) | null | Sí | When someone ended the grant early. |
| ended_by | string (uuid) | null | Sí | Identifier of the person who ended it early. |
{
"id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"org_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"created_at": "2026-10-08T14:30:00Z",
"created_by": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"updated_at": "2026-10-08T14:30:00Z",
"updated_by": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"partner_org_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"capability_code": "org.settings.read",
"agreement_reference": "Partner agreement, clause 7.2",
"valid_from": "2026-10-08T14:30:00Z",
"valid_to": "2026-10-08T14:30:00Z",
"record_grant_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"ended_at": "2026-10-08T14:30:00Z",
"ended_by": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"
}Ejemplos de código
curl -X POST "$XOS_BASE_URL/partner-standing-grants/record" \
-H "Authorization: Bearer $XOS_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"capability_code":"org.settings.read","valid_to":"2026-10-08T14:30:00Z","agreement_reference":"Partner agreement, clause 7.2"}'const { data } = await xos.partnerStandingGrants.record({
"capability_code": "org.settings.read",
"valid_to": "2026-10-08T14:30:00Z",
"agreement_reference": "Partner agreement, clause 7.2"
});response = xos.partner_standing_grants.record({"capability_code": "org.settings.read", "valid_to": "2026-10-08T14:30:00Z", "agreement_reference": "Partner agreement, clause 7.2"})xos partner-standing-grants record --data '{"capability_code":"org.settings.read","valid_to":"2026-10-08T14:30:00Z","agreement_reference":"Partner agreement, clause 7.2"}'