Home
Documentation
Resources
Certifications
Community

Resources

Check for updates on our solutions and system performance, or request technical support.

Community

Get the latest news, ask others for help and share your knowledge.

Create terminal action - Impressions - Mercado Pago Developers
Create terminal action

POST

https://api.mercadopago.com/terminals/v1/actions
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.
Request's 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 eac...View more
BODY
type
string

REQUIRED

Action type, associated with the Mercado Pago solution for wich it is created. Right now, the only supported value is "print".
print: Value associated with the creation of print actions for the Point of Sale.
external_reference
string

REQUIRED

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 ...View more
config
object

REQUIRED

Action type configuration.
content
string

REQUIRED

String that contains the information to be printed in the Point terminal. If the subtype is "invoice", it must be a valid .xml, and if the subtype is "custom" it must contain the string formatted with the supported tags.
Response parameters
id
string
Identifier of the action created in the request, automatically generated by Mercado Pago.
type
string
Action type.
print: Print action created for Point.
external_reference
string
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 u...View more
status
string
Current status of the action.
created: The action has been succesfully created.
Errors

400Error

empty_required_header

The 'X-Idempotency-Key' header is required and was not sent. Make the request again including it.

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.

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.

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.

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.

json_syntax_error

An incorrect JSON was sent. Check the message returned in the error details to find out what the problem was and try again.

invalid_data_xml

The data sent in the .xml is not compliant with the format provided by the invoices issuer. Check the message returned in the error details to find out what the problem was and try again.

401Error.

unauthorized

The value sent as Access Token is incorrect. Please check and try again with the correct value.

403Error.

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.

409Error.

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.

already_queued_order_for_terminal

The terminal already has an order waiting. It is necessary to finalize or cancel it to send new orders.

500Error.

idempotency_validation_failed

Validation fail. Please try submitting the request again.

500

Generic error. Please try submitting the request again.

Request
curl -X POST \
    'https://api.mercadopago.com/terminals/v1/actions'\
    -H 'Content-Type: application/json' \
       -H 'X-Idempotency-Key: 0d5020ed-1af6-469c-ae06-c3bec19954bb' \
       -H 'Authorization: Bearer TEST-7719*********832-03141*********ec9309854*********f1e54b5-1*********' \
    -d '{
  "type": "print",
  "external_reference": "ext_ref_1234",
  "config": {
    "point": {
      "terminal_id": "NEWLAND_N950__N950NCB123456789",
      "subtype": "invoice"
    }
  },
  "content": "{br}--------------------------------{br}{center}{w} COMPROBANTE DE ENTREGA{/w}{br}{br}{s} Nro pedido :12345{/s}{br}{s} Tienda: Tienda de prueba{/s}{br}--------------------------------{br}{s}***ITEM(S) DESPACHO***{/s}{br}{s}SKU / ARTICULO                    CANTIDAD    {/s}{br}{s}----------------------------------------------{/s}{br}{s}4065432630504 / BALON FUTBOL ADIDAS WUCL LGE EHV240424   1{br}{s}ENTREGAR: 06/06/2024{/s}{br}{s}DIRECCION: METROPOLITANA Cerro Navia test 12345  {/s}{br}{s}RECIBE: Pepito Perez{/s}{br}{s}entrega a cliente en horario am{/s}{br}--------------------------------{br}"
}'
Sample answer
{
  "id": "8952c6cf-bbb4-482c-a9f2-ea5fecd3ecd2",
  "type": "print",
  "external_reference": "ext_ref_1234",
  "status": "created",
  "config": {
    "point": {
      "terminal_id": "NEWLAND_N950__N950NCB123456789",
      "subtype": "invoice"
    }
  }
}