Factuarea APIDevelopers

Previsualizar el impacto de restringir un catálogo

Compute what would be lost if the commercial combinations of a product were replaced by the proposed ones, and mint the impact_token that confirms THAT exact change.

  • It is a READ and persists nothing — asking twice over the same catalog returns the same token — but it requires products:write, because the only thing its answer does is authorise a destructive write.
  • Send configurations as the COMPLETE list of combinations that would remain ACTIVE (an empty list means "retire the allow-list", which returns the product to the cartesian cross), plus variant_ids/presentation_ids enumerating what SURVIVES on each axis — omitting a key means "that axis is untouched", which is not the same as an empty list.
  • The answer says whether the change needs confirmation at all (requires_confirmation), which crosses stop being sellable, and which negotiated prices would be retired and from which price lists.
  • The token is a fingerprint of the current catalog AND of the set of prices at stake, not a credential: if either changes before you confirm, the confirmation is rejected and you ask for a fresh preview.
  • Send it back as impact_token when emptying configurations on PATCH /v1/products/{id}, or when deleting the variant or presentation whose removal would leave the product with no declared combination.
POST
/products/{product}/configurations/impact-preview
AuthorizationBearer <token>

En: header

Parámetros de ruta

product*string

Headers

Factuarea-Version?string

Fija la versión de la API (YYYY-MM-DD, versionado por fecha estilo Stripe) para esta petición; omítelo para usar la versión fijada de la clave, o la última si no hay ninguna. Versión no soportada → 400 unsupported_api_version; malformada → 400 parameter_invalid_format. La versión efectiva se refleja en la cabecera de respuesta Factuarea-Version. Consulta la guía de Versioning.

Formatodate
X-Active-Profile?string

Opera en nombre de una empresa hija (API key maestra de gestoría): pasa su id público (UUID v7) y la petición se ejecuta contra los datos de esa hija sin cambiar el scope, el tier ni el environment de la clave (omítelo para usar la propia empresa de la clave). UUID inválido → 400 parameter_invalid_uuid; id desconocido o no propio → 404 profile_not_found. Consulta la guía de Acting on behalf.

Formatouuid

Cuerpo de la petición

application/json

Definiciones de TypeScript

Usa el tipo request body en TypeScript.

Cuerpo de la respuesta

application/json

application/json

application/json

application/json

application/json

application/json

application/json