{"_id":"5c370457a6fcb043e431fdc9","project":"56e29a8dd3b68d0e00b48ffa","version":{"_id":"56e29a8dd3b68d0e00b48ffd","hasReference":true,"project":"56e29a8dd3b68d0e00b48ffa","__v":15,"hasDoc":true,"createdAt":"2016-03-11T10:14:37.460Z","releaseDate":"2016-03-11T10:14:37.460Z","categories":["56e29a8ed3b68d0e00b48ffe","56eb917a2e58011700afdfcc","56eb92252109011700f3ba5e","5704d4af849f721900f27835","57052a31473f900e004d5d54","5715222811537f19006aab2d","5715b57b810df00e00cc7832","5715baa9810df00e00cc7837","57180ed83a17770e009a7322","571810273a17770e009a7325","579b22d3f4ad7b190094b60e","584538ecba4f1c0f0096925e","586bb88e5602870f00ae7177","5a70407fb0a01400369583c5","5ace359e40606a0003eac1de"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"category":{"_id":"5715baa9810df00e00cc7837","project":"56e29a8dd3b68d0e00b48ffa","__v":0,"version":"56e29a8dd3b68d0e00b48ffd","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-04-19T04:57:13.380Z","from_sync":false,"order":6,"slug":"coverage","title":"Covers"},"user":"58bedd212710c31b004150db","__v":17,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-01-10T08:37:43.172Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"id\":\"871d188b-b7ee-482f-991e-5cbf697e023c\",\n  \"status\":\"Pending\",\n  \"coverage\":{\n    \"currency\":\"EUR\",\n    \"quotedAt\":\"2019-01-10T08:56:11Z\",\n    \"duration\":29,\n    \"bpsperday\":2.9540229885057471264367816093,\n    \"coverPrice\":12.85,\n    \"serviceFee\":2.77,\n    \"vat\":0.46\n  },\n  \"sellerId\":\"b4d3ea48-5281-4dc9-971b-6e96f08b8ab2\",\n  \"buyerId\":\"5c0541c0-bde8-40a7-a6b5-63584ac006be\",\n  \"invoice\":{\n    \"Amount\":1500,\n    \"Currency\":\"eur\",\n    \"DueAt\":\"2019-02-19T08:55:43Z\",\n    \"IssuedAt\":\"2019-01-21T08:55:43Z\",\n    \"Number\":\"001\"\n  }\n}","name":""},{"status":422,"language":"json","code":"{\"Code\":1033,\"Message\":\"Cover amount at activation should be equal or lower than the one at quote.\",\"Description\":null,\"DocUrl\":\"\"}","name":""},{"code":"{\"Code\":1029,\"Message\":\"Cover duration of the quote cannot be higher than the maximum cover duration allowed by the policy.\",\"Description\":null,\"DocUrl\":\"\"}","language":"json","status":422}]},"settings":"","examples":{"codes":[{"code":"<?php\n\nHttpRequest::methodRegister('PATCH');\n$request = new HttpRequest();\n$request->setUrl('https://ehda-rel-proxy.azurewebsites.net/v2/coverage/871d188b-b7ee-482f-991e-5cbf697e023c');\n$request->setMethod(HttpRequest::HTTP_METH_PATCH);\n\n$request->setHeaders(array(\n  'Postman-Token' => 'c2141a77-7e6b-4718-b2b2-75493c99f67c',\n  'cache-control' => 'no-cache',\n  'Content-Type' => 'application/json',\n  'apikey' => 'lT0i45cXthhPCvJFoo9RBu0Lk1dEFGlSqGuMcWZBClZHFbBzc1RhKvOGZ6Wc'\n));\n\n$request->setBody('{\n\t\"invoice\":{\n\t\t\"amount\": 1500,\n\t    \"dueDate\": \"2019-02-19T08:56:20.582Z\",\n\t    \"issuedDate\": \"2019-01-30T08:56:20.582Z\"\t\n\t}\n    \n}');\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}","language":"php"},{"code":"PATCH /v2/coverage/871d188b-b7ee-482f-991e-5cbf697e023c HTTP/1.1\nHost: ehda-rel-proxy.azurewebsites.net\napikey: lT0i45cXthhPCvJFoo9RBu0Lk1dEFGlSqGuMcWZBClZHFbBzc1RhKvOGZ6Wc\nContent-Type: application/json\ncache-control: no-cache\nPostman-Token: 8908ecc3-3b5b-4dd7-9030-8af9718efd2f\n{\n\t\"invoice\":{\n\t\t\"amount\": 1500,\n\t    \"dueDate\": \"2019-02-19T08:56:20.582Z\",\n\t    \"issuedDate\": \"2019-01-30T08:56:20.582Z\"\t\n\t}\n    \n}------WebKitFormBoundary7MA4YWxkTrZu0gW--","language":"http"},{"code":"curl -X PATCH \\\n  https://ehda-rel-proxy.azurewebsites.net/v2/coverage/871d188b-b7ee-482f-991e-5cbf697e023c \\\n  -H 'Content-Type: application/json' \\\n  -H 'Postman-Token: 6c0d3dc7-bb09-48fc-92af-b09e44da66eb' \\\n  -H 'apikey: lT0i45cXthhPCvJFoo9RBu0Lk1dEFGlSqGuMcWZBClZHFbBzc1RhKvOGZ6Wc' \\\n  -H 'cache-control: no-cache' \\\n  -d '{\n\t\"invoice\":{\n\t\t\"amount\": 1500,\n\t    \"dueDate\": \"2019-02-19T08:56:20.582Z\",\n\t    \"issuedDate\": \"2019-01-30T08:56:20.582Z\"\t\n\t}\n    \n}'","language":"curl"}]},"method":"patch","auth":"required","params":[{"_id":"5c37063bdc78de433f4405fc","ref":"","in":"path","required":true,"desc":"The quote ID to update","default":"","type":"string","name":"id"},{"_id":"5c37063bdc78de433f4405fb","ref":"","in":"body","required":true,"desc":"JSON containing the quote attributs to update: amount, dueAt, issueAt","default":"","type":"object","name":"body"},{"_id":"5c37063bdc78de433f4405fa","ref":"","in":"header","required":true,"desc":"Your Coverage API Key, in the HTTP request headers.","default":"","type":"string","name":"apikey"}],"url":"/coverage/:id"},"isReference":true,"order":999,"body":"This service is not activated by default. It's provided to customers who don't have the invoice final details at the time of quote.\n\nIt can happen for some market places, when the invoices of the products sold are not created by the sellers at the time of the order but instead at the time of delivery. In that case,  some changes on the amount, issue date and due date can occur between the order and the delivery requiring the quote to be updated prior to activation.\n\nWhen the quote is updated the API checks:\n- That the new invoice amount, if provided, is equal or lower than the one at quote time. If not an exception is returned.\n- That the cover duration, if new issue and/or due dates are provided, is equal or lower than the one at quote time. If not an error is returned.","excerpt":"Updates some of the quote parameters such as the invoice amount, issue date and due date.","slug":"update-quote","type":"endpoint","title":"Update Quote"}

patchUpdate Quote

Updates some of the quote parameters such as the invoice amount, issue date and due date.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

id:
required
string
The quote ID to update

Body Params

body:
required
object
JSON containing the quote attributs to update: amount, dueAt, issueAt

Headers

apikey:
required
string
Your Coverage API Key, in the HTTP request headers.

Examples


Result Format


Documentation

This service is not activated by default. It's provided to customers who don't have the invoice final details at the time of quote. It can happen for some market places, when the invoices of the products sold are not created by the sellers at the time of the order but instead at the time of delivery. In that case, some changes on the amount, issue date and due date can occur between the order and the delivery requiring the quote to be updated prior to activation. When the quote is updated the API checks: - That the new invoice amount, if provided, is equal or lower than the one at quote time. If not an exception is returned. - That the cover duration, if new issue and/or due dates are provided, is equal or lower than the one at quote time. If not an error is returned.