Developer Preview: JSON: PUT - measurement-sets/{id} - Issues?

108 views
Skip to first unread message

bfram...@gmail.com

unread,
Oct 25, 2017, 3:02:13 PM10/25/17
to Developer Group for QPP APIs
Hello,

Has anyone tried using the PUT request for the measurement-sets/{id} endpoint?
I'm working on adding logic into my application where if the submission_id already exists, send a PUT request to update the measurementSet completely, however I'm getting an error on the PUT request.

Note: I'm using JSON for my requests. I switched from using XML due to the number of outstanding bugs for XML.

Initially I'm trying a POST request, which yields the expected error that the submission already exists:

Request:



Response:



I then send a PUT request which yields an error that the submissionId doesn't exist:

Request:



Response:


One item that might be causing my issue relates to the example for a PUT request on the sandbox documentation:

1. The sandbox example for a measurementSet PUT includes "submissionId" in the request
    Is this required? Seems redundant if we need to supply the submissionId in the URL for the endpoint.
 
   I did try to include submissionId in the request, but it didn't seem to matter, the same error for the PUT request was returned.

Any tips regarding using the PUT request for the measurement-sets/{id} endpoint are welcome.

Thank You,
Bryan Frambes
Auto Generated Inline Image 1
Auto Generated Inline Image 2
Auto Generated Inline Image 3
Auto Generated Inline Image 4

Amit Mehta

unread,
Oct 27, 2017, 11:21:23 AM10/27/17
to Developer Group for QPP APIs
My experience has been to use the measurementset id when doing a PUT and DELETE in this scenario. The submissionid is for a unique NPI/TIN combination or TIN. 

bfram...@gmail.com

unread,
Oct 27, 2017, 11:26:13 AM10/27/17
to Developer Group for QPP APIs
Thanks Amit, I'll give it a try.

Thank You,
Bryan Frambes

bfram...@gmail.com

unread,
Oct 27, 2017, 2:05:14 PM10/27/17
to Developer Group for QPP APIs
Thanks again Amit,
I was targeting the wrong id for the PUT request, as you pointed out.

It's now working correctly after I updated the id when using this endpoint:

Notes for anyone else:

When I submitted the 2nd POST request it yielded the duplicateEntryError with the original submissionId.
In order to perform a PUT/PATCH request you need the measurementSet id.

Three possible routes to resolve this:

1. Store the measurementSet id in your application when measurementSets are submitted

2. Send a GET request to the submissions{id} endpoint with the submissionId to see your previously submitted measurementSets

Request:



I couldn't get this to work, it just yields this response:



3. Send a GET request to the measurementSets endpoint with the submissionId and submissionMethod

Request:



I tried this too, but it yields a HTML response for a page which says "The page you are trying to view does not exist.".

I think for now I'll be implementing #1.

Thank You,
Bryan Frambes


Auto Generated Inline Image 1
Auto Generated Inline Image 2
Auto Generated Inline Image 3
Auto Generated Inline Image 4

Mari Miyachi

unread,
Oct 30, 2017, 8:49:41 AM10/30/17
to Developer Group for QPP APIs
Hi Bryan! Does a GET to /measurement-sets work? Is it possible the submissionId and measurementSetId are mixed up?
Message has been deleted

bfram...@gmail.com

unread,
Oct 30, 2017, 1:05:15 PM10/30/17
to Developer Group for QPP APIs
Hello Mari,

When you mentioned submitting a GET to the /measurement-sets endpoint, it made me have a light bulb moment.

I figured out what was causing my requests to fail for these two requests:



and 



Solution:

Remember to include the "/submissions" portion of the API URL:
The double "/submissions/submissions" in the URL looked redundant/incorrect, which I supposed caused me to omit it before accidentally.

The requests appear to functioning properly when using this:



Thank You,
Bryan Frambes
Auto Generated Inline Image 1
Auto Generated Inline Image 2
Auto Generated Inline Image 3

Mari Miyachi

unread,
Oct 30, 2017, 4:21:54 PM10/30/17
to Developer Group for QPP APIs
Nice spot!

anuj Kumar dwivedi

unread,
Nov 13, 2017, 11:58:51 PM11/13/17
to Developer Group for QPP APIs
Hi,

Any one can help me, I have tried to POST request for the measurement-sets endpoint but i am getting error "No API found with those values" as you can see my attached word file. I have explained sample of code there while i got successfully response with POSTMAN editor , where i am wrong please let me know.

Please refer attached word file. 

If it is possible please provide a sample code of AJAX request .


Thanks,
Anuj
Error - Submit json data to CMS for Measurement-set.docx

Sam Keller

unread,
Nov 14, 2017, 11:00:41 AM11/14/17
to anuj Kumar dwivedi, Developer Group for QPP APIs
Hi Anuj,

It looks like you're using the OPTIONS request method here and not POST -- the API doesn't currently support OPTIONS (though this may change in the future). 

Thanks,
Sam

--
You received this message because you are subscribed to the Google Groups "Developer Group for QPP APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qpp-apis+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/qpp-apis.
To view this discussion on the web visit https://groups.google.com/d/msgid/qpp-apis/7692132a-ee70-4868-94bb-12d4bffce8b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages