cancel
Showing results for 
Search instead for 
Did you mean: 

Format of UpdateRecords API

VishakhaChoudh1
Contributor III

Hi,

 

I'm trying to update few records from 'Update Records' API. Following is the sample request I'm trying to make:

`<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <UpdateRecords xmlns="http://archer-tech.com/webservices/">
      <sessionToken>57F57C338568F9D21DBEEDB21FAF0AA5</sessionToken>
      <moduleId>71</moduleId>
 <contentRecords>
                <Records>
                    <Record contentId="275958">
                        <Field id="23165" value="4315122"></Field>
                        <Field id="21383" value="scan/1600457072.15122"></Field>
                    </Record>
                </Records>
            </contentRecords>    
    </UpdateRecords>
  </soap:Body>
</soap:Envelope>

 

I'm getting 400 Bad request upon sending this. Can someone please share the valid sample request?

 

Thanks in advance,

Vishakha

6 REPLIES 6

DavidPetty
Archer Employee
Archer Employee

Vishakha, try:

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<UpdateRecords xmlns="http://archer-tech.com/webservices/">
<sessionToken>57F57C338568F9D21DBEEDB21FAF0AA5</sessionToken>
<moduleId>71</moduleId>
<contentRecords>
<![CDATA[
<Records>
<Record contentId="275958">
<Field id="23165" value="4315122"></Field>
<Field id="21383" value="scan/1600457072.15122"></Field>
</Record>
</Records>
]]>

</contentRecords>
</UpdateRecords>
</soap:Body>
</soap:Envelope>

 Advisory Consultant - Archer, an RSA Business

Hi David,

 

I tried the above, However i get the below error.

 

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<UpdateRecords xmlns="http://archer-tech.com/webservices/">
<sessionToken>B9308AF671F4051856D7F3DFB7119918</sessionToken>
<moduleId>376</moduleId>
<contentRecords>
<![CDATA[
<Records>
<Record contentId="1549628">
<Field id="28745" value="Launched"></Field>
</Record>
</Records>
]]>
</contentRecords>
</UpdateRecords>
</soap:Body>
</soap:Envelope>

 

Error says:

 

<Records>
<Record contentId="1549628" ValidationMessage="Object reference not set to an instance of an object.">
<Field id="28745" value="Launched">
</Field>
</Record>
</Records>

 

Can you please help

Replace contentId with id in the Record node. I used the example above and got the same error. I finally found a post from 5 years ago that uses id instead of contentId. I tried it and it worked for me.

Can you please share the final working xml webservice request

Tried that too.  Same error.