Saltar al contenido

Accept a representation

Módulo Identity

POST/representations/{id}/acceptrepresentations.accept

Accepts the representation as the represented artist. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.

  • Requiere la capacidad me.profile.write.
  • Alcances de OAuth: me.
  • Envía el encabezado Idempotency-Key. Una repetición con la misma clave devuelve la respuesta original.
  • Estados de error: 400, 401, 404, 409, 422, 429. Los errores son detalles de problema RFC 9457.

Parámetros de ruta y de consulta

representations.accept: Parámetros de ruta y de consulta
CampoTipoObligatorioDescripción
idstring (uuid)SíIdentifier of the representation.

Respuesta 200: Representation

representations.accept: Representation
CampoTipoObligatorioDescripción
idstring (uuid)SíIdentifier of the representation.
created_atstring (date-time)SíWhen the row was created.
updated_atstring (date-time)SíWhen the row was last updated.
representative_person_idstring (uuid) | nullSíIdentifier of the representative.
artist_person_idstring (uuid)SíIdentifier of the represented artist.
scopesarray of RepresentationScopeSíDelegated scopes, stored as junction rows.
expires_onstring (date)SíExpiry.
accepted_atstring (date-time) | nullSíWhen the artist accepted.
revoked_atstring (date-time) | nullSíWhen the artist or the account revoked it.
{
  "id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "created_at": "2026-10-08T14:30:00Z",
  "updated_at": "2026-10-08T14:30:00Z",
  "representative_person_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "artist_person_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "scopes": [
    "Offers",
    "Advance"
  ],
  "expires_on": "2026-10-08",
  "accepted_at": "2026-10-08T14:30:00Z",
  "revoked_at": "2026-10-08T14:30:00Z"
}

Ejemplos de código

curl -X POST "$XOS_BASE_URL/representations/0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f/accept" \
  -H "Authorization: Bearer $XOS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
const { data } = await xos.representations.accept("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f");
response = xos.representations.accept("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f")
xos representations accept 0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f