Update preference - Preferences - Mercado Pago Developers
Update preference

PUT

/checkout/preferences/{id}
Renew the details of a payment preference. Indicate the ID of the preference and send the parameters with the information you want to update.
Request's parameters
id

REQUIRED

string
Localization: pathThe preference's ID
additional_info
string
Localization: bodyAdditional information.
auto_return
String
Localization: bodyIf specified, your buyers will be redirected back to your site immediately after completing the purchase.
approved: The redirection takes place only for approved payments.
all: The redirection takes place only for approved payments, forward compatibility only if we change the default behavior
back_urls
object
Localization: bodyURLs to return to the sellers website.
Response parameters
additional_info
string
Localization: bodyAdditional information.
auto_return
String
Localization: bodyIf specified, your buyers will be redirected back to your site immediately after completing the purchase.
approved: The redirection takes place only for approved payments.
all: The redirection takes place only for approved payments, forward compatibility only if we change the default behavior
back_urls
object
Localization: bodyURLs to return to the sellers website.
binary_mode
boolean
Localization: bodyWhen the payment is activated, it can only be approved or rejected. Otherwise, the payment may be pending.
Request
curl
curl -X PUT \
      'https://api.mercadopago.com/checkout/preferences/{id}' \
       -H 'Authorization: Bearer YOUR_ACCESS_TOKEN \
       -H 'Content-Type: application/json' \ 
      -d '{
  "items": [
    {
      "id": "202809963-a2201f8d-11cb-443f-adf6-de5a42eed67d",
      "title": "Dummy Title",
      "description": "Dummy Description",
      "picture_url": "http://www.myapp.com/myimage.jpg",
      "category_id": "cat123",
      "quantity": 1,
      "currency_id": "U$",
      "unit_price": 10
    }
  ],
  "payer": {
    "phone": {},
    "identification": {},
    "address": {}
  },
  "payment_methods": {
    "excluded_payment_methods": [
      {}
    ],
    "excluded_payment_types": [
      {}
    ]
  },
  "shipments": {
    "free_methods": [
      {}
    ],
    "receiver_address": {}
  },
  "back_urls": {},
  "marketplace_fee": 0,
  "differential_pricing": {},
  "metadata": {}
}'
Answer
json
{
  "back_urls": {},
  "binary_mode": false,
  "client_id": 6295877106812064,
  "collector_id": 202809963,
  "coupon_code": {},
  "coupon_labels": {},
  "date_created": "2018-02-02T19:22:23.535Z",
  "date_of_expiration": {},
  "expires": false,
  "id": "202809963-920c288b-4ebb-40be-966f-700250fa5370",
  "init_point": "https://www.mercadopago.com/mla/checkout/start?pref_id=202809963-920c288b-4ebb-40be-966f-700250fa5370",
  "internal_metadata": {},
  "items": [
    {
      "title": "Dummy Item",
      "description": "Multicolor Item",
      "currency_id": "$",
      "quantity": 1,
      "unit_price": 10
    }
  ],
  "marketplace": "MP-MKT-6295877106812064",
  "marketplace_fee": 0,
  "metadata": {},
  "notification_url": "https://url.com.br/notificacao",
  "payer": {
    "phone": {},
    "address": {
      "street_name": "Mc Street",
      "street_number": "7304"
    },
    "identification": {},
    "last_purchase": {}
  },
  "payment_methods": {
    "default_card_id": {},
    "excluded_payment_methods": [
      {
        "id": ""
      }
    ],
    "excluded_payment_types": [
      {
        "id": ""
      }
    ]
  },
  "processing_modes": {},
  "product_id": {},
  "redirect_urls": {
    "failure": "",
    "pending": "",
    "success": ""
  },
  "sandbox_init_point": "https://sandbox.mercadopago.com/mla/checkout/pay?pref_id=202809963-920c288b-4ebb-40be-966f-700250fa5370",
  "site_id": "MLB",
  "shipments": {
    "default_shipping_method": {},
    "receiver_address": {
      "city_name": {},
      "state_name": {}
    }
  },
  "total_amount": {},
  "last_updated": {},
  "statement_descriptor": "MERCADOPAGO"
}
Errors
400bad_request
invalid_collector_idcollector_id invalid.
invalid_sponsor_idsponsor_id is not an active user.
invalid_collector_emailcollector is not collector_email owner
invalid_operation_typeoperation_type invalid.
invalid_expiration_date_toexpiration_date_to invalid.
invalid_dateinvalid date of expiration.
invalid_expiration_date_fromexpiration_date_from invalid.
invalid_itemsunit_price invalid.
invalid_back_urlsback_urls invalid. Wrong format
invalid_payment_methodsinstallments invalid. Should be a number between 1 and 36.
invalid_marketplace_feemarketplace_fee must not be greater than total amount.
invalid_idpreference_id not found.
invalid_access_tokenaccess denied
invalid_shipmentsinvalid type (<type>) for field shipments.cost.