Logo
Openapi.it Public API Documentation

{{baseUrl}}/requests

POST {{baseUrl}}/requests

Endpoint to instantiate a new service request. You can instantiate it (with 'state'='NEW') and then complete it via PATCH/requests or pass all the data immediately to have it processed by the system.

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
Content-Type
string
Accept
string




RESPONSES

status OK

{ "data": { "documentId": "6687eed51a241a5d1be0f9fa", "search": { "field0": "12485671007" }, "callback": { "url": "https://webhook.site/f24cec85-22e3-4f7c-8ec0-227b240daa42", "field": "data", "method": "POST", "headers": { "test_header": "some_string" }, "data": {} }, "timestamps": { "creation": 1724416377, "WAIT": 1724416377, "lastUpdate": 1724416393 }, "state": "WAIT", "readableSearch": { "taxCode": "12485671007" }, "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 POST 'baseUrl/requests' -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{"documentId":"\u003cstring\u003e","state":"\u003cstring\u003e","search":{"field0":"\u003cstring\u003e","fieldN":"\u003cstring\u003e"},"callback":{"method":"\u003cstring\u003e","field":"\u003cstring\u003e","url":"\u003cstring\u003e","headers":{"key":"\u003cstring\u003e"},"data":"\u003cobject\u003e"},"notifyEmail":"\u003cstring\u003e","selectedOptions":["\u003cstring\u003e","\u003cstring\u003e"]}'

ENDPOINTS