Create a withdrawal [DEPRECATED: Use transaction routes]

POST /api/v1/plans/{plan_uuid}/sub-accounts/{subAccount_uuid}/withdrawals

Headers

Path parameters

application/json

Body Required

  • type string Required

    The type of withdrawal. Available options: recurring and adhoc

  • The frequency of the withdrawal. Available options: daily, weekly, fortnightly, four_weekly, monthly, bimonthly, quarterly, biannually, annually, adhoc and one_off

  • The start date of a recurring withdrawal. Required if the withdrawal type is "recurring".

  • The end date of a recurring withdrawal. Required if the withdrawal type is "recurring".

  • The date the withdrawal was made. Required if the withdrawal type is "adhoc".

  • value integer Required

    The value of the withdrawal.

  • notes string

    Notes about the withdrawal.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • uuid string

      uuid of the withdrawal

    • datetime the withdrawal was created

    • datetime the withdrawal was updated

    • datetime the money was withdrawn

    • value object

      withdrawal value

      Additional properties are allowed.

POST /api/v1/plans/{plan_uuid}/sub-accounts/{subAccount_uuid}/withdrawals
curl \
 -X POST https://api.plannrcrm.com/api/v1/plans/plan_uuid/sub-accounts/subAccount_uuid/withdrawals \
 -H "Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}" \
 -H "Content-Type: application/json" \
 -H "Accept: application/json" \
 -d '{"type":"recurring","frequency":"monthly","started_at":"2024-10-20","ended_at":"2024-11-20","withdrawn_at":"2024-11-20","value":50000,"notes":"Example Notes"}'
Request examples
# Headers
Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}
Content-Type: application/json
Accept: application/json

# Payload
{
  "type": "recurring",
  "frequency": "monthly",
  "started_at": "2024-10-20",
  "ended_at": "2024-11-20",
  "withdrawn_at": "2024-11-20",
  "value": 50000,
  "notes": "Example Notes"
}
Response examples (200)
{
  "uuid": "0853851a-8d2c-4f9f-a8c6-a0afa0bb8d46",
  "value": {
    "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"
    }
  },
  "created_at": "2024-11-20T13:24:03+00:00",
  "updated_at": "2024-11-20T13:24:03+00:00",
  "withdrawn_at": "2024-11-20T13:24:03+00:00"
}