update_option
- Back Office Admin API
- create_comment
- create_coupon
- create_option
- create_product
- delete_coupon
- delete_option
- delete_product
- detail_company_info
- detail_contact_info
- detail_coupon
- detail_option
- detail_pending_payment
- detail_product
- detail_sale
- list_coupons
- list_options
- list_payments
- list_products
- list_sales
- mark_shipped
- reauth
- refund_invoice
- refund_lineitem
- stop_lineitem_recurring
- update_coupon
- update_option
- update_product
The update_option call is used to update an option.
URL: https://www.2checkout.com/api/products/update_option
HTTP Method: POST
Input Parameters
option_id- ID of option being updated. Required.
option_name- Name of new product option. Required.
option_value_id- ID of existing option value to update/delete. Required when updating/deleting an option value.
option_value_name- Name of option value. Required when creating an option value.
option_value_surcharge- Amount of option surcharge. Required when creating an option value surcharge.
Data Returned
response_code- Tells the user whether or not the operation was successful.
response_message- Tells the user why the operation was or was not successful.
Example API calls using cURL
JSON
curl -X POST https://www.2checkout.com/api/products/update_option \
-H 'Accept: application/json' -u 'username:password' \
-d 'option_id=1001' -d 'option_name=test option' -d 'option_value_name=colors'
-d 'option_value_surcharge=1.00'
Example Successful Response
{
"response_code" : "OK",
"response_message" : "Option updated successfully."
}
Common Error Codes
PARAMETER_MISSINGRequired parameter missing: <parameter name>PARAMETER_INVALIDInvalid value for parameter: <parameter name>RECORD_NOT_FOUNDUnable to find record.FORBIDDENAccess denied to option.
