SAP Knowledge Base Article - Public

3059578 - Differences between Insert and Upsert operation - OData API

Symptom

You need to know what are the differences between an Insert and an Upsert API call.

Environment

  • SAP SuccessFactors HXM Suite
    • OData API

Resolution

Insert

The Insert operation is used only to create an entry.

The URL of the API call will have the name of the entity being inserted, for example:

https://<API-Server>/odata/v2/User

Refer to the OData guide page explaining Insert.

Upsert

The Upsert operation will work with the following logic:

  • If the record being sent in the payload already exists in SF, it will be updated with the data being sent
  • If the record being sent in the payload doesn't exist, it will be created

The URL of the API call will have the string "upsert", as below:

https://<API-Server>/odata/v2/upsert

Refer to the OData guide page explaining Upsert.

See Also

SAP SuccessFactors HXM Suite OData API: Developer Guide (V2)

Keywords

upsert, insert, difference, differ, not insertable, http, post, sf, successfactors, odata, api, endpoint, url, uri, payload , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , How To

Product

SAP SuccessFactors HXM Suite all versions