Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/improve industry data #2513

Open
wants to merge 19 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 126 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,126 @@
## Apparel

### Fields to send
Add all the additional information you want.

#### About items

| Array `items` | Type | Description |
| --- | --- | --- |
| `id` | String | Code. |
| `title` | String | Name. |
| `type` | String | Type. |
| `description` | String | Description. |
| `picture_url` | String | Picture URL. |
| `category_id` | String | Category. |
| `quantity` | Integer | Quantity. |
| `unit_price` | Float | Unit price. |

#### About the buyer

| Object `payer` | Type | Description |
| --- | --- | --- |
| `first_name` | String | Name. |
| `last_name` | String | Surname. |
| `identification` | Object | Identification data. |
| `identification_type` | String | Identification type. |
| `identification_number` | String | Identification number. |
| `phone` | Object | Phone. |
| `area_code` | Integer | Area Code. |
| `number` | Integer | Phone number. |
| `address` | Object | Adress data. |
| `zip_code` | String | Postal code |
| `street_name` | String | Street name. |
| `street_number` | Integer | Street number. |
| `authentication_type` | Enum | Type of authentication. They can be "Gmail," "Facebook," "Native Web," or "Other". |
| `registration_date` | Date | Buyer's registration date on the site. |
| `is_prime_user` | Boolean | `True` if it is, `False` if it is not. |
| `is_first_purchase_online` | Boolean | `True` if it is, `False` if it is not. |
| `last_purchase` | Date | Date of the last purchase on the site. |

#### About shipments

| Object `shipment` | Type | Description |
| --- | --- | --- |
| `receiver_address` | Object | Address of the buyer. |
| `zip_code` | String | Postal code. |
| `state_name` | String | Province. |
| `city_name` | String | City. |
| `street_number` | Integer | Street number. |
| `express_shipment` | Boolean | `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"
}
}
}
}'
```
127 changes: 127 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,127 @@
# Apparel

## Campos a enviar
Agrega toda la información adicional que quieras.

### 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. |
| `number` | Integer | Número de teléfono del comprador. |
| `address` | Object | Datos del domicilio del comprador. |
| `zip_code` | String | Código postal del comprador. |
| `street_name` | String | Nombre de calle del domicilio del comprador. |
| `street_number` | Integer | Número de calle del domicilio del comprador. |
| `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 | `True` si lo es, `False` si no lo es. |
| `is_first_purchase_online` | Boolean | Indica si es la primera compra del cliente. `True` si lo es, `False` si no lo es. |
| `last_purchase` | Date | Fecha de la última compra en el sitio. |

### Sobre los ítems

| 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. |

### 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"
}
}
}
}'
```

127 changes: 127 additions & 0 deletions guides/checkout-api-v2/industry-data/apparel.pt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# Apparel

## Campos para enviar
Adicione todas as informações adicionais que você deseja.

### Sobre itens

| Array `items` | Tipo | Descrição|
| --- | --- | --- |
| `id` | String | Código. |
| `title` | String | Nome. |
| `type` | String | Tipo |
| `description` | String | Descrição. |
| `picture_url` | String | Imagem URL. |
| `category_id` | String | Categoria. |
| `quantity` | Integer | Quantidade. |
| `unit_price` | Float | Preço unitário. |

### Sobre o comprador

| Object `payer` | Tipo | Descrição |
| --- | --- | --- |
| `first_name` | String | Nome. |
| `last_name` | String | Sobrenome. |
| `identification` | Object | Dados de identificação. |
| `identification_type` | String | Tipo de identificação. |
| `identification_number` | String | Número de identificação. |
| `phone` | Object | Telefone. |
| `area_code` | Integer | Código de área. |
| `number` | Integer | Número de telefone. |
| `address` | Object | Dados do endereço. |
| `zip_code` | String | Código postal. |
| `street_name` | String | Nome da rua. |
| `street_number` | Integer | Número da rua. |
| `authentication_type` | Enum | Tipo de autenticação. Podem ser "Gmail", "Facebook", "Web Nativa" ou "Outro". |
| `registration_date` | Date | Data de registro do comprador no site. |
| `is_prime_user` | Boolean | `True` se é, `False` se nao é. |
| `is_first_purchase_online` | Boolean | `True` se é, `False` se não é. |
| `last_purchase` | Date | Data da última compra no site. |

### Sobre remessa

| Object `shipment` | Tipo | Descrição |
| --- | --- | --- |
| `receiver_address` | Object | Dados do endereço do comprador. |
| `zip_code` | String | Código postal |
| `state_name` | String | Província |
| `city_name` | String | Cidade |
| `street_number` | Integer | Número da rua |
| `express_shipment` | Boolean | `True` se é, `False` se não é. |


```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