Passer au contenu
AchaduDevelopers
API opérationnelleAller sur le site Web ↗
Tableau de bord →
Developers/API/offer_update
Offres

Offre de mise à jour

Met à jour uniquement les champs soumis.

PATCH/offers/{id}offers:write
COMPORTEMENT

Le changement est validé et conservé dans le compte clé avant de répondre. Interrogez la ressource renvoyée comme source de vérité.

EFFET

Il peut modifier la ressource et émettre l'événement de domaine correspondant.

RÉPÉTITION

En cas de panne du réseau, confirmez l'état de la ressource avant de réessayer. Refaites automatiquement uniquement 429 et 5xx avec recul et gigue.

Demande

idstring · pathIdentificateur de ressource.minLength 2 · maxLength 100obligatoire
urlstring · bodyURL HTTPS d'origine du produit.uri · maxLength 2000facultatif
titlestring · bodyTitre public de l'offre.minLength 3 · maxLength 240facultatif
marketplacestring · bodyMarché source.maxLength 40facultatif
pricenumber · bodyPrix actuel.facultatif
original_pricenumber · bodyPrix précédent.facultatif
currencystring · bodyMonnaie ISO 4217.minLength 3 · maxLength 8 · default BRLfacultatif
imagestring · bodyURL HTTPS de l'image.urifacultatif
storestring · bodyNom du magasin.facultatif
categorystring · bodyCatégorie.facultatif
couponstring · bodyCode promo.facultatif
copystring · bodyTexte éditorial de l'offre.maxLength 6000facultatif
statusstring · bodyStatut organisé.facultatif
AuthorizationBearer ach_live_...
Acceptapplication/json
Portéeoffers:write

Exemple d'exécutable

curl
curl -X PATCH 'https://achadu.com/api/v1/offers/resource_id' \
  -H 'Authorization: Bearer ach_live_...' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "url": "https://example.com/product",
  "title": "Air fryer 5L",
  "marketplace": "string"
}'

Réponse et erreurs

Chaque réponse inclut request_id. Les listes ajoutent une pagination ; les ressources mutables renvoient l'état persistant après l'opération.

200 application/json
{
  "data": {
    "id": "off_01J...",
    "marketplace": "amazon",
    "title": "Air fryer 5L",
    "url": "https://example.com/product",
    "price": 329.9,
    "currency": "BRL",
    "review_status": "pending",
    "created_at": "2026-08-31T18:20:00.000Z"
  },
  "request_id": "req_01J..."
}
200Opération terminée.
400Paramètre, corps ou transition non valide.
401Clé manquante, invalide, expirée ou révoquée.
402Le plan de compte ne libère pas cette interface.
403A chave precisa do escopo offers:write.
404La fonctionnalité n'existe pas dans ce compte.
409L'état actuel empêche cette opération.
413Le corps JSON dépasse 128 Ko.
429La fenêtre de 120 requêtes par minute a été dépassée.