Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

PATCH - PUT Method Custom API

Posted on by 25

Hi everyone,

I try to update a field through a custom API using the PATCH method, but it returns this error

pastedimage1681756274773v1.png

testing the get method 

pastedimage1681756367944v2.png

in postman I specify the If-Match key

pastedimage1681756760999v3.png

has this happened to anyone?

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,696 Super User 2024 Season 2 on at
    RE: PATCH - PUT Method Custom API

    Hi, Get and Post don't need If-Match, so I still think it's a problem with this value.

    If your API endpoint contains specific value, try using "*" to see if it solves it.

    pastedimage1681874249544v1.png

    Hopefully other experts can give you better advice.

    Thanks

    ZHU

  • Diego91 Profile Picture
    Diego91 25 on at
    RE: PATCH - PUT Method Custom API

    Yes, it was just a typing error, but I still get the error. The strange thing is that the Get and Post methods work perfectly. I only have the problem to update the registry, could it be some missing property in the API page?

  • Diego91 Profile Picture
    Diego91 25 on at
    RE: PATCH - PUT Method Custom API

    Yes, it was just a typing error, but I still get the error. The strange thing is that the Get and Post methods work perfectly. I only have the problem to update the registry, could it be some missing property in the API page?

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,696 Super User 2024 Season 2 on at
    RE: PATCH - PUT Method Custom API

    Hi, Looks like a problem with the value in the If Match.

    pastedimage1681779607551v1.png

    Here is a similar discussion below, I hope it can solve your problem.

       

    pastedimage1681779626859v2.png

    Hope this helps.

    Thanks.

    ZHU

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