API - Udpdated Stage Date - Opportunities

Comments

1 comment

  • Avatar
    Rachel Harrigan

    If you do a GET or POST call on an individual opportunities or to get a list, we will return, "date_stage_changed." That is just the date the opportunity stage changed last.

    curl --request GET \
    --header "Content-Type: application/json" \
    --header "X-PW-AccessToken:TOKEN" \
    --header "X-PW-Application: developer_api" \
    --header "X-PW-UserEmail:EMAIL" \
    https://api.prosperworks.com/developer_api/v1/opportunities/3483209

    curl --request POST \
    --header "Content-Type: application/json" \
    --header "X-PW-AccessToken:TOKEN" \
    --header "X-PW-Application: developer_api" \
    --header "X-PW-UserEmail:EMAIL" \
    https://api.prosperworks.com/developer_api/v1/opportunities/search

     

    If you search activities/search by opportunity ID you will be able to get all opportunity stage changes and their old and new values.

    curl --request POST \
    --header "Content-Type: application/json" \
    --header "X-PW-AccessToken:TOKEN" \
    --header "X-PW-Application: developer_api" \
    --header "X-PW-UserEmail:EMAIL" \
    https://api.prosperworks.com/developer_api/v1/activities/search \
    --data '{"activity_types":[{"category":"system","id":3}],"parent":{"type":"opportunity","id":3483209}}'

     

    The response will show the old and new values and will look like this:

    [{"id":4685549507,"parent":{"id":3483209,"type":"opportunity"},"type":{"id":3,"category":"system","name":"Stage Change"},"user_id":133295,"details":"134757","activity_date":1537823911,"old_value":{"id":625576,"name":"First contact"},"new_value":{"id":622396,"name":"Schedule meeting"},"date_created":1537823911,"date_modified":1537823911}]

Please sign in to leave a comment.