{"__v":27,"_id":"562905922c0fd9190067da18","api":{"auth":"required","params":[],"results":{"codes":[]},"settings":"","url":""},"body":"In order to interact with the API, we'll need to grab an access token. You can retrieve this in your settings tab by [enabling development](https://personal.loopandtie.com/account/edit).\n\nIf you haven't signed up yet, [do so now!](https://www.loopandtie.com).\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/xbV3uhenQaisMcorRLnm_EnableDeveloper.png\",\n        \"EnableDeveloper.png\",\n        \"1202\",\n        \"1004\",\n        \"#5cb354\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nEnabling the Developer API will generate two tokens:\n  * lt\\_live\\_*: works with real teams, can send actual emails, and incur charges.\n  * lt\\_sbox\\_*: only interacts with your sandbox and won't incur any charges or send emails.  \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/2y0EdRxSsaeihThZ9XY0_EnabledDevelopment.png\",\n        \"EnabledDevelopment.png\",\n        \"1628\",\n        \"968\",\n        \"#66b25f\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nWe'll be working with the lt\\_sbox\\_* key from here on out. You can, if need be, switch to your live key in the API Explorer.\n\nLet's check that everything's working by retrieving all our teams.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -i https://api.loopandtie.com/v1/teams -H \\\"Authorization: Bearer [[app:key]]\\\"\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\nYou should get something similar to the following:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"data\\\": [\\n        {\\n            \\\"id\\\": \\\"loop-tie\\\",\\n            \\\"type\\\": \\\"teams\\\",\\n            \\\"attributes\\\": {\\n                \\\"name\\\": \\\"Loop & Tie\\\"\\n            }\\n        },\\n        {\\n            \\\"id\\\": \\\"sandbox\\\",\\n            \\\"type\\\": \\\"teams\\\",\\n            \\\"attributes\\\": {\\n                \\\"name\\\": \\\"sandbox-dimitri-roche-59a86b3a-c6cb-49c8-b07a-c5765453d39c\\\"\\n            }\\n        },\\n        {\\n            \\\"id\\\": \\\"personal\\\",\\n            \\\"type\\\": \\\"teams\\\",\\n            \\\"attributes\\\": {\\n                \\\"name\\\": \\\"personal-dimitri-roche-980ee742-5366-4046-b565-f5fb19619a58\\\"\\n            }\\n        }\\n    ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Some things to note about the API\",\n  \"body\": \"* All responses follow the [JSON API v1 spec](http://jsonapi.org/).\\n\\n\\n  * In this documentation, we use the Authorization Bearer header, but the `access_token` can also be passed as an URL parameter: `https://api.loopandtie.com/teams?access_token=[[app:key]]`\"\n}\n[/block]","category":"562905922c0fd9190067da16","createdAt":"2015-10-22T15:49:38.883Z","excerpt":"Loop and Tie is easy to integrate into your application through our REST API. This page will help you get started. You'll be up and running in no time! To get set up even quicker, ask us about our Zap available on https://zapier.com !","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":0,"parentDoc":null,"project":"562905912c0fd9190067da12","slug":"getting-started","sync_unique":"","title":"Getting Started","type":"basic","updates":[],"user":"5629054b48742a0d004745cc","version":"562905912c0fd9190067da15","childrenPages":[]}

Getting Started

Loop and Tie is easy to integrate into your application through our REST API. This page will help you get started. You'll be up and running in no time! To get set up even quicker, ask us about our Zap available on https://zapier.com !

