Skip to content

QuoteIndex_Load_Id#


Description#

Starting at zero, this function loads the index position of a quote within a list of quotes.

Request Body Parameters#

Parameter
Type Description
function String For module level functions this parameter will always have the value Module
module_code String The module code will always have the value quote for this function
module_function String Specifies the function being executed, in this case QuoteIndex_Load_Id
quote_id
edit_quote
quote_code
Number
String
String
The id of the quote
The code of the quote
The code of the quote
sort String “-id” negative parameter sorts list of quotes in descending order before returning index position

Response Body Parameters#

Parameter
Type Description
success Boolean Boolean value indicating if the API request was successful
index Number Index position of the quote

Example Request#

{
    "Store_Code": "{{Store_Code}}",
    "Miva_Request_Timestamp": "{{$timestamp}}",
    "Function": "Module",
    "Module_Code": "quote",
    "Module_Function": "QuoteIndex_Load_ID",
    "Quote_ID": 1001,
    "Sort": "-id"
}

Example Response#

{
    "success": 1,
    "data": {
        "index": 3
    }
}

Error Responses#

Error Code Error Message Error Description
MER-UTL-QUOTES-00343 Quote not found Quote not found
MER-UTL-QUOTES-00346 Unable to load quote: One of Quote_ID, Edit_Quote, or Quote_Code must be specified Unable to load quote