Skip to content

HTTP PATCH

Type: http-patch  ·  Package: HTTP Activities v1.0.0  ·  Output: ZoanHttpResponse

Send a PATCH request to partially update a resource: you only send the fields that change, not the entire object. It is the most convenient way to modify a specific piece of information — change a status, update a phone — without resending the entire record.

Same as PUT, but you send only the fields to modify in body. The API updates those fields and leaves the rest intact. Returns a ZoanHttpResponse. Fails if the server responds with an error — see error handling.

ParameterEditorDescription
urlexpressionThe URL of the resource to update.
bodyexpressionOnly the fields that change (object → JSON, or text).
ParameterEditorDescription
contentTypetextContent type. Por defecto application/json.
headersJSONDictionary of extra headers (name → value). See headers.
authorizationJSONAuthentication: bearer, basic or apikey. See authentication.

Returns a ZoanHttpResponse.

Change only the status of an order:

HTTP PATCH
url = = "https://api.erp.com/pedidos/" + pedidoId
body = { "estado": "despachado" }
authorization = { "type": "bearer", "token": = credential("api-erp").ToPlainText() }
→ output: resp