# Create terminal action This endpoint allows you to create a new print action for the Mercado Pago Point. In case of success, the request will return a response with status 201. **POST** `/terminals/v1/actions` ## 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 creating two identical payments. To ensure that each request is unique, it's important to use an exclusive value in the header of your request. We suggest using a UUID V4 or random strings. - `type` (string, optional) Action type associated with the Mercado Pago solution for which it is created. Right now, the only supported value is "print". Possible enum values: - `print` Value associated with the creation of print actions for the Point of Sale. - `external_reference` (string, optional) It is the external reference of the action, assigned when creating it. The maximum allowed limit is 64 characters, and the allowed characters are: uppercase and lowercase letters, numbers, and the symbols hyphen (-) and underscore (_). - `config` (object, optional) Action type configuration. - `config.point` (object, optional) Point action configuration. - `config.point.terminal_id` (string, optional) Identifier of the terminal that will obtain the action. You must send it according to the following format: "type of terminal + “__” + terminal serial", as in the following example: "NEWLAND_N950__N950NCB123456789". The serial number can be found on the rear label of the terminal. - `config.point.subtype` (string, optional) Identifier of the action subtype that will be created for the Point terminal. If the action is "print" you must choose one of the values: "custom" for a customized printing, or "image" for an image printout. Possible enum values: - `image` Identifier of the subtype related to image printings. It must contain the image encoded in base64 format. - `custom` Identifier of the subtype related to custom printings. It must contains one or more of the supported tags in order to realize a printing on the Point terminal. - `content` (string, optional) String that contains the information to be printed in the Point terminal. If the subtype is "custom", it must contain the string formatted with the supported tags; if it is "image", it must contain the image content in base64. ## Response parameters - `id` (string, optional) Identifier of the action created in the request, automatically generated by Mercado Pago. - `type` (string, optional) Action type. Possible enum values: - `print` Print action created for Point. - `external_reference` (string, optional) It is the external reference of the action, assigned when creating it. he maximum allowed limit is 64 characters, and the allowed characters are: uppercase and lowercase letters, numbers, and the symbols hyphen (-) and underscore (_). - `status` (string, optional) Current status of the action. Possible enum values: - `created` The action has been succesfully created. - `config` (object, optional) Action type configuration. - `config.point` (object, optional) Point action configuration. - `config.point.terminal_id` (string, optional) Identifier of the terminal that will obtain the action. You must send it according to the following format: "type of terminal + “__” + terminal serial", as in the following example: "NEWLAND_N950__N950NCB123456789". The serial number can be found on the rear label of the terminal. - `config.point.subtype` (string, optional) Identifier of the action subtype that will be created for the Point terminal. If the action is "print" you must choose between two values: "custom" for a customized printing, or "image" for an image printout. Possible enum values: - `image` Subtype identifier related to image impressions. Must contain the image encoded in base64 format. - `custom` Identifier of the subtype related to custom printings. It must contains one or more of the supported tags in order to perform a printing on the Point terminal. ## Errors | Status | Error | Description | | ------- | ------- | ----------- | | 400 | empty_required_header | The 'X-Idempotency-Key' header is required and was not sent. Make the request again including it. | | 400 | required_properties | There are some required properties missing. Check the message returned in the error details to find out what the problem was and try again. | | 400 | unsupported_properties | An unsupported property was sent. Check the message returned in the error details to find out what the problem was and try again. | | 400 | property_type | The wrong property type was submitted. For example, an 'integer' value for a 'string' property. Check the message returned in the error details to find out what the problem was and try again. | | 400 | property_value | An incorrect value for some property was sent. Check the message returned in the error details to find out what the problem was and try again. | | 400 | content is required | The content field is not present in the request body. | | 400 | The content file size exceeds the limit 1MB | The content of the content field exceeds the allowed size limit of 1MB. | | 400 | Error decoding base64, the provided base64 string is not valid. | The encoding of the image in base64 is incorrect. | | 401 | unauthorized | The value sent as Access Token is incorrect. Please check and try again with the correct value. | | 403 | forbidden_checking_terminal_owner | The Point terminal does not belong to the user who submitted the request. Check if the value sent for "terminal_id" is correct or if the terminal is linked to your account. | | 409 | idempotency_key_already_used | The value sent as the idempotency header has already been used with a different request within the last 24 hours. Please try the request again sending a new value. | | 409 | already_queued_order_for_terminal | The terminal already has an order waiting. It is necessary to finalize or cancel it to send new orders. | | 500 | idempotency_validation_failed | Validation fail. Please try submitting the request again. | | 500 | 500 | Generic error. Please try submitting the request again. | ## Request example ### cURL ```bash curl -X POST \ 'https://api.mercadopago.com/terminals/v1/actions' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "type": "print", "external_reference": "ext_ref_1234", "config": { "point": { "terminal_id": "NEWLAND_N950__N950NCB123456789",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RL8EjlW0yCNPoxDQ9QIqEebXVJpRt+BNUb0mjAOybqri64YARZa6C5KezglAtTR/wb8jpz/YmzouvAGuF1yTU0BEOqA4gDb/I+SNQ1OACMl14Yxb40UJtwB/ZhXaa6cirkW4HE1WGkH/AEuiPqlPMD801Mc3qbCSjsA9L1BKT0J97wthnw6oNyoXAM+im2EFEiuH1WNAJc1QJQC9mnQD7xPuO9tP1CNFAD72SAp/EFPAS8OUCMgaVRuAu/EdkqXvra2otREEQQzb58X2znH2KVvHFV1gPpFKMkBoKfBSUFGTYHUwVMcoIbu05T794AXKTLPgFsebIUkFVKZlaRvatKKVkgnZn0f18ZrYJXYTiPpX5EHi31PRP0QOQ9Yz/h/dwswo1G6YUmiAViA2a6GjGAcU7Bsp4v4r8DDwA08RUBOTk5OTk7Ov8lfFiKY13GwsdoAAAAASUVORK5CYII=" }' ``` ## Response example ```json { "id": "8952c6cf-bbb4-482c-a9f2-ea5fecd3ecd2", "type": "print", "external_reference": "ext_ref_1234", "status": "created", "config": { "point": { "terminal_id": "NEWLAND_N950__N950NCB123456789", "subtype": "image" } } } ```