Zum Inhalt

“ratingType” Resource Type#

Represents a vendor rating type as part of Vendor Rating Management in Business Central.

Note

For information about enabling APIs for Business Central, please refer to Enabling APIs for Dynamics 365 Business Central.

Methods#

Method Return Type Description
GET ratingType ratingType Gets a ratingType object.
DELETE ratingType none Deletes a ratingType object.
POST ratingType ratingType Creates a ratingType object.
PATCH ratingType ratingType Updates an existing ratingType object.
Navigation Return Type Description
ratings ratings Gets the ratings associated with the current rating type.

Properties#

Property Type Description
id GUID The unique ID of the rating type. Non-editable.
code string Specifies the code of the rating type.
ratingGroup NAV.KVSVRMRatingGroup Specifies the rating group of the rating type; possible values: " ", "Due Date", "Qty.", "Quality", or "Audit".
description string Specifies the description of the rating type.
valueType NAV.KVSVRMRatingValueType Specifies the type of the rating type value. Possible values: " ", "Absolute", or "Percentage".
status NAV.KVSVRMAuditTemplateStatus Specifies the status of the rating type. Possible values: "New", "Certified", "Under Development", or "Closed".
ratingPointsExists boolean Specifies whether rating values have been assigned to this rating type.

JSON Representation#

The following code shows a JSON representation of the ratingType resource.

{
    "id": "GUID",
    "code": "string",
    "ratingGroup": "string",
    "description": "string",
    "valueType": "string",
    "status": "string",
    "ratingPointsExists": "boolean"
}

HTTP Requests#

Get ratingTypes#

Retrieves the properties and relationships of a ratingType object for Business Central.

HTTP Request#

Replace the URL prefix for Business Central depending on your environment, following the guideline.

GET businesscentralPrefix/kumavision/kvsvrm/v1.0/companies({id})/ratingTypes({id})

Request Headers#

Header Value
Authorization Bearer {token}. Required.

Request Body#

For this method, no request body is required.

Response#

If successful, this method returns the 200 OK response code and a ratingType object in the response body.

Example#

Request

The following code shows an example of the request.

GET https://{businesscentralPrefix}/api/kumavision/kvsvrm/v1.0/companies({id})/ratingTypes({id})

Response The following code shows an example of the response.

{
    "@odata.context": "https://{businesscentralPrefix}/api/kumavision/kvsvrm/v1.0/companies({id})/ratingTypes",
    "value": [
        {
            "@odata.etag": "W/\"JzIwOzExMDc5MTgyODA0MzM5NjgzMjM5MTswMDsn\"",
            "id": "27f2b37c-589e-ed11-9eae-b5f34a05bcf5",
            "code": "AUDIT",
            "ratingGroup": "Audit",
            "description": "Audit assessment",
            "valueType": "0",
            "status": "Certified",
            "ratingPointsExists": false
        },
        {
            "@odata.etag": "W/\"JzE5OzY0Njk0OTE2MzIwODIwNDM1MTQxOzAwOyc=\"",
            "id": "28f2b37c-589e-ed11-9eae-b5f34a05bcf5",
            "code": "COM",
            "ratingGroup": "0",
            "description": "Comuncation assessment",
            "valueType": "0",
            "status": "Certified",
            "ratingPointsExists": true
        },
        {
            "@odata.etag": "W/\"JzE5OzM0MzUyMDI2Mjc5NjE4ODA5MTUxOzAwOyc=\"",
            "id": "29f2b37c-589e-ed11-9eae-b5f34a05bcf5",
            "code": "QUANTITY",
            "ratingGroup": "Quantity",
            "description": "Quantity assessment",
            "valueType": "Percental",
            "status": "Certified",
            "ratingPointsExists": true
        },
        {
            "@odata.etag": "W/\"JzE5OzcxNzUzMzQxODg2ODUwMTA1NzIxOzAwOyc=\"",
            "id": "2bf2b37c-589e-ed11-9eae-b5f34a05bcf5",
            "code": "DATE",
            "ratingGroup": "Date",
            "description": "Appointment Rating",
            "valueType": "Absolute",
            "status": "Certified",
            "ratingPointsExists": true
        }
    ]
}

Delete ratingTypes#

