# Update point of sale This endpoint allows to update the data of a point of sale. To use it, provide the point of sale ID and send only the parameters you want to update. All fields are optional. In case of success, the request will return a response with status 200. **PATCH** `/v2/pos/{pos_id}` ## Request parameters ### Header - `X-Idempotency-Key` (string, required) This feature allows you to safely retry requests without the risk of accidentally performing the same action more than once. This is useful for avoiding errors, such as updating the same point of sale twice. To ensure that each request is unique, you must use an exclusive value in the header for each call. If you use a value already assigned to another request, you will receive information corresponding to that created resource in response, not this new request. We suggest using a UUID V4 or random strings. The header accepts values between 1 and 64 characters. ### Path - `pos_id` (string, required) It is the numeric identifier of the point of sale, automatically assigned by Mercado Pago at creation time. Must be a valid integer greater than or equal to 0. - `name` (string, optional) It is the new name for the point of sale. Only alphanumeric characters, hyphens, underscores, and internal spaces are allowed. The value cannot start or end with a space. The maximum allowed limit is 45 characters. - `store_id` (string, optional) It is the identifier of the store to which the point of sale will belong after the update, assigned by Mercado Pago when the store is created and returned in the response under the `id` parameter. Only digits are allowed. The maximum allowed limit is 20 characters. Required if `external_store_id` is not provided. If both are sent, they must refer to the same store. - `external_store_id` (string, optional) It is the external identifier of the store to which the point of sale will belong after the update, defined by the integrator at the time the store was created under the `external_id` parameter. Required if `store_id` is not provided. If both are sent, they must refer to the same store. - `external_id` (string, optional) It is the new external identifier for the point of sale. Must contain only alphanumeric characters (letters and numbers). The maximum allowed limit is 40 characters. - `config` (object, optional) Point of sale configuration. It contains the "qr" configuration node. - `config.qr` (object, optional) QR code configuration for the point of sale. - `config.qr.operating_mode` (string, optional) Indicates the operating mode of the point of sale. It determines how the POS interacts with customers and which additional fields are required. `pdv` and `standalone` are available for all integrators. `unattended` and `self_service` are only available for merchants with assistance from Mercado Pago's commercial team. Possible enum values: - `self_service` Value associated with the self-service mode for unattended points of sale such as dispensers and vending machines. Mercado Pago calls the configured `config.qr.url` to retrieve the available products, the customer selects and pays autonomously. Requires the Gas Station category code and the `config.qr.url` field. This mode is only available for fuel dispensers at gas stations in Argentina (MLA), for merchants with assistance from Mercado Pago's commercial team. - `unattended` Value associated with the unattended mode for integrations in which the external system makes the order available, and Mercado Pago associates it to the QR code once it is scanned. The `config.qr.url` field is required. Available in Argentina (MLA) and Uruguay (MLU), for merchants with assistance from Mercado Pago's commercial team. - `pdv` Value associated with the attended operating mode. An operator is present and processes the transaction. The `config.qr.url` field must be absent. This mode has no associated payment flow logic in the POS V2 API. - `standalone` Value associated with the non-integrated código QR mode. The generated QR is static and not linked to any external system; the customer scans and pays directly from the Mercado Pago app without the integrator managing the order. The `config.qr.url` field must be absent. This mode has no associated payment flow logic in the POS V2 API. - `config.qr.category` (integer, optional) MCC code that indicates the category of the point of sale. The only possible categories are Gastronomy and Gas Station, and the code varies depending on the country of operation. If `operating_mode` is `self_service`, this field is required and must use the Gas Station code. Applies to all operating modes except `standalone`. If not specified, the point of sale remains with a generic category. Possible enum values: - `Gas Station` For gas stations, the code must be 47300. The code varies by country. - `Gastronomy` For gastronomy, the code must be 56101. The code varies by country. - `config.qr.url` (string, optional) URL to get the order of the integrator system when a payment is initiated. The value must start with "https://". Required if `operating_mode` is `self_service` or `unattended`. Must be null if `operating_mode` is `pdv` or `standalone`. The maximum allowed limit is 200 characters. ## Response parameters - `id` (integer, optional) It is the unique numeric identifier of the point of sale, automatically generated by Mercado Pago at creation time. When you register a point of sale, you will receive a corresponding ID. This ID can be used for various operations, including retrieving, updating, or deleting the point of sale. - `name` (string, optional) It is the updated name of the point of sale. - `status` (string, optional) It indicates the current status of the point of sale. Possible values: `active` (the point of sale is enabled and available to receive payments) and `inactive` (the point of sale is disabled and cannot receive payments). Possible enum values: - `active` - `inactive` - `date_created` (string, optional) It is the date and time the point of sale was created. This field displays the date and time in ISO 8601 format, such as 2024-08-08T19:29:45.019Z. - `date_last_updated` (string, optional) It is the date and time of the last update to the point of sale data. This field displays the date and time in ISO 8601 format, such as 2024-08-08T19:29:45.019Z. - `user_id` (integer, optional) The `user_id` corresponds to the `collector_id`. It refers to the identifier of the Mercado Pago account that receives the money from sales, that is, the account responsible for collecting the funds. - `external_id` (string, optional) It is the external identifier of the point of sale, defined by the integrator system. - `config` (object, optional) Point of sale configuration returned by the API. - `config.qr` (object, optional) QR code configuration for the point of sale. - `config.qr.operating_mode` (string, optional) Operating mode configured for the point of sale. Possible values: `pdv`, `unattended`, `self_service`, `standalone`. Possible enum values: - `pdv` - `unattended` - `self_service` - `standalone` - `config.qr.category` (integer, optional) MCC category code assigned to the point of sale, when applicable. - `qr_response` (object, optional) QR code data automatically generated and associated with the point of sale at creation time. - `qr_response.uuid` (string, optional) It is the unique identifier of the QR code associated with this point of sale, represented as a 64-character hexadecimal string (SHA-256 hash). - `qr_response.image` (string, optional) It is the URL of the QR code image to be printed or displayed for receiving payments. - `qr_response.template_document` (string, optional) It is the URL of the file (in PDF format) of the template containing the QR code to be used for receiving payments. - `qr_response.template_image` (string, optional) It is the URL of the file (in image format) of the template containing the QR code to be used for receiving payments. - `qr_response.qr_code` (string, optional) It is the raw QR code string that can be encoded into a QR image by the integrator system. ## Errors | Status | Error | Description | | ------- | ------- | ----------- | | 400 | bad_request | The request could not be processed. Verify that the body complies with the JSON schema, the point of sale belongs to the Access Token user, the X-Idempotency-Key header is present and not empty, and the URL domain in the config is registered and active as an integrator. | | 400 | resource_bad_request_error | The `pos_id` provided in the path is not a valid integer or is negative. Verify that the value is a non-negative base-10 integer. | | 400 | idempotency_key_already_used | The X-Idempotency-Key value sent was already used in a previous request with a different payload. Generate a new unique value for each distinct operation. | | 400 | invalid_operating_mode | The value sent for `config.qr.operating_mode` is not valid. Accepted values are: `self_service`, `unattended`, `pdv`, `standalone`. | | 401 | unauthorized | The value sent as Access Token is incorrect or missing. Please check and try again with a valid Access Token. | | 404 | pos_not_found | No point of sale was found for the provided `pos_id` and the Access Token user. Verify that the ID is correct and belongs to your account. | | 404 | store_not_found | The store identified by `store_id` or `external_store_id` does not exist or does not belong to the Access Token user. | | 409 | conflict | The same request is already being processed by another concurrent call with the same X-Idempotency-Key. Wait a few seconds and retry with the same key and the same payload. | | 424 | internal_error_check_store_owner | A communication error occurred while validating store ownership. This is a dependency failure and not related to the request data. Please try again. | | 500 | internal_server_error | An unexpected error occurred on the server. This is a transient failure not related to the request data. Please try again after a few moments. | ## Request example ### cURL ```bash curl -X PATCH \ 'https://api.mercadopago.com/v2/pos/{pos_id}' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "name": "POS-001", "store_id": "987654", "external_store_id": "string", "external_id": "SUC001POS002", "config": { "qr": { "operating_mode": "pdv", "category": 621102, "url": "https://integrator.example.com/qr/order" } } }' ``` ## Response example ```json { "id": 1234567, "name": "POS-001", "status": "active", "date_created": "2024-01-15T10:30:00Z", "date_last_updated": "2024-03-01T08:00:00Z", "user_id": 123456, "external_id": "SUC001POS002", "config": { "qr": { "operating_mode": "pdv", "category": 0 } }, "qr_response": { "uuid": "0977011a027c4b4387e52069da4264deae2946af4dcc44ee98a8f1dbb376c8a1", "image": "https://www.mercadopago.com/instore/merchant/qr/1234567/abc123.png", "template_document": "https://www.mercadopago.com/instore/merchant/qr/1234567/template_abc123.pdf", "template_image": "https://www.mercadopago.com/instore/merchant/qr/1234567/template_abc123.png", "qr_code": "00020101021226940014BR.GOV.BCB.PIX2572pix-qr-h.mercadopago.com/instore/h/p/v2/abc123" } } ```