-
Notifications
You must be signed in to change notification settings - Fork 8
Option_Retrieve
Jacob McConnell edited this page Jun 11, 2014
·
1 revision
You must specify your API username and password when creating your 2checkout-node object (named ‘tco’ in these examples) before calling this method.
##Method
###retrieve
Use to retrieve a product option.
####Arguments
- object - Object containing option parameters. Parameters -> API Detail Option
- callback - Function to be called on success/error
####Returns
Single Product Option Object.
####Example Usage:
args = {
option_id: 4635212971
};
tco.productOptions.retrieve(args, function (error, data) {
if (error) {
console.log(error);
} else {
console.log(data.response_code);
}
});####Example Response:
{
"option": [
{
"option_id": "4688355343",
"option_name": "decibels",
"option_values": [
{
"option_value_id": "4688355346",
"option_value_name": "150dB",
"option_value_surcharge": "11.00"
},
{
"option_value_id": "4688441332",
"option_value_name": "200dB",
"option_value_surcharge": "22.00"
},
{
"option_value_id": "4688441335",
"option_value_name": "250dB",
"option_value_surcharge": "33.00"
}
]
}
],
"response_code": "OK",
"response_message": "Option detail retrieved successfully."
}Please feel free to contact 2Checkout directly for assistance with your integration.