Forum Discussion

nkm's avatar
nkm
Experienced User
4 years ago

Get response codes from MYOB AccountRight API

Hi,

I am doing POST, PUT and DELETE API calls to myob accountright API, and when there is a success, it does not return a reponse body. Is there any way to retrieve the response code? I would like to use the response code to do exception handling. I am using PHP cURL to do the API calls. 

  • Hi nkm 

     

    Yes the Response Header always gives the se codes - success or otherwise - I use both - a bombout sometimes I just look for a word in the repsonse for a successful call but I do always get the Header.

     

    The Doc

  • The_Doc's avatar
    The_Doc
    Ultimate Cover User

    Hi nkm 

     

    Yes the Response Header always gives the se codes - success or otherwise - I use both - a bombout sometimes I just look for a word in the repsonse for a successful call but I do always get the Header.

     

    The Doc

    • nkm's avatar
      nkm
      Experienced User

      Hi, The_Doc ,

       

      Thank you for the reply. I can now retrieve the response code and use it for exception handling.

Looking for something else?

Search the Community Forum for answers or find your topic and get the conversation started!

Community home

Dig into MYOB Academy for free courses, learning paths and live events to help build your business with MYOB.