Logo
Openapi.it Public API Documentation

{{baseUrl}}/requests/:id

PATCH {{baseUrl}}/requests/:id

This endpoint allows you to modify some fields of the request and then close it (when the reqeust has state NEW) or to select a result produced by the search (in documents that 'hasSearch'=true)

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
Content-Type
string
Accept
string




RESPONSES

status OK

{ "data": { "documentId": "6687eed51a241a5d1be0f9fa", "search": { "field0": "12485671666" }, "callback": { "url": "https://webhook.site/f24cec85-22e3-4f7c-8ec0-227b240daa42", "field": "data", "method": "POST", "headers": { "test_header": "some_string" }, "data": {} }, "timestamps": { "creation": 1724416377, "NEW": 1724416377, "WAIT": 1724416377, "lastUpdate": 1724416393 }, "state": "WAIT", "readableSearch": { "taxCode": "12485671666" }, "optionsPrice": 0, "selectedOptions": null, "notifyEmail": null, "name": "Statuto", "hasSearch": false, "searchPrice": 0, "documentPrice": 4.9, "totalPrice": 4.9, "documents": null, "resultId": null, "results": null, "id": "66c881896de559cb65055392" }, "success": true, "message": "", "error": null }



Curl
curl -X PATCH 'baseUrl/requests/:id' -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{"state":"\u003cstring\u003e","search":{"field0":"\u003cstring\u003e","fieldN":"\u003cstring\u003e"},"search.fieldN":"\u003cstring\u003e","notifyEmail":"\u003cstring\u003e","callback":{"method":"\u003cstring\u003e","field":"\u003cstring\u003e","url":"\u003cstring\u003e","headers":{"key":"\u003cstring\u003e"},"data":"\u003cobject\u003e"},"selectedOptions":["\u003cstring\u003e","\u003cstring\u003e"]}'

ENDPOINTS