Update Lead Status
patch
/appstore/publisher/v1/leads/{leadId}
When a lead is created, it will be in NEW status. it can be updated to one of the following supported statuses:
- CONTACTED : Once is customer is contacted by the partner, the status is updated to contacted.
- PURCHASED : when purchased is made on the requested application or service, the lead is moved to purchased status.
- DELIVERED: Once the requested application or service is delivered to customer, the status of the lead is updated to delivered
Request
Supported Media Types
- application/xml
- application/json
Path Parameters
-
leadId: integer(int64)
Unique identifier of lead for which the status is to be updated.
body must contain the status to which the lead has to be updated.
Response
Supported Media Types
- application/json;qs=1
- application/xml;qs=.5
200 Response
Successful Operation
400 Response
Bad Request/Invalid Parameter
401 Response
Not Authorized
500 Response
System Error
Examples
1.Update Lead status to Contacted
The following example updates the status of lead to contacted by submitting a PATCH request on the REST resource using cURL.
cURL Example
curl -X PATCH -H "X-Oracle-UserId: partner-email" -H "Authorization: Bearer Access-token" "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/leads/8006587"
Request Header
X-Oracle-UserId: fname.lname@oracle.com Authorization: Bearer Access-token
Request Body
{ "status":"CONTACTED" }
HTTP Status Code:
200 OK
JSON Response:
{ "message":"Status of lead successfully changed to Contacted", "entityId":"8006587" }
2.Update Lead status to Purchased
The following example updates the status of lead to purchased by submitting a PATCH request on the REST resource using cURL.
cURL Example
curl -X PATCH -H "X-Oracle-UserId: partner-email" -H "Authorization: Bearer Access-token" "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/leads/8006587"
Request Header
X-Oracle-UserId: fname.lname@oracle.com Authorization: Bearer Access-token
Request Body
{ "status":"PURCHASED" }
HTTP Status Code:
200 OK
JSON Response:
{ "message":"Status of lead successfully changed to Purchased", "entityId":"8006587" }
3.Update Lead status to Delivered
The following example updates the status of lead to delivered by submitting a PATCH request on the REST resource using cURL.
cURL Example
curl -X PATCH -H "X-Oracle-UserId: partner-email" -H "Authorization: Bearer Access-token" "https://ocm-apis.cloud.oracle.com/appstore/publisher/v1/leads/8006587"
Request Header
X-Oracle-UserId: fname.lname@oracle.com Authorization: Bearer Access-token
Request Body
{ "status":"DELIVERED" }
HTTP Status Code:
200 OK
JSON Response:
{ "message":"Status of lead successfully changed to Delivered", "entityId":"8006587" }Back to Top