Deletes a rating type from Business Central.

HTTP Request#

Replace the URL prefix for Business Central depending on your environment, following the guideline.

DELETE businesscentralPrefix/kumavision/kvsvrm/v1.0/companies({id})/ratingTypes({id})

Request Headers#

Header Value
Authorization Bearer {token}. Required.
If-Match Required. If this request header is included and the eTag provided does not match the current tag of the ratingType, the ratingType will not be updated.

Request Body#

For this method, no request body is required.

Response#

If successful, this method returns the 204 No Content response code and deletes the rating type. Nothing will be returned in the response body.

Example#

Request

The following code shows an example of the request.

DELETE https://{businesscentralPrefix}/api/kumavision/kvsvrm/v1.0/companies({id})/ratingTypes({id})

Response

The following code shows an example of the response.

HTTP/1.1 204 No Content

Create ratingTypes#

Creates a rating type in Business Central.

HTTP Request#

Replace the URL prefix for Business Central depending on your environment, following the guideline.

POST businesscentralPrefix/kumavision/kvsvrm/v1.0/companies({id})/ratingTypes({id})

Request Headers#

Header Value
Authorization Bearer {token}. Required.
Content-Type application/json
If-Match Required. If this request header is included and the eTag provided does not match the current tag of the ratingType, the ratingType will not be updated.

Request Body#

In the request body, supply a JSON representation of a ratingType object.

Response#

If successful, this method returns the 201 Created response code and a ratingType object in the response body.

Example#

Request

The following code shows an example of the request.

POST https://{businesscentralPrefix}/api/kumavision/kvsvrm/v1.0/companies({id})/ratingTypes
Content-type: application/json
{
    "code": "TEST",
    "ratingGroup": " ",
    "description": "Test rating",
    "valueType": " ",
    "status": "Under Development"
}

Response The following code shows an example of the response.

HTTP/1.1 201 Created
Content-type: application/json
{
    "@odata.context": "https://{businesscentralPrefix}/api/kumavision/kvsvrm/v1.0/$metadata#companies({id}})/ratingTypes/$entity",
    "@odata.etag": "W/\"JzIwOzE3MTAxMjAzMzQ2Nzk0MzM2MDMyMTswMDsn\"",
    "id": "8843ddcf-54ac-ed11-9eb2-c7df0d0ebfab",
    "code": "TEST",
    "ratingGroup": "0",
    "description": "Test rating",
    "valueType": "0",
    "status": "Under Development",
    "ratingPointsExists": false
}

Update ratingTypes#

Updates the properties of a ratingType object for Business Central.

HTTP Request#

Replace the URL prefix for Business Central depending on your environment, following the guideline.

PATCH businesscentralPrefix/kumavision/kvsvrm/v1.0/companies({id})/ratingTypes({id})

Request Headers#

Header Value
Authorization Bearer {token}. Required.
Content-Type application/json
If-Match Required. If this request header is included and the eTag provided does not match the current tag of the ratingType, the ratingType will not be updated.

Request Body#

In the request body, supply the values for the fields to be updated. Existing properties that are not included in the request body will maintain their previous values or will be recalculated based on the changes made to other property values. For optimum performance, do not include existing values that have not changed.

Response#

If successful, this method returns the 200 OK response code and an updated ratingType object in the response body.

Example#

Request

The following code shows an example of the request.

PATCH https://{businesscentralPrefix}/api/kumavision/kvsvrm/v1.0/companies({id})/ratingTypes({id})
Content-type: application/json
{
    "status": "Certified"
}

Response The following code shows an example of the response.

HTTP/1.1 200 OK
Content-type: application/json
{
    "@odata.context": "https://{businesscentralPrefix}/api/kumavision/kvsvrm/v1.0/$metadata#companies({id}})/ratingTypes/$entity",
    "@odata.etag": "W/\"JzIwOzE3MTAxMjAzNTEzODkwNDE1MTA1MTswMDsn\"",
    "id": "8843ddcf-54ac-ed11-9eb2-c7df0d0ebfab",
    "code": "TEST",
    "ratingGroup": "0",
    "description": "Testbewertung",
    "valueType": "0",
    "status": "Certified",
    "ratingPointsExists": true
}