Table of Contents

“ratingEntry” Resource Type

Represents a vendor rating entry 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 ratingEntry ratingEntry Gets a ratingEntry object.
POST ratingEntry ratingEntry Creates a ratingEntry object.
Navigation Return Type Description
ratingType ratingTypes Gets the rating types associated with the current vendor rating entry.
ratings ratings Gets the ratings associated with the current vendor rating entry.

Properties

Property Type Description
id GUID The unique ID of the vendor rating entry. Non-editable.
entryNo Int Specifies the unique entry number of this vendor rating entry. vendorNo String Specifies the number of the associated vendor. type NAV.KVSVRMEntityType Specifies the type of the vendor rating entry. Possible values: " ", "G/L Account", "Item", "Resource", "Fixed Asset", "Charge (Item)", or "Work Center". no String Specifies the unique number of the record of the type defined in the "type” field. description String Specifies the description of the record defined by the "type" and "no” fields. vendorGroupCode String Specifies the code of the vendor group rating the vendor is associated with. itemGroupCode String Specifies the code of the item group rating the item is associated with. postingDate Date Specifies the date when the associated document was posted. documentDate Date Specifies the date when the associated document was created. ratingGroup NAV.KVSVRMRatingGroup Specifies the rating group of the vendor rating entry. Possible values: " ", "Due Date", "Qty.", "Quality", or "Audit". ratingTypeCode String Specifies the code of the associated rating type. ratingTypeDescription String Specifies the description of the associated rating type. ratingCode String Specifies the code of the associated rating. ratingDescription String Specifies the description of the associated rating. ratingPoints Decimal Specifies the number of rating points assigned to this vendor rating entry. quantityTarget Decimal Specifies the original quantity of the purchase order line. quantityActual Decimal Specifies the delivered quantity of the purchase order line. quantityDelta Decimal Specifies the difference between the original quantity and the delivered quantity of the respective purchase order line. quantityDeltaPercent Decimal Specifies the percentage difference between the original quantity and the delivered quantity of the respective purchase order line. ratingReferenceDate String Specifies the rating reference date when the item was rated. promisedReceiptDate Date Specifies the promised delivery date agreed by the vendor for delivery of the purchase order. This field is filled based on the respective purchase order line. expectedReceiptDate Date Specifies the date when the item is expected to be available in the warehouse. This field is filled based on the respective purchase order line. plannedReceiptDate Date Specifies the date when the item should arrive at the warehouse. This field is filled based on the respective purchase order line. dateDeltaInDays Decimal Specifies the difference in days between the rating reference date and the actual posting date. sourceType Int This is an internal field. It indicates the system table used for creating the item. sourceID String Specifies the unique number of the source document. sourceRefNo Int Specifies the number of the source document line. referenceType Int Specifies the type of the referenced record. In most cases, this will be "Purchase Line". referenceID String Specifies the document number of the referenced record. In most cases, this will be the document number of the associated "Purchase Line". referenceRefNo Int Specifies the line number of the referenced record. In most cases, this will be the line number of the associated "Purchase Line". correction Boolean Specifies whether the item has been canceled. This may occur in conjunction with a canceled delivery.

JSON Representation

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

{
    "id": "Guid",
    "entryNo": "int64",
    "vendorNo": "string",
    "type": "string",
    "no": "string",
    "description": "string",
    "vendorGroupCode": "string",
    "itemGroupCode": "string",
    "postingDate": "date",
    "documentDate": "date",
    "ratingGroup": "string",
    "ratingTypeCode": "string",
    "ratingTypeDescription": "string",
    "ratingCode": "string",
    "ratingDescription": "string",
    "ratingPoints": "decimal",
    "quantityTarget": "decimal",
    "quantityActual": "decimal",
    "quantityDelta": "decimal",
    "quantityDeltaPercent": "decimal",
    "ratingReferenceDate": "string",
    "promisedReceiptDate": "date",
    "expectedReceiptDate": "date",
    "plannedReceiptDate": "date",
    "dateDeltaInDays": "decimal",
    "sourceType": "int32",
    "sourceSubtype": "string",
    "sourceID": "string",
    "sourceRefNo": "int32",
    "referenceType": "int32",
    "referenceSubtype": "string",
    "referenceID": "string",
    "referenceRefNo": "int32",
    "correction": "boolean",
    "correctionEntryNo": "int32"
}

