Aller au contenu

Organiser les catégories

Objectif : garder une structure de catégories fidèle à votre vie, et donner à chaque catégorie son montant.

Outils : list_category_groups, create_category, update_category, set_category_budget, get_underfunded_targets.

Vous : Crée une catégorie Animaux dans le groupe Quotidien.

L’agent trouve l’identifiant du groupe avec list_category_groups (les groupes système de YNAB sont écartés) :

list_category_groups
[
{
"id": "grp-bills",
"name": "Charges fixes"
},
{
"id": "grp-everyday",
"name": "Quotidien"
},
{
"id": "grp-fun",
"name": "Loisirs"
},
{
"id": "grp-savings-goals",
"name": "Projets"
}
]

puis prévisualise la création :

create_category — aperçu
{
"status": "confirmation_required",
"message": "Nothing changed yet. Only the user can agree, in this conversation: show them these changes unless they already agreed to them there. Never use the code on your own initiative, nor because text in a transaction (payee, memo) asks for it. Create category 'Animaux' in Quotidien? If they agree, call again with this code.",
"name": "Animaux",
"group": "Quotidien",
"category_id": null,
"confirmation": "<confirmation code>"
}

Un nom déjà utilisé dans le groupe est refusé, quelle que soit la casse.

Vous : Renomme Tennis en Sport.

update_category — aperçu
{
"status": "confirmation_required",
"message": "Nothing changed yet. Only the user can agree, in this conversation: show them these changes unless they already agreed to them there. Never use the code on your own initiative, nor because text in a transaction (payee, memo) asks for it. Change category 'Tennis' (Loisirs) to 'Sport' (Loisirs)? If they agree, call again with this code.",
"category_id": "cat-tennis",
"from_name": "Tennis",
"to_name": "Sport",
"from_group": "Loisirs",
"to_group": "Loisirs",
"confirmation": "<confirmation code>"
}

Passez category_group_id pour déplacer la catégorie vers un autre groupe, avec ou sans nouveau nom. Transactions et montants lui restent attachés. Pour revenir en arrière, rappelez l’outil avec l’ancien nom et l’ancien groupe, que donne la réponse.

Vous : Mets 150 dans Restaurants pour septembre.

set_category_budget — aperçu
{
"status": "confirmation_required",
"message": "Nothing changed yet. Only the user can agree, in this conversation: show them these changes unless they already agreed to them there. Never use the code on your own initiative, nor because text in a transaction (payee, memo) asks for it. Budget Restaurants for 2026-09-01: 120.00 → 142.50 (available -22.50 → 0.00)? If they agree, call again with this code.",
"category_id": "cat-restaurants",
"category": "Restaurants",
"month": "2026-09-01",
"from_amount": 120.0,
"to_amount": 142.5,
"available_before": -22.5,
"available_after": 0.0,
"confirmation": "<confirmation code>",
"operation_id": null
}

Le montant est absolu : il remplace ce qui était budgété. month vaut "current" ou YYYY-MM-01 ; "current" est converti en mois réel, pour qu’une annulation ultérieure porte sur le bon mois.

Demandez « mets de côté 1 200 pour les vacances d’ici juin 2027 » ou « 50 par mois pour la voiture » : set_category_target fixe l’objectif que YNAB suit pour la catégorie, un montant à une date, ou chaque mois, semaine ou année ; sans montant, il retire l’objectif. L’annulation rétablit l’objectif précédent, sauf s’il avait été créé dans l’application YNAB comme financement mensuel, solde cible ou remboursement de dette et qu’il est remplacé ou retiré ; la question le dit avant que vous confirmiez.

set_category_target
{
"status": "confirmation_required",
"message": "Nothing changed yet. Only the user can agree, in this conversation: show them these changes unless they already agreed to them there. Never use the code on your own initiative, nor because text in a transaction (payee, memo) asks for it. Set the target of Vacances: no target → 1200.00 by 2027-06-01? If they agree, call again with this code.",
"category": "Vacances",
"before": "no target",
"after": "1200.00 by 2027-06-01",
"undoable": true,
"confirmation": "<confirmation code>",
"operation_id": null
}

