Bulk-upload Data

Hello everyone,

I hope you’re all well.

I have a POST API Collection:

  • Authorization Type = Basic Auth = Username and Password (An agent credentials)
  • Content -Type = text/xml
  • Raw

I can confirm that I can successfully create data in the environment by sending the data record by record.

For example:

<soap : Envelope xmlns ….>

Booking Test

</soap : Body>

</soap : Envelope>

Status = 200 OK

However, If I am attempting to RUN ORDER – POST API, as a Data File Type = text/csv, it’s failing, as Unsupported Media Type. But I am modifying the above to, as per one of the tutorials I have seen:

<soap : Envelope xmlns ….>

{{Booking Name}}

</soap : Body>

</soap : Envelope>

Status = 415 Unsupported Media Type

I can confirm that a column called Booking Name will be on the csv.

Or Status = 500 Internal Server Error.

soap : Client

System.Web.Services.Protocols.SoapException : Server was unable to read request. There is an error in XML document. Input string was not in a correct format>

How can I resolve the above? Loading data record by record is quite time consuming.

Also, once the records have been created in the environment, where will I be able to check their IDs?

Any help will be much appreciated.

Thank you.

Look at the console log and see what was actually sent to the API.

Is it in the correct format? Does the XML look right?

For example

You need to clarify what you mean by “checking their ID’s”. It’s not clear what you mean. Do you mean by checking the response? Or another API request against the database?

Hi there,

I have been doing a lot of research and watching a lot of videos on how to resolve this.

Some of them are:

Bulk upload using Postman – Learn Infor M3
Sending bulk data to post to API for volume testing - #7 by jamesst9

My XML code only sends one record at the time. If I am attempting to load the data through Collection Runner, it doesn’t get loaded.

I am able to upload the data one record at the time by entering the value, as per below:

Booking Test
12345, etc.

However, if I am trying to follow the steps as per this link Bulk upload using Postman – Learn Infor M3 and amend my code to:

{{ContactID}}, etc.

I am getting the following error message:

System.Web.Services.Protocols.SoapException: Server was unable to read request. —> System.InvalidOperationException: There is an error in XML document (4, 28). —>

Error Message: 500 Internal Server Error

I’ve also attempted to convert the data to JSON, by keeping the same POST URL - Raw – JSON – Content-Type – application/json

I have done the following:

“headers”: {

“Name”: “{{Name}}”,
“ContactID”: {{ContactID}},

But I am getting the following error:

Server was unable to process request. —> System.Xml.XmlException: Data at the root level is invalid. Line 2, position 1.

Error message: 500 Internal Server Error

Line 2 position 1 is “headers”. I don’t have any pre-request scripts. Just the body as per the above, containing all the Excel columns.

Any help will be much appreciated. Thank you.

So if you look at the console for the single request that is working.

Then look at the console log for the failing request and in particular the elements that you parameterized. The name and contact ID. Do they look right? Are they in the same format. Are they sending the name and contact ID?

Make sure the quotes haven’t been changed from " to “.