{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"1a7570ff-a9a5-4484-be61-7e39fb674a74","name":"API Partnership Program","description":"# Digital Gift Card Issuing Endpoint\r\n\r\nIn this document you will find all the details for integrating your system with our digital gift card issuing API.\r\n\r\n## Digital Gift Card\r\n\r\nThe 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.\r\n\r\n## E-mail delivery\r\n\r\nYou can use a flag and we will send the e-mails for you.\r\n\r\n- In the case of `send_emails` is `true`, Todo Cartões will send the e-mail.\r\n    * If you set `send_emails` as true, you should set the e-mail at the object `email`, using the property `to` and the custom message at the property `message`.\r\n- In case of the flag `send_emails` set as `false`, 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.\r\n\r\n## Your identifier\r\n\r\nYou should send a property called `external_partner_load_id`. 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.\r\n\r\nWe will provide you with 2 keys that represent the created (activated) or reloaded Gift Card transaction. These are the fields: `transaction_code` and `transaction_date`.\r\n\r\n### Authentication:\r\n\r\nA Bearer Token will be provided by Todo Cartões\r\n\r\n### Input\r\n\r\n**With e-mail:**\r\n```json\r\n{\r\n  \"card_identificator\": \"VALEVIRTUALTESTE\",\r\n  \"store_cnpj\": \"21647164000185\",\r\n  \"external_partner_load_id\": \"190\",\r\n  \"total\": 190.11,\r\n  \"send_email\": true,\r\n  \"email\": {\r\n    \"to\": \"test@todocartoes.com.br\",\r\n    \"custom_fields\": {\r\n      \"sender_name\": \"Thomás Sieczkowski\",\r\n      \"receiver_name\": \"Gregório Rados\",\r\n      \"message\": \"Hello friend. Congratulations for your job promotion :)\"\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n**Without e-mail:**\r\n\r\n```json\r\n{\r\n  \"card_identificator\": \"VALEVIRTUALTESTE\",\r\n  \"store_cnpj\": \"21647164000185\",\r\n  \"external_partner_load_id\": \"190\",\r\n  \"total\": 190.11,\r\n  \"send_email\": false\r\n}\r\n```\r\n| Campo               |   Tipo    |   Observações                                                                                         | Obrigatório |\r\n|---------------------|-----------|-------------------------------------------------------------------------------------------------------|-------------|\r\n| card_identificator  | String    | Identifier of the brand of the Gift Card                                                                 |     SIM     |\r\n| store_cnpj          | String    | CNPJ of the store that is originating this activation/reload    |     SIM     |\r\n| external_partner_load_id |  Integer  | ID on you platform        |      SIM     |\r\n| total               |  Decimal  | Value to be activated/reloaded into the Gift Card                            |      SIM     |\r\n| email               | Chave     | Weather to send the e-mails or not                       |     NÃO     |\r\n\r\n#### Detalhamento da chave de email\r\n\r\n| Campo               |   Tipo   |   Observações                                                                                                                                                                                                         | Obrigatório  |\r\n|---------------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|\r\n| to                  |  String  | E-mail of the recipient |      SIM     |\r\n| from                |  String  | Sender e-mail |      SIM     |\r\n| custom_fields       |  Chave   | Dynamic fields within the e-mail |      SIM     |\r\n\r\n### Saída\r\n\r\n```json\r\n{\r\n  \"response_code\": \"00\",\r\n  \"response_message\": \"OK. Transações efetuadas\",\r\n  \"transaction_code\": \"123\",\r\n  \"transaction_date\": \"2018-11-06\",\r\n  \"card_number\": \"504161000000000\",\r\n  \"card_password\": \"835837\",\r\n  \"expire_date\": \"2019-11-05\",\r\n  \"external_partner_load_id\": \"190\"\r\n}\r\n\r\n```\r\n| Campo                 | Tipo    | Observações                                                                 |\r\n|-----------------------|---------|-----------------------------------------------------------------------------|\r\n| card_response_code    | String  | Status code |\r\n| card_response_message | String  | Status messages            |\r\n| transaction_code      | String  | Daily sequencial transaction identifier |\r\n| transaction_date      | String  | Date of the transaction at our server. You should combine to transaction_code to have a unique ID at your side |\r\n| card_number           | String  | Number of the digital gift card generated |\r\n| card_password         | String  | Generated 6 digit password |\r\n| expire_date    | Date      | Date of expiration of the card                                                          |     SIM     |\r\n| external_partner_load_id |  Integer  | Your ID        |      SIM     |","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"2516022","team":57045,"collectionId":"1a7570ff-a9a5-4484-be61-7e39fb674a74","publishedId":"S1Lr3Amz","public":true,"publicUrl":"https://docs.todo.gift","privateUrl":"https://go.postman.co/documentation/2516022-1a7570ff-a9a5-4484-be61-7e39fb674a74","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","version":"8.10.1","publishDate":"2019-04-29T19:21:49.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/ac6a70a9275e4447af2579beb21729b41277e32cefad14fd8d3015b3f209f3cc","favicon":"https://todo.gift/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://docs.todo.gift/view/metadata/S1Lr3Amz"}