REST - Example of Save the Data using POST Call
Follow
REST v2 - Write
We can update and Insert new Record into Data by POST Method by send Post Data into Body. For Example if we want to insert a Punch in we Create a New View with TagName clockin.Then the Url will be
- https://platform.altamirahrm.com/api/v2 /REST/clockin
Type |
Name |
Description |
Schema |
header |
Token (required) |
Token generated by Authentication |
string |
Put the Token in the HTTP header and use the Json in Body like this Example. Mention all the Tagname which you want to insert or Update.
Note: For Update User have to mention the primary keys or Secondary keys. If no primary key or secondary Keys is found the Altamira Platform will treat it as new Record.
Example JSON for inserting a Record: Keys & KeysSecondary Should be Blank
{
"data": [
{
"CV.CustomerID": 1,
"CV.Name": "Mario",
"CV.Surname": "Rossi",
"CV.DateOfBirth": "1990-01-01T00:00:00.000Z",
"CV.RegionProvince": "167402847"
}
],
"Keys": [],
"KeysSecondary": []
}
Example JSON for Updating a Record:
{
"data": [
{
"CV.CustomerID": 1,
"CV.Name": "Mario",
"CV.Surname": "Rossi",
"CV.DateOfBirth": "1990-01-01T00:00:00.000Z",
"CV.RegionProvince": "167402847"
}
],
"Keys": ["CV.CustomerID"],
"KeysSecondary": []
}
Comments
0 comments
Please sign in to leave a comment.