Skip to content

Commit

Permalink
Merge pull request #2513 from mercadopago/feature/improve-industry-data
Browse files Browse the repository at this point in the history
Feature/improve industry data
  • Loading branch information
hgaldino authored Jan 10, 2025
2 parents 18e1b60 + 9ba0f2d commit 7dae5ff
Show file tree
Hide file tree
Showing 45 changed files with 5,546 additions and 0 deletions.
144 changes: 144 additions & 0 deletions guides/checkout-api-v2/industry-data/apparel.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# Apparel

These are the specific data for the **apparel** industry that you can add to your integration to improve payment approval.

## Fields to send

Add any additional information that you consider necessary.

### About the items

----[mla, mlm, mlu, mco, mlb, mpe]----
| Array `items` | Type | Description |
| --- | --- | --- |
| `id` | String | Item identification code. |
| `title` | String | Item name. |
| `type` | String | Item type. |
| `description` | String | Item description. |
| `picture_url` | String | Image URL representing the item. |
| `category_id` | String | Item category. |
| `quantity` | Integer | Quantity of units for the item. |
| `unit_price` | Float | Unit price assigned to the item. It can be an integer or a decimal. |
------------

----[mlc]----
| Array `items` | Type | Description |
| --- | --- | --- |
| `id` | String | Item identification code. |
| `title` | String | Item name. |
| `type` | String | Item type. |
| `description` | String | Item description. |
| `picture_url` | String | Image URL representing the item. |
| `category_id` | String | Item category. |
| `quantity` | Integer | Quantity of units for the item. |
| `unit_price` | Float | Unit price assigned to the item. It must be an integer. |
------------

### About the buyer

| Object `payer` | Type | Description |
| --- | --- | --- |
| `first_name` | String | Buyer's first name. |
| `last_name` | String | Buyer's last name. |
| `identification` | Object | Buyer's identification data. |
| `type` | String | Type of identification. It is found within the `identification` object. |
| `number` | String | Identification number. It is found within the `identification` object. |
| `phone` | Object | Buyer's phone number. |
| `area_code` | Integer | Buyer's area code. It is found within the `phone` object. |
| `number` | Integer | Buyer's phone number. It is found within the `phone` object. |
| `address` | Object | Buyer's address data. |
| `zip_code` | String | Buyer's postal code. It is found within the `address` object. |
| `street_name` | String | Street name of the buyer's address. It is found within the `address` object. |
| `street_number` | Integer | Street number of the buyer's address. It is found within the `address` object. |
| `authentication_type` | Enum | Type of authentication. It can be "Gmail", "Facebook", "Native Web", or "Other". |
| `registration_date` | Date | Buyer's registration date on the site. |
| `is_prime_user` | Boolean | Indicates if the user is premium. Put `true` if they are or `false` if they are not. |
| `is_first_purchase_online` | Boolean | Indicates if this is the customer's first purchase. Put `true` if they are or `false` if they are not. |
| `last_purchase` | Date | Date of the last purchase on the site. |

### About Shipments

| Object `shipment` | Type | Description |
| --- | --- | --- |
| `receiver_address` | Object | Shipping address data. |
| `zip_code` | String | Postal code for the shipment. |
| `state_name` | String | Province to which the order is shipped. |
| `city_name` | String | City to which the order is shipped. |
| `street_number` | Integer | Street number of the shipment. |
| `express_shipment` | Boolean | Indicates if the shipment is express. `true` if it is, `false` if it is not. |

```curl
curl --location 'https://api.mercadopago.com/v1/payments' \
--header 'Content-Type: application/json' \
--header 'X-Idempotency-Key: {{uuid}} \
--header 'Authorization: Bearer ACCESS_TOKEN' \
--header 'X-Meli-Session-Id: {{device_id}}' \
--data-raw '{
"transaction_amount": 150.00,
"installments": 1,
"statement_descriptor": "LOJA 123",
"capture": true,
"binary_mode": false,
"sponsor_id": null,
"application_fee": null,
"payment_method_id": "debvisa",
"token": "{{card_token_id}}",
"external_reference": "Pedido01",
"description": "PEDIDO NOVO",
"notification_url": "{{notification_url}}",
"metadata": {
"order_number": "order_01"
},
"payer": {
"email": "[email protected]",
"identification": {
"type": "CPF",
"number": "12345678909"
}
},
"additional_info": {
"items": [
{
"id": "1234",
"title": "Serviço",
"type": "my_items_type",
"picture_url": "{{url_image}}",
"description": "Descrição de serviço",
"category_id": "fashion",
"quantity": 1,
"unit_price": 150
}
],
"payer": {
"first_name": "Nome",
"last_name": "Sobrenome",
"is_prime_user": "1",
"is_first_purchase_online": "1",
"last_purchase": "2019-10-25T19:30:00.000-03:00",
"phone": {
"area_code": "11",
"number": "987654321"
},
"address": {
"zip_code": "206233-2002",
"street_name": "Av. das Nações Unidas",
"street_number": "3003"
},
"authentication_type": "Facebook",
"registration_date": "2020-08-06T09:25:04.000-03:00"
},
"shipments": {
"express_shipment": true,
"receiver_address": {
"zip_code": "306233-2003",
"street_name": "Av. das Nações Unidas",
"street_number": "3003",
"floor": "5",
"apartment": "502",
"state_name":"SP",
"city_name":"Osasco"
}
}
}
}'
```
145 changes: 145 additions & 0 deletions guides/checkout-api-v2/industry-data/apparel.es.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# Apparel

