Location API (Get , Create and Update)
Get Locations : Provides the details of Locations via Litmos Commerce API.
Note: All requests must be Authenticated.
Authentication and Authorization
Information used for API authentication and authorization is submitted in the request header. The following header name/values are required with each request.
Header | Description |
CompanyLoginId | Company Login Id (provisioned by ViewCentral account management) |
ProductId | Product Id. 1=Learning Management, 2=Event Management |
Username | User account username |
Password | User account password |
Request URI :
1. Get details of all Locations in Litmos commerce application (subscription listing and bundle are excluded) –
GET https://api.viewcentral.com/api/Locations
Response Codes:
HTTP Status | Description |
200 | Operation successful. Location object returned in response |
400 | Operation not successful. Response contains error information |
404 | Operation not successful. Location object not found |
Response Example:
{ "Success": true, "Error": null, "Data": [ { "Active": "Bool", "City": "String [max length 100]", "Country": "String [max length 2]", "Id": "Int [auto generated]", "Fax": "String [max length 50]", "ScheduleDefaultStartTime": "datetime [yyyy-mm-ddThh:mm:ssZ]", "ScheduleDefaultEndTime": "datetime [yyyy-mm-ddThh:mm:ssZ]", "Description": "String [max length unlimited]", "Group": "String [max length 255]", "Name": "String [max length 200]", "Type": "String [max length 255]", "Url": "String [max length 255]", "MinSeats": "Int [max length 10]", "MaxSeats": "Int [max length10]", "OtherStateProvince": "String [max length 100]", "Phone": "String [max length 50]", "PostalCode": "String [max length 20]", "ResourceGroup": "String [max length 255]", "RoomRentalRate": "Int [max length 9]", "StateProvince": "String [max length 2]", "Street1": "String [max length 50]", "Street2": "String [max length 50]", "ScheduleDefaultTimeZone": "String [max length 72]", "CustomDetail1": "String [max length 1024]", "CustomDetail2": "String [max length 1024]", "CustomDetail3": "String [max length 1024]", "DeliveryMethod": "String [INSTRUCTOR]", "Vendor": { "ID": "Int [max length 20]" }, "AttendeeJoinInstructions": "String [max length 255]", "AttendeeJoinAudio": "String [max length 255]", "HostJoinInstructions": "String [max length 255]", "HostJoinAudio": "String [max length 255]", "JoinMeetingUrl": "String [max length 255]", "TaxShipAddress": "Bool", "SuppressAttendeeView": "Bool", "Modified": { "CreatedBy": "string [max length 50]", "CreatedDate": "datetime [yyyy-mm-ddThh:mm:ssZ]", "UpdatedBy": "string [max length 50]", "UpdatedDate": "datetime [yyyy-mm-ddThh:mm:ssZ]" }, "Links": [ { "Rel": "Self", "Href": "/locations/{id}", "Method": "GET" }, { "Rel": "Sublocations", "Href": "/locations/{id}/sublocations", "Method": "GET" } ] } ] }
2.Get details of locations using filter in Litmos commerce application (subscription listing and bundle are excluded) –
GET https://api.viewcentral.com/api/locations?name=
Request Filters : Name = Location name.
Sl.No | Key | Value |
1 | name | String [max length 200] |
Response Codes:
HTTP Status | Description |
200 | Operation successful. Location object returned in response |
400 | Operation not successful. Response contains error information |
404 | Operation not successful. Location object not found |
Response Example:
Please refer to the above response example found in point 1.
1. Get details of location using location id in Litmos commerce application (subscription listing and bundle are excluded) –
GET https://api.viewcentral.com/api/locations/{ID}
Response :
HTTP Status | Description |
200 | Operation successful. Location object returned in response |
400 | Operation not successful. Response contains error information |
404 | Operation not successful. Location object not found |
Response Example:
Please refer to the above response example found in point 1.
—
Create Location (ClassRoom only) :
Create location via Litmos Commerce API. (Provide location object in request body).
Note: All requests must be Authenticated.
Authentication and Authorization
Information used for API authentication and authorization is submitted in the request header. The following header name/values are required with each request.
Header | Description |
CompanyLoginId | Company Login Id (provisioned by LTO account management) |
ProductId | Product Id. 1=Learning Management, 2=Event Management |
Username | User account username |
Password | User account password |
Request: Provide create location object in request body
URI: POST https://api.viewcentral.com/api/Locations
Request Example :
{ "Active": "Bool [Required]", "City": "Optional String [max length 100]", "Country": "Required String [max length 2]", "Fax": "Optional String [max length 50]", "ScheduleDefaultStartTime": "Optional datetime [yyyy-mm-ddThh:mm:ssZ]", "ScheduleDefaultEndTime": "Optional datetime [yyyy-mm-ddThh:mm:ssZ]", "Description": "Optional String [max length unlimited]", "Group": "Optional String [max length 255]", "Name": "Required String [max length 200]", "Type": "Optional String [max length 255]", "Url": "Optional String [max length 255]", "MinSeats": "Optional Int [max length 10]", "MaxSeats": "Optional Int [max length 10]", "OtherStateProvince": "Optional String [max length 100]", "Phone": "Optional String [max length 50]", "PostalCode": "Optional String [max length 20]", "ResourceGroup": "Optional String [max length 255]", "RoomRentalRate": "Optional Int [max length 9]", "StateProvince": "Optional String [max length 2]", "Street1": "Optional String [max length 50]", "Street2": "Optional String [max length 50]", "ScheduleDefaultTimeZone": "Optional String [max length 72]", "CustomDetail1": "Optional String [max length 1024]", "CustomDetail2": "Optional String [max length 1024]", "CustomDetail3": "Optional String [max length 1024]", "DeliveryMethod": "Required String [INSTRUCTOR]", "Vendor": { "ID": "Optional Int [max length 20]" } }
Response Codes:
HTTP Status | Description |
200 | Operation successful. Location object returned in response |
400 | Operation not successful. Response contains error information |
404 | Operation not successful. Location object not found |
Response Example:
{ "Success": true, "Error": null, "Data": [ { "Active": "Bool", "City": "String [max length 100]", "Country": "String [max length 2]", "Id": "Int [auto generated]", "Fax": "String [max length 50]", "ScheduleDefaultStartTime": "datetime [yyyy-mm-ddThh:mm:ssZ]", "ScheduleDefaultEndTime": "datetime [yyyy-mm-ddThh:mm:ssZ]", "Description": "String [max length unlimited]", "Group": "String [max length 255]", "Name": "String [max length 200]", "Type": "String [max length 255]", "Url": "String [max length 255]", "MinSeats": "Int [max length 10]", "MaxSeats": "Int [max length10]", "OtherStateProvince": "String [max length 100]", "Phone": "String [max length 50]", "PostalCode": "String [max length 20]", "ResourceGroup": "String [max length 255]", "RoomRentalRate": "Int [max length 9]", "StateProvince": "String [max length 2]", "Street1": "String [max length 50]", "Street2": "String [max length 50]", "ScheduleDefaultTimeZone": "String [max length 72]", "CustomDetail1": "String [max length 1024]", "CustomDetail2": "String [max length 1024]", "CustomDetail3": "String [max length 1024]", "DeliveryMethod": "String [INSTRUCTOR]", "Vendor": { "ID": "Int [max length 20]" }, "AttendeeJoinInstructions": "String [max length 255]", "AttendeeJoinAudio": "String [max length 255]", "HostJoinInstructions": "String [max length 255]", "HostJoinAudio": "String [max length 255]", "JoinMeetingUrl": "String [max length 255]", "TaxShipAddress": "Bool", "SuppressAttendeeView": "Bool", "Modified": { "CreatedBy": "string [max length 50]", "CreatedDate": "datetime [yyyy-mm-ddThh:mm:ssZ]", "UpdatedBy": "string [max length 50]", "UpdatedDate": "datetime [yyyy-mm-ddThh:mm:ssZ]" }, "Links": [ { "Rel": "Self", "Href": "/locations/{id}", "Method": "GET" }, { "Rel": "Sublocations", "Href": "/locations/{id}/sublocations", "Method": "GET" } ] } ] }
—
Update Location (ClassRoom only) :
Update location via Litmos Commerce API. (Provide location object in request body).
Note: All requests must be Authenticated.
Authentication and Authorization
Information used for API authentication and authorization is submitted in the request header. The following header name/values are required with each request.
Header | Description |
CompanyLoginId | Company Login Id (provisioned by ViewCentral account management) |
ProductId | Product Id. 1=Learning Management, 2=Event Management |
Username | User account username |
Password | User account password |
Request : Provide updated Location object in request body.
URI: PUT https://api.viewcentral.com/api/locations/{ID}
NOTE: this operation supports complete object update as well as partial object update. If the API request data does not supply ALL properties/fields with their intended values, the fields not supplied will be assigned the default value: NULL. If record previously had data in this field, the value will now be set to previous value. For example, location record is added with the ‘Description’ set to “Location Description”. With the API (PUT action) to update, if the location.‘Description’ property is not supplied in the API request, the ‘Description’ value will not be changed means it has value of “Location Description”.
Request example:
{ "Active": "Bool [Required]", "City": "Optional String [max length 100]", "Country": "Required String [max length 2]", "Fax": "Optional String [max length 50]", "ScheduleDefaultStartTime": "Optional datetime [yyyy-mm-ddThh:mm:ssZ]", "ScheduleDefaultEndTime": "Optional datetime [yyyy-mm-ddThh:mm:ssZ]", "Description": "Optional String [max length unlimited]", "Group": "Optional String [max length 255]", "Name": "Required String [max length 200]", "Type": "Optional String [max length 255]", "Url": "Optional String [max length 255]", "MinSeats": "Optional Int [max length 10]", "MaxSeats": "Optional Int [max length 10]", "OtherStateProvince": "Optional String [max length 100]", "Phone": "Optional String [max length 50]", "PostalCode": "Optional String [max length 20]", "ResourceGroup": "Optional String [max length 255]", "RoomRentalRate": "Optional Int [max length 9]", "StateProvince": "Optional String [max length 2]", "Street1": "Optional String [max length 50]", "Street2": "Optional String [max length 50]", "ScheduleDefaultTimeZone": "Optional String [max length 72]", "CustomDetail1": "Optional String [max length 1024]", "CustomDetail2": "Optional String [max length 1024]", "CustomDetail3": "Optional String [max length 1024]", "DeliveryMethod": "Optional String [INSTRUCTOR]", "Vendor": { "ID": "Optional Int [max length 20]" } }
Response Codes:
HTTP Status | Description |
200 | Operation successful. Location object returned in response |
400 | Operation not successful. Response contains error information |
404 | Operation not successful. Location object not found |
Response Example:
{ "Success": true, "Error": null, "Data": [ { "Active": "Bool", "City": "String [max length 100]", "Country": "String [max length 2]", "Id": "Int [auto generated]", "Fax": "String [max length 50]", "ScheduleDefaultStartTime": "datetime [yyyy-mm-ddThh:mm:ssZ]", "ScheduleDefaultEndTime": "datetime [yyyy-mm-ddThh:mm:ssZ]", "Description": "String [max length unlimited]", "Group": "String [max length 255]", "Name": "String [max length 200]", "Type": "String [max length 255]", "Url": "String [max length 255]", "MinSeats": "Int [max length 10]", "MaxSeats": "Int [max length10]", "OtherStateProvince": "String [max length 100]", "Phone": "String [max length 50]", "PostalCode": "String [max length 20]", "ResourceGroup": "String [max length 255]", "RoomRentalRate": "Int [max length 9]", "StateProvince": "String [max length 2]", "Street1": "String [max length 50]", "Street2": "String [max length 50]", "ScheduleDefaultTimeZone": "String [max length 72]", "CustomDetail1": "String [max length 1024]", "CustomDetail2": "String [max length 1024]", "CustomDetail3": "String [max length 1024]", "DeliveryMethod": "String [INSTRUCTOR]", "Vendor": { "ID": "Int [max length 20]" }, "AttendeeJoinInstructions": "String [max length 255]", "AttendeeJoinAudio": "String [max length 255]", "HostJoinInstructions": "String [max length 255]", "HostJoinAudio": "String [max length 255]", "JoinMeetingUrl": "String [max length 255]", "TaxShipAddress": "Bool", "SuppressAttendeeView": "Bool", "Modified": { "CreatedBy": "string [max length 50]", "CreatedDate": "datetime [yyyy-mm-ddThh:mm:ssZ]", "UpdatedBy": "string [max length 50]", "UpdatedDate": "datetime [yyyy-mm-ddThh:mm:ssZ]" }, "Links": [ { "Rel": "Self", "Href": "/locations/{id}", "Method": "GET" }, { "Rel": "Sublocations", "Href": "/locations/{id}/sublocations", "Method": "GET" } ] } ] }