Difference between revisions of "GDelete Specific Opportunity"
Ashley DeBon (talk | contribs) (Created page with "== Remove Opportunity == === Base URL === https://apimobile.callproof.com === Endpoint === /api/opportunities/{id} === Purpose === Deletes a specific opportunity and its re...") |
Ashley DeBon (talk | contribs) (→Successful Response (200)) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | == Remove Opportunity == | + | == [[Mobile_API]] »Remove Opportunity == |
=== Base URL === | === Base URL === | ||
| Line 37: | Line 37: | ||
==== Request Body ==== | ==== Request Body ==== | ||
None. | None. | ||
| + | |||
| + | === cURL Example for Android === | ||
| + | |||
| + | <pre> curl --location --request DELETE 'https://apimobile.callproof.com/api/opportunities/YOUR_OPPORTUNITY_ID' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' </pre> | ||
| + | |||
| + | === cURL Example for iOS === | ||
| + | |||
| + | <pre> curl --location --request DELETE 'https://apimobile.callproof.com/api/opportunities/YOUR_OPPORTUNITY_ID' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' </pre> | ||
=== Successful Response (200) === | === Successful Response (200) === | ||
Latest revision as of 08:07, 21 July 2026
Contents
Mobile_API »Remove Opportunity
Base URL
https://apimobile.callproof.com
Endpoint
/api/opportunities/{id}
Purpose
Deletes a specific opportunity and its related records, including linked contacts, history, personnel, and reassignment data.
HTTP Method
DELETE
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer access token |
Security
- Yes – Requires Bearer Token authentication.
Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | Unique identifier of the opportunity to delete |
Query Parameters
None.
Request Body
None.
cURL Example for Android
curl --location --request DELETE 'https://apimobile.callproof.com/api/opportunities/YOUR_OPPORTUNITY_ID' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
cURL Example for iOS
curl --location --request DELETE 'https://apimobile.callproof.com/api/opportunities/YOUR_OPPORTUNITY_ID' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Successful Response (200)
Indicates that the opportunity was deleted successfully.
| Field | Type | Description |
|---|---|---|
| clientStatusCode | integer | Status indicator for the client (for example, 200) |
| user_id | integer | Identifier of the authenticated user |
| company_id | integer | Identifier of the authenticated user’s company |
| message | string | Confirmation message (for example, "The selected opportunity was successfully deleted.") |
| uri | string | Requested resource URI |
Error Responses
| Status Code | Meaning |
|---|---|
| 400 | Bad Request – the opportunity could not be deleted |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- 400 – Invalid opportunity ID ("Opportunity Id is Invalid"), opportunity not found ("Opportunity Not Found"), or another delete error (for example, "Error while removing the Contact Opportunities").
- 401 – Authentication failed or the access token is missing/expired.