Skip to main content
Version: Next

Update subscription

Via the API, you can amend a subscription for a given user.

Endpoint Url

EnvironmentUrl
Sandboxhttps://partners-sandbox.ftmtapi.com/subscription/update
Prodhttps://partners.ftmtapi.com/subscription/update

Request

FieldTypeDescriptionRequiredFormat
emailstringThe email address of the user (unique ID).Yes
paymentPlannumberThe periodicity of the subscription (months)No1, 6 or 12
planStartDatestringWhen is the program supposed to startNoYYYY-MM-DD
subscriptionStatusstringThe status of the subscriptionNoactive, cancelled or paused

Payload example

const payload = {
email: 'jane@doe.com',
paymentPlan: 6,
planStartDate: '2023-12-30',
}

Response

Response is always in JSON format.

{
"message": "update request received",
"email": "jane@doe.com"
}

Example call when you want to change the subscription plan

const axios = require('axios');

const res = await axios({
url: 'https://partners.ftmtapi.com/subscription/update',
method: 'post',
data: {
email: 'jane@doe.com',
paymentPlan: 12,
},
headers: {
Authorization: 'Bearer <YOUR_API_KEY>',
'Fitmate-Version': '2023-10-04',
}
});