Hey Community members great news. I figured out what was wrong. Thanks for all support
In my Header Key I have Content-Type Called twice with this new cURL it let me send request and gave me response.
Original Message:
Sent: 05-19-2025 17:10
From: Jignesh Chaudhari
Subject: Status 400 for mentioned API end point
No issues thanks for trying we are still in QA that is why I did not reach our to Care first but let me try with them thanks
------------------------------
Jignesh Chaudhari
Original Message:
Sent: 05-19-2025 15:59
From: Brian Trezise
Subject: Status 400 for mentioned API end point
That all looks right. I think I'm going to have to refer you to care as we'd need some more information (correlationid specifically) to investigate what's going wrong (and we can't actually debug any further here in the forum).
------------------------------
Brian Trezise
Genesys - Employees - Lead Software Engineer
Original Message:
Sent: 05-19-2025 15:43
From: Jignesh Chaudhari
Subject: Status 400 for mentioned API end point
Yes exactly here cURL. I hide Auth bearer token for security reason.
Here (I used Postman API collection from Genesys Site only)
curl --location 'https://api.mypurecloud.com/api/v2/workforcemanagement/businessunits/020193c2-e20d-4c08-92cc-24a886c9ecae/weeks/2025-03-10/schedules/8de636b7-3537-4a71-b054-6c0fa507ccb7/agentschedules/query' \
--header 'Content-Type: application/json' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: bearer ****************************************************-Rg' \
--data '{
"managementUnitId": "0e7417b0-b355-4e41-b9a1-a3ec9526b5f0"
}'
------------------------------
Jignesh Chaudhari
Original Message:
Sent: 05-19-2025 15:00
From: Brian Trezise
Subject: Status 400 for mentioned API end point
So there's no content at all in the response body? Not even a contextId or a correlationId? you should be getting more back from the API than just the http status even in an error state. Perhaps you could post a cURL from postman?
------------------------------
Brian Trezise
Genesys - Employees - Lead Software Engineer
Original Message:
Sent: 05-19-2025 14:07
From: Jignesh Chaudhari
Subject: Status 400 for mentioned API end point
Yes I am using Postman for data analysis.
There is no result in any format. Postman Raw response Tab for same parameters

------------------------------
Jignesh Chaudhari
Original Message:
Sent: 05-19-2025 14:01
From: Brian Trezise
Subject: Status 400 for mentioned API end point
Looks like you're using Postman. Can you show the "Raw" response tab?
------------------------------
Brian Trezise
Genesys - Employees - Lead Software Engineer
Original Message:
Sent: 05-19-2025 10:08
From: Jignesh Chaudhari
Subject: Status 400 for mentioned API end point
Sure in params you can see below

and under Body (raw) I put this

IDs are valid and Genesys Development Center UI gave me result.
This is what I see in postman for above API payload request.

Thanks for looking into it.
------------------------------
Jignesh Chaudhari
Original Message:
Sent: 05-19-2025 08:38
From: Jason Mathison
Subject: Status 400 for mentioned API end point
Can you post the body of the response?
------------------------------
--Jason
Original Message:
Sent: 05-16-2025 10:56
From: Jignesh Chaudhari
Subject: Status 400 for mentioned API end point
We are using POST - /api/v2/workforcemanagement/businessunits/:businessUnitId/weeks/:weekId/schedules/:scheduleId/agentschedules/query and providing valid path variables key businessUnitId, weekId (yyyy-MM-dd) and scheduleId. In postman under Body RAW we put valid managementUnitId but still I am getting Status 400 while calling the API.
Not sure what am I missing ?
#PlatformAPI
------------------------------
Jignesh Chaudhari
------------------------------