09-10-2024 12:05 AM
Hi
Anybody using the CCWR List Quote API successfully?
According to the documentation the endpoint is https://apix.cisco.com/ccw/renewals/api/v1.0/quote/manager (POST) and the only mandatory field is "billToLocation" (as a list of integers):
{
"billToLocation":[123456789]
}
Sending the request (Bearer Authorization Token is OK and for sure I change 123456789 to my acutal BID) results in a HTTP 400/bad request.
Any help is very much appreciated
Marcel
09-10-2024 02:40 AM
@Marcel Zehnder i dont know this doc/api. Only thing i can think of is if the API requires the list to be wrapped in square brackets? I had a look and cannot find any code examples
{
"billToLocation": [123456789]
}
Bit of an old thread, but has a contact email on there https://community.cisco.com/t5/services-discussions/ccw-r-api-availability/td-p/3599580
Update whilst replying, i found the doc here https://apidocs-prod.cisco.com/explore;category=6083723925042e9035f6a750;epname=6083723a25042e9035f6a769;apiendpt=642f09ead0cb02238b1dae31
What i noted was this
billToLocation[] integer billToLocation
I am 100% guessing here mate, purely based on the provided snippet "billToLocation[]integerbillToLocation," it seems there might be a formatting issue or a misunderstanding in the documentation. This leads me to think the most likely interpretation that the billToLocation
field is an array (or list) containing one or more integer values, hence this is denoted by square brackets []
in JSON.
Try the square brackets, if that breaks again, i would go via the email and ask what the support for this API is or some working examples.
Hope this helps.
09-10-2024 03:23 AM
Thanks mate, I was thinking the same and therefore alreday tried almost all possbile options. I tried with the following JSON payloads, all resulting in 400 bad request:
# int
{
"billToLocation": 123456789
}
# string
{
"billToLocation": "123456789"
}
# int-array
{
"billToLocation": [123456789]
}
# string-array
{
"billToLocation": ["123456789"]
}
09-10-2024 03:47 AM
@Marcel Zehnder yes odd, i then saw the example code... (below), i wondering if this is not the only mandatory field you need, i hoped the 400 error should have typically come with more details in the response body to help clue you in.
the example code shows - {
"billToLocation": 80616,
"createdBy": "rkatkam",
"daysBeforeToday": 10,
"fromDate": "02-02-2020",
"lastUpdateDaysBeforeToday": 10,
"lastUpdateFromDate": "02-02-2023",
"lastUpdateToDate": "03-02-2023",
"limit": 1000,
"offset": 0,
"quoteSource": [
"API/B2B"
],
"quoteStatus": [
"Valid"
],
"quoteType": [
"SFC"
],
"resellerBillToLocation": [
82555
],
"toDate": "03-02-2020"
}
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide