Factuarea APIDevelopers

Previsualitzar l'impacte de restringir un catàleg

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>

A: header

Paràmetres de ruta

product*string

Headers

Factuarea-Version?string

Fixa la versió de l'API (YYYY-MM-DD, versionat per data estil Stripe) per a aquesta petició; omet-lo per usar la versió fixada de la clau, o l'última si no n'hi ha cap. Versió no suportada → 400 unsupported_api_version; mal formada → 400 parameter_invalid_format. La versió efectiva es reflecteix a la capçalera de resposta Factuarea-Version. Consulta la guia de Versioning.

Formatdate
X-Active-Profile?string

Opera en nom d'una empresa filla (API key mestra de gestoria): passa el seu id públic (UUID v7) i la petició s'executa contra les dades d'aquella filla sense canviar l'scope, el tier ni l'environment de la clau (omet-lo per usar la pròpia empresa de la clau). UUID no vàlid → 400 parameter_invalid_uuid; id desconegut o no propi → 404 profile_not_found. Consulta la guia d'Acting on behalf.

Formatuuid

Cos de la petició

application/json

Definicions de TypeScript

Usa el tipus request body a TypeScript.

Cos de la resposta

application/json

application/json

application/json

application/json

application/json

application/json

application/json