In order to interact with the API, we'll need to grab an access token. You can retrieve this in your settings tab by [enabling development](https://personal.loopandtie.com/account/edit). If you haven't signed up yet, [do so now!](https://www.loopandtie.com). [block:image] { "images": [ { "image": [ "https://files.readme.io/xbV3uhenQaisMcorRLnm_EnableDeveloper.png", "EnableDeveloper.png", "1202", "1004", "#5cb354", "" ] } ] } [/block] Enabling the Developer API will generate two tokens: * lt\_live\_*: works with real teams, can send actual emails, and incur charges. * lt\_sbox\_*: only interacts with your sandbox and won't incur any charges or send emails. [block:image] { "images": [ { "image": [ "https://files.readme.io/2y0EdRxSsaeihThZ9XY0_EnabledDevelopment.png", "EnabledDevelopment.png", "1628", "968", "#66b25f", "" ] } ] } [/block] We'll be working with the lt\_sbox\_* key from here on out. You can, if need be, switch to your live key in the API Explorer. Let's check that everything's working by retrieving all our teams. [block:code] { "codes": [ { "code": "curl -i https://api.loopandtie.com/v1/teams -H \"Authorization: Bearer [[app:key]]\"", "language": "curl" } ] } [/block] You should get something similar to the following: [block:code] { "codes": [ { "code": "{\n \"data\": [\n {\n \"id\": \"loop-tie\",\n \"type\": \"teams\",\n \"attributes\": {\n \"name\": \"Loop & Tie\"\n }\n },\n {\n \"id\": \"sandbox\",\n \"type\": \"teams\",\n \"attributes\": {\n \"name\": \"sandbox-dimitri-roche-59a86b3a-c6cb-49c8-b07a-c5765453d39c\"\n }\n },\n {\n \"id\": \"personal\",\n \"type\": \"teams\",\n \"attributes\": {\n \"name\": \"personal-dimitri-roche-980ee742-5366-4046-b565-f5fb19619a58\"\n }\n }\n ]\n}", "language": "json" } ] } [/block] [block:callout] { "type": "info", "title": "Some things to note about the API", "body": "* All responses follow the [JSON API v1 spec](http://jsonapi.org/).\n\n\n * In this documentation, we use the Authorization Bearer header, but the `access_token` can also be passed as an URL parameter: `https://api.loopandtie.com/teams?access_token=[[app:key]]`" } [/block]
In order to interact with the API, we'll need to grab an access token. You can retrieve this in your settings tab by [enabling development](https://personal.loopandtie.com/account/edit). If you haven't signed up yet, [do so now!](https://www.loopandtie.com). [block:image] { "images": [ { "image": [ "https://files.readme.io/xbV3uhenQaisMcorRLnm_EnableDeveloper.png", "EnableDeveloper.png", "1202", "1004", "#5cb354", "" ] } ] } [/block] Enabling the Developer API will generate two tokens: * lt\_live\_*: works with real teams, can send actual emails, and incur charges. * lt\_sbox\_*: only interacts with your sandbox and won't incur any charges or send emails. [block:image] { "images": [ { "image": [ "https://files.readme.io/2y0EdRxSsaeihThZ9XY0_EnabledDevelopment.png", "EnabledDevelopment.png", "1628", "968", "#66b25f", "" ] } ] } [/block] We'll be working with the lt\_sbox\_* key from here on out. You can, if need be, switch to your live key in the API Explorer. Let's check that everything's working by retrieving all our teams. [block:code] { "codes": [ { "code": "curl -i https://api.loopandtie.com/v1/teams -H \"Authorization: Bearer [[app:key]]\"", "language": "curl" } ] } [/block] You should get something similar to the following: [block:code] { "codes": [ { "code": "{\n \"data\": [\n {\n \"id\": \"loop-tie\",\n \"type\": \"teams\",\n \"attributes\": {\n \"name\": \"Loop & Tie\"\n }\n },\n {\n \"id\": \"sandbox\",\n \"type\": \"teams\",\n \"attributes\": {\n \"name\": \"sandbox-dimitri-roche-59a86b3a-c6cb-49c8-b07a-c5765453d39c\"\n }\n },\n {\n \"id\": \"personal\",\n \"type\": \"teams\",\n \"attributes\": {\n \"name\": \"personal-dimitri-roche-980ee742-5366-4046-b565-f5fb19619a58\"\n }\n }\n ]\n}", "language": "json" } ] } [/block] [block:callout] { "type": "info", "title": "Some things to note about the API", "body": "* All responses follow the [JSON API v1 spec](http://jsonapi.org/).\n\n\n * In this documentation, we use the Authorization Bearer header, but the `access_token` can also be passed as an URL parameter: `https://api.loopandtie.com/teams?access_token=[[app:key]]`" } [/block]
{"__v":16,"_id":"5643b577ca75830d00859c9d","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"body":"With our lt\\_sbox token, we'll be creating gifts in our sandbox with the API, and confirming its creation with the gifting web site.\n\nThis will involve a `POST` to the `/teams/sandbox/gifts` endpoint. The example below will send the gift email November 12th 2016 at 3PM UTC time. Feel free to adjust.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -i https://api.loopandtie.com/v1/teams/sandbox/gifts \\\\\\n-H \\\"Authorization: Bearer [[app:key]]\\\" \\\\\\n-H \\\"Content-Type: application/json\\\" \\\\\\n-X POST \\\\\\n-d '{\\\"gift\\\":\\n        {\\n          \\\"name\\\": \\\"Ziggi\\\",\\n          \\\"email\\\": \\\"thewailers@jamaica.com\\\",\\n          \\\"collection\\\": \\\"$25\\\",\\n          \\\"message\\\": \\\"Better than Bob\\\",\\n          \\\"from\\\": \\\"Peter Tosh\\\",\\n          \\\"scheduled_at\\\": \\\"2016-11-12T15:00:00Z\\\"\\n        }\\n     }'\\n\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\nOn success, the gift's JSON will be returned.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"data\\\": {\\n    \\\"id\\\": \\\"GB1600D90811L\\\",\\n    \\\"type\\\": \\\"gifts\\\",\\n    \\\"attributes\\\": {\\n      \\\"team\\\": \\\"sandbox\\\",\\n      \\\"sender_name\\\": \\\"Dimitri Roche\\\",\\n      \\\"untie_url\\\":\\\"http://www.loopandtie.com/untie/jFAxxxxxxxxxxx\\\",\\n      \\\"email\\\": \\\"thewailers@jamaica.com\\\",\\n      \\\"stage\\\": \\\"scheduled\\\",\\n      \\\"last_event_at\\\": \\\"2015-11-12T15:04:00.013Z\\\",\\n      \\\"scheduled_at\\\": \\\"2016-11-12T15:06:49.000Z\\\",\\n      \\\"tagline\\\": null,\\n      \\\"message\\\": \\\"Better than Bob\\\",\\n      \\\"from\\\": \\\"Peter Tosh\\\",\\n      \\\"events\\\": [{ \\\"stage\\\": \\\"scheduled\\\", \\\"message\\\": null, \\\"created_at\\\": \\\"2015-11-12T15:04:00.018Z\\\" }]\\n    },\\n    \\\"relationships\\\": {\\n      \\\"sender\\\": { \\\"data\\\": { \\\"id\\\": \\\"1\\\", \\\"type\\\": \\\"users\\\" } },\\n      \\\"collection\\\": { \\\"data\\\": { \\\"id\\\": \\\"4\\\", \\\"type\\\": \\\"collections\\\" } },\\n      \\\"logo\\\": { \\\"data\\\": { \\\"id\\\": \\\"126\\\", \\\"type\\\": \\\"logos\\\" } },\\n      \\\"design\\\": { \\\"data\\\": { \\\"id\\\": \\\"standard-gift-of-choice-v2\\\", \\\"type\\\": \\\"designs\\\" } }\\n    }\\n  },\\n  \\\"included\\\": [\\n    {\\n      \\\"id\\\": \\\"1\\\",\\n      \\\"type\\\": \\\"users\\\",\\n      \\\"attributes\\\": { \\\"name\\\": \\\"Dimitri Roche\\\", \\\"email\\\": \\\"dimroc@loopandtie.com\\\" }\\n    },\\n    {\\n      \\\"id\\\": \\\"4\\\",\\n      \\\"type\\\": \\\"collections\\\",\\n      \\\"attributes\\\": { \\\"name\\\": \\\"$25\\\", \\\"global\\\": true, \\\"price\\\": \\\"25.00\\\" }\\n    },\\n    {\\n      \\\"id\\\": \\\"126\\\",\\n      \\\"type\\\": \\\"logos\\\",\\n      \\\"attributes\\\": { \\\"name\\\": \\\"Loop & Tie\\\", \\\"global\\\": true, \\\"image_url\\\": \\\"/images/email/v1/logo-thin.png\\\" }\\n    },\\n    {\\n      \\\"id\\\": \\\"standard-gift-of-choice-v2\\\",\\n      \\\"type\\\": \\\"designs\\\",\\n      \\\"attributes\\\": {\\n        \\\"name\\\": \\\"Standard Gift Of Choice v2\\\",\\n        \\\"global\\\": true,\\n        \\\"image_url\\\": \\\"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/8/1441980212/uploads/standard.jpg?1441980212\\\",\\n        \\\"thumbnail_url\\\": \\\"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/8/1441980212/uploads/thumbnail.jpg?1441980212\\\"\\n      }\\n    }\\n  ]\\n}\",\n      \"language\": \"json\",\n      \"name\": null\n    }\n  ]\n}\n[/block]\nNow that the gift has been created, navigate to your [sandbox](https://sandbox.loopandtie.com) to see the newly created gift!","category":"563a5308e1313f0d00c8678c","createdAt":"2015-11-11T21:39:03.117Z","excerpt":"","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":0,"parentDoc":null,"project":"562905912c0fd9190067da12","slug":"creating-gifts","sync_unique":"","title":"Creating Gifts","type":"basic","updates":[],"user":"5629054b48742a0d004745cc","version":"562905912c0fd9190067da15","childrenPages":[]}

Creating Gifts


With our lt\_sbox token, we'll be creating gifts in our sandbox with the API, and confirming its creation with the gifting web site. This will involve a `POST` to the `/teams/sandbox/gifts` endpoint. The example below will send the gift email November 12th 2016 at 3PM UTC time. Feel free to adjust. [block:code] { "codes": [ { "code": "curl -i https://api.loopandtie.com/v1/teams/sandbox/gifts \\\n-H \"Authorization: Bearer [[app:key]]\" \\\n-H \"Content-Type: application/json\" \\\n-X POST \\\n-d '{\"gift\":\n {\n \"name\": \"Ziggi\",\n \"email\": \"thewailers@jamaica.com\",\n \"collection\": \"$25\",\n \"message\": \"Better than Bob\",\n \"from\": \"Peter Tosh\",\n \"scheduled_at\": \"2016-11-12T15:00:00Z\"\n }\n }'\n", "language": "curl" } ] } [/block] On success, the gift's JSON will be returned. [block:code] { "codes": [ { "code": "{\n \"data\": {\n \"id\": \"GB1600D90811L\",\n \"type\": \"gifts\",\n \"attributes\": {\n \"team\": \"sandbox\",\n \"sender_name\": \"Dimitri Roche\",\n \"untie_url\":\"http://www.loopandtie.com/untie/jFAxxxxxxxxxxx\",\n \"email\": \"thewailers@jamaica.com\",\n \"stage\": \"scheduled\",\n \"last_event_at\": \"2015-11-12T15:04:00.013Z\",\n \"scheduled_at\": \"2016-11-12T15:06:49.000Z\",\n \"tagline\": null,\n \"message\": \"Better than Bob\",\n \"from\": \"Peter Tosh\",\n \"events\": [{ \"stage\": \"scheduled\", \"message\": null, \"created_at\": \"2015-11-12T15:04:00.018Z\" }]\n },\n \"relationships\": {\n \"sender\": { \"data\": { \"id\": \"1\", \"type\": \"users\" } },\n \"collection\": { \"data\": { \"id\": \"4\", \"type\": \"collections\" } },\n \"logo\": { \"data\": { \"id\": \"126\", \"type\": \"logos\" } },\n \"design\": { \"data\": { \"id\": \"standard-gift-of-choice-v2\", \"type\": \"designs\" } }\n }\n },\n \"included\": [\n {\n \"id\": \"1\",\n \"type\": \"users\",\n \"attributes\": { \"name\": \"Dimitri Roche\", \"email\": \"dimroc@loopandtie.com\" }\n },\n {\n \"id\": \"4\",\n \"type\": \"collections\",\n \"attributes\": { \"name\": \"$25\", \"global\": true, \"price\": \"25.00\" }\n },\n {\n \"id\": \"126\",\n \"type\": \"logos\",\n \"attributes\": { \"name\": \"Loop & Tie\", \"global\": true, \"image_url\": \"/images/email/v1/logo-thin.png\" }\n },\n {\n \"id\": \"standard-gift-of-choice-v2\",\n \"type\": \"designs\",\n \"attributes\": {\n \"name\": \"Standard Gift Of Choice v2\",\n \"global\": true,\n \"image_url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/8/1441980212/uploads/standard.jpg?1441980212\",\n \"thumbnail_url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/8/1441980212/uploads/thumbnail.jpg?1441980212\"\n }\n }\n ]\n}", "language": "json", "name": null } ] } [/block] Now that the gift has been created, navigate to your [sandbox](https://sandbox.loopandtie.com) to see the newly created gift!
With our lt\_sbox token, we'll be creating gifts in our sandbox with the API, and confirming its creation with the gifting web site. This will involve a `POST` to the `/teams/sandbox/gifts` endpoint. The example below will send the gift email November 12th 2016 at 3PM UTC time. Feel free to adjust. [block:code] { "codes": [ { "code": "curl -i https://api.loopandtie.com/v1/teams/sandbox/gifts \\\n-H \"Authorization: Bearer [[app:key]]\" \\\n-H \"Content-Type: application/json\" \\\n-X POST \\\n-d '{\"gift\":\n {\n \"name\": \"Ziggi\",\n \"email\": \"thewailers@jamaica.com\",\n \"collection\": \"$25\",\n \"message\": \"Better than Bob\",\n \"from\": \"Peter Tosh\",\n \"scheduled_at\": \"2016-11-12T15:00:00Z\"\n }\n }'\n", "language": "curl" } ] } [/block] On success, the gift's JSON will be returned. [block:code] { "codes": [ { "code": "{\n \"data\": {\n \"id\": \"GB1600D90811L\",\n \"type\": \"gifts\",\n \"attributes\": {\n \"team\": \"sandbox\",\n \"sender_name\": \"Dimitri Roche\",\n \"untie_url\":\"http://www.loopandtie.com/untie/jFAxxxxxxxxxxx\",\n \"email\": \"thewailers@jamaica.com\",\n \"stage\": \"scheduled\",\n \"last_event_at\": \"2015-11-12T15:04:00.013Z\",\n \"scheduled_at\": \"2016-11-12T15:06:49.000Z\",\n \"tagline\": null,\n \"message\": \"Better than Bob\",\n \"from\": \"Peter Tosh\",\n \"events\": [{ \"stage\": \"scheduled\", \"message\": null, \"created_at\": \"2015-11-12T15:04:00.018Z\" }]\n },\n \"relationships\": {\n \"sender\": { \"data\": { \"id\": \"1\", \"type\": \"users\" } },\n \"collection\": { \"data\": { \"id\": \"4\", \"type\": \"collections\" } },\n \"logo\": { \"data\": { \"id\": \"126\", \"type\": \"logos\" } },\n \"design\": { \"data\": { \"id\": \"standard-gift-of-choice-v2\", \"type\": \"designs\" } }\n }\n },\n \"included\": [\n {\n \"id\": \"1\",\n \"type\": \"users\",\n \"attributes\": { \"name\": \"Dimitri Roche\", \"email\": \"dimroc@loopandtie.com\" }\n },\n {\n \"id\": \"4\",\n \"type\": \"collections\",\n \"attributes\": { \"name\": \"$25\", \"global\": true, \"price\": \"25.00\" }\n },\n {\n \"id\": \"126\",\n \"type\": \"logos\",\n \"attributes\": { \"name\": \"Loop & Tie\", \"global\": true, \"image_url\": \"/images/email/v1/logo-thin.png\" }\n },\n {\n \"id\": \"standard-gift-of-choice-v2\",\n \"type\": \"designs\",\n \"attributes\": {\n \"name\": \"Standard Gift Of Choice v2\",\n \"global\": true,\n \"image_url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/8/1441980212/uploads/standard.jpg?1441980212\",\n \"thumbnail_url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/8/1441980212/uploads/thumbnail.jpg?1441980212\"\n }\n }\n ]\n}", "language": "json", "name": null } ] } [/block] Now that the gift has been created, navigate to your [sandbox](https://sandbox.loopandtie.com) to see the newly created gift!
{"__v":13,"_id":"563a5331c63a22190018dcb5","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"body":"There are times when just a gift link to the untie page (redemption page with card and product selection) will suffice, and no email is needed. We'll walk through the creation of a gift link that can be embedded in a customer service email.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -i https://api.loopandtie.com/v1/teams/sandbox/gifts \\\\\\n-H \\\"Authorization: Bearer [[app:key]]\\\" \\\\\\n-H \\\"Content-Type: application/json\\\" \\\\\\n-X POST \\\\\\n-d '{\\\"gift\\\":\\n        {\\n          \\\"name\\\": \\\"Ziggi\\\",\\n          \\\"collection\\\": \\\"$25\\\",\\n          \\\"message\\\": \\\"Better than Bob\\\",\\n          \\\"from\\\": \\\"Peter Tosh\\\",\\n          \\\"delivery_method\\\": \\\"link\\\"\\n        }\\n     }'\\n\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\nIn the call above, notice that there is neither an `email` attribute nor a `scheduled_at` attribute. Instead, we set `delivery_method` to `link` and get the JSON payload below, that includes `untie_url`\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"data\\\": {\\n        \\\"id\\\": \\\"GBB8C23A5511A\\\",\\n        \\\"type\\\": \\\"gifts\\\",\\n        \\\"attributes\\\": {\\n            \\\"team\\\": \\\"sandbox\\\",\\n            \\\"sender_name\\\": \\\"Dimitri Roche\\\",\\n            \\\"untie_url\\\": \\\"http://www.loopandtie.com/untie/JjUxxxxxxx\\\",\\n            \\\"delivery_method\\\": \\\"link\\\",\\n            \\\"email\\\": null,\\n            \\\"scheduled_at\\\": null,\\n            \\\"stage\\\": \\\"scheduled\\\",\\n            \\\"last_event_at\\\": \\\"2015-11-13T20:39:45.911Z\\\",\\n            \\\"tagline\\\": null,\\n            \\\"message\\\": \\\"Better than Bob\\\",\\n            \\\"from\\\": \\\"Peter Tosh\\\",\\n            \\\"thank_you_note\\\": null,\\n            \\\"thank_you_signature\\\": null,\\n            \\\"selected_product\\\": null,\\n            \\\"variant\\\": null,\\n            \\\"redemption_email\\\": null,\\n            \\\"address\\\": null,\\n            \\\"events\\\": [\\n                {\\n                    \\\"stage\\\": \\\"scheduled\\\",\\n                    \\\"message\\\": null,\\n                    \\\"created_at\\\": \\\"2015-11-13T20:39:45.917Z\\\"\\n                }\\n            ]\\n        },\\n        \\\"relationships\\\": {\\n            \\\"sender\\\": {\\n                \\\"data\\\": {\\n                    \\\"id\\\": \\\"1\\\",\\n                    \\\"type\\\": \\\"users\\\"\\n                }\\n            },\\n            \\\"collection\\\": {\\n                \\\"data\\\": {\\n                    \\\"id\\\": \\\"4\\\",\\n                    \\\"type\\\": \\\"collections\\\"\\n                }\\n            },\\n            \\\"logo\\\": {\\n                \\\"data\\\": {\\n                    \\\"id\\\": \\\"126\\\",\\n                    \\\"type\\\": \\\"logos\\\"\\n                }\\n            },\\n            \\\"design\\\": {\\n                \\\"data\\\": {\\n                    \\\"id\\\": \\\"standard-gift-of-choice-v2\\\",\\n                    \\\"type\\\": \\\"designs\\\"\\n                }\\n            }\\n        }\\n    },\\n    \\\"included\\\": [\\n        {\\n            \\\"id\\\": \\\"1\\\",\\n            \\\"type\\\": \\\"users\\\",\\n            \\\"attributes\\\": {\\n                \\\"name\\\": \\\"Dimitri Roche\\\",\\n                \\\"email\\\": \\\"dimroc@loopandtie.com\\\"\\n            }\\n        },\\n        {\\n            \\\"id\\\": \\\"4\\\",\\n            \\\"type\\\": \\\"collections\\\",\\n            \\\"attributes\\\": {\\n                \\\"name\\\": \\\"$25\\\",\\n                \\\"global\\\": true,\\n                \\\"price\\\": \\\"25.00\\\"\\n            }\\n        },\\n        {\\n            \\\"id\\\": \\\"126\\\",\\n            \\\"type\\\": \\\"logos\\\",\\n            \\\"attributes\\\": {\\n                \\\"name\\\": \\\"Loop & Tie\\\",\\n                \\\"global\\\": true,\\n                \\\"image_url\\\": \\\"/images/email/v1/logo-thin.png\\\"\\n            }\\n        },\\n        {\\n            \\\"id\\\": \\\"standard-gift-of-choice-v2\\\",\\n            \\\"type\\\": \\\"designs\\\",\\n            \\\"attributes\\\": {\\n                \\\"name\\\": \\\"Standard Gift Of Choice v2\\\",\\n                \\\"global\\\": true,\\n                \\\"image_url\\\": \\\"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/8/1441980212/uploads/standard.jpg?1441980212\\\",\\n                \\\"thumbnail_url\\\": \\\"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/8/1441980212/uploads/thumbnail.jpg?1441980212\\\"\\n            }\\n        }\\n    ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nNow that we have an untie_url (\"http://www.loopandtie.com/untie/JjUxxxxxxx\"), we can visit it directly or just add it as a hyperlink in an email.","category":"563a5308e1313f0d00c8678c","createdAt":"2015-11-04T18:49:21.111Z","excerpt":"","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":1,"parentDoc":null,"project":"562905912c0fd9190067da12","slug":"generating-gift-links","sync_unique":"","title":"Generating Gift Links","type":"basic","updates":[],"user":"5629054b48742a0d004745cc","version":"562905912c0fd9190067da15","childrenPages":[]}

Generating Gift Links


There are times when just a gift link to the untie page (redemption page with card and product selection) will suffice, and no email is needed. We'll walk through the creation of a gift link that can be embedded in a customer service email. [block:code] { "codes": [ { "code": "curl -i https://api.loopandtie.com/v1/teams/sandbox/gifts \\\n-H \"Authorization: Bearer [[app:key]]\" \\\n-H \"Content-Type: application/json\" \\\n-X POST \\\n-d '{\"gift\":\n {\n \"name\": \"Ziggi\",\n \"collection\": \"$25\",\n \"message\": \"Better than Bob\",\n \"from\": \"Peter Tosh\",\n \"delivery_method\": \"link\"\n }\n }'\n", "language": "curl" } ] } [/block] In the call above, notice that there is neither an `email` attribute nor a `scheduled_at` attribute. Instead, we set `delivery_method` to `link` and get the JSON payload below, that includes `untie_url` [block:code] { "codes": [ { "code": "{\n \"data\": {\n \"id\": \"GBB8C23A5511A\",\n \"type\": \"gifts\",\n \"attributes\": {\n \"team\": \"sandbox\",\n \"sender_name\": \"Dimitri Roche\",\n \"untie_url\": \"http://www.loopandtie.com/untie/JjUxxxxxxx\",\n \"delivery_method\": \"link\",\n \"email\": null,\n \"scheduled_at\": null,\n \"stage\": \"scheduled\",\n \"last_event_at\": \"2015-11-13T20:39:45.911Z\",\n \"tagline\": null,\n \"message\": \"Better than Bob\",\n \"from\": \"Peter Tosh\",\n \"thank_you_note\": null,\n \"thank_you_signature\": null,\n \"selected_product\": null,\n \"variant\": null,\n \"redemption_email\": null,\n \"address\": null,\n \"events\": [\n {\n \"stage\": \"scheduled\",\n \"message\": null,\n \"created_at\": \"2015-11-13T20:39:45.917Z\"\n }\n ]\n },\n \"relationships\": {\n \"sender\": {\n \"data\": {\n \"id\": \"1\",\n \"type\": \"users\"\n }\n },\n \"collection\": {\n \"data\": {\n \"id\": \"4\",\n \"type\": \"collections\"\n }\n },\n \"logo\": {\n \"data\": {\n \"id\": \"126\",\n \"type\": \"logos\"\n }\n },\n \"design\": {\n \"data\": {\n \"id\": \"standard-gift-of-choice-v2\",\n \"type\": \"designs\"\n }\n }\n }\n },\n \"included\": [\n {\n \"id\": \"1\",\n \"type\": \"users\",\n \"attributes\": {\n \"name\": \"Dimitri Roche\",\n \"email\": \"dimroc@loopandtie.com\"\n }\n },\n {\n \"id\": \"4\",\n \"type\": \"collections\",\n \"attributes\": {\n \"name\": \"$25\",\n \"global\": true,\n \"price\": \"25.00\"\n }\n },\n {\n \"id\": \"126\",\n \"type\": \"logos\",\n \"attributes\": {\n \"name\": \"Loop & Tie\",\n \"global\": true,\n \"image_url\": \"/images/email/v1/logo-thin.png\"\n }\n },\n {\n \"id\": \"standard-gift-of-choice-v2\",\n \"type\": \"designs\",\n \"attributes\": {\n \"name\": \"Standard Gift Of Choice v2\",\n \"global\": true,\n \"image_url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/8/1441980212/uploads/standard.jpg?1441980212\",\n \"thumbnail_url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/8/1441980212/uploads/thumbnail.jpg?1441980212\"\n }\n }\n ]\n}", "language": "json" } ] } [/block] Now that we have an untie_url ("http://www.loopandtie.com/untie/JjUxxxxxxx"), we can visit it directly or just add it as a hyperlink in an email.
There are times when just a gift link to the untie page (redemption page with card and product selection) will suffice, and no email is needed. We'll walk through the creation of a gift link that can be embedded in a customer service email. [block:code] { "codes": [ { "code": "curl -i https://api.loopandtie.com/v1/teams/sandbox/gifts \\\n-H \"Authorization: Bearer [[app:key]]\" \\\n-H \"Content-Type: application/json\" \\\n-X POST \\\n-d '{\"gift\":\n {\n \"name\": \"Ziggi\",\n \"collection\": \"$25\",\n \"message\": \"Better than Bob\",\n \"from\": \"Peter Tosh\",\n \"delivery_method\": \"link\"\n }\n }'\n", "language": "curl" } ] } [/block] In the call above, notice that there is neither an `email` attribute nor a `scheduled_at` attribute. Instead, we set `delivery_method` to `link` and get the JSON payload below, that includes `untie_url` [block:code] { "codes": [ { "code": "{\n \"data\": {\n \"id\": \"GBB8C23A5511A\",\n \"type\": \"gifts\",\n \"attributes\": {\n \"team\": \"sandbox\",\n \"sender_name\": \"Dimitri Roche\",\n \"untie_url\": \"http://www.loopandtie.com/untie/JjUxxxxxxx\",\n \"delivery_method\": \"link\",\n \"email\": null,\n \"scheduled_at\": null,\n \"stage\": \"scheduled\",\n \"last_event_at\": \"2015-11-13T20:39:45.911Z\",\n \"tagline\": null,\n \"message\": \"Better than Bob\",\n \"from\": \"Peter Tosh\",\n \"thank_you_note\": null,\n \"thank_you_signature\": null,\n \"selected_product\": null,\n \"variant\": null,\n \"redemption_email\": null,\n \"address\": null,\n \"events\": [\n {\n \"stage\": \"scheduled\",\n \"message\": null,\n \"created_at\": \"2015-11-13T20:39:45.917Z\"\n }\n ]\n },\n \"relationships\": {\n \"sender\": {\n \"data\": {\n \"id\": \"1\",\n \"type\": \"users\"\n }\n },\n \"collection\": {\n \"data\": {\n \"id\": \"4\",\n \"type\": \"collections\"\n }\n },\n \"logo\": {\n \"data\": {\n \"id\": \"126\",\n \"type\": \"logos\"\n }\n },\n \"design\": {\n \"data\": {\n \"id\": \"standard-gift-of-choice-v2\",\n \"type\": \"designs\"\n }\n }\n }\n },\n \"included\": [\n {\n \"id\": \"1\",\n \"type\": \"users\",\n \"attributes\": {\n \"name\": \"Dimitri Roche\",\n \"email\": \"dimroc@loopandtie.com\"\n }\n },\n {\n \"id\": \"4\",\n \"type\": \"collections\",\n \"attributes\": {\n \"name\": \"$25\",\n \"global\": true,\n \"price\": \"25.00\"\n }\n },\n {\n \"id\": \"126\",\n \"type\": \"logos\",\n \"attributes\": {\n \"name\": \"Loop & Tie\",\n \"global\": true,\n \"image_url\": \"/images/email/v1/logo-thin.png\"\n }\n },\n {\n \"id\": \"standard-gift-of-choice-v2\",\n \"type\": \"designs\",\n \"attributes\": {\n \"name\": \"Standard Gift Of Choice v2\",\n \"global\": true,\n \"image_url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/8/1441980212/uploads/standard.jpg?1441980212\",\n \"thumbnail_url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/8/1441980212/uploads/thumbnail.jpg?1441980212\"\n }\n }\n ]\n}", "language": "json" } ] } [/block] Now that we have an untie_url ("http://www.loopandtie.com/untie/JjUxxxxxxx"), we can visit it directly or just add it as a hyperlink in an email.
{"__v":4,"_id":"5644ae6e2229d717001091c5","api":{"auth":"required","examples":{"codes":[{"name":"","code":"curl -i https://api.loopandtie.com/v1/teams \\\n-H \"Authorization: Bearer [[app:key]]\"","language":"curl"},{"code":"response = HTTParty.get('http://api.loopandtie.com/v1/teams', headers: { \"Authorization\" => \"Bearer [[app:key]]\"})\nputs response.body, response.code, response.message, response.headers.inspect","language":"ruby"}]},"params":[],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"data\": [\n        {\n            \"id\": \"loop-tie\",\n            \"type\": \"teams\",\n            \"attributes\": {\n                \"name\": \"Loop & Tie\"\n            }\n        },\n        {\n            \"id\": \"sandbox\",\n            \"type\": \"teams\",\n            \"attributes\": {\n                \"name\": \"sandbox-dimitri-roche-dbd68dd5-c5b7-4668-abf8-339e3435d120\"\n            }\n        },\n        {\n            \"id\": \"personal\",\n            \"type\": \"teams\",\n            \"attributes\": {\n                \"name\": \"personal-dimitri-roche-980ee742-5366-4046-b565-f5fb19619a58\"\n            }\n        }\n    ]\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/teams"},"body":"","category":"563a545ca19edf0d00972332","createdAt":"2015-11-12T15:21:18.757Z","excerpt":"Retrieves all the teams available for the caller.\n\nAll requests are authenticated against either Authorization Bearer Token or an access_token parameter.","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":0,"parentDoc":null,"project":"562905912c0fd9190067da12","slug":"teams","sync_unique":"","title":"/teams","type":"get","updates":[],"user":"5629054b48742a0d004745cc","version":"562905912c0fd9190067da15","childrenPages":[]}

