Partially update a membership (base value and promotional period). Only the fields sent in the body are changed; the change applies immediately and only to new sales.
Scope: idBranch only selects the branch the operation runs on — it never transfers the membership to another branch.
A membership outside the resolved branch answers 404 without exposing data from other branches.
API Pro is validated at the authenticated multilocation key level, as in every other endpoint.value updates the base value (VALOR_CONTRATO) of the membership identified in the route only — add-ons are
never changed through the main membership. To change the base value of an add-on, send a separate PATCH with
the add-on's own idMembership: that value is global and is reflected in every main membership that links it.
In the GET (and in this response) the value sent here is returned as baseValue; the value field of the GET
also adds the Fixed add-ons, so never send it back as the base value.
Calculated fields (totalValue, additionalMembershipsValue, calculatedTotalValue) are rejected in the body.
The response is the same membership object returned by GET v3/membership, including promotionalPeriod, and
the GET cache of this credential is refreshed right after the update.promotionalPeriod has no on/off flag — as in the EVO screen, a periodQuantity greater than zero puts the
membership on promotion and zero turns it off (the promotional values are then stored as 0). Fields omitted keep
their current value; periodType, applicationType and withRestriction default to what is already configured.
Putting the membership on promotion, or changing applicationType, requires the value of that applicationType
(promotionalTotalValue or principalPromotionalValue) in the same request; while already on promotion, partial
updates reuse the stored value. Value fields sent with periodQuantity zero are rejected.
periodQuantity follows the limits of the membership registration screen: up to 30 for Day and up to 999 for
Month. PerMembership requires periodType Month, and its principalPromotionalValue cannot exceed value — also
checked when only value is sent to a membership already on promotion PerMembership.
withRestriction true requires minimumStayPeriod and promotionalInstallments (already stored or sent in the same
request), both at least 2 as in the registration screen; with withRestriction false they are not accepted in
the body, and the stored values are kept.Editable fields: value and every field of promotionalPeriod (periodType, periodQuantity, withRestriction,
applicationType, promotionalTotalValue, principalPromotionalValue, additionalMemberships[].promotionalValue,
minimumStayPeriod, promotionalInstallments). Calculated, read-only: value of the GET, valuePromotionalPeriod,
promotionalPeriod.calculatedTotalValue, additionalMemberships[].defaultSaleValue and the legacy flat
promotional fields of the GET — sending totalValue, additionalMembershipsValue or calculatedTotalValue is a 400.Examples by key. Branch key (idBranch optional; when sent it must be the branch of the key):PATCH /api/v1/membership/100
{ "value": 179.90 }Central key (idBranch required, one of the central's branches) and General Admin key (idBranch required):PATCH /api/v1/membership/100?idBranch=12
{ "promotionalPeriod": { "periodType": "Month", "periodQuantity": 3, "withRestriction": false,
"applicationType": "Total", "promotionalTotalValue": 135.00 } }Promotion per membership, changing one add-on link only (the other links keep their values):{ "promotionalPeriod": { "applicationType": "PerMembership", "principalPromotionalValue": 100.00,
"additionalMemberships": [ { "idMembership": 23265, "promotionalValue": 5.00 } ] } }The same add-on can be linked once as Fixed and once as Optional. Without additionalType the item changes every
link of that idMembership; with it, only the link of that type, so each link can get its own value. additionalType
only selects the link — it never changes the link type. The same link cannot be sent twice (and an item without
additionalType cannot be combined with another item of the same idMembership):"additionalMemberships": [ { "idMembership": 23655, "additionalType": "Fixed", "promotionalValue": 10.00 },
{ "idMembership": 23655, "additionalType": "Optional", "promotionalValue": 15.00 } ]Restriction with minimum stay, and turning the promotion off:{ "promotionalPeriod": { "withRestriction": true, "minimumStayPeriod": 12, "promotionalInstallments": 3 } }
{ "promotionalPeriod": { "periodQuantity": 0 } }Responses: 200 with the resulting membership (same object as GET v3/membership). 400 when the body is
missing or idBranch is invalid for the key (HttpResponseError with the message), or when a field is rejected —
then the body is { "errors": [ { "key": "promotionalPeriod.periodQuantity", "value": "Must not exceed 30 when periodType is Day." } ] },
one item per field, nothing is saved. 401/403 follow the EVO API authentication and the ContratoEdicao role;
401 also when a Central or General Admin key has no access to the requested branch. 404 when the membership does not belong to
the resolved branch — the message never reveals data from other branches.
Requisição
Authorization
Basic Auth
Envie suas requisições HTTP com um cabeçalho
Authorization
que contenha a palavra Basic seguida por um espaço e uma string codificada em base64 username:password