{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/timecard.json","auth":"required","examples":{"codes":[]},"method":"put","params":[{"name":"parentShiftId","type":"int","default":"","desc":"Unique identifier of the parent shift (A shift with sub activities such as break start, break end etc,. is considered as a parent shift.)","required":true,"in":"body","ref":"","_id":"573314d245fc0c0e00c15423"},{"name":"timeCards","type":"array_object","default":"","desc":"Contains information of the shift activities","required":false,"in":"body","ref":"","_id":"573314d245fc0c0e00c15422"},{"name":"eventTime","type":"int","default":"","desc":"Timestamp (in milliseconds) during which the shift was updated","required":false,"in":"body","ref":"","_id":"573314d245fc0c0e00c15421"},{"name":"eventType","type":"int","default":"","desc":"Type of events separated by comma. The following values are valid: 1 - Shift start , 2 - Break start, 3 - Break End, 4 - Shift End","required":false,"in":"body","ref":"","_id":"573314d245fc0c0e00c15420"},{"name":"id","type":"int","default":"","desc":"Unique identifier of the shift","required":false,"in":"body","ref":"","_id":"573314d245fc0c0e00c1541f"},{"name":"address","type":"object","default":"","desc":"Specifies the address of the shift location","required":false,"in":"body","ref":"","_id":"573314d245fc0c0e00c1541e"},{"name":"formattedAddress","type":"string","default":"","desc":"Concatenated string containing the complete address","required":false,"in":"body","ref":"","_id":"573314d245fc0c0e00c1541d"},{"name":"latitude","type":"double","default":"","desc":"Latitude coordinates of the shift location","required":false,"in":"body","ref":"","_id":"573314d245fc0c0e00c1541c"},{"name":"longitude","type":"double","default":"","desc":"Longitude coordinates of the shift location","required":false,"in":"body","ref":"","_id":"573314d245fc0c0e00c1541b"},{"name":"time","type":"int","default":"","desc":"Address generation timestamp in milliseconds","required":false,"in":"body","ref":"","_id":"573314d245fc0c0e00c1541a"},{"name":"misc","type":"string","default":"","desc":"Additional information about the shift activity","required":false,"in":"body","ref":"","_id":"573314d245fc0c0e00c15419"}],"results":{"codes":[{"status":200,"language":"json","code":"{  \n   \"serverResponse\":{  \n      \"result\":\"TimeCard Edited Successfully\",\n      \"error\":null\n   }\n}","name":""}]},"settings":"559288b86bf22f170075b794"},"next":{"description":"","pages":[]},"title":"Edit","type":"endpoint","slug":"edit","excerpt":"Use this API to modify an existing shift. You can edit shift attributes for events such as shift start, shift end, break start, break end. Only one shift can be updated in a single API call.","body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Sample Request\",\n  \"body\": \"https://api.azuga.com/azuga-ws/v1/timecard.json\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{  \\n   \\\"parentShiftId\\\":\\\"22\\\",\\n   \\\"timeCards\\\":[  \\n      {  \\n         \\\"eventTime\\\":1460174400000,\\n         \\\"eventType\\\":1,\\n         \\\"id\\\":22,\\n         \\\"location\\\":{  \\n            \\\"address\\\":{  \\n               \\\"formattedAddress\\\":\\\"1803 Ocean Cape Common, San Jose, CA 95131,USA\\\"\\n            },\\n            \\\"latitude\\\":\\\"37.384973\\\",\\n            \\\"longitude\\\":\\\"-121.896050\\\",\\n            \\\"time\\\":1461217105281\\n         },\\n         \\\"misc\\\":\\\"Shift Start\\\"\\n      },\\n      {  \\n         \\\"eventTime\\\":1460175000000,\\n         \\\"eventType\\\":2,\\n         \\\"id\\\":23,\\n         \\\"location\\\":{  \\n            \\\"address\\\":{  \\n               \\\"formattedAddress\\\":\\\"3101, Mountain View Rd, Santa Clara, CA 95054, USA\\\"\\n            },\\n            \\\"latitude\\\":\\\"37.410857\\\",\\n            \\\"longitude\\\":\\\"-121.985456\\\",\\n            \\\"time\\\":1461218105281\\n         },\\n         \\\"misc\\\":\\\"Break Start\\\"\\n      },\\n      {  \\n         \\\"eventTime\\\":1460176200000,\\n         \\\"eventType\\\":3,\\n         \\\"id\\\":24,\\n         \\\"location\\\":{  \\n            \\\"address\\\":{  \\n               \\\"formattedAddress\\\":\\\"1312 Crossman Ave, Sunnyvale, CA 94089, USA\\\"\\n            },\\n            \\\"latitude\\\":\\\"37.410105\\\",\\n            \\\"longitude\\\":\\\"-122.010499\\\",\\n            \\\"time\\\":1461217185281\\n         },\\n         \\\"misc\\\":\\\"Break End\\\"\\n      },\\n      {  \\n         \\\"eventTime\\\":1460260740000,\\n         \\\"eventType\\\":4,\\n         \\\"id\\\":25,\\n         \\\"location\\\":{  \\n            \\\"address\\\":{  \\n               \\\"formattedAddress\\\":\\\"1399 Charleston Rd, Mountain View, CA 94043, USA\\\"\\n            },\\n            \\\"latitude\\\":\\\"37.420603\\\",\\n            \\\"longitude\\\":\\\"-122.077406\\\",\\n            \\\"time\\\":1461217105281\\n         },\\n         \\\"misc\\\":\\\"Break End\\\"\\n      }\\n   ],\\n   \\\"timeZone\\\":\\\"US/Pacific\\\",\\n   \\\"userId\\\":\\\"b5b0e72b-f659-11e5-b1c8-316e9903837a\\\"\\n}\\n\",\n      \"language\": \"json\",\n      \"name\": \"Sample Payload\"\n    }\n  ]\n}\n[/block]\n##API Response explanation\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"error\",\n    \"0-1\": \"Error status\",\n    \"1-0\": \"result\",\n    \"1-1\": \"API message (Success/Failure)\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]","updates":[],"order":2,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"573314d245fc0c0e00c15418","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"TIMECARD","slug":"timecard","order":10,"from_sync":false,"reference":true,"_id":"573306dea6a9c40e00e13875","version":"559286c6c39c4b2d00127a71","project":"55926c913735880d005f7c65","createdAt":"2016-05-11T10:18:06.559Z","__v":0},"createdAt":"2016-05-11T11:17:38.700Z","githubsync":"","parentDoc":null,"project":"55926c913735880d005f7c65","user":"5656a3dd5656350d001d83a0","editedParams":true,"editedParams2":true,"__v":0,"version":{"version":"1","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["559286c7c39c4b2d00127a72","55928a98c39c4b2d00127a83","5592bd7b9a68220d00f1c3db","5593dcaf0e82e81700334e25","5594342f0c33bd0d000595a3","563081713998420d00a509e4","5630941c7581b80d00c51c86","56309f4ff1c0580d00fac666","567923b8239fac0d00c7df25","573306dea6a9c40e00e13875","577a288fd051530e00f65563","579af3982b865e17005a4357","57ee06aa1e42900e0014a374","5951f49a63f39000159e7ef1","5951f4c563f39000159e7ef2","598951542a9dfc000fcacd40","5b3375cc98cb500003e4b363","5bbcd4e29667280003084100"],"_id":"559286c6c39c4b2d00127a71","createdAt":"2015-06-30T12:08:38.768Z","project":"55926c913735880d005f7c65","releaseDate":"2015-06-30T12:08:38.768Z","__v":18,"forked_from":"559286b6c39c4b2d00127a6e"}}

