HomeGuidesAPI ReferenceChangelog
Terms of Use
API Reference

Partner discount change / Update

⚠️ Experimental endpoint — not yet a stable contract. This resource ships as experimental / beta. While experimental, its schema and behaviour may change without a version bump — including breaking changes within v2.0 itself. Anyone consuming it does so for evaluation only, or by coordinating adoption with their account manager so changes can be sequenced with them. It graduates to a stable, version-locked contract (where the normal breaking-change rules apply) only when this experimental notice is removed.

Partially edit a scheduled or active change under the current stored state. Omitted properties are preserved; only endsAt and note can be cleared with null. Unchanged active start and discount values are accepted. An empty or semantically identical edit leaves timestamps, actor, reason and audit unchanged, even when a scheduled start is due but not processed. Effective edits record the administrator and clear the automatic reason. Invalid supplied fields, conditional revert combinations and clearing an active end return 422 with API field names. For effective edits, an invalid startsAt or endsAt supplied in the request returns 422; when only an omitted stored timestamp blocks the edit, the response is 409 without field-validation errors. If both supplied and omitted timestamps fail validation, the supplied-field errors return 422. Disabled billing, terminal states and changed active start or discount return 409. Overlap returns 409 with message Another scheduled discount change already covers this period.

Required permission: Partners.update on the visible parent partner. Missing, out-of-scope or wrong-parent identifiers return 404; a visible partner without edit permission returns 403.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
integer
required

Partner ID.

integer
required

Discount change ID.

Body Params

Partial edit of a scheduled or active change. Omission preserves each stored value. Only endsAt and note accept explicit null. A revertDiscount without an effective end is invalid. Active startsAt and discount cannot change, but numerically identical percentages and equivalent UTC start instants are accepted. Empty or semantically identical edits preserve timestamps, actor, reason and audit history, including due-but-unprocessed scheduled changes. Malformed input and prohibited combinations remain invalid. Effective scheduled edits require a future start and validate the entire resulting period. An invalid supplied startsAt or endsAt returns 422 with that API field's validation errors; an edit blocked only by an omitted stored timestamp returns 409 without field-validation errors. Supplied-field validation errors take precedence when both supplied and omitted timestamps are invalid. Terminal states and disabled corporate billing reject even a no-op. Effective edits record the administrator and clear the automatic reason.

date-time | null

Omit to preserve. Only explicit null clears the end and revert discount of a scheduled change; do not also send revertDiscount. Empty or whitespace-only timestamps are invalid. An active change's end cannot be cleared. A value must be a valid ISO 8601 timestamp with an explicit timezone or offset, zero seconds and zero fractional seconds. Adding an end to a permanent change requires revertDiscount in the same request. An effective active edit requires a future end. Values are converted to UTC.

string | null

Omit to preserve, send null or an empty string to clear, or send a nonempty string to replace the note.

number
0 to 100

Discount percentage, with at most two decimal places. Must be a JSON number, not a string.

date-time

Start timestamp. Requests must use a valid ISO 8601 timestamp with an explicit timezone or offset and minute precision (zero seconds and zero fractional seconds). Values are converted to UTC; responses use UTC.

number
0 to 100

Discount percentage to apply when the limited change ends, with at most two decimal places. Must be a JSON number, not a string. Required when creating a limited change; omitted for permanent changes. May be omitted in incomplete historical records.

Responses

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json