Create or Update an Expenditure

POST /api/v1/client/{client_uuid}/expenditure/{lifeStage_uuid}/{lifeStageField_uuid}

This endpoint creates an individual expenditure for a client.

Headers

Path parameters

application/json

Body Required

  • amount integer Required

    The amount of the expenditure in pennies.

Responses

POST /api/v1/client/{client_uuid}/expenditure/{lifeStage_uuid}/{lifeStageField_uuid}
curl \
 -X POST https://api.plannrcrm.com/api/v1/client/f6aa1670-dcf0-484e-a0c5-08590fe89a84/expenditure/dcf0-484e-a0c5-08590fe89a84-f6aa1670/dcf0-484e-a0c5-08590fe89a84-f6aa1670 \
 -H "Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}" \
 -H "Content-Type: application/json" \
 -H "Accept: application/json" \
 -d '{"amount":50000}'
Request examples
# Headers
Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}
Content-Type: application/json
Accept: application/json

# Payload
{
  "amount": 50000
}
Response examples (200)
{
  "name": "Electricity",
  "uuid": "3d755c86-4d2e-4329-85f1-1d2fe3eac22e",
  "amount": {
    "amount": {
      "example": "4000",
      "description": "Money amount at their lowest denominator (for example: pennies)"
    },
    "currency": {
      "example": "GBP",
      "description": "Currency of the money"
    },
    "formatted": {
      "example": "£40.00",
      "description": "Money amount formatted with currency"
    }
  },
  "section": "Housekeeping Expenses",
  "position": "1",
  "created_at": "2024-10-16T11:10:13+01:00",
  "updated_at": "2024-10-16T11:10:13+01:00",
  "life_stage_uuid": "91d6a2d0-0a99-45d2-ba88-c70080658f7b",
  "life_stage_field_uuid": "eb26a292-a6a9-46b9-a512-729ff5ab26f5",
  "life_stage_section_uuid": "43cf5777-51c6-4660-a37a-641a51b71a63"
}