POST visitor/createActivity?Token={Token}
Create visitor activity. Agenda "Visit" has to be licensed. Privilege "Edit" of licensed agenda "Visitors - Persons" required. Privilege "Edit" of item "Activities" of licensed agenda "Visitors - Persons" required. Functionality may also be restricted by record permission "Edit" of agenda "Visitors - Persons"
Request Information
Authorization
- Authorization by token required
Availability
- Method disabled by configuration
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
Token |
The action is authorized by this token. Token should generated by calling action "POST login". Expiration time of each token is 20 seconds |
globally unique identifier |
Required |
Body Parameters
VisitorActivityCreateReqName | Description | Type | Additional information |
---|---|---|---|
VisitorId |
Unique identification of the visitor in the system |
globally unique identifier |
Required Matching regular expression pattern: ^({){0,1}[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}(}){0,1}$ |
Activity |
Visitor activity encapsulating object |
VisitorActivity |
Required |
Request Formats
application/json
Sample:
{"VisitorId":"c51acfaf-57e4-4082-8276-af9dabef33dc","Activity":{"ActivityType":{"Title":"Activity A","Shortcut":"AA","Frequency":0,"Signed":0},"ValidTo":"\/Date(1732230000000)\/","Description":"Some description of this activity","Attachment":null}}
application/xml
Sample:
<Request> <VisitorId>c51acfaf-57e4-4082-8276-af9dabef33dc</VisitorId> <Activity> <ActivityType> <Title>Activity A</Title> <Shortcut>AA</Shortcut> <Frequency>0</Frequency> <Signed>0</Signed> </ActivityType> <ValidTo>2024-11-22T00:00:00+01:00</ValidTo> <Description>Some description of this activity</Description> </Activity> </Request>
text/json
Sample:
{ "VisitorId": "fe4ac706-51bc-468f-a741-a35f5846d432", "Activity": { "ActivityType": { "Title": "sample string 1", "Shortcut": "sample string 2", "Frequency": 3, "Signed": 4 }, "ValidTo": "2024-11-21T12:54:16.8148092+01:00", "Description": "sample string 1", "Attachment": { "Name": "sample string 1", "Description": "sample string 2", "Path": "sample string 3", "Data": "QEA=" } } }
text/xml
Sample:
<Request xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <VisitorId>fe4ac706-51bc-468f-a741-a35f5846d432</VisitorId> <Activity> <ActivityType> <Title>sample string 1</Title> <Shortcut>sample string 2</Shortcut> <Frequency>3</Frequency> <Signed>4</Signed> </ActivityType> <ValidTo>2024-11-21T12:54:16.8148092+01:00</ValidTo> <Description>sample string 1</Description> <Attachment> <Name>sample string 1</Name> <Description>sample string 2</Description> <Path>sample string 3</Path> <Data>QEA=</Data> </Attachment> </Activity> </Request>
Response Information
Response Codes
Http Code | Error Number | Description |
---|---|---|
200 request succesfully done | 0 | Successfully done |
400 bad request | 1002 | Entry parameter missing or parameter bindigs failed |
401 unauthorized | 1000 | Token {0} not found |
401 unauthorized | 1001 | Token {0} already expired |
401 unauthorized | 1006 | Ip filter violated for ip client address [{0}] |
401 unauthorized | 1007 | Ip filter [{0}] parsing failed |
401 unauthorized | 1008 | Request rate policy violated for [{0}] |
403 server refuses fo fulfill the request | 1536 | Privilege Edit of agenda Visitors-Persons violated for [Visitor Id{0}] |
403 server refuses fo fulfill the request | 1535 | Privilege Edit of item Activities of agenda Visitors-Persons violated for [VisitorId {0}] |
403 server refuses fo fulfill the request | 1539 | Record permission Edit of agenda Visitor - Persons violated for [{0}] |
403 server refuses fo fulfill the request | 1525 | Create activity of type [{0}] for visitor [{1}] failed. Exception:{2} |
403 server refuses fo fulfill the request | 8 | Not licensed |
404 required resource does not exist on the server | 1100 | PersonId [{0}] not found |
415 unsupported Media Type | The request entity has a media type which the server or resource does not support. Only application/json and application/xml are supported | |
500 internal error | Server exception description |
Resource Description
BaseRespOfVisitorActivityCreateReqName | Description | Type | Additional information |
---|---|---|---|
Result | RequestResult |
None. |
|
Request | VisitorActivityCreateReq |
None. |
Response Formats
application/json
Sample:
{"Result":{"Message":"Processed with result: ExecOK","Code":0,"ModelStateErr":null},"Request":{"VisitorId":"c51acfaf-57e4-4082-8276-af9dabef33dc","Activity":{"ActivityType":{"Title":"Activity A","Shortcut":"AA","Frequency":0,"Signed":0},"ValidTo":"\/Date(1732230000000)\/","Description":"Some description of this activity","Attachment":null}}}
application/xml
Sample:
<Response> <Result> <Message>Processed with result: ExecOK</Message> <Code>0</Code> </Result> <Request> <VisitorId>c51acfaf-57e4-4082-8276-af9dabef33dc</VisitorId> <Activity> <ActivityType> <Title>Activity A</Title> <Shortcut>AA</Shortcut> <Frequency>0</Frequency> <Signed>0</Signed> </ActivityType> <ValidTo>2024-11-22T00:00:00+01:00</ValidTo> <Description>Some description of this activity</Description> </Activity> </Request> </Response>
text/json
Sample:
{ "Result": { "Message": "sample string 1", "Code": 2, "ModelStateErr": [ "sample string 1", "sample string 2" ] }, "Request": { "VisitorId": "00b3cc48-9178-45d9-a3e0-aa0ef632152a", "Activity": { "ActivityType": { "Title": "sample string 1", "Shortcut": "sample string 2", "Frequency": 3, "Signed": 4 }, "ValidTo": "2024-11-21T12:54:16.8304245+01:00", "Description": "sample string 1", "Attachment": { "Name": "sample string 1", "Description": "sample string 2", "Path": "sample string 3", "Data": "QEA=" } } } }
text/xml
Sample:
<Response xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Result> <Message>sample string 1</Message> <Code>2</Code> <ModelStateErr> <string>sample string 1</string> <string>sample string 2</string> </ModelStateErr> </Result> <Request> <VisitorId>00b3cc48-9178-45d9-a3e0-aa0ef632152a</VisitorId> <Activity> <ActivityType> <Title>sample string 1</Title> <Shortcut>sample string 2</Shortcut> <Frequency>3</Frequency> <Signed>4</Signed> </ActivityType> <ValidTo>2024-11-21T12:54:16.8304245+01:00</ValidTo> <Description>sample string 1</Description> <Attachment> <Name>sample string 1</Name> <Description>sample string 2</Description> <Path>sample string 3</Path> <Data>QEA=</Data> </Attachment> </Activity> </Request> </Response>