For selected items(Based on their ID's)from one list, I need to store those items to another list using rest API.
How to append those ID's to rest API?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
ID values are unique per List (and incremented by SharePoint on every New Item added) so no matter how you copy Items to another list they will get a new ID
You have no control over the ID value.
If you want to retain the original ID you have to add your own column where you store the ID value.
remember: SharePoint is NOT a Relational Database
I would create a new field in the second list called something like FirstListID and store the ID's in that field so that you have a mapping between the two lists.
That way when you query the second list you can use that field to find the data in the first list using the ID.