DEV

Mutation.

complianceQuestionnaireAmend

Open a session to amend answers a completed session already certified. Takes the completed session's id — its container, route and lines are all the input needed — and returns a NEW session whose lines start pre-answered from the responses currently in force, so the merchant edits what they last said instead of re-answering from scratch. Answering it finalizes through the ordinary path, superseding those responses. The session passed in is never modified. It stays COMPLETED and keeps its own answers and responses, so it remains the record of what was filed and of which session filed it. The responses it produced also stay in force until the new session finalizes: the item's complianceAttributes do not change while an amendment is in progress, and the container does not drop out of ready. A line is cloned for every line of the source session that has something to correct, meaning a current COMPLETE response for a CATALOG_ITEM target. Lines with nothing to correct are skipped, so a program that has since stopped applying is not resurrected; an ITEM line is always skipped, since its response may already be projected onto a filed entry. Upsert, not create: a container may have only one session open at a time, so the amendment lines are added to whatever session is already open — which is just as likely to be an ordinary outstanding questionnaire (opened by complianceQuestionnaireInfer or by a catalog-item change) as another amendment. An unrelated open questionnaire therefore never blocks an amendment, and the returned session may contain outstanding lines alongside the amendments; lines covers only the amendments. Re-calling is idempotent: an amendment already open is reported as it stands, never re-seeded over. Two cases must wait. If the open session already holds that program's line for the target — outstanding work, or an amendment that already finalized in it — a second line for the same identity is not allowed, so that program is skipped and logged; when no program can be amended for that reason, the call fails rather than reporting success against a session it did not touch. And if the open session is on a different ship route than the session being corrected, the call fails outright: a session's route decides the identity every line in it finalizes under, so an amendment can only be made under the route its answers were certified for. Lines are NOT auto-finalized. Edit through questionnaireAnswersSubmit, or accept the carried-over answers as they stand with questionnaireSessionAttest — an amendment is still a human act.

Arguments

No description
GraphQL
1
2
3
type Mutation {
  complianceQuestionnaireAmend(input: ComplianceQuestionnaireAmendInput!): ComplianceQuestionnaireInferResult!
}
Book a demo

Was this page helpful?