Forum Discussion

nkm's avatar
nkm
Experienced User
4 years ago
Solved

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

2 Replies

Replies have been turned off for this discussion
  • The_Doc's avatar
    The_Doc
    Ultimate Partner

    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.