Estos son los datos específicos para la industria **apparel** que puedes agregar a tu integración para mejorar la aprobación de los pagos.

## Campos a enviar

Agrega toda la información adicional que consideres necesaria.

### Sobre los ítems

----[mla, mlm, mlu, mco, mlb, mpe]----
| Array `items` | Tipo | Descripción |
| --- | --- | --- |
| `id` | String | Código de identificación del ítem. |
| `title` | String | Nombre del ítem. |
| `type` | String | Tipo de ítem. |
| `description` | String | Descripción del ítem. |
| `picture_url` | String | URL de imagen que representa al ítem. |
| `category_id` | String | Categoría del ítem. |
| `quantity` | Integer | Cantidad de unidades para el ítem. |
| `unit_price` | Float | Precio unitario asignado al ítem. Puede ser entero o con decimales. |
------------

----[mlc]----
| Array `items` | Tipo | Descripción |
| --- | --- | --- |
| `id` | String | Código de identificación del ítem. |
| `title` | String | Nombre del ítem. |
| `type` | String | Tipo de ítem. |
| `description` | String | Descripción del ítem. |
| `picture_url` | String | URL de imagen que representa al ítem. |
| `category_id` | String | Categoría del ítem. |
| `quantity` | Integer | Cantidad de unidades para el ítem. |
| `unit_price` | Float | Precio unitario asignado al ítem. Debe ser un número entero. |
------------

### Sobre el comprador

| Object `payer` | Tipo | Descripción |
| --- | --- | --- |
| `first_name` | String | Nombre del comprador. |
| `last_name` | String | Apellido del comprador. |
| `identification` | Object | Datos de identificación del comprador. |
| `type` | String | Tipo de identificación. Se encuentra dentro del objeto `identification`. |
| `number` | String | Número de identificación. Se encuentra dentro del objeto `identification`. |
| `phone` | Object | Teléfono del comprador. |
| `area_code` | Integer | Código de área del comprador. Se encuentra dentro del objeto `phone`. |
| `number` | Integer | Número de teléfono del comprador. Se encuentra dentro del objeto `phone`. |
| `address` | Object | Datos del domicilio del comprador. |
| `zip_code` | String | Código postal del comprador. Se encuentra dentro del objeto `address`. |
| `street_name` | String | Nombre de calle del domicilio del comprador. Se encuentra dentro del objeto `address`. |
| `street_number` | Integer | Número de calle del domicilio del comprador. Se encuentra dentro del objeto `address`. |
| `authentication_type` | Enum | Tipo de autenticación. Pueden ser "Gmail", "Facebook", "Web Nativa" u "Otro". |
| `registration_date` | Date | Fecha de registro del comprador en el sitio. |
| `is_prime_user` | Boolean | Indica si el usuario es premium. Coloca `true` si lo es o `false` si no lo es. |
| `is_first_purchase_online` | Boolean | Indica si es la primera compra del cliente. Coloca `true` si lo es o `false` si no lo es. |
| `last_purchase` | Date | Fecha de la última compra en el sitio. |

### Sobre envíos

| Object `shipment` | Tipo | Descripción |
| --- | --- | --- |
| `receiver_address` | Object | Datos de dirección del envío. |
| `zip_code` | String | Código postal para el envío. |
| `state_name` | String | Provincia hacia donde se envía el pedido. |
| `city_name` | String | Ciudad hacia donde se envía el pedido. |
| `street_number` | Integer | Número de calle del envío. |
| `express_shipment` | Boolean | Indica si el envío es rápido. `true` si lo es, `false` si no lo es. |

```curl
curl --location 'https://api.mercadopago.com/v1/payments' \
--header 'Content-Type: application/json' \
--header 'X-Idempotency-Key: {{uuid}} \
--header 'Authorization: Bearer ACCESS_TOKEN' \
--header 'X-Meli-Session-Id: {{device_id}}' \
--data-raw '{
"transaction_amount": 150.00,
"installments": 1,
"statement_descriptor": "LOJA 123",
"capture": true,
"binary_mode": false,
"sponsor_id": null,
"application_fee": null,
"payment_method_id": "debvisa",
"token": "{{card_token_id}}",
"external_reference": "Pedido01",
"description": "PEDIDO NOVO",
"notification_url": "{{notification_url}}",
"metadata": {
"order_number": "order_01"
},
"payer": {
"email": "[email protected]",
"identification": {
"type": "CPF",
"number": "12345678909"
}
},
"additional_info": {
"items": [
{
"id": "1234",
"title": "Serviço",
"type": "my_items_type",
"picture_url": "{{url_image}}",
"description": "Descrição de serviço",
"category_id": "fashion",
"quantity": 1,
"unit_price": 150
}
],
"payer": {
"first_name": "Nome",
"last_name": "Sobrenome",
"is_prime_user": "1",
"is_first_purchase_online": "1",
"last_purchase": "2019-10-25T19:30:00.000-03:00",
"phone": {
"area_code": "11",
"number": "987654321"
},
"address": {
"zip_code": "206233-2002",
"street_name": "Av. das Nações Unidas",
"street_number": "3003"
},
"authentication_type": "Facebook",
"registration_date": "2020-08-06T09:25:04.000-03:00"
},
"shipments": {
"express_shipment": true,
"receiver_address": {
"zip_code": "306233-2003",
"street_name": "Av. das Nações Unidas",
"street_number": "3003",
"floor": "5",
"apartment": "502",
"state_name":"SP",
"city_name":"Osasco"
}
}
}
}'
```

Loading

0 comments on commit 7dae5ff

Please sign in to comment.