Opportunity: Save Beverage Catalogue

  • Updated

Save Beverage Catalogue


POST /v2/opportunity/save/quote/beverage

This API adds Beverage catalogue in an opportunity quote and returns a unique Id and its associated details. This same API allows you to update an existing Beverage catalogue e.g. change the price or comments.


Parameter
Id    Long

The Id of the catalogue item. Required only if you are updating the catalogue. If empty, a new catalogue item will be created.

Qty    Double

The Quantity of the catalogue item.

TemplateId    Long

The Template Id of the catalogue item.

StartDate    DateTime

The Start Date and time of catalogue item.

EndDate    DateTime

The End Date and time of catalogue item.

UnitPrice    Double

The Unit Price of the catalogue item.

DiscountType    Double

This represents the type of discount provided. The possible values could be 'P' and 'C', where 'P' is the percentile discount and 'C' is a fixed discount amount.

DiscountValue    Double

This represents the Discount provided for the catalogue item. The value provided is used along with the discount type to calculate the total discount amount.

TaxType    Object { Id, Name }

The Tax Type to be associated with the catalogue item. The Tax Type must exist in your Priava Account. Passed in JSON format where:
Id = the ID of the Tax Type.
Name = the name of the Tax Type.

Quote    Object { Id, QuoteNumber }

Quote to which the catalogue item is to be associated. The Quote must exist in your Priava Account. Passed in JSON format where:
Id = the ID of the Quote.
QuoteNumber = the number of the Quote.

FinancialComments    String

The Financial Comment to be associated with the catalogue item.

CatalogueComments    String

The Comment to be associated with the catalogue item.

CreditOrDebit    String

This represents whether the catalogue item should be credited or debited to the opportunity. Only values supported are Credit or Debit.

RefPkgId    String

The Id of the referenced package catalogue.

Formula Object
Formula associated to the catalogue item, contains following:
 Name String
 Name of the Formula
 CustomFormulaFields Array[{}]
 The Custom Formula Fields passed in JSON Format where:
 FieldName = Name of the Custom Formula Field
 FieldValue = Value of the Custom Formula Field
{
    "Id": 100179910,
    "Name": "Pack B - Ales",
    "StartDate": "05/02/2019 09:00",
    "EndDate": "05/02/2019 17:00",
    "Qty": 1,
    "TemplateId": 446,
    "UnitPrice": 17,
    "TaxType": {
        "Id": 26,
        "Name": "GST - Included 10%"
    },
    "DiscountType": "C",
    "DiscountValue": 10,
    "Quote": {
        "Id": 100029864,
        "QuoteNumber": "37"
    },
    "Formula": {
        "CustomFormulaFields": [
            {
                "FieldValue": "10",
                "FieldName": "Gold"
            },
            {
                "FieldValue": "3",
                "FieldName": "OT 1.5"
            }
        ],
        "Name": "Gold new"
    },
    "FinancialComments": "This is financial comment",
    "CatalogueComments": "This is catalogue comment",
    "CreditOrDebit": "Debit",
    "RefPkgId": 100179833
}
Response:
{
    "result": {
        "Abbreviation": "BV",
        "NetTotalInclDiscount": "7.00",
        "Tax": "0.64",
        "FormulaToolTip": "",
        "EndDate": "05/02/2019 17:00",
        "NetTotalExTax": "6.36",
        "DiscountAmount": "10.00",
        "Name": "Pack B - Ales",
        "Quote": {
            "QuoteNumber": "37",
            "Id": 100029864,
            "Name": "Quote4"
        },
        "StartDate": "05/02/2019 09:00",
        "TaxType": {
            "TaxPercentage": 10,
            "Position": 16,
            "TaxIncluded": true,
            "Inactive": false,
            "Id": 26,
            "Name": "GST - Included 10%"
        },
        "Formula": {},
        "UnitPrice": "17.00",
        "FinancialComments": "This is financial comment",
        "DiscountType": "C",
        "CatalogueTypeName": "BeverageCatalogue",
        "Opportunity": {
            "OpportunityNumber": "89",
            "Id": 15527,
            "Name": "Test Can Reason"
        },
        "Qty": "1.00",
        "GrandTotal": "7.00",
        "Id": 100179910,
        "DiscountValue": "10.00",
        "TemplateId": 446,
        "CatalogueComments": "This is catalogue comment"
    },
    "success": true
}

Was this article helpful?

Have more questions? Submit a request