Skip to content

API Maker - Update by id & Replace by id API [Put operation]

Update By id

▸ Update the object's properties that match the payload and

  • leave the others unchanged.

Replace By id [Mongo specific API]

▸ Update the object's properties that match the payload and

  • remove the rest of properties.

✅ List of Feature

  • Primary key override
  • Modify response using Query Params
  • Nested level update
  • Upsert support
  • Retrive response prior to update or after the update

⭐ Params ⭐

👉 id ▸ User can update single record by id

👉 primaryKey ▸ Based on primary key field, user can update data.


⭐ Query Params ⭐

👉 select ▸ Retrieve the fields based on the user's needs.

👉 deep ▸ Obtain more precise / details data in a certain field.

👉 upsert

  • true ▸ If record is not present then perform insert operation
  • false ▸ If record is present then perform update operation

👉 returnDocument

  • before ▸ Retrieve the response prior to updating it.
  • after ▸ Retrieve the response after the update.

NPM

YouTube

Websites

LinkedIn

Twitter