Update improvement

PUT /api/v2/household/{HouseholdGUID}/assets/{AssetGUID}/improvements/{ImprovementGUID}

This endpoint allows users to update an improvement for a household asset.

Path parameters

  • HouseholdGUID string(uuid) Required

    The HouseholdGUID of the client.

  • AssetGUID string(uuid) Required

    The AssetGUID for the improvement you want to update.

  • ImprovementGUID string(uuid) Required

    The ImprovementGUID you want to update.

application/json

Body Required

  • TransactionType integer Required

    Value must be set to 10.

  • Description string Required

    Maximum length is 50.

  • TransactionAmount number(float) Required
  • AssetIncrease number(float) Required
  • StartBasis integer Required

    To retrieve a comprehensive list of acceptable values and their corresponding formatted values, you may make a request to the designated endpoint: /api/v2/household/{HouseholdGUID}/assets/improvements/options

  • StartEventGUID string(uuid) | null

    This field is required if the value of StartBasis = 4.

    To retrieve a comprehensive list of acceptable values and their corresponding formatted values, you may make a request to the designated endpoint: /api/v2/household/{HouseholdGUID}/assets/improvements/options

  • StartAge integer | null

    This field is required if the value of StartBasis = 2 or 7. StartAge must be in the future.

    Minimum value is 0, maximum value is 130.

  • StartDate string | null

    This field is required if the value of StartBasis = 3. StartDate should be in the future.

    Dates should be provided in the format "Y-m-d", where "Y" represents the year, "m" represents the month and "d" represents the day. For example, "2023-07-24" represents 24th July, 2023.

Responses

PUT /api/v2/household/{HouseholdGUID}/assets/{AssetGUID}/improvements/{ImprovementGUID}
curl \
 -X PUT https://api.fincalc.co.uk/api/v2/household/{HouseholdGUID}/assets/{AssetGUID}/improvements/{ImprovementGUID} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"TransactionType":10,"Description":"Our House","TransactionAmount":5000.1,"AssetIncrease":10000.1,"StartBasis":3,"StartEventGUID":"F3AAED8D-3A5F-44B5-BC6D-9E8C7646C9D7","StartAge":42,"StartDate":"2024-01-01"}'
Request examples
{
  "TransactionType": 10,
  "Description": "Our House",
  "TransactionAmount": 5000.1,
  "AssetIncrease": 10000.1,
  "StartBasis": 3,
  "StartEventGUID": "F3AAED8D-3A5F-44B5-BC6D-9E8C7646C9D7",
  "StartAge": 42,
  "StartDate": "2024-01-01"
}
Response examples (200)
{
  "success": true,
  "data": {
    "TransactionGUID": "E8F8B580-0D24-45B7-9DA1-8F11F64B6909",
    "TransactionType": 10,
    "AssetGUID": "4D09A1F6-035E-437F-9B45-842C789D9D9D",
    "Description": "Our House",
    "TransactionAmount": 5000.1,
    "AssetIncrease": 10000.1,
    "StartBasis": 3,
    "StartEventGUID": "F3AAED8D-3A5F-44B5-BC6D-9E8C7646C9D7",
    "StartAge": 42,
    "StartDate": "2024-01-01",
    "FormattedValues": {
      "AssetGUID": "Our House",
      "StartDate": "01/01/2024",
      "StartBasis": "Specific Date",
      "AssetIncrease": "£10,000",
      "TransactionType": "Asset Improvement",
      "TransactionAmount": "£5,000"
    }
  }
}
Response examples (403)
{
  "success": false,
  "message": "You do not have permission to edit the household."
}
Response examples (404)
{
  "success": false,
  "message": "Household not found."
}
Response examples (422)
{
  "success": false,
  "message": "Validation Error.",
  "data": {
    "ClientGUID": [
      "The client guid field is required."
    ]
  }
}
Response examples (500)
{
  "success": false,
  "message": "Failed to update the asset improvement."
}