# Opt Out offer

This opt-out endpoint should be used when a customer has successfully purchased the partner's primary product, but declined the Offer of ancillary products (such as insurance) presented by XCover Elements.

The purpose of utilising the opt-out workflow is so Cover Genius can demonstrate conversion rate to the regulators, ensuring the product and pricing are fit for purpose. It also enables the XCover machine learning platform to deliver the optimal products and prices.

## POST /api/partners/{partner\_id}/offers/{offer\_id}/opt-out

> Opt-out offer

```json
{"openapi":"3.0.0","info":{"title":"Offers","version":"1.0.0"},"tags":[{"name":"Opt-out offer","description":"This opt-out endpoint should be used when a customer has successfully purchased the partner's primary product, but declined the Offer of ancillary products (such as insurance) presented by XCover Elements.\n\nThe purpose of utilising the opt-out workflow is so Cover Genius can demonstrate conversion rate to the regulators, ensuring the product and pricing are fit for purpose. It also enables the XCover machine learning platform to deliver the optimal products and prices.\n"}],"servers":[{"url":"https://api.xone.xcover.com"}],"security":[{"PartnerPrivateAPI":["offers:update"]}],"components":{"securitySchemes":{"PartnerPrivateAPI":{"type":"oauth2","description":"# XONE API Access Token\n\nTo get started with the XONE API, you'll first need to obtain an access token. \nThis token acts as a digital key, granting your application permission to make API calls.\n\nThis process uses the **OAuth 2.0 Client Credentials Grant flow**. You'll use your unique client ID and client secret to request a token, which you then include in subsequent API requests.\n\n## 🔑 Authentication Steps\n\n* **Request Token:** Send a \"Retrieve Token\" request to the XONE authorization server's token endpoint.\n* **Include Credentials:** In the request body, provide your `client_id` and `client_secret` as a JSON object.\n* **Use Token:** The server will respond with an `access_token` that you can now use to authenticate your API calls by including it in the **Authorization** header as a `Bearer` token.\n","flows":{"clientCredentials":{"tokenUrl":"https://api.xone.xcover.com/api/oauth/token","scopes":{"quotes:view":"Read-only access to view quote details.","quotes:update":"Permission to opt-out quotes.","offers:view":"Read-only access to view offer details.","offers:update":"Permission to opt-out existing offers.","offers:delete":"Permission to cancel an existing booking of an offer.","bookings:create":"Ability to create new bookings for quotes.","bookings:view":"Read-only access to view booking details.","bookings:update":"Permission to modify existing bookings.","bookings:delete":"Permission to cancel bookings."}}}}}},"paths":{"/api/partners/{partner_id}/offers/{offer_id}/opt-out":{"post":{"summary":"Opt-out offer","tags":["Opt-out offer"],"responses":{"200":{"description":"200 OK"},"401":{"description":"401 Unauthorized","headers":{"Date":{"schema":{"deprecated":false}},"Transfer-Encoding":{"schema":{"deprecated":false}},"Connection":{"schema":{"deprecated":false}},"Cache-Control":{"schema":{"deprecated":false}},"Vary":{"schema":{"deprecated":false}},"X-Content-Type-Options":{"schema":{"deprecated":false}},"X-XSS-Protection":{"schema":{"deprecated":false}},"Strict-Transport-Security":{"schema":{"deprecated":false}},"CF-Cache-Status":{"schema":{"deprecated":false}},"Server":{"schema":{"deprecated":false}},"CF-RAY":{"schema":{"deprecated":false}},"Server-Timing":{"schema":{"deprecated":false}},"Cf-Team":{"schema":{"deprecated":false}}},"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customer":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"country":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"address1":{"type":"string"},"address2":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"postcode":{"type":"string"}}}}}}}}}}}}
```
