- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2024 05:44 AM - edited 10-09-2024 05:46 AM
Hi,
I am using POST method for Buy Item:
https://xxxx.service-now.com/api/sn_sc/servicecatalog/items/{sys_id}/order_now
and testing via postman. Below is the json I am passing via postman:
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2024 06:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2024 12:00 AM
Hello @Shivani29 ,
The error you're seeing suggests that the quantity field is being passed incorrectly. For the REST API request to work properly, the quantity field should be sent as an integer, not as a string.
Here are two options you can try:
-
Send quantity as an integer:
{ "quantity": 1, "variables": { "Variable1": "value", "variable2": "value", "variable3": "value" } }
-
Use sysparm_quantity instead of quantity:
{ "sysparm_quantity": 1, "variables": { "Variable1": "value", "variable2": "value", "variable3": "value" } }
Either approach should resolve the "Invalid Quantity value" error. Let me know if you encounter any other issues!
Please Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Regards,
Aniket

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2024 06:18 AM
Quantity should be a number. Pass like below:
"quantity": 1,
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2024 11:43 PM
Hi,
Thanks for replying. Yes, i did the same but was getting the same error.
Regards,
SHivani

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2024 06:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2024 04:47 AM
Thanks Ajay, It is working now
Regards,
Shivani