get/teams

Retrieves all the teams available for the caller. All requests are authenticated against either Authorization Bearer Token or an access_token parameter.


User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"__v":0,"_id":"5644b0697f1fff210078e657","api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -i https://api.loopandtie.com/v1/teams/sandbox/collections \\\n-H \"Authorization: Bearer [[app:key]]\"","name":""}]},"params":[{"_id":"5644b0697f1fff210078e658","required":false,"desc":"The team to get the information for","default":"sandbox","type":"string","name":"team_id","in":"path"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"data\": [\n        {\n            \"id\": \"4\",\n            \"type\": \"collections\",\n            \"attributes\": {\n                \"name\": \"$25\",\n                \"global\": true,\n                \"price\": \"25.00\"\n            }\n        },\n        {\n            \"id\": \"5\",\n            \"type\": \"collections\",\n            \"attributes\": {\n                \"name\": \"$50\",\n                \"global\": true,\n                \"price\": \"50.00\"\n            }\n        },\n        {\n            \"id\": \"7\",\n            \"type\": \"collections\",\n            \"attributes\": {\n                \"name\": \"$100\",\n                \"global\": true,\n                \"price\": \"100.00\"\n            }\n        }\n    ]\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/teams/:team_id/collections"},"body":"","category":"563a545ca19edf0d00972332","createdAt":"2015-11-12T15:29:45.632Z","editedParams":true,"editedParams2":true,"excerpt":"Retrieves all the product collections available to be sent for the team.","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":1,"parentDoc":null,"project":"562905912c0fd9190067da12","slug":"teamsteam_idcollections","sync_unique":"","title":"/teams/:team_id/collections","type":"get","updates":[],"user":"5629054b48742a0d004745cc","version":"562905912c0fd9190067da15","childrenPages":[]}

get/teams/:team_id/collections

Retrieves all the product collections available to be sent for the team.

Path Params

team_id:
stringsandbox
The team to get the information for

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"__v":0,"_id":"5644b1976b0ca50d00f6bcbf","api":{"settings":"","results":{"codes":[{"status":200,"language":"json","code":"{\n    \"data\": [\n        {\n            \"id\": \"welcome-home-v2\",\n            \"type\": \"designs\",\n            \"attributes\": {\n                \"name\": \"Welcome Home v2\",\n                \"global\": true,\n                \"image_url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/7/1441980129/uploads/standard.jpg?1441980129\",\n                \"thumbnail_url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/7/1441980129/uploads/thumbnail.jpg?1441980129\"\n            }\n        },\n        {\n            \"id\": \"standard-gift-of-choice-v2\",\n            \"type\": \"designs\",\n            \"attributes\": {\n                \"name\": \"Standard Gift Of Choice v2\",\n                \"global\": true,\n                \"image_url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/8/1441980212/uploads/standard.jpg?1441980212\",\n                \"thumbnail_url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/8/1441980212/uploads/thumbnail.jpg?1441980212\"\n            }\n        }\n    ]\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"examples":{"codes":[{"language":"curl","code":"curl -i https://api.loopandtie.com/v1/teams/sandbox/designs \\\n-H \"Authorization: Bearer [[app:key]]\"","name":""}]},"auth":"required","params":[{"_id":"5644b0697f1fff210078e658","required":false,"desc":"The team to get the information for","default":"sandbox","type":"string","name":"team_id","in":"path"}],"url":"/teams/:team_id/designs"},"body":"","category":"563a545ca19edf0d00972332","createdAt":"2015-11-12T15:34:47.895Z","editedParams":true,"editedParams2":true,"excerpt":"Retrieves all the designs available to the team.","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":2,"parentDoc":null,"project":"562905912c0fd9190067da12","slug":"teamsteam_iddesigns","sync_unique":"","title":"/teams/:team_id/designs","type":"get","updates":[],"user":"5629054b48742a0d004745cc","version":"562905912c0fd9190067da15","childrenPages":[]}

get/teams/:team_id/designs

Retrieves all the designs available to the team.

Path Params

team_id:
stringsandbox
The team to get the information for

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"__v":0,"_id":"5644b1ebb360ea0d009147b0","api":{"examples":{"codes":[{"language":"curl","code":"curl -i https://api.loopandtie.com/v1/teams/sandbox/logos \\\n-H \"Authorization: Bearer [[app:key]]\"","name":""}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"data\": [\n        {\n            \"id\": \"126\",\n            \"type\": \"logos\",\n            \"attributes\": {\n                \"name\": \"Loop & Tie\",\n                \"global\": true,\n                \"image_url\": \"/images/email/v1/logo-thin.png\"\n            }\n        }\n    ]\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[{"_id":"5644b0697f1fff210078e658","required":false,"desc":"The team to get the information for","default":"sandbox","type":"string","name":"team_id","in":"path"}],"url":"/teams/:team_id/logos"},"body":"","category":"563a545ca19edf0d00972332","createdAt":"2015-11-12T15:36:11.590Z","editedParams":true,"editedParams2":true,"excerpt":"Retrieves all the logos available to the team.","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":3,"parentDoc":null,"project":"562905912c0fd9190067da12","slug":"teamsteam_idlogos","sync_unique":"","title":"/teams/:team_id/logos","type":"get","updates":[],"user":"5629054b48742a0d004745cc","version":"562905912c0fd9190067da15","childrenPages":[]}

get/teams/:team_id/logos

Retrieves all the logos available to the team.

Path Params

team_id:
stringsandbox
The team to get the information for

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"__v":0,"_id":"5644b23cd608df0d00d26948","api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -i https://api.loopandtie.com/v1/teams/sandbox/gifts \\\n-H \"Authorization: Bearer [[app:key]]\"","name":""}]},"params":[{"_id":"5644b0697f1fff210078e658","required":false,"desc":"The team to get the information for","default":"sandbox","type":"string","name":"team_id","in":"path"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"data\": [{\n        \"id\": \"GB260E0F4B11K\",\n        \"type\": \"gifts\",\n        \"attributes\": {\n            \"team\": \"sandbox\",\n            \"sender_name\": \"Dimitri Roche\",\n            \"untie_url\":\"http://www.loopandtie.com/untie/jFAxxxxxxxxxxx\",\n            \"email\": \"dimroc@loopandtie.com\",\n            \"stage\": \"scheduled\",\n            \"last_event_at\": \"2015-11-03T19:57:51.757Z\",\n            \"scheduled_at\": \"2015-11-03T20:07:27.876Z\",\n            \"tagline\": null,\n            \"message\": \"We Jammin'\",\n            \"from\": \"Bob Marley\",\n            \"thank_you_note\": null,\n            \"thank_you_signature\": null,\n            \"selected_product\": null,\n            \"variant\": null,\n            \"redemption_email\": null,\n            \"address\": null,\n            \"events\": [\n                {\n                    \"stage\": \"scheduled\",\n                    \"message\": null,\n                    \"created_at\": \"2015-11-03T19:57:51.759Z\"\n                }\n            ]\n        },\n        \"relationships\": {\n            \"sender\": {\n                \"data\": {\n                    \"id\": \"1\",\n                    \"type\": \"users\"\n                }\n            },\n            \"collection\": {\n                \"data\": {\n                    \"id\": \"6\",\n                    \"type\": \"collections\"\n                }\n            },\n            \"logo\": {\n                \"data\": {\n                    \"id\": \"126\",\n                    \"type\": \"logos\"\n                }\n            },\n            \"design\": {\n                \"data\": {\n                    \"id\": \"welcome-home-v2\",\n                    \"type\": \"designs\"\n                }\n            }\n        }\n    }],\n    \"included\": [\n        {\n            \"id\": \"1\",\n            \"type\": \"users\",\n            \"attributes\": {\n                \"name\": \"Dimitri Roche\",\n                \"email\": \"dimroc@loopandtie.com\"\n            }\n        },\n        {\n            \"id\": \"6\",\n            \"type\": \"collections\",\n            \"attributes\": {\n                \"name\": \"$75\",\n                \"global\": true,\n                \"price\": \"75.00\"\n            }\n        },\n        {\n            \"id\": \"126\",\n            \"type\": \"logos\",\n            \"attributes\": {\n                \"name\": \"Loop & Tie\",\n                \"global\": true,\n                \"image_url\": \"/images/email/v1/logo-thin.png\"\n            }\n        },\n        {\n            \"id\": \"welcome-home-v2\",\n            \"type\": \"designs\",\n            \"attributes\": {\n                \"name\": \"Welcome Home v2\",\n                \"global\": true,\n                \"image_url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/7/1441980129/uploads/standard.jpg?1441980129\",\n                \"thumbnail_url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/7/1441980129/uploads/thumbnail.jpg?1441980129\"\n            }\n        }\n    ]\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/teams/:team_id/gifts"},"body":"","category":"563a545ca19edf0d00972332","createdAt":"2015-11-12T15:37:32.387Z","editedParams":true,"editedParams2":true,"excerpt":"Retrieves the gifts sent by the team.","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":4,"parentDoc":null,"project":"562905912c0fd9190067da12","slug":"teamsteam_idgifts","sync_unique":"","title":"/teams/:team_id/gifts","type":"get","updates":[],"user":"5629054b48742a0d004745cc","version":"562905912c0fd9190067da15","childrenPages":[]}

get/teams/:team_id/gifts

Retrieves the gifts sent by the team.

Path Params

team_id:
stringsandbox
The team to get the information for

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"__v":4,"_id":"5644b4097f1fff210078e65d","api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -i http://api.loopandtie.com/v1/teams/sandbox/gifts \\\n-H \"Authorization: Bearer [[app:key]]\"\n-H \"Content-Type: application/json\" \\\n-X POST \\\n-d '{\"gift\":\n        {\n          \"name\": \"Ziggi\",\n          \"email\": \"thewailers@jamaica.com\",\n          \"collection\": \"$25\",\n          \"message\": \"Better than Bob\",\n          \"from\": \"Peter Tosh\",\n          \"scheduled_at\": \"2016-11-12T15:06:49Z\"\n        }\n     }'\n","name":""}]},"params":[{"_id":"5644b0697f1fff210078e658","required":false,"desc":"The team to get the information for","default":"sandbox","type":"string","name":"team_id","in":"path"},{"_id":"5644b2827f1fff210078e65b","required":true,"desc":"Recipient's Name","default":"Kobe Bryant","type":"string","name":"gift[name]","in":"body"},{"_id":"5644b4097f1fff210078e664","required":true,"desc":"The Collection Name or ID","default":"$50","type":"string","name":"gift[collection]","in":"body"},{"_id":"5644b4097f1fff210078e660","required":true,"desc":"The message to be placed in the gift underneath the design","default":"Let's go fishing","type":"string","name":"gift[message]","in":"body"},{"_id":"5644b4097f1fff210078e65f","required":true,"desc":"The From text that's placed at the bottom of the gift","default":"Kareem","type":"string","name":"gift[from]","in":"body"},{"_id":"56463fb056fb450d00410018","required":false,"desc":"Either email or link. Email will require scheduled_at to send the gift email, link will merely return an untie_url.","default":"email","type":"string","name":"gift[delivery_method]","in":"body"},{"_id":"5644b4097f1fff210078e665","required":false,"desc":"Recipient's Email. Required if delivery_method is blank or email.","default":"kobe@retiring.com","type":"string","name":"gift[email]","in":"body"},{"_id":"566dc5c8aa8f8b0d009944f8","required":false,"desc":"Optional subject of email of delivery_method is email. Defaults to \"Sender Name Sent You A Gift!\"","default":"","type":"string","name":"gift[subject]","in":"body"},{"_id":"5644b4097f1fff210078e65e","required":false,"desc":"When to send the gift email","default":"2016-11-12T15:06:49Z","type":"yyyy-mm-dd","name":"gift[scheduled_at]","in":"body"},{"_id":"5644b4097f1fff210078e661","required":false,"desc":"The tagline to be sent at the top of the gift.","default":"","type":"string","name":"gift[tagline]","in":"body"},{"_id":"5644b4097f1fff210078e662","required":false,"desc":"The Logo ID. Defaults to Loop & Tie.","default":"","type":"int","name":"gift[logo_id]","in":"body"},{"_id":"5644b4097f1fff210078e663","required":false,"desc":"The Design ID or slug","default":"","type":"string","name":"gift[design_id]","in":"body"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"data\": {\n    \"id\": \"GB1600D90811L\",\n    \"type\": \"gifts\",\n    \"attributes\": {\n      \"team\": \"sandbox\",\n      \"sender_name\": \"Dimitri Roche\",\n      \"untie_url\":\"http://www.loopandtie.com/untie/jFAxxxxxxxxxxx\",\n      \"email\": \"thewailers@jamaica.com\",\n      \"stage\": \"scheduled\",\n      \"last_event_at\": \"2015-11-12T15:04:00.013Z\",\n      \"scheduled_at\": \"2016-11-12T15:06:49.000Z\",\n      \"tagline\": null,\n      \"message\": \"Better than Bob\",\n      \"from\": \"Peter Tosh\",\n      \"thank_you_note\": null,\n      \"thank_you_signature\": null,\n      \"selected_product\": null,\n      \"variant\": null,\n      \"redemption_email\": null,\n      \"address\": null,\n      \"events\": [{ \"stage\": \"scheduled\", \"message\": null, \"created_at\": \"2015-11-12T15:04:00.018Z\" }]\n    },\n    \"relationships\": {\n      \"sender\": { \"data\": { \"id\": \"1\", \"type\": \"users\" } },\n      \"collection\": { \"data\": { \"id\": \"4\", \"type\": \"collections\" } },\n      \"logo\": { \"data\": { \"id\": \"126\", \"type\": \"logos\" } },\n      \"design\": { \"data\": { \"id\": \"standard-gift-of-choice-v2\", \"type\": \"designs\" } }\n    }\n  },\n  \"included\": [\n    {\n      \"id\": \"1\",\n      \"type\": \"users\",\n      \"attributes\": { \"name\": \"Dimitri Roche\", \"email\": \"dimroc@loopandtie.com\" }\n    },\n    {\n      \"id\": \"4\",\n      \"type\": \"collections\",\n      \"attributes\": { \"name\": \"$25\", \"global\": true, \"price\": \"25.00\" }\n    },\n    {\n      \"id\": \"126\",\n      \"type\": \"logos\",\n      \"attributes\": { \"name\": \"Loop & Tie\", \"global\": true, \"image_url\": \"/images/email/v1/logo-thin.png\" }\n    },\n    {\n      \"id\": \"standard-gift-of-choice-v2\",\n      \"type\": \"designs\",\n      \"attributes\": {\n        \"name\": \"Standard Gift Of Choice v2\",\n        \"global\": true,\n        \"image_url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/8/1441980212/uploads/standard.jpg?1441980212\",\n        \"thumbnail_url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/8/1441980212/uploads/thumbnail.jpg?1441980212\"\n      }\n    }\n  ]\n}","name":""},{"status":400,"language":"json","code":"{\n  \"errors\": [\n    { \"status\": 422, \"detail\": \"From can't be blank\" },\n    { \"status\": 422, \"detail\": \"From has invalid characters\" }\n  ]\n}","name":""}]},"settings":"","url":"/teams/:team_id/gifts"},"body":"Once you've created a gift, check it out in your [gifting portal.](https://sandbox.loopandtie.com)","category":"563a545ca19edf0d00972332","createdAt":"2015-11-12T15:45:13.888Z","editedParams":true,"editedParams2":true,"excerpt":"Creates a gift","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":5,"parentDoc":null,"project":"562905912c0fd9190067da12","slug":"teamsteam_idgifts-1","sync_unique":"","title":"/teams/:team_id/gifts","type":"post","updates":[],"user":"5629054b48742a0d004745cc","version":"562905912c0fd9190067da15","childrenPages":[]}

post/teams/:team_id/gifts

Creates a gift

Path Params

team_id:
stringsandbox
The team to get the information for

Body Params

gift[name]:
required
stringKobe Bryant
Recipient's Name
gift[collection]:
required
string$50
The Collection Name or ID
gift[message]:
required
stringLet's go fishing
The message to be placed in the gift underneath the design
gift[from]:
required
stringKareem
The From text that's placed at the bottom of the gift
gift[delivery_method]:
stringemail
Either email or link. Email will require scheduled_at to send the gift email, link will merely return an untie_url.
gift[email]:
stringkobe@retiring.com
Recipient's Email. Required if delivery_method is blank or email.
gift[subject]:
string
Optional subject of email of delivery_method is email. Defaults to "Sender Name Sent You A Gift!"
gift[scheduled_at]:
yyyy-mm-dd2016-11-12T15:06:49Z
When to send the gift email
gift[tagline]:
string
The tagline to be sent at the top of the gift.
gift[logo_id]:
integer
The Logo ID. Defaults to Loop & Tie.
gift[design_id]:
string
The Design ID or slug
Once you've created a gift, check it out in your [gifting portal.](https://sandbox.loopandtie.com)

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Once you've created a gift, check it out in your [gifting portal.](https://sandbox.loopandtie.com)
{"__v":0,"_id":"5644b2827f1fff210078e65a","api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -i https://api.loopandtie.com/v1/teams/sandbox/gifts/GB260E0F4B11K \\\n-H \"Authorization: Bearer [[app:key]]\"","name":""}]},"params":[{"_id":"5644b0697f1fff210078e658","required":false,"desc":"The team to get the information for","default":"sandbox","type":"string","name":"team_id","in":"path"},{"_id":"5644b2827f1fff210078e65b","default":"","desc":"The gift id","name":"id","required":true,"type":"string","in":"path"}],"results":{"codes":[{"name":"","code":"{\n    \"data\": {\n        \"id\": \"GB260E0F4B11K\",\n        \"type\": \"gifts\",\n        \"attributes\": {\n            \"team\": \"sandbox\",\n            \"sender_name\": \"Dimitri Roche\",\n            \"untie_url\":\"http://www.loopandtie.com/untie/jFAxxxxxxxxxxx\",\n            \"email\": \"dimroc@loopandtie.com\",\n            \"subject\": \"Bob Marley Sent You A Gift!\",\n            \"stage\": \"scheduled\",\n            \"last_event_at\": \"2015-11-03T19:57:51.757Z\",\n            \"scheduled_at\": \"2015-11-03T20:07:27.876Z\",\n            \"tagline\": null,\n            \"message\": \"We Jammin'\",\n            \"from\": \"Bob Marley\",\n            \"thank_you_note\": null,\n            \"thank_you_signature\": null,\n            \"selected_product\": null,\n            \"variant\": null,\n            \"redemption_email\": null,\n            \"address\": null,\n            \"events\": [\n                {\n                    \"stage\": \"scheduled\",\n                    \"message\": null,\n                    \"created_at\": \"2015-11-03T19:57:51.759Z\"\n                }\n            ]\n        },\n        \"relationships\": {\n            \"sender\": {\n                \"data\": {\n                    \"id\": \"1\",\n                    \"type\": \"users\"\n                }\n            },\n            \"collection\": {\n                \"data\": {\n                    \"id\": \"6\",\n                    \"type\": \"collections\"\n                }\n            },\n            \"logo\": {\n                \"data\": {\n                    \"id\": \"126\",\n                    \"type\": \"logos\"\n                }\n            },\n            \"design\": {\n                \"data\": {\n                    \"id\": \"welcome-home-v2\",\n                    \"type\": \"designs\"\n                }\n            }\n        }\n    },\n    \"included\": [\n        {\n            \"id\": \"1\",\n            \"type\": \"users\",\n            \"attributes\": {\n                \"name\": \"Dimitri Roche\",\n                \"email\": \"dimroc@loopandtie.com\"\n            }\n        },\n        {\n            \"id\": \"6\",\n            \"type\": \"collections\",\n            \"attributes\": {\n                \"name\": \"$75\",\n                \"global\": true,\n                \"price\": \"75.00\"\n            }\n        },\n        {\n            \"id\": \"126\",\n            \"type\": \"logos\",\n            \"attributes\": {\n                \"name\": \"Loop & Tie\",\n                \"global\": true,\n                \"image_url\": \"/images/email/v1/logo-thin.png\"\n            }\n        },\n        {\n            \"id\": \"welcome-home-v2\",\n            \"type\": \"designs\",\n            \"attributes\": {\n                \"name\": \"Welcome Home v2\",\n                \"global\": true,\n                \"image_url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/7/1441980129/uploads/standard.jpg?1441980129\",\n                \"thumbnail_url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/7/1441980129/uploads/thumbnail.jpg?1441980129\"\n            }\n        }\n    ]\n}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","url":"/teams/:team_id/gifts/:id"},"body":"","category":"563a545ca19edf0d00972332","createdAt":"2015-11-12T15:38:42.598Z","editedParams":true,"editedParams2":true,"excerpt":"Retrieves a gift sent by the team.","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":6,"parentDoc":null,"project":"562905912c0fd9190067da12","slug":"teamsteam_idgiftsid","sync_unique":"","title":"/teams/:team_id/gifts/:id","type":"get","updates":[],"user":"5629054b48742a0d004745cc","version":"562905912c0fd9190067da15","childrenPages":[]}

get/teams/:team_id/gifts/:id

Retrieves a gift sent by the team.

Path Params

team_id:
stringsandbox
The team to get the information for
id:
required
string
The gift id

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"__v":0,"_id":"56465d83a74cd10d00a3f04d","api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -i https://api.loopandtie.com/v1/teams/sandbox/gifts/GB32133 \\\n-H \"Authorization: Bearer [[app:key]]\" \\\n-X DELETE","name":""}]},"params":[{"_id":"5644b0697f1fff210078e658","required":false,"desc":"The team to get the information for","default":"sandbox","type":"string","name":"team_id","in":"path"},{"_id":"5644b2827f1fff210078e65b","required":true,"desc":"The gift id","default":"","type":"string","name":"id","in":"path"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"data\": {\n        \"id\": \"GB260E0F4B11K\",\n        \"type\": \"gifts\",\n        \"attributes\": {\n            \"team\": \"sandbox\",\n            \"sender_name\": \"Dimitri Roche\",\n            \"untie_url\":\"http://www.loopandtie.com/untie/jFAxxxxxxxxxxx\",\n            \"email\": \"dimroc@loopandtie.com\",\n            \"stage\": \"canceled\",\n            \"last_event_at\": \"2015-11-03T19:57:51.757Z\",\n            \"scheduled_at\": \"2015-11-03T20:07:27.876Z\",\n            \"tagline\": null,\n            \"message\": \"We Jammin'\",\n            \"from\": \"Bob Marley\",\n            \"thank_you_note\": null,\n            \"thank_you_signature\": null,\n            \"selected_product\": null,\n            \"variant\": null,\n            \"redemption_email\": null,\n            \"address\": null,\n            \"events\": [\n                {\n                    \"stage\": \"scheduled\",\n                    \"message\": null,\n                    \"created_at\": \"2015-11-03T19:57:51.759Z\"\n                }\n            ],\n            \"canceled_at\": \"2015-11-06T06:00:00Z\",\n            \"canceled_by\": \"Scott Roche\"\n        },\n        \"relationships\": {\n            \"sender\": {\n                \"data\": {\n                    \"id\": \"1\",\n                    \"type\": \"users\"\n                }\n            },\n            \"collection\": {\n                \"data\": {\n                    \"id\": \"6\",\n                    \"type\": \"collections\"\n                }\n            },\n            \"logo\": {\n                \"data\": {\n                    \"id\": \"126\",\n                    \"type\": \"logos\"\n                }\n            },\n            \"design\": {\n                \"data\": {\n                    \"id\": \"welcome-home-v2\",\n                    \"type\": \"designs\"\n                }\n            }\n        }\n    },\n    \"included\": [\n        {\n            \"id\": \"1\",\n            \"type\": \"users\",\n            \"attributes\": {\n                \"name\": \"Dimitri Roche\",\n                \"email\": \"dimroc@loopandtie.com\"\n            }\n        },\n        {\n            \"id\": \"6\",\n            \"type\": \"collections\",\n            \"attributes\": {\n                \"name\": \"$75\",\n                \"global\": true,\n                \"price\": \"75.00\"\n            }\n        },\n        {\n            \"id\": \"126\",\n            \"type\": \"logos\",\n            \"attributes\": {\n                \"name\": \"Loop & Tie\",\n                \"global\": true,\n                \"image_url\": \"/images/email/v1/logo-thin.png\"\n            }\n        },\n        {\n            \"id\": \"welcome-home-v2\",\n            \"type\": \"designs\",\n            \"attributes\": {\n                \"name\": \"Welcome Home v2\",\n                \"global\": true,\n                \"image_url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/7/1441980129/uploads/standard.jpg?1441980129\",\n                \"thumbnail_url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/designs/7/1441980129/uploads/thumbnail.jpg?1441980129\"\n            }\n        }\n    ]\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/teams/:team_id/gifts/:id"},"body":"","category":"563a545ca19edf0d00972332","createdAt":"2015-11-13T22:00:35.336Z","editedParams":true,"editedParams2":true,"excerpt":"Cancels an unredeemed gift sent by the team.","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":7,"parentDoc":null,"project":"562905912c0fd9190067da12","slug":"teamsteam_idgiftsid-1","sync_unique":"","title":"/teams/:team_id/gifts/:id","type":"delete","updates":[],"user":"5629054b48742a0d004745cc","version":"562905912c0fd9190067da15","childrenPages":[]}

delete/teams/:team_id/gifts/:id

Cancels an unredeemed gift sent by the team.

Path Params

team_id:
stringsandbox
The team to get the information for
id:
required
string
The gift id

User Information

Try It Out

delete
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"__v":6,"_id":"5644cdc72229d717001091fb","api":{"auth":"required","examples":{"codes":[{"code":"curl -i https://api.loopandtie.com/v1/teams/sandbox/hooks \\\n-H \"Authorization: Bearer [[app:key]]\" \\\n-H \"Content-Type: application/json\" \\\n-X POST \\\n-d '{\"hook\":\n        {\n          \"url\": \"http://mydomain.com/hooks\"\n        }\n     }'","language":"curl"}]},"params":[{"_id":"5844a491f07064230041c825","ref":"","in":"path","required":false,"desc":"The team that the webhooks belong to","default":"sandbox","type":"string","name":"team_id"},{"_id":"5844a491f07064230041c824","default":"","desc":"URL to receive the HTTP push notifications.","in":"body","name":"hooks[url]","ref":"","required":true,"type":"string"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"data\":\n  \t{\n      \"id\": \"sandbox\",\n      \"type\": \"webhooks\",\n      \"attributes\":\n      \t{\n          \"url\": \"http://mydomain.com/hooks\"\n        }\n    }\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/teams/:team_id/hooks"},"body":"","category":"5844a503f07064230041c826","createdAt":"2015-11-12T17:35:03.564Z","excerpt":"Create a webhook to receive an HTTP push notification when a gift changes stage (scheduled, redeemed, delivered, etc).","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"description":"","pages":[]},"order":0,"parentDoc":null,"project":"562905912c0fd9190067da12","slug":"teamsteam_idhooks","sync_unique":"","title":"/teams/:team_id/hooks","type":"post","updates":[],"user":"5629054b48742a0d004745cc","version":"562905912c0fd9190067da15","childrenPages":[]}

post/teams/:team_id/hooks

Create a webhook to receive an HTTP push notification when a gift changes stage (scheduled, redeemed, delivered, etc).

Path Params

team_id:
stringsandbox
The team that the webhooks belong to

Body Params

hooks[url]:
required
string
URL to receive the HTTP push notifications.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"__v":1,"_id":"5844a56bb655f2230039ed89","api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -i https://api.loopandtie.com/v1/teams/sandbox/hooks -H \"Authorization: Bearer [[app:key]]"}]},"params":[{"_id":"5844a5c0d418791900c31a88","ref":"","in":"path","required":false,"desc":"The team that the webhooks belong to","default":"sandbox","type":"string","name":"team_id"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"data\": {\n    \"id\": \"sandbox\",\n    \"type\": \"webhooks\",\n    \"attributes\": {\n      \"url\": \"http://mydomain.com/hooks\"\n    }\n  }\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/teams/:team_id/hooks"},"body":"","category":"5844a503f07064230041c826","createdAt":"2016-12-04T23:23:23.813Z","excerpt":"Retrieves the current webhook URL.","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":999,"project":"562905912c0fd9190067da12","slug":"teamsteam_idhooks-1","sync_unique":"","title":"/teams/:team_id/hooks","type":"get","updates":[],"user":"5629054b48742a0d004745cc","version":"562905912c0fd9190067da15","childrenPages":[]}

get/teams/:team_id/hooks

Retrieves the current webhook URL.

Path Params

team_id:
stringsandbox
The team that the webhooks belong to

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"__v":0,"_id":"5844a745b655f2230039ed8a","api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -i https://api.loopandtie.com/v1/teams/sandbox/hooks \\\n-H \"Authorization: Bearer [[app:key]]\" \\\n-X DELETE"}]},"params":[{"_id":"5844a745b655f2230039ed8b","ref":"","in":"path","required":false,"desc":"The team that the webhooks belong to","default":"sandbox","type":"string","name":"team_id"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"data\": {\n    \"id\": \"sandbox\",\n    \"type\": \"webhooks\",\n    \"attributes\": {\n      \"url\": null\n    }\n  }\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/teams/:team_id/hooks"},"body":"","category":"5844a503f07064230041c826","createdAt":"2016-12-04T23:31:17.373Z","excerpt":"Clears the webhook URL for the team.","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":999,"project":"562905912c0fd9190067da12","slug":"teamsteam_idhooks-2","sync_unique":"","title":"/teams/:team_id/hooks","type":"delete","updates":[],"user":"5629054b48742a0d004745cc","version":"562905912c0fd9190067da15","childrenPages":[]}

delete/teams/:team_id/hooks

Clears the webhook URL for the team.

Path Params

team_id:
stringsandbox
The team that the webhooks belong to

User Information

Try It Out

delete
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"__v":0,"_id":"5847460e889b6c2d00fb86ea","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"body":"After setting a webhook URL using the webhook API endpoints, any gift event (like sent, redeemed, etc) will trigger an HTTP push notification. These notifications will have a JSON payload that describes the gift event that occurred and the gift it is associated with.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"data\\\": {\\n    \\\"id\\\": \\\"GB1600D90811L\\\",\\n    \\\"type\\\": \\\"gift-events\\\",\\n    \\\"attributes\\\": {\\n      \\\"event\\\": \\\"redeemed\\\",\\n      \\\"created-at\\\":\\\"2015-11-12T15:10:00.013Z\\\",\\n      \\\"message\\\": null\\n    },\\n    \\\"relationships\\\": {\\n      \\\"gift\\\": {\\n        \\\"data\\\": { \\\"id\\\": \\\"GB1600D90811L\\\", \\\"type\\\": \\\"gifts\\\" }\\n      }\\n    }\\n  },\\n  \\\"included\\\": [\\n    {\\n    \\t\\\"id\\\": \\\"GB1600D90811L\\\",\\n      \\\"type\\\": \\\"gifts\\\",\\n      \\\"attributes\\\": {\\n        \\\"team\\\":\\\"sandbox\\\",\\n        \\\"sender-name\\\":\\\"Dimitri Roche\\\",\\n        \\\"untie-url\\\":\\\"http://www.loopandtie.com/untie/jFAxxxxxxxxxxx\\\",\\n        \\\"email\\\":\\\"thewailers@jamaica.com\\\",\\n        \\\"stage\\\":\\\"redeemed\\\",\\n        \\\"last-event-at\\\":\\\"2015-11-12T15:10:00.013Z\\\",\\n        \\\"scheduled-at\\\":\\\"2016-11-12T15:06:49.000Z\\\",        \\n        \\\"tagline\\\":null,\\n        \\\"message\\\":\\\"Better than Bob\\\",\\n        \\\"from\\\":\\\"Peter Tosh\\\",\\n        \\\"events\\\": [\\n          {\\\"stage\\\": \\\"scheduled\\\", \\\"message\\\": null, \\\"created_at\\\": \\\"2015-11-12T15:04:00.018Z\\\"},\\n          {\\\"stage\\\": \\\"sent\\\", \\\"message\\\": null, \\\"created-at\\\": \\\"2015-11-12T15:06:00.000Z\\\"},\\n          {\\\"stage\\\": \\\"redeemed\\\", \\\"message\\\": null, \\\"created-at\\\": \\\"2015-11-12T15:10:00.013Z\\\"}\\n        ]\\n      },\\n      \\\"relationships\\\": {\\n      \\t\\\"sender\\\": { \\\"data\\\": { \\\"id\\\": \\\"1\\\", \\\"type\\\": \\\"users\\\" } },\\n      \\t\\\"collection\\\": { \\\"data\\\": { \\\"id\\\": \\\"4\\\", \\\"type\\\": \\\"collections\\\" } },\\n      \\t\\\"logo\\\": { \\\"data\\\": { \\\"id\\\": \\\"126\\\", \\\"type\\\": \\\"logos\\\" } },\\n      \\t\\\"design\\\": { \\\"data\\\": { \\\"id\\\": \\\"standard-gift-of-choice-v2\\\", \\\"type\\\": \\\"designs\\\" } }\\n    \\t}\\n  \\t}\\n  ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nPossible values for the `event` attribute, which corresponds to the kind of event that occurred, are: `sent`, `opened`, `redeemed`, `bounced`, `shipped`, `canceled`, `declined`, `delivered`, `messaged` and `thanked`","category":"5844a503f07064230041c826","createdAt":"2016-12-06T23:13:18.441Z","excerpt":"","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","next":{"pages":[],"description":""},"order":999,"project":"562905912c0fd9190067da12","slug":"receiving-gift-event-notifications","sync_unique":"","title":"Receiving Gift Event Notifications","type":"basic","updates":[],"user":"5629054b48742a0d004745cc","version":"562905912c0fd9190067da15","childrenPages":[]}

Receiving Gift Event Notifications


After setting a webhook URL using the webhook API endpoints, any gift event (like sent, redeemed, etc) will trigger an HTTP push notification. These notifications will have a JSON payload that describes the gift event that occurred and the gift it is associated with. [block:code] { "codes": [ { "code": "{\n \"data\": {\n \"id\": \"GB1600D90811L\",\n \"type\": \"gift-events\",\n \"attributes\": {\n \"event\": \"redeemed\",\n \"created-at\":\"2015-11-12T15:10:00.013Z\",\n \"message\": null\n },\n \"relationships\": {\n \"gift\": {\n \"data\": { \"id\": \"GB1600D90811L\", \"type\": \"gifts\" }\n }\n }\n },\n \"included\": [\n {\n \t\"id\": \"GB1600D90811L\",\n \"type\": \"gifts\",\n \"attributes\": {\n \"team\":\"sandbox\",\n \"sender-name\":\"Dimitri Roche\",\n \"untie-url\":\"http://www.loopandtie.com/untie/jFAxxxxxxxxxxx\",\n \"email\":\"thewailers@jamaica.com\",\n \"stage\":\"redeemed\",\n \"last-event-at\":\"2015-11-12T15:10:00.013Z\",\n \"scheduled-at\":\"2016-11-12T15:06:49.000Z\", \n \"tagline\":null,\n \"message\":\"Better than Bob\",\n \"from\":\"Peter Tosh\",\n \"events\": [\n {\"stage\": \"scheduled\", \"message\": null, \"created_at\": \"2015-11-12T15:04:00.018Z\"},\n {\"stage\": \"sent\", \"message\": null, \"created-at\": \"2015-11-12T15:06:00.000Z\"},\n {\"stage\": \"redeemed\", \"message\": null, \"created-at\": \"2015-11-12T15:10:00.013Z\"}\n ]\n },\n \"relationships\": {\n \t\"sender\": { \"data\": { \"id\": \"1\", \"type\": \"users\" } },\n \t\"collection\": { \"data\": { \"id\": \"4\", \"type\": \"collections\" } },\n \t\"logo\": { \"data\": { \"id\": \"126\", \"type\": \"logos\" } },\n \t\"design\": { \"data\": { \"id\": \"standard-gift-of-choice-v2\", \"type\": \"designs\" } }\n \t}\n \t}\n ]\n}", "language": "json" } ] } [/block] Possible values for the `event` attribute, which corresponds to the kind of event that occurred, are: `sent`, `opened`, `redeemed`, `bounced`, `shipped`, `canceled`, `declined`, `delivered`, `messaged` and `thanked`
After setting a webhook URL using the webhook API endpoints, any gift event (like sent, redeemed, etc) will trigger an HTTP push notification. These notifications will have a JSON payload that describes the gift event that occurred and the gift it is associated with. [block:code] { "codes": [ { "code": "{\n \"data\": {\n \"id\": \"GB1600D90811L\",\n \"type\": \"gift-events\",\n \"attributes\": {\n \"event\": \"redeemed\",\n \"created-at\":\"2015-11-12T15:10:00.013Z\",\n \"message\": null\n },\n \"relationships\": {\n \"gift\": {\n \"data\": { \"id\": \"GB1600D90811L\", \"type\": \"gifts\" }\n }\n }\n },\n \"included\": [\n {\n \t\"id\": \"GB1600D90811L\",\n \"type\": \"gifts\",\n \"attributes\": {\n \"team\":\"sandbox\",\n \"sender-name\":\"Dimitri Roche\",\n \"untie-url\":\"http://www.loopandtie.com/untie/jFAxxxxxxxxxxx\",\n \"email\":\"thewailers@jamaica.com\",\n \"stage\":\"redeemed\",\n \"last-event-at\":\"2015-11-12T15:10:00.013Z\",\n \"scheduled-at\":\"2016-11-12T15:06:49.000Z\", \n \"tagline\":null,\n \"message\":\"Better than Bob\",\n \"from\":\"Peter Tosh\",\n \"events\": [\n {\"stage\": \"scheduled\", \"message\": null, \"created_at\": \"2015-11-12T15:04:00.018Z\"},\n {\"stage\": \"sent\", \"message\": null, \"created-at\": \"2015-11-12T15:06:00.000Z\"},\n {\"stage\": \"redeemed\", \"message\": null, \"created-at\": \"2015-11-12T15:10:00.013Z\"}\n ]\n },\n \"relationships\": {\n \t\"sender\": { \"data\": { \"id\": \"1\", \"type\": \"users\" } },\n \t\"collection\": { \"data\": { \"id\": \"4\", \"type\": \"collections\" } },\n \t\"logo\": { \"data\": { \"id\": \"126\", \"type\": \"logos\" } },\n \t\"design\": { \"data\": { \"id\": \"standard-gift-of-choice-v2\", \"type\": \"designs\" } }\n \t}\n \t}\n ]\n}", "language": "json" } ] } [/block] Possible values for the `event` attribute, which corresponds to the kind of event that occurred, are: `sent`, `opened`, `redeemed`, `bounced`, `shipped`, `canceled`, `declined`, `delivered`, `messaged` and `thanked`
{"__v":3,"_id":"5644ce972229d717001091fd","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/suppliers"},"body":"","category":"5644cd4098da41190099f27f","createdAt":"2015-11-12T17:38:31.989Z","excerpt":"Coming soon. Let us know if this endpoint is important to you via email!","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":0,"parentDoc":null,"project":"562905912c0fd9190067da12","slug":"suppliers","sync_unique":"","title":"/suppliers","type":"get","updates":[],"user":"5629054b48742a0d004745cc","version":"562905912c0fd9190067da15","childrenPages":[]}

get/suppliers

Coming soon. Let us know if this endpoint is important to you via email!


User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Result Format