Validate a payment-plan amount update of a recurring contract
Takes the same body as POST /v1/contract/update-recurring-contract-payment-plan-amount and answers 200 with the literal JSON null. A non-recurring contract answers 200 as well.
Use it to:
- Check that a new periodic fee passes the continuous-service revenue rule (37633) before applying it
Not for:
- Applying the change:
POST /v1/contract/update-recurring-contract-payment-plan-amount - Confirming that the contract is recurring: a non-recurring contract also answers 200
Rules across fields:
- R1: As the update: ProjectSubContractId should be a contract of ProjectId; not enforced.
Behaviour:
- Idempotent.
- Safe to retry. Writes nothing; repeatable.
- Side effect: None persisted.
- Changes are visible to the next read immediately.
Call first: GET /v1/project/get-all, GET /v1/contract
Next: POST /v1/contract/update-recurring-contract-payment-plan-amount
Not yet documented: behaviour → side effects; errors; examples.
curl -X POST "https://app3.timelog.com/your-account/api/v1/contract/validate-update-recurring-contract-payment-plan-amount" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"ProjectId": 123,
"ProjectSubContractId": 123,
"PaymentPlanAmount": 3.14
}'
import requests
import json
url = "https://app3.timelog.com/your-account/api/v1/contract/validate-update-recurring-contract-payment-plan-amount"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"ProjectId": 123,
"ProjectSubContractId": 123,
"PaymentPlanAmount": 3.14
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://app3.timelog.com/your-account/api/v1/contract/validate-update-recurring-contract-payment-plan-amount", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"ProjectId": 123,
"ProjectSubContractId": 123,
"PaymentPlanAmount": 3.14
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"ProjectId": 123,
"ProjectSubContractId": 123,
"PaymentPlanAmount": 3.14
}`)
req, err := http.NewRequest("POST", "https://app3.timelog.com/your-account/api/v1/contract/validate-update-recurring-contract-payment-plan-amount", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://app3.timelog.com/your-account/api/v1/contract/validate-update-recurring-contract-payment-plan-amount')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"ProjectId": 123,
"ProjectSubContractId": 123,
"PaymentPlanAmount": 3.14
}'
response = http.request(request)
puts response.body
"null"
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"Code": 100,
"Details": [],
"Message": "Unknown error occur in system, please contact system administrator.",
"Parameters": "model: {"ProjectId":0,"ProjectSubContractId":0,"PaymentPlanAmount":0.0}",
"Url": "https://app{server-number}.timelog.com/{account}/api/v1/contract/validate-update-recurring-contract-payment-plan-amount"
}
/v1/contract/validate-update-recurring-contract-payment-plan-amount
Target server for requests. Edit to use your own host.
OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp).
The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user.
> Not yet documented: how to obtain a token.
> Not yet documented: token lifetime.
Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp).
The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user.
> Not yet documented: how to obtain a token.
> Not yet documented: token lifetime.The media type of the request body
The project the contract belongs to. Used only as the save context (budget sync, multi-customer handling, recalculation); it is NOT checked against the contract's own project. An unknown or 0 value fails with a 500 (captured for 0).
Refers to ProjectRead.ProjectID. Look up valid values with GET /v1/project/get-all.
- 0 / omitted / unknown — 500 Code 100, no 400.
- An existing project that is not the contract's project — Accepted; the save runs with that project as context.
Valid values come from GET /v1/project/get-all.
The contract to update (ContractID in ContractRead). Unknown or 0 fails with a 500.
Refers to ContractRead.ContractID. Look up valid values with GET /v1/contract.
- 0 / omitted / unknown — 500 Code 100.
- A contract that is not model 4, 7 or 8 (not recurring) — Nothing changes; 200.
Valid values come from GET /v1/contract.
The contract's new payment-plan amount (the fixed price per recurrence period), in the project currency. The server also sets the contract's BudgetWorkAmount = round(PaymentPlanAmount / RecurrenceMonth, 2, away from zero) — the per-month work budget. No range, sign or decimal check. Unit: project currency, per recurrence period - Model 7 or 8 — PaymentPlanAmount stored; BudgetWorkAmount derived. - Model 7 (continuous service) — 37633 when round(amount / months, 2) differs from the contract's allocated budget amount — 'You must allocate all revenue amount to proceed.' - Omitted — 0 is applied (non-nullable). > Not yet documented: constraints → unit.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp).
The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user.
Not yet documented: how to obtain a token.
Not yet documented: token lifetime.
Body
The project the contract belongs to. Used only as the save context (budget sync, multi-customer handling, recalculation); it is NOT checked against the contract's own project. An unknown or 0 value fails with a 500 (captured for 0).
Refers to ProjectRead.ProjectID. Look up valid values with GET /v1/project/get-all.
-
0 / omitted / unknown — 500 Code 100, no 400.
-
An existing project that is not the contract's project — Accepted; the save runs with that project as context.
Valid values come from GET /v1/project/get-all.
The contract to update (ContractID in ContractRead). Unknown or 0 fails with a 500.
Refers to ContractRead.ContractID. Look up valid values with GET /v1/contract.
-
0 / omitted / unknown — 500 Code 100.
-
A contract that is not model 4, 7 or 8 (not recurring) — Nothing changes; 200.
Valid values come from GET /v1/contract.
The contract's new payment-plan amount (the fixed price per recurrence period), in the project currency. The server also sets the contract's BudgetWorkAmount = round(PaymentPlanAmount / RecurrenceMonth, 2, away from zero) — the per-month work budget. No range, sign or decimal check.
Unit: project currency, per recurrence period
-
Model 7 or 8 — PaymentPlanAmount stored; BudgetWorkAmount derived.
-
Model 7 (continuous service) — 37633 when round(amount / months, 2) differs from the contract's allocated budget amount — 'You must allocate all revenue amount to proceed.'
-
Omitted — 0 is applied (non-nullable).
Not yet documented: constraints → unit.
Responses
Success without content: HTTP 200 with the literal JSON body null. Literal JSON null (TafSuccessResult) — also when the contract is not recurring and nothing was checked.