POST visit/create?Token={Token}
Create visit, visitor, visitor's car, document and card in the system. Agenda "Visit" has to be licensed. Privilege "New" of licensed agenda "Visits" required. No record permissions restriction implemented.
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
VisitCreateReqName | Description | Type | Additional information |
---|---|---|---|
VisitId |
The visit identifier |
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}$ |
Visitor |
The visitor encapsulating object |
Visitor |
Required |
Vehicle |
The visitor vehicle object |
VisitorVehicle |
None. |
Trailer |
The visitor trailer object |
VisitorVehicle |
None. |
VisitType |
The visit type object |
VisitType |
Required |
VisitedPerson |
Visited person object |
SimplePerson |
None. |
VisitedOrgStructure |
Organization structure object |
OrgStructure |
None. |
EscortedByPerson |
Visitor's escort object |
SimplePerson |
None. |
Identifier |
Visitor identifier object |
VisitorIdentifier |
None. |
Reason |
The reason of the visit |
string |
Required String length: inclusive between 0 and 4000 |
Photos |
Visitor photos |
Collection of Collection of byte |
None. |
Request Formats
application/json
{"VisitId":"3eca19ca-a718-4501-bbc0-8c376ede1eab","Visitor":null,"Vehicle":null,"Trailer":null,"VisitType":null,"VisitedPerson":null,"VisitedOrgStructure":null,"EscortedByPerson":null,"Identifier":null,"Reason":null,"Photos":null}
application/xml
<Request> <VisitId>3eca19ca-a718-4501-bbc0-8c376ede1eab</VisitId> </Request>
text/json
{ "VisitId": "a76f7c99-b3bc-4b22-9372-c6ea2b471733", "Visitor": { "VisitorId": "5ce7dbec-337f-422d-8c51-43cd828dfe9b", "Name": "sample string 1", "Surname": "sample string 2", "Firm": "sample string 3", "Document": { "Nationality": "sample string 1", "Sex": 2, "Name": "sample string 1", "Surname": "sample string 2", "DocNumber": "sample string 3", "DocType": 4, "DateOfBirth": "2024-11-21T13:14:02.4260189+01:00", "DateExpiration": "2024-11-21T13:14:02.4260189+01:00", "State": "sample string 5" }, "FingerPrintISO": "sample string 4", "FingerPrintSuprema": "sample string 5", "Activities": [ { "ActivityType": { "Title": "sample string 1", "Shortcut": "sample string 2", "Frequency": 3, "Signed": 4 }, "ValidTo": "2024-11-21T13:14:02.4260189+01:00", "Description": "sample string 1", "Attachment": { "Name": "sample string 1", "Description": "sample string 2", "Path": "sample string 3", "Data": "QEA=" } }, { "ActivityType": { "Title": "sample string 1", "Shortcut": "sample string 2", "Frequency": 3, "Signed": 4 }, "ValidTo": "2024-11-21T13:14:02.4260189+01:00", "Description": "sample string 1", "Attachment": { "Name": "sample string 1", "Description": "sample string 2", "Path": "sample string 3", "Data": "QEA=" } } ] }, "Vehicle": { "LicenceNumber": "sample string 1", "Brand": "sample string 2" }, "Trailer": { "LicenceNumber": "sample string 1", "Brand": "sample string 2" }, "VisitType": { "Title": "sample string 1", "Description": "sample string 2", "ActivityTypes": [ { "Title": "sample string 1", "Shortcut": "sample string 2", "Frequency": 3, "Signed": 4 }, { "Title": "sample string 1", "Shortcut": "sample string 2", "Frequency": 3, "Signed": 4 } ], "DocRequested": 3, "VisitedPersonOrStructureRequested": 4, "IdentifierRequested": 5, "VisitPresentOnly": 6, "VisitConfirmation": 7, "VisitValidity": 8, "GenerateEntryCode": 9 }, "VisitedPerson": { "PersonId": "sample string 1", "Name": "sample string 2", "Surname": "sample string 3", "OrganizationStructure": "sample string 4", "Presence": 5 }, "VisitedOrgStructure": { "Structure": "sample string 1", "Title": "sample string 2" }, "EscortedByPerson": { "PersonId": "sample string 1", "Name": "sample string 2", "Surname": "sample string 3", "OrganizationStructure": "sample string 4", "Presence": 5 }, "Identifier": { "InternalNrLong": "sample string 1", "RegistrationNr": "sample string 2" }, "Reason": "sample string 2", "Photos": [ "QEA=", "QEA=" ] }
text/xml
<Request xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <VisitId>a76f7c99-b3bc-4b22-9372-c6ea2b471733</VisitId> <Visitor> <VisitorId>5ce7dbec-337f-422d-8c51-43cd828dfe9b</VisitorId> <Name>sample string 1</Name> <Surname>sample string 2</Surname> <Firm>sample string 3</Firm> <Document> <Nationality>sample string 1</Nationality> <Sex>2</Sex> <Name>sample string 1</Name> <Surname>sample string 2</Surname> <DocNumber>sample string 3</DocNumber> <DocType>4</DocType> <DateOfBirth>2024-11-21T13:14:02.4260189+01:00</DateOfBirth> <DateExpiration>2024-11-21T13:14:02.4260189+01:00</DateExpiration> <State>sample string 5</State> </Document> <FingerPrintISO>sample string 4</FingerPrintISO> <FingerPrintSuprema>sample string 5</FingerPrintSuprema> <Activities> <VisitorActivity> <ActivityType> <Title>sample string 1</Title> <Shortcut>sample string 2</Shortcut> <Frequency>3</Frequency> <Signed>4</Signed> </ActivityType> <ValidTo>2024-11-21T13:14:02.4260189+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> </VisitorActivity> <VisitorActivity> <ActivityType> <Title>sample string 1</Title> <Shortcut>sample string 2</Shortcut> <Frequency>3</Frequency> <Signed>4</Signed> </ActivityType> <ValidTo>2024-11-21T13:14:02.4260189+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> </VisitorActivity> </Activities> </Visitor> <Vehicle> <LicenceNumber>sample string 1</LicenceNumber> <Brand>sample string 2</Brand> </Vehicle> <Trailer> <LicenceNumber>sample string 1</LicenceNumber> <Brand>sample string 2</Brand> </Trailer> <VisitType> <Title>sample string 1</Title> <Description>sample string 2</Description> <ActivityTypes> <VisitorActivityType> <Title>sample string 1</Title> <Shortcut>sample string 2</Shortcut> <Frequency>3</Frequency> <Signed>4</Signed> </VisitorActivityType> <VisitorActivityType> <Title>sample string 1</Title> <Shortcut>sample string 2</Shortcut> <Frequency>3</Frequency> <Signed>4</Signed> </VisitorActivityType> </ActivityTypes> <DocRequested>3</DocRequested> <VisitedPersonOrStructureRequested>4</VisitedPersonOrStructureRequested> <IdentifierRequested>5</IdentifierRequested> <VisitPresentOnly>6</VisitPresentOnly> <VisitConfirmation>7</VisitConfirmation> <VisitValidity>8</VisitValidity> <GenerateEntryCode>9</GenerateEntryCode> </VisitType> <VisitedPerson> <PersonId>sample string 1</PersonId> <Name>sample string 2</Name> <Surname>sample string 3</Surname> <OrganizationStructure>sample string 4</OrganizationStructure> <Presence>5</Presence> </VisitedPerson> <VisitedOrgStructure> <Structure>sample string 1</Structure> <Title>sample string 2</Title> </VisitedOrgStructure> <EscortedByPerson> <PersonId>sample string 1</PersonId> <Name>sample string 2</Name> <Surname>sample string 3</Surname> <OrganizationStructure>sample string 4</OrganizationStructure> <Presence>5</Presence> </EscortedByPerson> <Identifier> <InternalNrLong>sample string 1</InternalNrLong> <RegistrationNr>sample string 2</RegistrationNr> </Identifier> <Reason>sample string 2</Reason> <Photos> <base64Binary>QEA=</base64Binary> <base64Binary>QEA=</base64Binary> </Photos> </Request>
Response Information
Response Codes
Http Code | Error Number | Description |
---|---|---|
200 request succesfully done | 0 | Successfully done |
202 accepted for processing | 0 | Create activity of type [{0}] for visitor [{1}] failed. Exception:{2} |
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 | 1520 | Privilege New of agenda Visits violated for [VisitID {0}] |
403 server refuses fo fulfill the request | 8 | Not licensed |
403 server refuses fo fulfill the request | 1506 | VisitId [{0}] already exist |
403 server refuses fo fulfill the request | 1533 | Fp by other person |
403 server refuses fo fulfill the request | 1 | Db operation failed, agenda missing priviliges |
403 server refuses fo fulfill the request | 2 | Db operation failed, record missing priviliges |
403 server refuses fo fulfill the request | 3 | Db operation failed, Record duplicity |
403 server refuses fo fulfill the request | 4 | Db operation failed, already changed by another user |
403 server refuses fo fulfill the request | 5 | Db operation failed, already deleted by another user |
403 server refuses fo fulfill the request | 6 | Db operation failed, database data consistence violation |
403 server refuses fo fulfill the request | 7 | Db operation failed, operation can not be executed because another problems occured |
403 server refuses fo fulfill the request | 8 | Not licensed |
404 required resource does not exist on the server | 1160 | Organization structure [{0}] not found |
404 required resource does not exist on the server | 1508 | Visited person [personId: {0}] not found |
404 required resource does not exist on the server | 1509 | Escort [personId: {0}] not found |
404 required resource does not exist on the server | 1510 | Visit type [{0}] not found |
404 required resource does not exist on the server | 1511 | Visitor identifier [{0}] not found |
404 required resource does not exist on the server | 1512 | Visitor identifier type [{0}] is wrong |
404 required resource does not exist on the server | 1513 | Visitor identifier is already assigned to person [{0}] |
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
BaseRespOfVisitCreateReqName | Description | Type | Additional information |
---|---|---|---|
Result | RequestResult |
None. |
|
Request | VisitCreateReq |
None. |
Response Formats
application/json
{"Result":{"Message":"Processed with result: ExecOK","Code":0,"ModelStateErr":null},"Request":{"VisitId":"3eca19ca-a718-4501-bbc0-8c376ede1eab","Visitor":null,"Vehicle":null,"Trailer":null,"VisitType":null,"VisitedPerson":null,"VisitedOrgStructure":null,"EscortedByPerson":null,"Identifier":null,"Reason":null,"Photos":null}}
application/xml
<Response> <Result> <Message>Processed with result: ExecOK</Message> <Code>0</Code> </Result> <Request> <VisitId>3eca19ca-a718-4501-bbc0-8c376ede1eab</VisitId> </Request> </Response>
text/json
{ "Result": { "Message": "sample string 1", "Code": 2, "ModelStateErr": [ "sample string 1", "sample string 2" ] }, "Request": { "VisitId": "e4fe27b5-18b6-43b8-8eae-513fcd7b1d18", "Visitor": { "VisitorId": "b0e6e493-e81b-4c50-9c0d-1d3f3422bc6b", "Name": "sample string 1", "Surname": "sample string 2", "Firm": "sample string 3", "Document": { "Nationality": "sample string 1", "Sex": 2, "Name": "sample string 1", "Surname": "sample string 2", "DocNumber": "sample string 3", "DocType": 4, "DateOfBirth": "2024-11-21T13:14:02.4573312+01:00", "DateExpiration": "2024-11-21T13:14:02.4573312+01:00", "State": "sample string 5" }, "FingerPrintISO": "sample string 4", "FingerPrintSuprema": "sample string 5", "Activities": [ { "ActivityType": { "Title": "sample string 1", "Shortcut": "sample string 2", "Frequency": 3, "Signed": 4 }, "ValidTo": "2024-11-21T13:14:02.4573312+01:00", "Description": "sample string 1", "Attachment": { "Name": "sample string 1", "Description": "sample string 2", "Path": "sample string 3", "Data": "QEA=" } }, { "ActivityType": { "Title": "sample string 1", "Shortcut": "sample string 2", "Frequency": 3, "Signed": 4 }, "ValidTo": "2024-11-21T13:14:02.4573312+01:00", "Description": "sample string 1", "Attachment": { "Name": "sample string 1", "Description": "sample string 2", "Path": "sample string 3", "Data": "QEA=" } } ] }, "Vehicle": { "LicenceNumber": "sample string 1", "Brand": "sample string 2" }, "Trailer": { "LicenceNumber": "sample string 1", "Brand": "sample string 2" }, "VisitType": { "Title": "sample string 1", "Description": "sample string 2", "ActivityTypes": [ { "Title": "sample string 1", "Shortcut": "sample string 2", "Frequency": 3, "Signed": 4 }, { "Title": "sample string 1", "Shortcut": "sample string 2", "Frequency": 3, "Signed": 4 } ], "DocRequested": 3, "VisitedPersonOrStructureRequested": 4, "IdentifierRequested": 5, "VisitPresentOnly": 6, "VisitConfirmation": 7, "VisitValidity": 8, "GenerateEntryCode": 9 }, "VisitedPerson": { "PersonId": "sample string 1", "Name": "sample string 2", "Surname": "sample string 3", "OrganizationStructure": "sample string 4", "Presence": 5 }, "VisitedOrgStructure": { "Structure": "sample string 1", "Title": "sample string 2" }, "EscortedByPerson": { "PersonId": "sample string 1", "Name": "sample string 2", "Surname": "sample string 3", "OrganizationStructure": "sample string 4", "Presence": 5 }, "Identifier": { "InternalNrLong": "sample string 1", "RegistrationNr": "sample string 2" }, "Reason": "sample string 2", "Photos": [ "QEA=", "QEA=" ] } }
text/xml
<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> <VisitId>e4fe27b5-18b6-43b8-8eae-513fcd7b1d18</VisitId> <Visitor> <VisitorId>b0e6e493-e81b-4c50-9c0d-1d3f3422bc6b</VisitorId> <Name>sample string 1</Name> <Surname>sample string 2</Surname> <Firm>sample string 3</Firm> <Document> <Nationality>sample string 1</Nationality> <Sex>2</Sex> <Name>sample string 1</Name> <Surname>sample string 2</Surname> <DocNumber>sample string 3</DocNumber> <DocType>4</DocType> <DateOfBirth>2024-11-21T13:14:02.4573312+01:00</DateOfBirth> <DateExpiration>2024-11-21T13:14:02.4573312+01:00</DateExpiration> <State>sample string 5</State> </Document> <FingerPrintISO>sample string 4</FingerPrintISO> <FingerPrintSuprema>sample string 5</FingerPrintSuprema> <Activities> <VisitorActivity> <ActivityType> <Title>sample string 1</Title> <Shortcut>sample string 2</Shortcut> <Frequency>3</Frequency> <Signed>4</Signed> </ActivityType> <ValidTo>2024-11-21T13:14:02.4573312+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> </VisitorActivity> <VisitorActivity> <ActivityType> <Title>sample string 1</Title> <Shortcut>sample string 2</Shortcut> <Frequency>3</Frequency> <Signed>4</Signed> </ActivityType> <ValidTo>2024-11-21T13:14:02.4573312+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> </VisitorActivity> </Activities> </Visitor> <Vehicle> <LicenceNumber>sample string 1</LicenceNumber> <Brand>sample string 2</Brand> </Vehicle> <Trailer> <LicenceNumber>sample string 1</LicenceNumber> <Brand>sample string 2</Brand> </Trailer> <VisitType> <Title>sample string 1</Title> <Description>sample string 2</Description> <ActivityTypes> <VisitorActivityType> <Title>sample string 1</Title> <Shortcut>sample string 2</Shortcut> <Frequency>3</Frequency> <Signed>4</Signed> </VisitorActivityType> <VisitorActivityType> <Title>sample string 1</Title> <Shortcut>sample string 2</Shortcut> <Frequency>3</Frequency> <Signed>4</Signed> </VisitorActivityType> </ActivityTypes> <DocRequested>3</DocRequested> <VisitedPersonOrStructureRequested>4</VisitedPersonOrStructureRequested> <IdentifierRequested>5</IdentifierRequested> <VisitPresentOnly>6</VisitPresentOnly> <VisitConfirmation>7</VisitConfirmation> <VisitValidity>8</VisitValidity> <GenerateEntryCode>9</GenerateEntryCode> </VisitType> <VisitedPerson> <PersonId>sample string 1</PersonId> <Name>sample string 2</Name> <Surname>sample string 3</Surname> <OrganizationStructure>sample string 4</OrganizationStructure> <Presence>5</Presence> </VisitedPerson> <VisitedOrgStructure> <Structure>sample string 1</Structure> <Title>sample string 2</Title> </VisitedOrgStructure> <EscortedByPerson> <PersonId>sample string 1</PersonId> <Name>sample string 2</Name> <Surname>sample string 3</Surname> <OrganizationStructure>sample string 4</OrganizationStructure> <Presence>5</Presence> </EscortedByPerson> <Identifier> <InternalNrLong>sample string 1</InternalNrLong> <RegistrationNr>sample string 2</RegistrationNr> </Identifier> <Reason>sample string 2</Reason> <Photos> <base64Binary>QEA=</base64Binary> <base64Binary>QEA=</base64Binary> </Photos> </Request> </Response>