Delete an option of a draft question
DELETE /supplier-assessment-templates/{templateId}/questions/{questionId}/options/{optionId}
Scope supplier_template:write Plan Growth+
Remove one answer option from a question of a draft. The draft’s revision is required, as an If-Match header or as {"revision": N} in an optional body of at most 4 KiB (otherwise 400 VALIDATION_FAILED). A choice question must keep two options (409 OPTION_MINIMUM_REACHED), and an option that another question’s gating rule depends on cannot be deleted (409 OPTION_REFERENCED, the dependants are in error.args.dependents). Structural write: 30 per token and hour. Requires the supplier_template:write scope (or a signed-in Owner, Manager or Contributor session).
Example
curl -X DELETE "https://api.autociso.io/api/v1/supplier-assessment-templates/<templateId>/questions/<questionId>/options/<optionId>" \
-H "Authorization: Bearer <your-api-token>"import requests
response = requests.delete(
"https://api.autociso.io/api/v1/supplier-assessment-templates/<templateId>/questions/<questionId>/options/<optionId>",
headers={"Authorization": "Bearer <your-api-token>"},
)
print(response.status_code)const response = await fetch("https://api.autociso.io/api/v1/supplier-assessment-templates/<templateId>/questions/<questionId>/options/<optionId>", {
method: "DELETE",
headers: { "Authorization": "Bearer <your-api-token>" },
});
console.log(response.status);Response 204
No response body
Path parameters
templateIdstring requiredQuestionnaire document id (satpl_...), orsatpl_builtin_supplier_security_privacy_v1for the built-in one.questionIdstring requiredQuestion id, as returned insections[].questions[].questionId.optionIdstring requiredOption id, as returned inquestions[].options[].optionId.
Header parameters
If-MatchstringThe draft revision asW/"<revision>", from the ETag header. Wins over arevisionin the body. A write on an older revision fails with 409 STALE_REVISION.
Request body
revisioninteger
Returns
Status 204 with no response body.
Errors
| Status | Code | Retry | Meaning |
|---|---|---|---|
| 400 | VALIDATION_FAILED |
no | The JSON body does not match the request schema, or the revision is missing where required. code VALIDATION_FAILED. |
| 401 | INVALID_TOKEN |
no | Missing (UNAUTHORIZED) or invalid, expired or revoked (INVALID_TOKEN) token. |
| 402 | FEATURE_GATED |
no | The tenant plan does not include supply chain security. code FEATURE_GATED; args.feature, args.minTier, args.minTierName. |
| 403 | INSUFFICIENT_SCOPE |
no | The token lacks supplier_template:write (INSUFFICIENT_SCOPE), has no accountable person (FORBIDDEN: this principal cannot edit questionnaires), or the target is the built-in questionnaire (BUILTIN_IMMUTABLE). |
| 404 | QUESTION_NOT_FOUND |
no | Unknown questionnaire (NOT_FOUND), question (QUESTION_NOT_FOUND) or option (OPTION_NOT_FOUND). |
| 409 | OPTION_MINIMUM_REACHED |
no | Everything in EditConflict, plus OPTION_MINIMUM_REACHED (a choice question keeps two options) and OPTION_REFERENCED (another question’s gating rule depends on the option; args.dependents lists them). |
| 429 | RATE_LIMITED |
yes | Too many failed authentication attempts from this address, or the token used its hourly write budget (30 structural, 120 field edits). code RATE_LIMITED; wait Retry-After seconds, also in error.args.retryAfterSeconds. |
| 500 | DB_ERROR |
no | Unexpected server error. code DB_ERROR; quote error.id to support. |
| 503 | BILLING_UNAVAILABLE |
yes | Billing is temporarily unavailable, so the plan could not be checked. code BILLING_UNAVAILABLE. Retry later. |
Was this page helpful?