Mettre à jour le statut d’une action
curl --request PATCH \
--url https://www.qwairy.co/api/v1/brands/{brandId}/actions/{actionId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"status": "<string>"
}
'import requests
url = "https://www.qwairy.co/api/v1/brands/{brandId}/actions/{actionId}"
payload = { "status": "<string>" }
headers = {
"Authorization": "<authorization>",
"If-Match": "<if-match>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: '<authorization>',
'If-Match': '<if-match>',
'Content-Type': 'application/json'
},
body: JSON.stringify({status: '<string>'})
};
fetch('https://www.qwairy.co/api/v1/brands/{brandId}/actions/{actionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Actions
Mettre à jour le statut d’une action
Faites passer une recommandation du Centre d’actions à un autre statut, comme En cours ou Terminée, avec la version de l’action dans If-Match.
PATCH
https://www.qwairy.co
/
api
/
v1
/
brands
/
{brandId}
/
actions
/
{actionId}
Mettre à jour le statut d’une action
curl --request PATCH \
--url https://www.qwairy.co/api/v1/brands/{brandId}/actions/{actionId} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"status": "<string>"
}
'import requests
url = "https://www.qwairy.co/api/v1/brands/{brandId}/actions/{actionId}"
payload = { "status": "<string>" }
headers = {
"Authorization": "<authorization>",
"If-Match": "<if-match>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: '<authorization>',
'If-Match': '<if-match>',
'Content-Type': 'application/json'
},
body: JSON.stringify({status: '<string>'})
};
fetch('https://www.qwairy.co/api/v1/brands/{brandId}/actions/{actionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Fait passer une recommandation du Centre d’actions à un autre statut. Renvoyer le statut actuel ne change rien et renvoie l’action inchangée.
Nécessite une offre Business, Agency Business ou Enterprise active, et un jeton d’API dont l’accès en écriture a été activé par un Propriétaire ou un Manager. Consultez Écrire des données pour l’activation, l’idempotence, les requêtes conditionnelles et la gestion des erreurs.
Consultez Codes d’erreur pour les erreurs d’authentification, d’offre, d’idempotence et de serveur. Un jeton sans accès en écriture renvoie
La
version de l’action renvoyée par Lister les actions, entre guillemets. Utilisez * pour écrire sans condition.Identifiant de l’action renvoyé par Lister les actions.
Réponse
Renvoie200, le nouvel ETag et l’action, avec les mêmes champs que les éléments de Lister les actions plus version. La version est une valeur de concurrence opaque : copiez-la telle quelle.
Requête et réponse synthétiques
Cet exemple suppose que laversion de l’action que vous avez lue en dernier est 2.
curl -X PATCH "https://www.qwairy.co/api/v1/brands/$BRAND_ID/actions/$ACTION_ID" \
-H "Authorization: Bearer $QWAIRY_API_TOKEN" \
-H 'If-Match: "2"' \
-H "Content-Type: application/json" \
-d '{"status":"IN_PROGRESS"}'
{
"id": "66666666-0000-4000-8000-000000000000",
"type": "CONTENT_GAP",
"category": "CONTENT",
"sourceType": "QUESTION_GAP",
"scope": "ON_SITE",
"title": "Cover pricing questions on the pricing page",
"description": "Stored answers raise pricing questions that this page does not address.",
"sourceUrl": null,
"targetProvider": null,
"evidenceProviders": ["example-provider"],
"evidenceScope": "OBSERVED",
"forceTier": "HIGH",
"priorityScore": 53,
"demandBadge": 3,
"isQuickWin": false,
"effort": "MEDIUM",
"status": "IN_PROGRESS",
"signals": null,
"impactJustification": null,
"effortJustification": null,
"baselineMetric": null,
"targetMetric": null,
"questionId": null,
"checklist": [],
"createdAt": "2026-10-01T09:00:00.000Z",
"updatedAt": "2026-10-12T14:30:00.000Z",
"version": 3
}
Erreurs
| Statut | Code | Cause |
|---|---|---|
400 | INVALID_REQUEST | status absent ou inconnu |
404 | RESOURCE_NOT_FOUND | Le workspace ou l’action est absent ou inaccessible |
412 | PRECONDITION_FAILED | L’action a changé depuis votre lecture |
428 | PRECONDITION_REQUIRED | If-Match est absent |
403 API_KEY_READ_ONLY. Sur 429, respectez Retry-After. Si le limiteur d’écriture est indisponible ou si les écritures sont suspendues, la requête renvoie 503 SERVICE_UNAVAILABLE et rien ne change.