HTTP Requests

Get ratingEntries

Retrieves the properties and relationships of a ratingEntry 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})/ratingEntries({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 ratingEntry 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})/ratingEntries({id})

Response The following code shows an example of the response.

{
    "@odata.context": "https://{businesscentralPrefix}/api/kumavision/kvsvrm/v1.0/companies({id})/ratingEntries",
    "value": [
        {
            "@odata.etag": "W/\"JzIwOzExNTI1ODE3MDQyMTQ4NDIwOTIyMTswMDsn\"",
            "id": "92a9db65-60ac-ed11-9eb2-c7df0d0ebfab",
            "entryNo": 1,
            "vendorNo": "10000",
            "type": "0",
            "no": "",
            "description": "",
            "vendorGroupCode": "",
            "itemGroupCode": "",
            "postingDate": "2023-02-14",
            "documentDate": "2023-02-14",
            "ratingGroup": "0",
            "ratingTypeCode": "TEST",
            "ratingTypeDescription": "",
            "ratingCode": "B",
            "ratingDescription": "",
            "ratingPoints": 0,
            "quantityTarget": 0,
            "quantityActual": 0,
            "quantityDelta": 0,
            "quantityDeltaPercent": 0,
            "ratingReferenceDate": "0",
            "promisedReceiptDate": "0001-01-01",
            "expectedReceiptDate": "0001-01-01",
            "plannedReceiptDate": "0001-01-01",
            "dateDeltaInDays": 0,
            "sourceType": 0,
            "sourceSubtype": "0",
            "sourceID": "",
            "sourceRefNo": 0,
            "referenceType": 0,
            "referenceSubtype": "0",
            "referenceID": "",
            "referenceRefNo": 0,
            "correction": false,
            "correctionEntryNo": 0
        }
    ]
}

Create ratingEntries

Creates a vendor rating entry 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})/ratingEntries({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 ratingEntry, the ratingEntry will not be updated.

Request Body

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

Response

If successful, this method returns the 201 Created response code and a ratingEntry 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})/ratingEntries
Content-type: application/json
{
    "vendorNo": "10000",
    "postingDate": "2023-02-14",
    "documentDate": "2023-02-14",
    "ratingTypeCode": "TEST",
    "ratingCode": "B"
}

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})/ratingEntries/$entity",
    "@odata.etag": "W/\"JzIwOzE4NDA3ODQzNzAxNjMxNTk5MDMxMTswMDsn\"",
    "id": "118c6853-61ac-ed11-9eb2-c7df0d0ebfab",
    "entryNo": 2,
    "vendorNo": "10000",
    "type": "0",
    "no": "",
    "description": "",
    "vendorGroupCode": "",
    "itemGroupCode": "",
    "postingDate": "2023-02-14",
    "documentDate": "2023-02-14",
    "ratingGroup": "0",
    "ratingTypeCode": "TEST",
    "ratingTypeDescription": "",
    "ratingCode": "B",
    "ratingDescription": "",
    "ratingPoints": 0,
    "quantityTarget": 0,
    "quantityActual": 0,
    "quantityDelta": 0,
    "quantityDeltaPercent": 0,
    "ratingReferenceDate": "0",
    "promisedReceiptDate": "0001-01-01",
    "expectedReceiptDate": "0001-01-01",
    "plannedReceiptDate": "0001-01-01",
    "dateDeltaInDays": 0,
    "sourceType": 0,
    "sourceSubtype": "0",
    "sourceID": "",
    "sourceRefNo": 0,
    "referenceType": 0,
    "referenceSubtype": "0",
    "referenceID": "",
    "referenceRefNo": 0,
    "correction": false,
    "correctionEntryNo": 0
}