Updates an existing Invitation
1 min
PUT
https://openapi.sine.co/v1/api/invitations/{invitationId}
Path Parameters
- invitationIdstring<uuid>requiredExampleDescriptionFormatuuid
Query Parameters
- suppressEmailbooleanExampleDescription
Header Parameters
- x-sine-team-idstring<uuid>requiredDescriptionFormatuuid
Body Parameters
- bodyobjectrequiredExample
{ "firstName": "James", "lastName": "Bond", "visitorTypeName": "Delivery", "visitorTypeId": "019fe2b4-f2ee-4a19-873d-ddb4f014dfce", "startDate": "2021-09-20T11:00:00.000Z", "endDate": "2021-09-22T09:00:00.000Z", "siteId": "019fe2b4-f2ee-4a19-873d-ddb4f014dfce", "email": "[email protected]", "mobile": "+61405107480", "companyName": "Sine", "subject": "Invitation Subject", "hostGroupName": "Staff", "hostEmail": "[email protected]", "adminNotes": "A message for admin", "visitorNotes": "A message to guest" }Description- object
- object
Responses
200
- objectExample
{ "id": "019fe2b4-f2ee-4a19-873d-ddb4f014dfce", "firstName": "James", "lastName": "Bond", "visitorType": { "id": "019fe2b4-f2ee-4a19-873d-ddb4f014dfce", "name": "Delivery" }, "startDate": "2021-09-20T11:00:00.000Z", "endDate": "2021-09-22T09:00:00.000Z", "site": { "id": "019fe2b4-f2ee-4a19-873d-ddb4f014dfce", "name": "Sine", "address": "100 Pirie St, Adelaide SA 5000", "latitude": -34.925, "longitude": 138.604 }, "email": "[email protected]", "mobile": "+61405107480", "subject": "Invitation Subject", "host": { "id": "079fe2b4-f2ee-4a19-873d-ddb4f014dfce", "firstName": "Example", "lastName": "Person", "hostGroupName": "Staff", "email": "[email protected]" }, "adminNotes": "A message for admin", "visitorNotes": "A message to guest", "updated": "2021-09-22T09:00:00.000Z", "fastTrackCode": "12332", "emailSent": true, "emailReminderTime": "2021-09-22T09:00:00.000Z", "created": "2021-09-22T09:00:00.000Z", "cancelled": "2021-09-22T09:00:00.000Z", "actioned": false, "activePassCount": 1, "company": { "id": "019fe2b4-f2ee-4a19-873d-ddb4f014dfce", "name": "Sine" } }- idstring<uuid>ExampleDescriptionFormatuuid
- firstNamestringExampleDescription
- lastNamestringExampleDescription
- visitorTypeobjectExample
{ "id": "019fe2b4-f2ee-4a19-873d-ddb4f014dfce", "name": "Delivery" }- idstring<uuid>ExampleDescriptionFormatuuid
- namestringExampleDescription
- startDatestring<date-time>ExampleDescriptionFormatdate-time
- endDatestring<date-time>ExampleDescriptionFormatdate-time
- siteobjectExample
{ "id": "019fe2b4-f2ee-4a19-873d-ddb4f014dfce", "name": "Sine", "address": "100 Pirie St, Adelaide SA 5000", "latitude": -34.925, "longitude": 138.604 }- idstring<uuid>ExampleDescriptionFormatuuid
- namestringExampleDescription
- addressstringExampleDescription
- latitudenumber<float>ExampleDescriptionFormatfloat
- longitudenumber<float>ExampleDescriptionFormatfloat
- emailstring<email>ExampleDescriptionFormatemail
- mobilestringExampleDescription
- subjectstringExampleDescription
- hostobjectExample
{ "id": "079fe2b4-f2ee-4a19-873d-ddb4f014dfce", "firstName": "Example", "lastName": "Person", "hostGroupName": "Staff", "email": "[email protected]" }- idstring<uuid>ExampleDescriptionFormatuuid
- firstNamestringExampleDescription
- lastNamestringExampleDescription
- hostGroupNamestringExampleDescription
- emailstringExampleDescription
- adminNotesstringExampleDescriptionMax Length1000
- visitorNotesstringExampleDescriptionMax Length4000
- updatedstring<date-time>ExampleDescriptionFormatdate-time
- fastTrackCodenumberExampleDescription
- emailSentbooleanExampleDescription
- emailReminderTimestring<date-time>ExampleDescriptionFormatdate-time
- createdstring<date-time>ExampleDescriptionFormatdate-time
- cancelledstring<date-time>ExampleDescriptionFormatdate-time
- actionedbooleanDescription
- activePassCountnumberExampleDescription
- companyobjectExample
{ "id": "019fe2b4-f2ee-4a19-873d-ddb4f014dfce", "name": "Sine" }- idstring<uuid>DescriptionFormatuuid
- namestringDescription
400
- objectExample
{ "code": "BAD_REQUEST", "message": "The request is invalid" }- codestringExampleDescription
- messagestringExampleDescription
401
- objectExample
{ "code": "UNAUTHORIZED", "message": "Invalid authentication credentials" }- codestringExampleDescription
- messagestringExampleDescription
403
- objectExample
{ "code": "FORBIDDEN", "message": "You are not allowed to access this information" }- codestringExampleDescription
- messagestringExampleDescription
404
- objectExample
{ "code": "SITE_NOT_FOUND", "message": "SiteNotFoundError" }- codestringExampleDescription
- messagestringExampleDescription
424
- objectExample
{ "code": "CONSUMER_ERROR", "message": "Unexpected error while communicating with downstream service, please try again" }- codestringExampleDescription
- messagestringExampleDescription
429
- objectExample
{ "code": "RATE_LIMITED", "message": "API rate limit exceeded" }- codestringExampleDescription
- messagestringExampleDescription
500
- objectExample
{ "code": "INTERNAL_SERVER_ERROR", "message": "Something went wrong, please try again later" }- codestringExampleDescription
- messagestringExampleDescription
curl
curl --request PUT \
--url https://openapi.sine.co/v1/api/invitations/{invitationId} \
--header 'accept: application/json' \
--header 'x-sine-team-id: string<uuid>'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("x-sine-team-id", "string<uuid>");
var requestOptions = {
method: 'PUT',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://openapi.sine.co/v1/api/invitations/{invitationId}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
import json
url = "https://openapi.sine.co/v1/api/invitations/{invitationId}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-sine-team-id': 'string<uuid>'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
200
// OK - Invitation updated successfully
{
"id": "019fe2b4-f2ee-4a19-873d-ddb4f014dfce",
"firstName": "James",
"lastName": "Bond",
"visitorType": {
"id": "019fe2b4-f2ee-4a19-873d-ddb4f014dfce",
"name": "Delivery"
},
"startDate": "2021-09-20T11:00:00.000Z",
"endDate": "2021-09-22T09:00:00.000Z",
"site": {
"id": "019fe2b4-f2ee-4a19-873d-ddb4f014dfce",
"name": "Sine",
"address": "100 Pirie St, Adelaide SA 5000",
"latitude": -34.925,
"longitude": 138.604
},
"email": "[email protected]",
"mobile": "+61405107480",
"subject": "Invitation Subject",
"host": {
"id": "079fe2b4-f2ee-4a19-873d-ddb4f014dfce",
"firstName": "Example",
"lastName": "Person",
"hostGroupName": "Staff",
"email": "[email protected]"
},
"adminNotes": "A message for admin",
"visitorNotes": "A message to guest",
"updated": "2021-09-22T09:00:00.000Z",
"fastTrackCode": "12332",
"emailSent": true,
"emailReminderTime": "2021-09-22T09:00:00.000Z",
"created": "2021-09-22T09:00:00.000Z",
"cancelled": "2021-09-22T09:00:00.000Z",
"actioned": false,
"activePassCount": 1,
"company": {
"id": "",
"name": ""
}
}400
// Bad request
{
"code": "BAD_REQUEST",
"message": "The request is invalid"
}401
// Unauthorized
{
"code": "UNAUTHORIZED",
"message": "Invalid authentication credentials"
}403
// Forbidden
{
"code": "FORBIDDEN",
"message": "You are not allowed to access this information"
}404
// Resource not found
{
"code": "SITE_NOT_FOUND",
"message": "SiteNotFoundError"
}424
// Service dependency failed
{
"code": "CONSUMER_ERROR",
"message": "Unexpected error while communicating with downstream service, please try again"
}429
// Too many requests
{
"code": "RATE_LIMITED",
"message": "API rate limit exceeded"
}500
// Internal server error
{
"code": "INTERNAL_SERVER_ERROR",
"message": "Something went wrong, please try again later"
}