Skip to main content

Create a Spending Plan Iteration Item

Use this endpoint to create a new spending_plan_iteration_item.

POST
/users/{user_guid}/spending_plans/{spending_plan_guid}/iterations/current/iteration_items

Parameters

FieldRequiredType

category_guid

The category of the iteration_item.

Optional
String

item_type

The type of the iteration item. 0 = RECURRING_EXPENSE, 1 = PLANNED_EXPENSE, 2 = OTHER_EXPENSE, 3 = INCOME.

Optional
String

planned_amount

The amount planned for the iteration_item.

Required
Decimal

scheduled_payment_guid

The scheduled payment of the iteration_item.

Optional
String

top_level_category_guid

The parent category of the iteration_item.

Optional
String

Request sample

Language:shell

_10
curl -i -X POST 'https://int-api.mx.com/users/USR-11141024-90b3-1bce-cac9-c06ced52ab4c/spending_plans/SPL-dbfe201d-c341-4bff-93c0-62a918d0b600/iterations/current/iteration_items' \
_10
-u 'client_id:api_key' \
_10
-H 'Accept: application/vnd.mx.api.v2beta+json' \
_10
-H 'Content-Type: application/json' \
_10
-d '{
_10
"iteration_item": {
_10
"planned_amount": 110
_10
}
_10
}'

Response sample

200
Language:json

_16
{
_16
"iteration_item": {
_16
"created_at": "2023-05-16T16:12:57Z",
_16
"updated_at": "2023-05-16T16:12:57Z",
_16
"actual_amount": null,
_16
"category_guid": null,
_16
"guid": "SII-e34f7aee-8f7c-46fe-a88c-c6e3eadfca44",
_16
"item_type": null,
_16
"planned_amount": 110.0,
_16
"scheduled_payment_guid": null,
_16
"spending_plan_iteration_guid": "SPI-848e6648-3fa3-4632-ac8f-e65f03167102",
_16
"top_level_category_guid": null,
_16
"transaction_guids": null,
_16
"user_guid": "USR-72086f59-6684-4adf-8f29-c4d32db43cd7"
_16
}
_16
}