CREATEORUPDATE calls

The CreateOrUpdate action updates a record's metadata; if the record does not exist, then the call creates the record.

📘

Note

If you are updating a user account, your changes might trigger an email to notify that user of their account changes. You can control a production site's email notifications within the Orange Logic interface. You can control email notifications on test sites with the &AllowNotifications parameter email notifications.

Asset example

⚠️

Caution

Use the CoreField.Parent-folder parameter to set a location to create a record. Otherwise, a new record will be created directly in the root folder. However, the root folder does not appear in the user interface, and a search in the interface will not produce assets located directly in the root folder.

This call looks for an asset with the value of OL123 in the CoreField.Id_Client field. If an asset with this ID does not exist, a new Standard Image record is created with the title “London skyline” and the description “Stunning view of the London skyline” in the folder with a Record ID of 2QDTWAWPHA1.

POST or GET /API/DataTable/V2.2/Documents.Image.Default:CreateOrUpdate?CoreField.Id_Client=OL123&CoreField.Title:=London skyline&CoreField.CaptionLong:=Stunning view of the London skyline&CoreField.Parent-folder=2QDTWAWPHA1

Response
  
<Result>
<APIRequestInfo>
<ProviderVersion>LONDON.R2.2131E.216729</ProviderVersion>
<ProviderIdentity>OLU-T-USW2-APP</ProviderIdentity>
<ProviderID>44ddde3ac27a33c394335f249d4007d4</ProviderID>
<Module>DataTable</Module>
<APIVersion>V2.2</APIVersion>
<Resource>Documents.Image.Default:CreateOrUpdate</Resource>
<IsLoggedIn type="Boolean">True</IsLoggedIn>
<Status>LoggedIn</Status>
<UserLogin>[email protected]</UserLogin>
<Session>No session (production configuration)</Session>
<TimeoutPeriodMinutes type="Numeric">20</TimeoutPeriodMinutes>
</APIRequestInfo>
<RequestInterpretation>
<Updates type="List">
<Update>
<Field>CoreField.CaptionLong</Field>
<Operator>:=</Operator>
<OperatorDescription>Assign a value to a single-value field</OperatorDescription>
<Value>Stunning view of the London skyline, featuring iconic landmarks like the Shard, the London Eye, and the Tower Bridge against a backdrop of city lights.</Value>
</Update>
<Update>
<Field>CoreField.Id_Client</Field>
<Operator>:=</Operator>
<OperatorDescription>Assign a value to a single-value field</OperatorDescription>
<Value>OL1234</Value>
</Update>
<Update>
<Field>CoreField.Title</Field>
<Operator>:=</Operator>
<OperatorDescription>Assign a value to a single-value field</OperatorDescription>
<Value>London skyline</Value>
</Update>
</Updates>
<Filters type="List">
<Filter>
<Field>CoreField.Id_Client</Field>
<Operator>=</Operator>
<OperatorDescription>Field must be equal to value</OperatorDescription>
<Value>OL1234</Value>
</Filter>
<Filter>
<Field>CoreField.DO_OriginalVersion</Field>
<Operator>=</Operator>
<OperatorDescription>Field must be equal to value</OperatorDescription>
<Value/>
</Filter>
</Filters>
<IgnoredParameters type="List"/>
</RequestInterpretation>
<Response>
<RecordID>2QDTWAO7SM7</RecordID>
<Code>SUCCESS</Code>
</Response>
</Result>