Skip to main content
Answer

Error using Postman and the files api to save a pdf

  • May 12, 2023
  • 3 replies
  • 438 views

Forum|alt.badge.img

I’m testing adding a file using Postman and I’m getting the error:

{

    "message": "The request is invalid.",

    "modelState": {

        "": [

            "Unable to translate bytes [E2] at index 10 from specified code page to Unicode."

        ]

    }

}

 

Here are the headers:

In the body I’ve tried several different pdf files but I still get the same result.  I’m not sure what I need to change to get this to work.

Best answer by sweta68

Hi @vpoulson 

Kindly refer to below link for a reference.

https://asiablog.acumatica.com/2018/01/attach-files-with-rest-api.html

 

Hope it helps!

Regards,

Sweta

3 replies

Forum|alt.badge.img+9
  • Semi-Pro III
  • Answer
  • May 17, 2023

Hi @vpoulson 

Kindly refer to below link for a reference.

https://asiablog.acumatica.com/2018/01/attach-files-with-rest-api.html

 

Hope it helps!

Regards,

Sweta


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • May 18, 2023

Hi @vpoulson  I don’t think such an API request is available (I may be wrong) to save the PDF file.


Forum|alt.badge.img
  • Author
  • Freshman II
  • July 17, 2023

@Naveen Boga I’m getting the same error when trying to attach a .PNG file.