HTTP PATCH
HTTP PATCH
Section titled “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.
How it works
Section titled “How it works”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.
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
url | expression | The URL of the resource to update. |
body | expression | Only the fields that change (object → JSON, or text). |
Optional parameters
Section titled “Optional parameters”| Parameter | Editor | Description |
|---|---|---|
contentType | text | Content type. Por defecto application/json. |
headers | JSON | Dictionary of extra headers (name → value). See headers. |
authorization | JSON | Authentication: bearer, basic or apikey. See authentication. |
Output
Section titled “Output”Returns a ZoanHttpResponse.
Example
Section titled “Example”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