Replace a quote
Replaces an existing quote record.
Method
PUT
Endpoint
{base_url}/quotes/{id}
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer | Required | Unique quote ID. |
Query parameters
None.
Headers
| Header | Required | Value |
|---|---|---|
Content-Type |
Required | application/json |
Request body
Send the complete quote object without the id.
Response body
Returns the updated quote.
Status codes
| Status code | Status | Description |
|---|---|---|
| 200 | OK | The quote was updated. |
| 400 | Bad Request | The request body is invalid. |
| 404 | Not Found | No quote exists with the specified ID. |
Example request
curl --request PUT "http://localhost:3000/quotes/3" \
--header "Content-Type: application/json" \
--data '{
"subscriberId": 1,
"healthQuoteText": "The greatest wealth is health. - Virgil",
"loveQuoteText": "",
"helpPplQuoteText": "Helping others creates lasting impact. - Quoteable Service",
"customQuote": false,
"customQuoteText": "",
"shareQuote": true,
"shareQuoteContact": "pepper.pots@stark.com"
}'
Example response
{
"subscriberId": 1,
"healthQuoteText": "The greatest wealth is health. - Virgil",
"loveQuoteText": "",
"helpPplQuoteText": "Helping others creates lasting impact. - Quoteable Service",
"customQuote": false,
"customQuoteText": "",
"shareQuote": true,
"shareQuoteContact": "pepper.pots@stark.com",
"id": 3
}