putEdit

Use this API to modify an existing shift. You can edit shift attributes for events such as shift start, shift end, break start, break end. Only one shift can be updated in a single API call.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

parentShiftId:
required
integer
Unique identifier of the parent shift (A shift with sub activities such as break start, break end etc,. is considered as a parent shift.)
timeCards:
array of objects
Contains information of the shift activities
eventTime:
integer
Timestamp (in milliseconds) during which the shift was updated
eventType:
integer
Type of events separated by comma. The following values are valid: 1 - Shift start , 2 - Break start, 3 - Break End, 4 - Shift End
id:
integer
Unique identifier of the shift
address:
object
Specifies the address of the shift location
formattedAddress:
string
Concatenated string containing the complete address
latitude:
double
Latitude coordinates of the shift location
longitude:
double
Longitude coordinates of the shift location
time:
integer
Address generation timestamp in milliseconds
misc:
string
Additional information about the shift activity

Result Format


Documentation

[block:callout] { "type": "info", "title": "Sample Request", "body": "https://api.azuga.com/azuga-ws/v1/timecard.json" } [/block] [block:code] { "codes": [ { "code": "{ \n \"parentShiftId\":\"22\",\n \"timeCards\":[ \n { \n \"eventTime\":1460174400000,\n \"eventType\":1,\n \"id\":22,\n \"location\":{ \n \"address\":{ \n \"formattedAddress\":\"1803 Ocean Cape Common, San Jose, CA 95131,USA\"\n },\n \"latitude\":\"37.384973\",\n \"longitude\":\"-121.896050\",\n \"time\":1461217105281\n },\n \"misc\":\"Shift Start\"\n },\n { \n \"eventTime\":1460175000000,\n \"eventType\":2,\n \"id\":23,\n \"location\":{ \n \"address\":{ \n \"formattedAddress\":\"3101, Mountain View Rd, Santa Clara, CA 95054, USA\"\n },\n \"latitude\":\"37.410857\",\n \"longitude\":\"-121.985456\",\n \"time\":1461218105281\n },\n \"misc\":\"Break Start\"\n },\n { \n \"eventTime\":1460176200000,\n \"eventType\":3,\n \"id\":24,\n \"location\":{ \n \"address\":{ \n \"formattedAddress\":\"1312 Crossman Ave, Sunnyvale, CA 94089, USA\"\n },\n \"latitude\":\"37.410105\",\n \"longitude\":\"-122.010499\",\n \"time\":1461217185281\n },\n \"misc\":\"Break End\"\n },\n { \n \"eventTime\":1460260740000,\n \"eventType\":4,\n \"id\":25,\n \"location\":{ \n \"address\":{ \n \"formattedAddress\":\"1399 Charleston Rd, Mountain View, CA 94043, USA\"\n },\n \"latitude\":\"37.420603\",\n \"longitude\":\"-122.077406\",\n \"time\":1461217105281\n },\n \"misc\":\"Break End\"\n }\n ],\n \"timeZone\":\"US/Pacific\",\n \"userId\":\"b5b0e72b-f659-11e5-b1c8-316e9903837a\"\n}\n", "language": "json", "name": "Sample Payload" } ] } [/block] ##API Response explanation [block:parameters] { "data": { "h-0": "Field", "h-1": "Description", "0-0": "error", "0-1": "Error status", "1-0": "result", "1-1": "API message (Success/Failure)" }, "cols": 2, "rows": 2 } [/block]

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}