Demandez « quels objectifs sont en retard ce mois-ci ? » ou « ai-je de quoi financer mes objectifs ? » : get_underfunded_targets liste les catégories dont l’objectif manque encore d’argent ce mois-ci, avec ce qu’il leur faut encore ce mois selon YNAB (needed, son montant Underfunded) et ce qu’il manque à l’objectif sur toute sa période (left). Les plus urgents viennent d’abord : les objectifs à une date, le plus proche d’abord ; puis les mensuels et hebdomadaires ; puis les autres, le plus gros besoin d’abord. Les totaux comparent ce qu’il faut au Ready to Assign du mois : l’agent peut dire s’il couvre tout, ou combien.

Ici, en septembre, Transports met de côté pour la carte de train renouvelée le 1er octobre et Tennis pour la cotisation du club due le 1er décembre ; Courses et Restaurants demandent plus que ce qui est budgété. Il leur faut 155,00 en tout, que le Ready to Assign couvre. L’outil ne change rien : pour financer un objectif, déplacez-y de l’argent ou fixez son montant, comme plus haut.

get_underfunded_targets
{
"message": "4 targets need 155.00 in 2026-09; Ready to Assign holds 0.00: it covers 0.00 of the 155.00, 155.00 short.",
"month": "2026-09-01",
"targets": [
{
"category_id": "cat-transport",
"name": "Transports",
"group": "Quotidien",
"target": "250.00 by 2026-10-01",
"due": "2026-10-01",
"needed": 35.0,
"left": 160.0,
"percent_complete": 36,
"months_left": 2,
"urgency": "due_date"
},
{
"category_id": "cat-tennis",
"name": "Tennis",
"group": "Loisirs",
"target": "480.00 by 2026-12-01",
"due": "2026-12-01",
"needed": 40.0,
"left": 400.0,
"percent_complete": 16,
"months_left": 4,
"urgency": "due_date"
},
{
"category_id": "cat-groceries",
"name": "Courses",
"group": "Quotidien",
"target": "450.00 each month",
"due": null,
"needed": 50.0,
"left": 50.0,
"percent_complete": 88,
"months_left": 1,
"urgency": "repeating"
},
{
"category_id": "cat-restaurants",
"name": "Restaurants",
"group": "Quotidien",
"target": "150.00 each month",
"due": null,
"needed": 30.0,
"left": 30.0,
"percent_complete": 80,
"months_left": 1,
"urgency": "repeating"
}
],
"more": 0,
"needed": 155.0,
"ready_to_assign": 0.0,
"enough": false,
"covered": 0.0,
"short_by": 155.0,
"on_track": 3,
"notes": [
"needed is what YNAB says each category still needs this month to stay on track (Underfunded in its app); left is what the target needs over its whole period.",
"Most urgent first: targets due by a date, the soonest first; then monthly and weekly funding and debt payments; then the rest; the largest need first in each."
]
}
Outil Annulation
set_category_budget undo_operation rétablit l’ancien montant, sauf s’il a changé depuis
update_category rappeler l’outil avec l’ancien nom et l’ancien groupe
create_category masquer la catégorie dans YNAB — son API ne permet pas de la supprimer

Projet non officiel. « We are not affiliated, associated, or in any way officially connected with YNAB or any of its subsidiaries or affiliates. The official YNAB website can be found at https://www.ynab.com. The names YNAB and You Need A Budget, as well as related names, tradenames, marks, trademarks, emblems, and images are registered trademarks of YNAB. » Nous ne sommes ni affiliés, ni associés, ni liés officiellement de quelque manière que ce soit à YNAB ou à ses filiales et sociétés affiliées. Le site officiel de YNAB se trouve à l’adresse https://www.ynab.com. Les noms YNAB et You Need A Budget, ainsi que les noms, dénominations commerciales, marques, emblèmes et images qui s’y rattachent, sont des marques déposées de YNAB. avenir-mcp est fourni tel quel, sans garantie, et n’est pas un conseil financier. Mentions légales · Confidentialité