Valuekeep Developers - Web API Reference

Workshops and Employees | Consent

Service to manage entities of type 'Consent'.

Overview


URL api/{tenantKey}/{orgKey}/workShopsCore/consents
Methods Supported GET, POST, PUT, DELETE

All Operations

This service includes the following operations:

All Resources

This service uses the following resources:

All Enumerations

This service uses the following enumerations:

GET Operations

GET Consents (odata)

Returns a page of the list of all the entity records available.

The following elements are optional:

opts (ODataQueryOptions) OData query option.

Response:

When successful, the response body contains the list of records available. See ConsentResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

GET /workShopsCore/consents/odata

GET Consent by identifier

Returns the entity record that matches the specified identifier.

The following elements are required:

id (string) The record identifier.

Response:

When successful, the response body contains the entity record. See ConsentResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /workShopsCore/consents/{id}

GET Consent by key

Returns the entity record that matches the specified key.

The following elements are required:

consentKey (string) Consent.

Response:

When successful, the response body contains the entity record. See ConsentResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /workShopsCore/consents/{consentKey}

POST Operations

POST Consents

Creates a new entity record.

The following elements are required:

consentResource (ApiConsentResource) The request body should contain the entity record that should be created.
See ApiConsentResource.

The following elements are optional:

customAttributes (JSON Document) A key-value pair in JSON format that represents the extensibility custom attributes for this entity.
The key should be the custom attribute name prefixed with "custom_", e.g. "custom_attributeName".
While the "customAttributes" element is optional, please notice that specific custom attributes might be marked as required.

Response:

When successful, the response body contains the new entity record identifier. The resource header location property contains the URL for the new entity record. See ApiConsentResource.

Response status codes:

201 Created. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

POST /workShopsCore/consents

POST Get Requester Notification Id

Custom operation 'GetRequesterNotificationId'.

The following elements are required:

userName (string) UserName.

The following elements are optional:

customAttributes (JSON Document) A key-value pair in JSON format that represents the extensibility custom attributes for this entity.
The key should be the custom attribute name prefixed with "custom_", e.g. "custom_attributeName".
While the "customAttributes" element is optional, please notice that specific custom attributes might be marked as required.

Response:

When successful, the response body contains a string.

Resource URL:

POST /workShopsCore/consents/getRequesterNotificationId

POST Get Technician Notification Id

Custom operation 'GetTechnicianNotificationId'.

The following elements are required:

userName (string) UserName.

The following elements are optional:

customAttributes (JSON Document) A key-value pair in JSON format that represents the extensibility custom attributes for this entity.
The key should be the custom attribute name prefixed with "custom_", e.g. "custom_attributeName".
While the "customAttributes" element is optional, please notice that specific custom attributes might be marked as required.

Response:

When successful, the response body contains a string.

Resource URL:

POST /workShopsCore/consents/getTechnicianNotificationId

PUT Operations

PUT Set ConsentKey Consent

Updates the value of attribute 'ConsentKey' in the specified entity record.

The following elements are required:

consentKey (string) Consent.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /workShopsCore/consents/{consentKey}/consentKey

PUT Set ConsentType Consent

Updates the value of attribute 'ConsentType' in the specified entity record.

The following elements are required:

consentKey (string) Consent.
value (enum ConsentType) The request body should contain the new value for the attribute.
See ConsentType.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /workShopsCore/consents/{consentKey}/consentType

PUT Set Employee Consent

Updates the value of attribute 'Employee' in the specified entity record.

The following elements are required:

consentKey (string) Consent.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /workShopsCore/consents/{consentKey}/employee

PUT Set EndDate Consent

Updates the value of attribute 'EndDate' in the specified entity record.

The following elements are required:

consentKey (string) Consent.
value (DateTimeOffset) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /workShopsCore/consents/{consentKey}/endDate

PUT Set IsActive Consent

Updates the value of attribute 'IsActive' in the specified entity record.

The following elements are required:

consentKey (string) Consent.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

PUT /workShopsCore/consents/{consentKey}/isActive

PUT Set NotificationID Consent

Updates the value of attribute 'NotificationID' in the specified entity record.

The following elements are required:

consentKey (string) Consent.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /workShopsCore/consents/{consentKey}/notificationID

PUT Set StartDate Consent

Updates the value of attribute 'StartDate' in the specified entity record.

The following elements are required:

consentKey (string) Consent.
value (DateTimeOffset) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /workShopsCore/consents/{consentKey}/startDate

PUT Set User Consent

Updates the value of attribute 'User' in the specified entity record.

The following elements are required:

consentKey (string) Consent.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /workShopsCore/consents/{consentKey}/user

PUT Set Custom Attribute Consent

Updates the value of 'CustomAttribute' in the specified entity record.

The following elements are required:

consentKey (string) Consent
customAttributeName (string) The custom attribute name.
value (ExtensibilityCustomAttributeValueResource) The request body should contain the new value for the custom attribute.
See ExtensibilityCustomAttributeValueResource.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

PUT /workShopsCore/consents/{consentKey}/{customAttributeName}

DELETE Operations

DELETE Consent by identifier

Deletes the entity record that matches the specified identifier.

The following elements are required:

id (string) The record identifier.

Response:

When successful, the response body is empty.

Response status codes:

204 Deleted. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

DELETE /workShopsCore/consents/{id}

DELETE Consent by key

Deletes the entity record that matches the specified key.

The following elements are required:

consentKey (string) Consent.

Response:

When successful, the response body is empty.

Response status codes:

204 Deleted. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

DELETE /workShopsCore/consents/{consentKey}

Resources


ApiConsentResource

The following elements are required:

consentKey (string) Consent.
consentType (enum ConsentType) Consent Type.
See ConsentType.
user (string) User.
startDate (DateTimeOffset) Start Date.
employee (string) Employee.

The following elements are optional:

endDate (DateTimeOffset) End Date.
notificationID (string) Notification ID.


ConsentResource

The following elements are required:

consentKey (string) Consent.
consentType (enum ConsentType) Consent Type.
See ConsentType.
user (string) User.
startDate (DateTimeOffset) Start Date.
employee (string) Employee.

The following elements are optional:

endDate (DateTimeOffset) End Date.
notificationID (string) Notification ID.


ExtensibilityCustomAttributeValueResource

The following elements are required:

value (object) The custom attribute value.

Enumerations


ConsentType

1 Geolocation
2 PushNotificationsTechnician
3 PushNotificationsRequester