{"info":{"_postman_id":"1a7570ff-a9a5-4484-be61-7e39fb674a74","name":"API Partnership Program","description":"<html><head></head><body><h1 id=\"digital-gift-card-issuing-endpoint\">Digital Gift Card Issuing Endpoint</h1>\n<p>In this document you will find all the details for integrating your system with our digital gift card issuing API.</p>\n<h2 id=\"digital-gift-card\">Digital Gift Card</h2>\n<p>The issuing Digital Gift Card endpoint creates and activates a card using the value send as parameter. It is possible to configute 1 (one) Gift Card per request. You should send your external_id of the object related to your system in order to sync your ID to ours.</p>\n<h2 id=\"e-mail-delivery\">E-mail delivery</h2>\n<p>You can use a flag and we will send the e-mails for you.</p>\n<ul>\n<li>In the case of <code>send_emails</code> is <code>true</code>, Todo Cartões will send the e-mail.<ul>\n<li>If you set <code>send_emails</code> as true, you should set the e-mail at the object <code>email</code>, using the property <code>to</code> and the custom message at the property <code>message</code>.</li>\n</ul>\n</li>\n<li>In case of the flag <code>send_emails</code> set as <code>false</code>, Todo Cartões will not send the e-mail. You should be responsible to et the data at the response of the request you've sent.</li>\n</ul>\n<h2 id=\"your-identifier\">Your identifier</h2>\n<p>You should send a property called <code>external_partner_load_id</code>. This is the ID of this purchase in your platform. It is very important that you send a unique identifier for every Gift Card generated. The endpoint will not allow.</p>\n<p>We will provide you with 2 keys that represent the created (activated) or reloaded Gift Card transaction. These are the fields: <code>transaction_code</code> and <code>transaction_date</code>.</p>\n<h3 id=\"authentication\">Authentication:</h3>\n<p>A Bearer Token will be provided by Todo Cartões</p>\n<h3 id=\"input\">Input</h3>\n<p><strong>With e-mail:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"card_identificator\": \"VALEVIRTUALTESTE\",\n  \"store_cnpj\": \"21647164000185\",\n  \"external_partner_load_id\": \"190\",\n  \"total\": 190.11,\n  \"send_email\": true,\n  \"email\": {\n    \"to\": \"test@todocartoes.com.br\",\n    \"custom_fields\": {\n      \"sender_name\": \"Thomás Sieczkowski\",\n      \"receiver_name\": \"Gregório Rados\",\n      \"message\": \"Hello friend. Congratulations for your job promotion :)\"\n    }\n  }\n}\n</code></pre>\n<p><strong>Without e-mail:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"card_identificator\": \"VALEVIRTUALTESTE\",\n  \"store_cnpj\": \"21647164000185\",\n  \"external_partner_load_id\": \"190\",\n  \"total\": 190.11,\n  \"send_email\": false\n}\n</code></pre>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Campo</th>\n<th>Tipo</th>\n<th>Observações</th>\n<th>Obrigatório</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>card_identificator</td>\n<td>String</td>\n<td>Identifier of the brand of the Gift Card</td>\n<td>SIM</td>\n</tr>\n<tr>\n<td>store_cnpj</td>\n<td>String</td>\n<td>CNPJ of the store that is originating this activation/reload</td>\n<td>SIM</td>\n</tr>\n<tr>\n<td>external_partner_load_id</td>\n<td>Integer</td>\n<td>ID on you platform</td>\n<td>SIM</td>\n</tr>\n<tr>\n<td>total</td>\n<td>Decimal</td>\n<td>Value to be activated/reloaded into the Gift Card</td>\n<td>SIM</td>\n</tr>\n<tr>\n<td>email</td>\n<td>Chave</td>\n<td>Weather to send the e-mails or not</td>\n<td>NÃO</td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"detalhamento-da-chave-de-email\">Detalhamento da chave de email</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Campo</th>\n<th>Tipo</th>\n<th>Observações</th>\n<th>Obrigatório</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>to</td>\n<td>String</td>\n<td>E-mail of the recipient</td>\n<td>SIM</td>\n</tr>\n<tr>\n<td>from</td>\n<td>String</td>\n<td>Sender e-mail</td>\n<td>SIM</td>\n</tr>\n<tr>\n<td>custom_fields</td>\n<td>Chave</td>\n<td>Dynamic fields within the e-mail</td>\n<td>SIM</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"saída\">Saída</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"response_code\": \"00\",\n  \"response_message\": \"OK. Transações efetuadas\",\n  \"transaction_code\": \"123\",\n  \"transaction_date\": \"2018-11-06\",\n  \"card_number\": \"504161000000000\",\n  \"card_password\": \"835837\",\n  \"expire_date\": \"2019-11-05\",\n  \"external_partner_load_id\": \"190\"\n}\n\n</code></pre>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Campo</th>\n<th>Tipo</th>\n<th>Observações</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>card_response_code</td>\n<td>String</td>\n<td>Status code</td>\n</tr>\n<tr>\n<td>card_response_message</td>\n<td>String</td>\n<td>Status messages</td>\n</tr>\n<tr>\n<td>transaction_code</td>\n<td>String</td>\n<td>Daily sequencial transaction identifier</td>\n</tr>\n<tr>\n<td>transaction_date</td>\n<td>String</td>\n<td>Date of the transaction at our server. You should combine to transaction_code to have a unique ID at your side</td>\n</tr>\n<tr>\n<td>card_number</td>\n<td>String</td>\n<td>Number of the digital gift card generated</td>\n</tr>\n<tr>\n<td>card_password</td>\n<td>String</td>\n<td>Generated 6 digit password</td>\n</tr>\n<tr>\n<td>expire_date</td>\n<td>Date</td>\n<td>Date of expiration of the card</td>\n</tr>\n<tr>\n<td>external_partner_load_id</td>\n<td>Integer</td>\n<td>Your ID</td>\n</tr>\n</tbody>\n</table>\n</div></body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Digital Gift Card Issuing Endpoint","slug":"digital-gift-card-issuing-endpoint"}],"owner":"2516022","collectionId":"1a7570ff-a9a5-4484-be61-7e39fb674a74","publishedId":"S1Lr3Amz","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2019-04-29T19:21:49.000Z"},"item":[{"name":"Digital Gift Card Issuing","id":"1a8e7b9a-99d2-48d2-bdce-e10f337e366c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{token}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"card_identificator\": \"API - LENTRECOTE DE PARIS\",\n  \"store_cnpj\": \"12316059000415\",\n  \"external_partner_load_id\": \"190\",\n  \"total\": 100.00,\n  \"send_email\": true,\n  \"email\": {\n    \"to\": \"receiversemail@domain.com.br\",\n    \"custom_fields\": {\n      \"sender_name\": \"José Alves\",\n      \"receiver_name\": \"John Lester\",\n      \"message\": \"Congratulations on your job promotion!\"\n    }\n  }\n}"},"url":"https://corporate-sandbox.todocartoes.com.br/api/v1/gift-cards","description":"<p>This endpoint issues new Digital Gift Cards for our corporate partners.</p>\n","urlObject":{"protocol":"https","path":["api","v1","gift-cards"],"host":["corporate-sandbox","todocartoes","com","br"],"query":[],"variable":[]}},"response":[],"_postman_id":"1a8e7b9a-99d2-48d2-bdce-e10f337e366c"},{"name":"Available stores list","id":"4e512c81-a26b-4b13-8a58-0a3753448947","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":"https://corporate-sandbox.todocartoes.com.br/api/v1/brands","description":"<h1 id=\"endpoint-de-listagem-de-marcas\">Endpoint de listagem de marcas</h1>\n<p>Lista todas das lojas disponíveis para criação de gift card coporativos</p>\n<p>GET <code>https://corporate-sandobox.todocartoes.com.br/api/v1/brands</code></p>\n<h2 id=\"headers\">Headers</h2>\n<p><code>Content-Type</code> <code>application/json</code></p>\n<h2 id=\"response\"><em>Response</em></h2>\n<p>A resposta possui um body contendo as seguintes informações disponíveis em um array <code>brands</code>, para cada marca:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Nome</th>\n<th>Tipo</th>\n<th>Descrição</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>brand_name</td>\n<td>string</td>\n<td>Nome da Marca</td>\n</tr>\n<tr>\n<td>min_value</td>\n<td>string</td>\n<td>Valor mínimo</td>\n</tr>\n<tr>\n<td>max_value</td>\n<td>string</td>\n<td>Valor Máximo</td>\n</tr>\n<tr>\n<td>expiration_in_months</td>\n<td>int</td>\n<td>Validade em meses</td>\n</tr>\n<tr>\n<td>card_identificator</td>\n<td>string</td>\n<td>Identificador do cartão</td>\n</tr>\n<tr>\n<td>perform_in</td>\n<td>string</td>\n<td>Local de utilização</td>\n</tr>\n<tr>\n<td>stores</td>\n<td>string</td>\n<td>Lojas participantes</td>\n</tr>\n<tr>\n<td>site</td>\n<td>string</td>\n<td>Site do lojista</td>\n</tr>\n<tr>\n<td>image_thumb</td>\n<td>string</td>\n<td>Logo do logista Thumb 600x600</td>\n</tr>\n<tr>\n<td>image_small</td>\n<td>string</td>\n<td>Logo do logista Small 100x100</td>\n</tr>\n<tr>\n<td>image_default</td>\n<td>string</td>\n<td>Logo do logista original</td>\n</tr>\n</tbody>\n</table>\n</div>","urlObject":{"protocol":"https","path":["api","v1","brands"],"host":["corporate-sandbox","todocartoes","com","br"],"query":[],"variable":[]}},"response":[],"_postman_id":"4e512c81-a26b-4b13-8a58-0a3753448947"}],"event":[{"listen":"prerequest","script":{"id":"32ae8abb-4aa2-4c63-bad6-e0b8b8814a56","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"72eef2a4-cc53-482a-ae8c-5f71478495b3","type":"text/javascript","exec":[""]}}]}