Skip to main content

Notifications

Announcements

No record found.

Service | Customer Service, Contact Center, Fie...
Answered

Web API Case creation POSTMAN

Posted on by 5

Hi all,

I am having issues with the Case (incedent) creation. As for now I was able to create an account but I need to be able to create cases. I have my OAuth connected properly, I have all the responses, I am able to create an account. I need a case. Please see request and response:

Request to: MYORG.crm4.dynamics.com/.../incidents (Bearer token is okay)

json:

{
"name": "API Title"
}

Responce:

{
    "error": {
        "code""0x8006088a",
        "message""Resource not found for the segment 'incident'.",
        "innererror": {
            "message""Resource not found for the segment 'incident'.",
            "type""Microsoft.OData.UriParser.ODataUnrecognizedPathException",
            "stacktrace""   at Microsoft.OData.UriParser.ODataPathParser.CreateDynamicPathSegment(ODataPathSegment previous, String identifier, String parenthesisExpression)\r\n   at Microsoft.OData.UriParser.ODataPathParser.CreateFirstSegment(String segmentText)\r\n   at Microsoft.OData.UriParser.ODataPathParser.ParsePath(ICollection`1 segments)\r\n   at Microsoft.OData.UriParser.ODataPathFactory.BindPath(ICollection`1 segments, ODataUriParserConfiguration configuration)\r\n   at Microsoft.OData.UriParser.ODataUriParser.Initialize()\r\n   at System.Web.OData.Routing.DefaultODataPathHandler.Parse(String serviceRoot, String odataPath, IServiceProvider requestContainer, Boolean template)\r\n   at System.Web.OData.Routing.DefaultODataPathHandler.Parse(String serviceRoot, String odataPath, IServiceProvider requestContainer)\r\n   at Microsoft.Crm.Extensibility.ODataV4.Routing.CrmODataPathHandler.Parse(String serviceRoot, String odataPath, IServiceProvider requestContainer)"
        }
    }
}
Please advise 
  • NorvilleRogers Profile Picture
    NorvilleRogers 5 on at
    RE: Web API Case creation POSTMAN

    Thank you.  This was a very helpful answer Ankit.   Also, thank you @Rdobryanskyy1 for posting this question.

  • RE: Web API Case creation POSTMAN

    Please mark the thread as verified!!!!

  • Rdobryanskyy1 Profile Picture
    Rdobryanskyy1 5 on at
    RE: Web API Case creation POSTMAN

    You are FANTASTIC!!!! Thank you!!!!!

  • Verified answer
    RE: Web API Case creation POSTMAN

    Please use just above approach and if it works , mark this thread as verified.

  • Verified answer
    RE: Web API Case creation POSTMAN

    I believe this can help :-

    "customerid_contact@odata.bind":"/contacts(<Record GUID>)

  • Suggested answer
    RE: Web API Case creation POSTMAN

    In place of primarycontactid can you write CustomerId and chek please

  • Rdobryanskyy1 Profile Picture
    Rdobryanskyy1 5 on at
    RE: Web API Case creation POSTMAN

    ok now I got this:

    {

       "error": {

           "code": "0x8004440f",

           "message": "CustomerId is missing and required",

           "innererror": {

               "message": "CustomerId is missing and required",

    Sorry I am really new to REST API

  • Suggested answer
    RE: Web API Case creation POSTMAN

    you can use below :-

    { "tile":"Sample Case", "primarycontactid@odata.bind":"/contacts(<Record Id of contact>)" } as a request you can send. Select the method as POST.

     

    Hope this helps.

    Best regards,

    Ankit

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

  • Rdobryanskyy1 Profile Picture
    Rdobryanskyy1 5 on at
    RE: Web API Case creation POSTMAN

    I have this:

    {

       "error": {

           "code": "0x80044410",

           "message": "You should specify a parent contact or account.",

           "innererror": {

               "message": "You should specify a parent contact or account.",

    What is the format of specifying the account or contact?

  • Suggested answer
    RE: Web API Case creation POSTMAN

    Hy Partner,

    Try with incidents in the URL. Your URL should be :-

    https://<OrgURL>/api/data/v9.1/incidents

    It should be collection schema name of an entity

     

    Hope this helps.

    Best regards,

    Ankit

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans