{"_id":"562905922c0fd9190067da18","order":0,"parentDoc":null,"project":"562905912c0fd9190067da12","title":"Getting Started","user":"5629054b48742a0d004745cc","version":"562905912c0fd9190067da15","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]","createdAt":"2015-10-22T15:49:38.883Z","link_url":"","slug":"getting-started","sync_unique":"","type":"basic","api":{"settings":"","url":"","auth":"required","params":[],"results":{"codes":[]}},"category":"562905922c0fd9190067da16","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,"updates":[],"__v":27,"link_external":false,"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]
{"_id":"5643b577ca75830d00859c9d","link_external":false,"link_url":"","order":0,"slug":"creating-gifts","api":{"auth":"required","params":[],"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"code":"{}","name":"","status":400,"language":"json"}]},"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      \\\"external-id\\\": \\\"GB1600D90811L\\\",\\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      \\\"subject\\\":\\\"Peter Sent You A Gift!\\\",\\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\\\": \\\"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/logos/2387/1531343620/standard.png?1531343620\\\" }\\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        \\\"has-logo\\\": 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!","createdAt":"2015-11-11T21:39:03.117Z","hidden":false,"version":"562905912c0fd9190067da15","updates":[],"parentDoc":null,"sync_unique":"","title":"Creating Gifts","type":"basic","githubsync":"","project":"562905912c0fd9190067da12","user":"5629054b48742a0d004745cc","__v":17,"category":"563a5308e1313f0d00c8678c","excerpt":"","isReference":false,"next":{"description":"","pages":[]},"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 \"external-id\": \"GB1600D90811L\",\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 \"subject\":\"Peter Sent You A Gift!\",\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\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/logos/2387/1531343620/standard.png?1531343620\" }\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 \"has-logo\": 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 \"external-id\": \"GB1600D90811L\",\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 \"subject\":\"Peter Sent You A Gift!\",\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\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/logos/2387/1531343620/standard.png?1531343620\" }\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 \"has-logo\": 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!
{"_id":"563a5331c63a22190018dcb5","link_external":false,"parentDoc":null,"api":{"auth":"required","params":[],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{}"},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":""},"category":"563a5308e1313f0d00c8678c","githubsync":"","order":1,"type":"basic","updates":[],"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          \\t\\\"external-id\\\": \\\"GBB8C23A5511A\\\",\\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          \\t\\\"subject\\\":\\\"Peter Sent You A Gift!\\\",\\n            \\\"message\\\": \\\"Better than Bob\\\",\\n            \\\"from\\\": \\\"Peter Tosh\\\",\\n            \\\"thank-you-note\\\": 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\\\": \\\"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/logos/2387/1531343620/standard.png?1531343620\\\"\\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                \\\"has-logo\\\": 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.","project":"562905912c0fd9190067da12","slug":"generating-gift-links","sync_unique":"","title":"Generating Gift Links","version":"562905912c0fd9190067da15","__v":14,"createdAt":"2015-11-04T18:49:21.111Z","excerpt":"","hidden":false,"link_url":"","user":"5629054b48742a0d004745cc","isReference":false,"next":{"description":"","pages":[]},"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 \t\"external-id\": \"GBB8C23A5511A\",\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 \t\"subject\":\"Peter Sent You A Gift!\",\n \"message\": \"Better than Bob\",\n \"from\": \"Peter Tosh\",\n \"thank-you-note\": 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\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/logos/2387/1531343620/standard.png?1531343620\"\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 \"has-logo\": 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 \t\"external-id\": \"GBB8C23A5511A\",\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 \t\"subject\":\"Peter Sent You A Gift!\",\n \"message\": \"Better than Bob\",\n \"from\": \"Peter Tosh\",\n \"thank-you-note\": 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\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/logos/2387/1531343620/standard.png?1531343620\"\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 \"has-logo\": 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.
{"_id":"5b22cccc3a42e90003d78705","project":"562905912c0fd9190067da12","version":"562905912c0fd9190067da15","category":"563a5308e1313f0d00c8678c","user":"5629054b48742a0d004745cc","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-06-14T20:15:08.001Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"Authorizing 3rd party applications to use your account is easy.  To create an integration with Loop & Tie, contact support at support@loopandtie.com.\n\n## Authorization Code Flow\nWhen you register your application with Loop & Tie, we will issue you with a `client_id` and `client_secret`. We will use these later in the flow, to allow you to exchange an `authorization_token` for an `access_token` which you can use in requests to our API.\n\n## Requesting an authorization token\nTo request the authorization token, you should visit the `/oauth2/authorize` endpoint.\n\n```\nhttp://www.loopandtie.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&response_type=code\n```\n\nIf the user is not logged into the Loop and Tie website, they will be prompted to Log in, and then prompted to authorize your application to access their account.\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/f8dde50-Screen_Shot_2018-06-14_at_5.50.57_PM.png\",\n        \"Screen Shot 2018-06-14 at 5.50.57 PM.png\",\n        872,\n        886,\n        \"#548bb2\"\n      ]\n    }\n  ]\n}\n[/block]\nWhen the user clicks \"Authorize\" they will be redirect back to your specified `redirect_url` with an `authorization_token` as a parameter of the response, e.g.:\n\n```\ncode=225bd83cfd7f20939916694fe1e7967ba63ccede80f7b8abfd5e79d22df068fe\n```\nUsing this `authorization_token` (code), you should exchange this for an `access_token` for the user.\n\n## Requesting the access token\nTo retrieve the `access_token` for the user, you should send an HTTP POST request from your server, with the credentials supplied to you from Loop and Tie when you setup your app integration.\n\nUsing cURL, this might look like:\n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X POST \\\\\\n  https://www.loopandtie.com/oauth2/token \\\\\\n  -F client_id=6d707fe6c4e0e66c31cae50f29bb50bee26d01ee28124050064dcbebe4b56d7a \\\\\\n  -F client_secret=0200e9bcdb4a1e8798243306522cda45bf8cbe9209210cfdeb7017de10c20336 \\\\\\n  -F code=777d8588b18023029da14506d881587ca3bf70f981823ba989a292282eeafea2 \\\\\\n  -F grant_type=authorization_code \\\\\\n  -F redirect_uri=https://your.site/redirect-uri\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\nIf successful, this will return you a payload containing an `access_token`.\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"access_token\\\":\\\"lt_yourawesomeapp_YyMTbOujweXw-GtkllEfZyM7GsY\\\",\\n  \\\"token_type\\\":\\\"bearer\\\",\\n  \\\"created_at\\\":1529032029\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nYou should use this token calls to the API, specifying it in the `Authorization` header, as a Bearer token, e.g.:\n\n`Authorization: Bearer de6780bc506a04bd9362820ba8aed28a71eedbe1c5c4f9dd350e54`","excerpt":"Integrating your app with Loop and Tie has never been easier","slug":"oauth-20-api-access","type":"basic","title":"OAuth 2.0 API access","__v":0,"parentDoc":null,"childrenPages":[]}

OAuth 2.0 API access

Integrating your app with Loop and Tie has never been easier

Authorizing 3rd party applications to use your account is easy. To create an integration with Loop & Tie, contact support at support@loopandtie.com. ## Authorization Code Flow When you register your application with Loop & Tie, we will issue you with a `client_id` and `client_secret`. We will use these later in the flow, to allow you to exchange an `authorization_token` for an `access_token` which you can use in requests to our API. ## Requesting an authorization token To request the authorization token, you should visit the `/oauth2/authorize` endpoint. ``` http://www.loopandtie.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&response_type=code ``` If the user is not logged into the Loop and Tie website, they will be prompted to Log in, and then prompted to authorize your application to access their account. [block:image] { "images": [ { "image": [ "https://files.readme.io/f8dde50-Screen_Shot_2018-06-14_at_5.50.57_PM.png", "Screen Shot 2018-06-14 at 5.50.57 PM.png", 872, 886, "#548bb2" ] } ] } [/block] When the user clicks "Authorize" they will be redirect back to your specified `redirect_url` with an `authorization_token` as a parameter of the response, e.g.: ``` code=225bd83cfd7f20939916694fe1e7967ba63ccede80f7b8abfd5e79d22df068fe ``` Using this `authorization_token` (code), you should exchange this for an `access_token` for the user. ## Requesting the access token To retrieve the `access_token` for the user, you should send an HTTP POST request from your server, with the credentials supplied to you from Loop and Tie when you setup your app integration. Using cURL, this might look like: [block:code] { "codes": [ { "code": "curl -X POST \\\n https://www.loopandtie.com/oauth2/token \\\n -F client_id=6d707fe6c4e0e66c31cae50f29bb50bee26d01ee28124050064dcbebe4b56d7a \\\n -F client_secret=0200e9bcdb4a1e8798243306522cda45bf8cbe9209210cfdeb7017de10c20336 \\\n -F code=777d8588b18023029da14506d881587ca3bf70f981823ba989a292282eeafea2 \\\n -F grant_type=authorization_code \\\n -F redirect_uri=https://your.site/redirect-uri", "language": "curl" } ] } [/block] If successful, this will return you a payload containing an `access_token`. [block:code] { "codes": [ { "code": "{\n \"access_token\":\"lt_yourawesomeapp_YyMTbOujweXw-GtkllEfZyM7GsY\",\n \"token_type\":\"bearer\",\n \"created_at\":1529032029\n}", "language": "json" } ] } [/block] You should use this token calls to the API, specifying it in the `Authorization` header, as a Bearer token, e.g.: `Authorization: Bearer de6780bc506a04bd9362820ba8aed28a71eedbe1c5c4f9dd350e54`
Authorizing 3rd party applications to use your account is easy. To create an integration with Loop & Tie, contact support at support@loopandtie.com. ## Authorization Code Flow When you register your application with Loop & Tie, we will issue you with a `client_id` and `client_secret`. We will use these later in the flow, to allow you to exchange an `authorization_token` for an `access_token` which you can use in requests to our API. ## Requesting an authorization token To request the authorization token, you should visit the `/oauth2/authorize` endpoint. ``` http://www.loopandtie.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&response_type=code ``` If the user is not logged into the Loop and Tie website, they will be prompted to Log in, and then prompted to authorize your application to access their account. [block:image] { "images": [ { "image": [ "https://files.readme.io/f8dde50-Screen_Shot_2018-06-14_at_5.50.57_PM.png", "Screen Shot 2018-06-14 at 5.50.57 PM.png", 872, 886, "#548bb2" ] } ] } [/block] When the user clicks "Authorize" they will be redirect back to your specified `redirect_url` with an `authorization_token` as a parameter of the response, e.g.: ``` code=225bd83cfd7f20939916694fe1e7967ba63ccede80f7b8abfd5e79d22df068fe ``` Using this `authorization_token` (code), you should exchange this for an `access_token` for the user. ## Requesting the access token To retrieve the `access_token` for the user, you should send an HTTP POST request from your server, with the credentials supplied to you from Loop and Tie when you setup your app integration. Using cURL, this might look like: [block:code] { "codes": [ { "code": "curl -X POST \\\n https://www.loopandtie.com/oauth2/token \\\n -F client_id=6d707fe6c4e0e66c31cae50f29bb50bee26d01ee28124050064dcbebe4b56d7a \\\n -F client_secret=0200e9bcdb4a1e8798243306522cda45bf8cbe9209210cfdeb7017de10c20336 \\\n -F code=777d8588b18023029da14506d881587ca3bf70f981823ba989a292282eeafea2 \\\n -F grant_type=authorization_code \\\n -F redirect_uri=https://your.site/redirect-uri", "language": "curl" } ] } [/block] If successful, this will return you a payload containing an `access_token`. [block:code] { "codes": [ { "code": "{\n \"access_token\":\"lt_yourawesomeapp_YyMTbOujweXw-GtkllEfZyM7GsY\",\n \"token_type\":\"bearer\",\n \"created_at\":1529032029\n}", "language": "json" } ] } [/block] You should use this token calls to the API, specifying it in the `Authorization` header, as a Bearer token, e.g.: `Authorization: Bearer de6780bc506a04bd9362820ba8aed28a71eedbe1c5c4f9dd350e54`
{"_id":"5644ae6e2229d717001091c5","githubsync":"","hidden":false,"sync_unique":"","title":"/teams","version":"562905912c0fd9190067da15","__v":4,"body":"","category":"563a545ca19edf0d00972332","updates":[],"createdAt":"2015-11-12T15:21:18.757Z","link_external":false,"order":0,"parentDoc":null,"type":"get","user":"5629054b48742a0d004745cc","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"}]},"method":"get","params":[],"results":{"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-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":200,"language":"json"},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/teams"},"excerpt":"Retrieves all the teams available for the caller.\n\nAll requests are authenticated against either Authorization Bearer Token or an access_token parameter.","link_url":"","project":"562905912c0fd9190067da12","slug":"teams","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



{"_id":"5644b0697f1fff210078e657","editedParams2":true,"excerpt":"Retrieves all the product collections available to be sent for the team.","githubsync":"","hidden":false,"link_external":false,"order":1,"sync_unique":"","api":{"url":"/teams/:team_id/collections","auth":"required","examples":{"codes":[{"code":"curl -i https://api.loopandtie.com/v1/teams/sandbox/collections \\\n-H \"Authorization: Bearer [[app:key]]\"","name":"","language":"curl"}]},"method":"get","params":[{"_id":"5644b0697f1fff210078e658","ref":"","in":"path","required":false,"desc":"The team to get the information for","default":"sandbox","type":"string","name":"team_id"}],"results":{"codes":[{"name":"","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\": \"6\",\n            \"type\": \"collections\",\n            \"attributes\": {\n                \"name\": \"VIP Customers\",\n                \"global\": false,\n                \"price\": \"100.00\"\n            }\n        }\n    ]\n}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":""},"type":"get","title":"/teams/:team_id/collections","category":"563a545ca19edf0d00972332","createdAt":"2015-11-12T15:29:45.632Z","editedParams":true,"link_url":"","parentDoc":null,"project":"562905912c0fd9190067da12","__v":2,"version":"562905912c0fd9190067da15","user":"5629054b48742a0d004745cc","slug":"teamsteam_idcollections","updates":[],"body":"","isReference":false,"next":{"description":"","pages":[]},"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



{"_id":"5644b1976b0ca50d00f6bcbf","category":"563a545ca19edf0d00972332","editedParams":true,"githubsync":"","link_external":false,"order":2,"type":"get","version":"562905912c0fd9190067da15","excerpt":"Retrieves all the designs available to the team.","hidden":false,"title":"/teams/:team_id/designs","__v":2,"api":{"auth":"required","examples":{"codes":[{"name":"","language":"curl","code":"curl -i https://api.loopandtie.com/v1/teams/sandbox/designs \\\n-H \"Authorization: Bearer [[app:key]]\""}]},"method":"get","params":[{"_id":"5644b0697f1fff210078e658","ref":"","in":"path","required":false,"desc":"The team to get the information for","default":"sandbox","type":"string","name":"team_id"}],"results":{"codes":[{"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                \"has-logo\": 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                \"has-logo\": 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":200},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":"/teams/:team_id/designs"},"editedParams2":true,"parentDoc":null,"project":"562905912c0fd9190067da12","sync_unique":"","updates":[],"user":"5629054b48742a0d004745cc","body":"","createdAt":"2015-11-12T15:34:47.895Z","link_url":"","slug":"teamsteam_iddesigns","isReference":false,"next":{"description":"","pages":[]},"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



{"_id":"5644b1ebb360ea0d009147b0","link_external":false,"order":3,"slug":"teamsteam_idlogos","title":"/teams/:team_id/logos","api":{"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\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/logos/2387/1531343620/standard.png?1531343620\"\n            }\n        }\n    ]\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/teams/:team_id/logos","auth":"required","examples":{"codes":[{"language":"curl","code":"curl -i https://api.loopandtie.com/v1/teams/sandbox/logos \\\n-H \"Authorization: Bearer [[app:key]]\"","name":""}]},"method":"get","params":[{"_id":"5644b0697f1fff210078e658","ref":"","in":"path","required":false,"desc":"The team to get the information for","default":"sandbox","type":"string","name":"team_id"}]},"editedParams":true,"excerpt":"Retrieves all the logos available to the team.","githubsync":"","user":"5629054b48742a0d004745cc","type":"get","body":"","category":"563a545ca19edf0d00972332","hidden":false,"sync_unique":"","updates":[],"createdAt":"2015-11-12T15:36:11.590Z","link_url":"","parentDoc":null,"__v":4,"editedParams2":true,"project":"562905912c0fd9190067da12","version":"562905912c0fd9190067da15","isReference":false,"next":{"description":"","pages":[]},"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



{"_id":"5b356c4ff726870003b39d43","project":"562905912c0fd9190067da12","version":"562905912c0fd9190067da15","category":"563a545ca19edf0d00972332","user":"5629054b48742a0d004745cc","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-06-28T23:16:31.469Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[{"status":200,"language":"json","code":"{\n    \"data\": [\n        {\n            \"id\": \"0\",\n            \"type\": \"messages\",\n            \"attributes\": {\n                \"message\": \"Better than Bob\",\n                \"created-at\": \"2016-11-12T15:06:49Z\"\n            }\n        },\n        {\n            \"id\": \"1\",\n            \"type\": \"messages\",\n            \"attributes\": {\n                \"message\": \"We Jammin'\",\n                \"created-at\": \"2015-11-03T19:57:51.759Z\"\n            }\n        }\n    ]\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"method":"get","examples":{"codes":[{"code":"curl -i https://api.loopandtie.com/v1/teams/sandbox/messages \\\n-H \"Authorization: Bearer [[app:key]]\"","name":"","language":"curl"}]},"auth":"required","params":[{"_id":"5644b0697f1fff210078e658","ref":"","in":"path","required":false,"desc":"The team to get the messages from","default":"sandbox","type":"string","name":"team_id"}],"url":"/teams/:team_id/messages"},"isReference":false,"order":4,"body":"","excerpt":"Retrieves past gift messages for gifts sent by the user making the api call, for the given team","slug":"teamsteam_idmessages","type":"get","title":"/teams/:team_id/messages","__v":9,"parentDoc":null,"childrenPages":[]}

get/teams/:team_id/messages

Retrieves past gift messages for gifts sent by the user making the api call, for the given team

Path Params

team_id:
stringsandbox
The team to get the messages from

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



{"_id":"5644b23cd608df0d00d26948","version":"562905912c0fd9190067da15","api":{"examples":{"codes":[{"language":"curl","code":"curl -i https://api.loopandtie.com/v1/teams/sandbox/gifts \\\n-H \"Authorization: Bearer [[app:key]]\"","name":""}]},"method":"get","params":[{"_id":"5644b0697f1fff210078e658","ref":"","in":"path","required":false,"desc":"The team to get the information for","default":"sandbox","type":"string","name":"team_id"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"data\": [{\n        \"id\": \"GB260E0F4B11K\",\n        \"type\": \"gifts\",\n        \"attributes\": {\n          \t\"external-id\": \"GB260E0F4B11K\",\n            \"team\": \"sandbox\",\n            \"sender-name\": \"Dimitri Roche\",\n            \"untie-url\":\"http://www.loopandtie.com/untie/jFAxxxxxxxxxxx\",\n            \"delivery-method\": \"email\",\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            \"subject\":\"Bob Sent You A Gift!\",\n            \"message\": \"We Jammin'\",\n            \"from\": \"Bob Marley\",\n            \"thank-you-note\": 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\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/logos/2387/1531343620/standard.png?1531343620\"\n            }\n        },\n        {\n            \"id\": \"welcome-home-v2\",\n            \"type\": \"designs\",\n            \"attributes\": {\n                \"name\": \"Welcome Home v2\",\n                \"global\": true,\n                \"has-logo\": 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":""},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":"/teams/:team_id/gifts","auth":"required"},"createdAt":"2015-11-12T15:37:32.387Z","link_url":"","order":5,"sync_unique":"","title":"/teams/:team_id/gifts","editedParams2":true,"hidden":false,"link_external":false,"slug":"teamsteam_idgifts","user":"5629054b48742a0d004745cc","body":"","category":"563a545ca19edf0d00972332","parentDoc":null,"excerpt":"Retrieves the gifts sent by the team.","githubsync":"","project":"562905912c0fd9190067da12","type":"get","updates":[],"__v":7,"editedParams":true,"isReference":false,"next":{"description":"","pages":[]},"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



{"_id":"5644b4097f1fff210078e65d","sync_unique":"","body":"Once you've created a gift, check it out in your [gifting portal.](https://sandbox.loopandtie.com)","createdAt":"2015-11-12T15:45:13.888Z","editedParams":true,"link_external":false,"link_url":"","project":"562905912c0fd9190067da12","updates":[],"githubsync":"","hidden":false,"title":"/teams/:team_id/gifts","__v":14,"editedParams2":true,"parentDoc":null,"order":6,"slug":"teamsteam_idgifts-1","type":"post","user":"5629054b48742a0d004745cc","version":"562905912c0fd9190067da15","api":{"settings":"","url":"/teams/:team_id/gifts","auth":"required","examples":{"codes":[{"name":"","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"}]},"method":"post","params":[{"_id":"5644b0697f1fff210078e658","ref":"","in":"path","required":false,"desc":"The team to get the information for","default":"sandbox","type":"string","name":"team_id"},{"_id":"5644b2827f1fff210078e65b","ref":"","in":"body","required":true,"desc":"Recipient's Name","default":"Kobe Bryant","type":"string","name":"gift[name]"},{"_id":"5644b4097f1fff210078e664","ref":"","in":"body","required":true,"desc":"The Collection Name or ID","default":"$50","type":"string","name":"gift[collection]"},{"_id":"5644b4097f1fff210078e660","ref":"","in":"body","required":true,"desc":"The message to be placed in the gift underneath the design","default":"Let's go fishing","type":"string","name":"gift[message]"},{"_id":"5644b4097f1fff210078e65f","ref":"","in":"body","required":true,"desc":"The From text that's placed at the bottom of the gift","default":"Kareem","type":"string","name":"gift[from]"},{"_id":"56463fb056fb450d00410018","ref":"","in":"body","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]"},{"_id":"5644b4097f1fff210078e665","ref":"","in":"body","required":false,"desc":"Recipient's Email. Required if delivery_method is blank or email.","default":"kobe@retiring.com","type":"string","name":"gift[email]"},{"_id":"566dc5c8aa8f8b0d009944f8","ref":"","in":"body","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]"},{"_id":"5644b4097f1fff210078e65e","ref":"","in":"body","required":false,"desc":"When to send the gift email","default":"2016-11-12T15:06:49Z","type":"yyyy-mm-dd","name":"gift[scheduled_at]"},{"_id":"5644b4097f1fff210078e662","ref":"","in":"body","required":false,"desc":"The Logo ID. Defaults to Loop & Tie.","default":"","type":"int","name":"gift[logo_id]"},{"_id":"5644b4097f1fff210078e663","ref":"","in":"body","required":false,"desc":"The Design ID or slug","default":"","type":"string","name":"gift[design_id]"}],"results":{"codes":[{"name":"","code":"{\n  \"data\": {\n    \"id\": \"GB1600D90811L\",\n    \"type\": \"gifts\",\n    \"attributes\": {\n      \"external-id\": \"GB1600D90811L\",\n      \"team\": \"sandbox\",\n      \"sender-name\": \"Dimitri Roche\",\n      \"untie-url\":\"http://www.loopandtie.com/untie/jFAxxxxxxxxxxx\",\n      \"delivery-method\": \"email\",\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      \"subject\":\"Peter Sent You A Gift!\",\n      \"message\": \"Better than Bob\",\n      \"from\": \"Peter Tosh\",\n      \"thank-you-note\": 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\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/logos/2387/1531343620/standard.png?1531343620\" }\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        \"has-logo\": 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","status":200},{"name":"","code":"{\n  \"errors\": [\n    { \"title\": \"ApiError\", \"status\": 422, \"detail\": \"From can't be blank\" },\n    { \"title\": \"ApiError\", \"status\": 422, \"detail\": \"From has invalid characters\" },\n    { \"title\": \"BillingError\", \"status\": 400, \"detail\": \"Your card was declined.\" }\n  ]\n}","language":"json","status":400}]}},"category":"563a545ca19edf0d00972332","excerpt":"Creates a gift","isReference":false,"next":{"description":"","pages":[]},"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[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)
{"_id":"5644b2827f1fff210078e65a","link_url":"","parentDoc":null,"__v":8,"api":{"auth":"required","examples":{"codes":[{"name":"","language":"curl","code":"curl -i https://api.loopandtie.com/v1/teams/sandbox/gifts/GB260E0F4B11K \\\n-H \"Authorization: Bearer [[app:key]]\""}]},"method":"get","params":[{"_id":"5644b0697f1fff210078e658","ref":"","in":"path","required":false,"desc":"The team to get the information for","default":"sandbox","type":"string","name":"team_id"},{"_id":"5644b2827f1fff210078e65b","ref":"","in":"path","required":true,"desc":"The gift id","default":"","type":"string","name":"id"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"data\": {\n        \"id\": \"GB260E0F4B11K\",\n        \"type\": \"gifts\",\n        \"attributes\": {\n            \"external-id\": \"GB260E0F4B11K\",\n            \"team\": \"sandbox\",\n            \"sender-name\": \"Dimitri Roche\",\n            \"untie-url\":\"http://www.loopandtie.com/untie/jFAxxxxxxxxxxx\",\n            \"delivery-method\": \"email\",\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            \"subject\": \"Bob Marley Sent You A Gift!\",\n            \"message\": \"We Jammin'\",\n            \"from\": \"Bob Marley\",\n            \"thank-you-note\": 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\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/logos/2387/1531343620/standard.png?1531343620\"\n            }\n        },\n        {\n            \"id\": \"welcome-home-v2\",\n            \"type\": \"designs\",\n            \"attributes\": {\n                \"name\": \"Welcome Home v2\",\n                \"global\": true,\n                \"has-logo\": 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":""},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":"","url":"/teams/:team_id/gifts/:id"},"body":"","githubsync":"","sync_unique":"","title":"/teams/:team_id/gifts/:id","updates":[],"editedParams":true,"excerpt":"Retrieves a gift sent by the team.","link_external":false,"order":7,"slug":"teamsteam_idgiftsid","version":"562905912c0fd9190067da15","createdAt":"2015-11-12T15:38:42.598Z","hidden":false,"project":"562905912c0fd9190067da12","type":"get","user":"5629054b48742a0d004745cc","category":"563a545ca19edf0d00972332","editedParams2":true,"isReference":false,"next":{"description":"","pages":[]},"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



{"_id":"56465d83a74cd10d00a3f04d","link_url":"","sync_unique":"","user":"5629054b48742a0d004745cc","title":"/teams/:team_id/gifts/:id","updates":[],"excerpt":"Cancels an unredeemed gift sent by the team.","link_external":false,"order":8,"parentDoc":null,"editedParams":true,"hidden":false,"slug":"teamsteam_idgiftsid-1","type":"delete","__v":5,"api":{"settings":"","url":"/teams/:team_id/gifts/:id","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":""}]},"method":"delete","params":[{"_id":"5644b0697f1fff210078e658","ref":"","in":"path","required":false,"desc":"The team to get the information for","default":"sandbox","type":"string","name":"team_id"},{"_id":"5644b2827f1fff210078e65b","ref":"","in":"path","required":true,"desc":"The gift id","default":"","type":"string","name":"id"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"data\": {\n        \"id\": \"GB260E0F4B11K\",\n        \"type\": \"gifts\",\n        \"attributes\": {\n            \"external-id\": \"GB260E0F4B11K\",\n            \"team\": \"sandbox\",\n            \"sender-name\": \"Dimitri Roche\",\n            \"untie-url\":\"http://www.loopandtie.com/untie/jFAxxxxxxxxxxx\",\n            \"delivery-method\": \"email\",\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            \"subject\": \"Bob Marley Sent You A Gift!\",\n            \"message\": \"We Jammin'\",\n            \"from\": \"Bob Marley\",\n            \"thank-you-note\": 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\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/logos/2387/1531343620/standard.png?1531343620\"\n            }\n        },\n        {\n            \"id\": \"welcome-home-v2\",\n            \"type\": \"designs\",\n            \"attributes\": {\n                \"name\": \"Welcome Home v2\",\n                \"global\": true,\n                \"has-logo\": 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":""}]}},"body":"","createdAt":"2015-11-13T22:00:35.336Z","version":"562905912c0fd9190067da15","category":"563a545ca19edf0d00972332","editedParams2":true,"githubsync":"","project":"562905912c0fd9190067da12","isReference":false,"next":{"description":"","pages":[]},"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



{"_id":"5b119f9d1300180003828a45","project":"562905912c0fd9190067da12","version":"562905912c0fd9190067da15","category":"563a545ca19edf0d00972332","user":"5629054b48742a0d004745cc","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-06-01T19:33:49.378Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"data\": [\n    {\n      \"id\": \"GB1600D90811L\",\n      \"type\": \"gifts\",\n      \"attributes\": {\n        \"external-id\": \"GB1600D90811L\",\n        \"team\": \"sandbox\",\n        \"sender-name\": \"Dimitri Roche\",\n        \"untie-url\":\"http://www.loopandtie.com/untie/jFAxxxxxxxxxxx\",\n        \"delivery-method\": \"email\",\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        \"subject\":\"Peter Sent You A Gift!\",\n        \"message\": \"Better than Bob\",\n        \"from\": \"Peter Tosh\",\n        \"thank-you-note\": 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    {\n      \"id\": \"BE9BFC6431L1Y\",\n      \"type\": \"gifts\",\n      \"attributes\": {\n        \"external-id\": \"BE9BFC6431L1Y\",\n        \"team\": \"sandbox\",\n        \"sender-name\": \"Dimitri Roche\",\n        \"untie-url\":\"http://www.loopandtie.com/untie/s15xxxxxxxxxxx\",\n        \"delivery-method\": \"link\",\n        \"email\": null,\n        \"stage\": \"scheduled\",\n        \"last-event-at\": \"2015-11-12T15:04:00.013Z\",\n        \"scheduled-at\": \"2016-11-12T15:06:49.000Z\",\n        \"subject\":\"Peter Sent You A Gift!\",\n        \"message\": \"Better than Bob\",\n        \"from\": \"Peter Tosh\",\n        \"thank-you-note\": 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  ],\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\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/logos/2387/1531343620/standard.png?1531343620\" }\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        \"has-logo\": 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    { \"title\": \"ApiError\", \"status\": 422, \"detail\": \"From can't be blank\" },\n    { \"title\": \"ApiError\", \"status\": 422, \"detail\": \"From has invalid characters\" },\n    { \"title\": \"BillingError\", \"status\": 400, \"detail\": \"Your card was declined.\" }\n  ]\n}","name":""}]},"method":"post","examples":{"codes":[{"code":"curl -i https://api.loopandtie.com/v1/teams/sandbox/bulk/gifts \\\n-H \"Authorization: Bearer [[app:key]]\" \\\n-H \"Content-Type: application/json\" \\\n-X POST \\\n-d '{\"gift\":\n        {\n          \"collection\": \"$25\",\n          \"message\": \"Better than Bob\",\n          \"from\": \"Peter Tosh\",\n          \"recipients_attributes\": [\n          \t{\n              \"name\": \"Ziggi\",\n              \"email\": \"thewailers@jamaica.com\",\n              \"scheduled_at\": \"2016-11-12T15:06:49Z\"\n            },\n            {\n              \"name\": \"Stephen\",\n              \"delivery_method\": \"link\"\n            }\n          ]\n        }\n     }'\n","language":"curl","name":""}]},"settings":"","auth":"required","params":[{"_id":"5644b0697f1fff210078e658","ref":"","in":"path","required":false,"desc":"The team to get the information for","default":"sandbox","type":"string","name":"team_id"},{"_id":"5644b4097f1fff210078e664","ref":"","in":"body","required":true,"desc":"The Collection Name or ID","default":"$50","type":"string","name":"gift[collection]"},{"_id":"5644b4097f1fff210078e660","ref":"","in":"body","required":true,"desc":"The message to be placed in the gift underneath the design","default":"Let's go fishing","type":"string","name":"gift[message]"},{"_id":"5644b4097f1fff210078e65f","ref":"","in":"body","required":true,"desc":"The From text that's placed at the bottom of the gift","default":"Kareem","type":"string","name":"gift[from]"},{"_id":"566dc5c8aa8f8b0d009944f8","ref":"","in":"body","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]"},{"_id":"5644b4097f1fff210078e662","ref":"","in":"body","required":false,"desc":"The Logo ID. Defaults to Loop & Tie.","default":"","type":"int","name":"gift[logo_id]"},{"_id":"5644b4097f1fff210078e663","ref":"","in":"body","required":false,"desc":"The Design ID or slug","default":"","type":"string","name":"gift[design_id]"},{"_id":"5b11a1a564ee650003dbbbb5","ref":"","in":"body","required":true,"desc":"Array of gift recipient attributes, with the object structure and values explained below","default":"","type":"array_object","name":"gift[recipients_attributes]"},{"_id":"5644b2827f1fff210078e65b","ref":"","in":"body","required":true,"desc":"Recipient's Name","default":"Kobe Bryant","type":"string","name":"gift[recipients_attributes][N][name]"},{"_id":"56463fb056fb450d00410018","ref":"","in":"body","required":false,"desc":"Either email or link. Email will send the gift at the scheduled_at time, link will merely return an untie_url.","default":"email","type":"string","name":"gift[recipients_attributes][N][delivery_method]"},{"_id":"5644b4097f1fff210078e665","ref":"","in":"body","required":false,"desc":"Recipient's Email. Required if delivery_method is blank or email.","default":"kobe@retiring.com","type":"string","name":"gift[recipients_attributes][N][email]"},{"_id":"5644b4097f1fff210078e65e","ref":"","in":"body","required":false,"desc":"When to send the gift email. If not provided, will send 5 minutes after the request is made","default":"2016-11-12T15:06:49Z","type":"yyyy-mm-dd","name":"gift[recipients_attributes][N][scheduled_at]"}],"url":"/teams/:team_id/bulk/gifts"},"isReference":false,"order":9,"body":"This endpoint is atomic, in the sense that all requested gifts will be created or none of them will be created, depending on whether the response is a success or a failure. There is no situation in which gifts will be created for only a subset of the requested recipients.","excerpt":"Creates multiple gifts at once","slug":"teamsteam_idgifts-2","type":"post","title":"/teams/:team_id/bulk/gifts","__v":30,"parentDoc":null,"childrenPages":[]}

post/teams/:team_id/bulk/gifts

Creates multiple gifts at once

Path Params

team_id:
stringsandbox
The team to get the information for

Body Params

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[subject]:
string
Optional subject of email of delivery_method is email. Defaults to "Sender Name Sent You A Gift!"
gift[logo_id]:
integer
The Logo ID. Defaults to Loop & Tie.
gift[design_id]:
string
The Design ID or slug
gift[recipients_attributes]:
required
array of objects
Array of gift recipient attributes, with the object structure and values explained below
gift[recipients_attributes][N][name]:
required
stringKobe Bryant
Recipient's Name
gift[recipients_attributes][N][delivery_method]:
stringemail
Either email or link. Email will send the gift at the scheduled_at time, link will merely return an untie_url.
gift[recipients_attributes][N][email]:
stringkobe@retiring.com
Recipient's Email. Required if delivery_method is blank or email.
gift[recipients_attributes][N][scheduled_at]:
yyyy-mm-dd2016-11-12T15:06:49Z
When to send the gift email. If not provided, will send 5 minutes after the request is made
This endpoint is atomic, in the sense that all requested gifts will be created or none of them will be created, depending on whether the response is a success or a failure. There is no situation in which gifts will be created for only a subset of the requested recipients.

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



This endpoint is atomic, in the sense that all requested gifts will be created or none of them will be created, depending on whether the response is a success or a failure. There is no situation in which gifts will be created for only a subset of the requested recipients.
{"_id":"5b28587b36a5030003c3f1e9","project":"562905912c0fd9190067da12","version":"562905912c0fd9190067da15","category":"563a545ca19edf0d00972332","user":"5629054b48742a0d004745cc","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-06-19T01:12:27.807Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","examples":{"codes":[{"name":"","language":"curl","code":"curl -i https://api.loopandtie.com/v1/teams/sandbox/previews \\\n-H \"Authorization: Bearer [[app:key]]\" \\\n-H \"Content-Type: application/json\" \\\n-X POST \\\n-d '{\"gift\":\n        {\n          \"collection\": \"$25\",\n          \"message\": \"Better than Bob\",\n          \"from\": \"Peter Tosh\",\n          \"recipients_attributes\": [\n          \t{\n              \"name\": \"Ziggi\",\n              \"email\": \"thewailers@jamaica.com\",\n              \"scheduled_at\": \"2016-11-12T15:06:49Z\"\n            },\n            {\n              \"name\": \"Stephen\",\n              \"delivery_method\": \"link\"\n            }\n          ]\n        }\n     }'\n"}]},"method":"post","results":{"codes":[{"name":"","code":"{\n  \"data\": [\n    {\n      \"id\": \"BD8CF6B94\",\n      \"type\": \"preview\",\n      \"attributes\": {\n        \"gift-preview-url\": \"https://sandbox.loopandtie.com/previews/BD8CF6B94/gift\",\n        \"email-preview-url\": \"https://sandbox.loopandtie.com/previews/BD8CF6B94/email\"\n      }\n    }\n  ]\n}","language":"json","status":200},{"name":"","code":"{\n  \"errors\": [\n    { \"title\": \"ApiError\", \"status\": 422, \"detail\": \"From can't be blank\" },\n    { \"title\": \"ApiError\", \"status\": 422, \"detail\": \"From has invalid characters\" }\n  ]\n}","language":"json","status":400}]},"auth":"required","params":[{"_id":"5644b0697f1fff210078e658","ref":"","in":"path","required":false,"desc":"The team to get the information for","default":"sandbox","type":"string","name":"team_id"},{"_id":"5644b4097f1fff210078e664","ref":"","in":"body","required":true,"desc":"The Collection Name or ID","default":"$50","type":"string","name":"gift[collection]"},{"_id":"5644b4097f1fff210078e660","ref":"","in":"body","required":true,"desc":"The message to be placed in the gift underneath the design","default":"Let's go fishing","type":"string","name":"gift[message]"},{"_id":"5644b4097f1fff210078e65f","ref":"","in":"body","required":true,"desc":"The From text that's placed at the bottom of the gift","default":"Kareem","type":"string","name":"gift[from]"},{"_id":"566dc5c8aa8f8b0d009944f8","ref":"","in":"body","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]"},{"_id":"5644b4097f1fff210078e662","ref":"","in":"body","required":false,"desc":"The Logo ID. Defaults to Loop & Tie.","default":"","type":"int","name":"gift[logo_id]"},{"_id":"5644b4097f1fff210078e663","ref":"","in":"body","required":false,"desc":"The Design ID or slug","default":"","type":"string","name":"gift[design_id]"},{"_id":"5b11a1a564ee650003dbbbb5","ref":"","in":"body","required":true,"desc":"Array of gift recipient attributes, with the object structure and values explained below","default":"","type":"array_object","name":"gift[recipients_attributes]"},{"_id":"5644b2827f1fff210078e65b","ref":"","in":"body","required":true,"desc":"Recipient's Name","default":"Kobe Bryant","type":"string","name":"gift[recipients_attributes][N][name]"},{"_id":"56463fb056fb450d00410018","ref":"","in":"body","required":false,"desc":"Either email or link. Email will send the gift at the scheduled_at time, link will merely return an untie_url.","default":"email","type":"string","name":"gift[recipients_attributes][N][delivery_method]"},{"_id":"5644b4097f1fff210078e665","ref":"","in":"body","required":false,"desc":"Recipient's Email. Required if delivery_method is blank or email.","default":"kobe@retiring.com","type":"string","name":"gift[recipients_attributes][N][email]"},{"_id":"5644b4097f1fff210078e65e","ref":"","in":"body","required":false,"desc":"When to send the gift email. If not provided, will send 5 minutes after the request is made","default":"2016-11-12T15:06:49Z","type":"yyyy-mm-dd","name":"gift[recipients_attributes][N][scheduled_at]"}],"url":"/teams/:team_id/previews"},"isReference":false,"order":10,"body":"Preview links are specific to the team that requested them. You must be logged in as a user on that team in order to view them.","excerpt":"Creates gift and email preview links for use before gift creation","slug":"teamsteam_idpreviews","type":"post","title":"/teams/:team_id/previews","__v":8,"parentDoc":null,"childrenPages":[]}

post/teams/:team_id/previews

Creates gift and email preview links for use before gift creation

Path Params

team_id:
stringsandbox
The team to get the information for

Body Params

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[subject]:
string
Optional subject of email of delivery_method is email. Defaults to "Sender Name Sent You A Gift!"
gift[logo_id]:
integer
The Logo ID. Defaults to Loop & Tie.
gift[design_id]:
string
The Design ID or slug
gift[recipients_attributes]:
required
array of objects
Array of gift recipient attributes, with the object structure and values explained below
gift[recipients_attributes][N][name]:
required
stringKobe Bryant
Recipient's Name
gift[recipients_attributes][N][delivery_method]:
stringemail
Either email or link. Email will send the gift at the scheduled_at time, link will merely return an untie_url.
gift[recipients_attributes][N][email]:
stringkobe@retiring.com
Recipient's Email. Required if delivery_method is blank or email.
gift[recipients_attributes][N][scheduled_at]:
yyyy-mm-dd2016-11-12T15:06:49Z
When to send the gift email. If not provided, will send 5 minutes after the request is made
Preview links are specific to the team that requested them. You must be logged in as a user on that team in order to view them.

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



Preview links are specific to the team that requested them. You must be logged in as a user on that team in order to view them.
{"_id":"5644cdc72229d717001091fb","link_external":false,"link_url":"","type":"post","user":"5629054b48742a0d004745cc","__v":7,"body":"","category":"5844a503f07064230041c826","createdAt":"2015-11-12T17:35:03.564Z","hidden":false,"next":{"description":"","pages":[]},"parentDoc":null,"sync_unique":"","title":"/teams/:team_id/hooks","version":"562905912c0fd9190067da15","api":{"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":""},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":"/teams/:team_id/hooks","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"}]},"method":"post","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","ref":"","in":"body","required":true,"desc":"URL to receive the HTTP push notifications.","default":"","type":"string","name":"hook[url]"}]},"updates":[],"excerpt":"Create a webhook to receive an HTTP push notification when a gift changes stage (scheduled, redeemed, delivered, etc).","githubsync":"","isReference":false,"order":0,"project":"562905912c0fd9190067da12","slug":"teamsteam_idhooks","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

hook[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



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



{"_id":"5844a745b655f2230039ed8a","excerpt":"Clears the webhook URL for the team.","isReference":false,"type":"delete","__v":0,"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"}]},"method":"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":""},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":"","url":"/teams/:team_id/hooks"},"link_external":false,"project":"562905912c0fd9190067da12","sync_unique":"","user":"5629054b48742a0d004745cc","version":"562905912c0fd9190067da15","hidden":false,"next":{"pages":[],"description":""},"slug":"teamsteam_idhooks-2","title":"/teams/:team_id/hooks","updates":[],"body":"","githubsync":"","link_url":"","order":2,"category":"5844a503f07064230041c826","createdAt":"2016-12-04T23:31:17.373Z","parentDoc":null,"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



{"_id":"5847460e889b6c2d00fb86ea","link_url":"","project":"562905912c0fd9190067da12","type":"basic","user":"5629054b48742a0d004745cc","link_external":false,"title":"Receiving Gift Event Notifications","updates":[],"version":"562905912c0fd9190067da15","createdAt":"2016-12-06T23:13:18.441Z","excerpt":"","githubsync":"","next":{"pages":[],"description":""},"order":3,"slug":"receiving-gift-event-notifications","sync_unique":"","__v":0,"api":{"auth":"required","params":[],"url":"","results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":""},"body":"After setting a webhook URL using the webhook API endpoints, any gift event (like sent, redeemed, etc) will trigger an HTTP `POST` request to the set URL. These `POST` requests 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        \\\"external-id\\\": \\\"GB1600D90811L\\\",\\n        \\\"team\\\": \\\"sandbox\\\",\\n        \\\"sender-name\\\": \\\"Dimitri Roche\\\",\\n        \\\"untie-url\\\": \\\"http://www.loopandtie.com/untie/jFAxxxxxxxxxxx\\\",\\n        \\\"delivery-method\\\": \\\"email\\\",\\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        \\\"subject\\\": \\\"Peter Sent You A Gift!\\\",\\n        \\\"message\\\": \\\"Better than Bob\\\",\\n        \\\"from\\\": \\\"Peter Tosh\\\",\\n        \\\"thank-you-note\\\": null,\\n        \\\"selected-product\\\": {\\n          \\\"data\\\": {\\n            \\\"id\\\": \\\"PA91A8633GBFE\\\",\\n            \\\"type\\\": \\\"products\\\",\\n            \\\"attributes\\\": {\\n              \\\"name\\\": \\\"Native Planter\\\",\\n              \\\"image-url\\\": \\\"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/products/2396/1507048672/images/1/legacy.jpg?1507048672\\\"\\n            }\\n          }\\n        },\\n        \\\"variant\\\": {\\n          \\\"data\\\": {\\n            \\\"id\\\": \\\"999\\\",\\n            \\\"type\\\": \\\"variants\\\",\\n            \\\"attributes\\\": {\\n              \\\"name\\\":\\\"Smoke Grey\\\",\\n              \\\"image-url\\\": \\\"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/variants/2680/1506561278/image/legacy.jpg?1506561278\\\"\\n            }\\n          }\\n        },\\n      \\t\\\"redemption-email\\\": \\\"thewailers@jamaica.com\\\",\\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`\n\nWebhooks that fail to deliver will be retried up to 3 times, at intervals of 1 minute, 10 minutes and 1 hour since last retry.","hidden":false,"category":"5844a503f07064230041c826","isReference":false,"parentDoc":null,"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 `POST` request to the set URL. These `POST` requests 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 \"external-id\": \"GB1600D90811L\",\n \"team\": \"sandbox\",\n \"sender-name\": \"Dimitri Roche\",\n \"untie-url\": \"http://www.loopandtie.com/untie/jFAxxxxxxxxxxx\",\n \"delivery-method\": \"email\",\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 \"subject\": \"Peter Sent You A Gift!\",\n \"message\": \"Better than Bob\",\n \"from\": \"Peter Tosh\",\n \"thank-you-note\": null,\n \"selected-product\": {\n \"data\": {\n \"id\": \"PA91A8633GBFE\",\n \"type\": \"products\",\n \"attributes\": {\n \"name\": \"Native Planter\",\n \"image-url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/products/2396/1507048672/images/1/legacy.jpg?1507048672\"\n }\n }\n },\n \"variant\": {\n \"data\": {\n \"id\": \"999\",\n \"type\": \"variants\",\n \"attributes\": {\n \"name\":\"Smoke Grey\",\n \"image-url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/variants/2680/1506561278/image/legacy.jpg?1506561278\"\n }\n }\n },\n \t\"redemption-email\": \"thewailers@jamaica.com\",\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` Webhooks that fail to deliver will be retried up to 3 times, at intervals of 1 minute, 10 minutes and 1 hour since last retry.
After setting a webhook URL using the webhook API endpoints, any gift event (like sent, redeemed, etc) will trigger an HTTP `POST` request to the set URL. These `POST` requests 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 \"external-id\": \"GB1600D90811L\",\n \"team\": \"sandbox\",\n \"sender-name\": \"Dimitri Roche\",\n \"untie-url\": \"http://www.loopandtie.com/untie/jFAxxxxxxxxxxx\",\n \"delivery-method\": \"email\",\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 \"subject\": \"Peter Sent You A Gift!\",\n \"message\": \"Better than Bob\",\n \"from\": \"Peter Tosh\",\n \"thank-you-note\": null,\n \"selected-product\": {\n \"data\": {\n \"id\": \"PA91A8633GBFE\",\n \"type\": \"products\",\n \"attributes\": {\n \"name\": \"Native Planter\",\n \"image-url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/products/2396/1507048672/images/1/legacy.jpg?1507048672\"\n }\n }\n },\n \"variant\": {\n \"data\": {\n \"id\": \"999\",\n \"type\": \"variants\",\n \"attributes\": {\n \"name\":\"Smoke Grey\",\n \"image-url\": \"https://d2ncrfzc0pt6uh.cloudfront.net/uploads/variants/2680/1506561278/image/legacy.jpg?1506561278\"\n }\n }\n },\n \t\"redemption-email\": \"thewailers@jamaica.com\",\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` Webhooks that fail to deliver will be retried up to 3 times, at intervals of 1 minute, 10 minutes and 1 hour since last retry.
{"_id":"5644ce972229d717001091fd","excerpt":"Coming soon. Let us know if this endpoint is important to you via email!","order":0,"slug":"suppliers","sync_unique":"","title":"/suppliers","__v":3,"body":"","type":"get","version":"562905912c0fd9190067da15","category":"5644cd4098da41190099f27f","hidden":false,"project":"562905912c0fd9190067da12","link_url":"","parentDoc":null,"updates":[],"user":"5629054b48742a0d004745cc","createdAt":"2015-11-12T17:38:31.989Z","githubsync":"","link_external":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/suppliers","auth":"required","method":"get","params":[]},"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