{"_id":"558233f95b7fa60d0068b46c","category":"558233f85b7fa60d0068b46a","order":0,"sync_unique":"","type":"basic","version":"558233f75b7fa60d0068b469","api":{"auth":"required","params":[],"results":{"codes":[]},"settings":"","url":""},"body":"The Level API is structured around REST and has predictable URLs with HTTP response codes to indicate errors. A JSON hash will always be returned as the response. All api requests should be made over HTTPS. \n\n**What can you do with the Level API?**\n\n- Easily add printing, framing and fulfillment to any website that has photos, unframed art or digital artwork.\n- Monetize your visual content without having to set up an e-commerce platform or deal with logistics associated with shipping physical products.\n- Send an image and get back a mock-up of that image framed, with whatever frame specs you specify (e.g., Black frame with 2\" matting) and in the right perspective relative to your print size. \n- Create new experiences around selling framed artwork; you create compelling content and ways for people to interact with it, we'll provide printing and custom framing when they want it on their wall.\n\nLevel has full printing capabilities for creating photos and fine art prints. The API can also accommodate partners that prefer to create prints on their own, or have original artwork that would be sent to Level for framing upon order.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Register for an API key\"\n}\n[/block]\nTo interact with the Level API you must first get an API key. You will be sending this token with every request and it will link orders and data to your account.\n**[Register for your API Key Here](https://www.levelframes.com/api/users/sign_up)**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Root API Endpoint\\nhttps://www.levelframes.com/api/v1\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"**[Register for your API Key Here](https://www.levelframes.com/api/users/sign_up)**\",\n  \"sidebar\": true\n}\n[/block]","excerpt":"This page will help you get started with level.","githubsync":"","hidden":false,"link_url":"","parentDoc":null,"updates":[],"user":"558233c6b806360d00244671","project":"558233f75b7fa60d0068b466","title":"Level API Reference","__v":23,"isReference":false,"link_external":false,"slug":"getting-started","createdAt":"2015-06-18T02:59:05.001Z","childrenPages":[]}

Level API Reference

This page will help you get started with level.

The Level API is structured around REST and has predictable URLs with HTTP response codes to indicate errors. A JSON hash will always be returned as the response. All api requests should be made over HTTPS. **What can you do with the Level API?** - Easily add printing, framing and fulfillment to any website that has photos, unframed art or digital artwork. - Monetize your visual content without having to set up an e-commerce platform or deal with logistics associated with shipping physical products. - Send an image and get back a mock-up of that image framed, with whatever frame specs you specify (e.g., Black frame with 2" matting) and in the right perspective relative to your print size. - Create new experiences around selling framed artwork; you create compelling content and ways for people to interact with it, we'll provide printing and custom framing when they want it on their wall. Level has full printing capabilities for creating photos and fine art prints. The API can also accommodate partners that prefer to create prints on their own, or have original artwork that would be sent to Level for framing upon order. [block:api-header] { "type": "basic", "title": "Register for an API key" } [/block] To interact with the Level API you must first get an API key. You will be sending this token with every request and it will link orders and data to your account. **[Register for your API Key Here](https://www.levelframes.com/api/users/sign_up)** [block:code] { "codes": [ { "code": "Root API Endpoint\nhttps://www.levelframes.com/api/v1", "language": "text" } ], "sidebar": true } [/block] [block:callout] { "type": "info", "body": "**[Register for your API Key Here](https://www.levelframes.com/api/users/sign_up)**", "sidebar": true } [/block]
The Level API is structured around REST and has predictable URLs with HTTP response codes to indicate errors. A JSON hash will always be returned as the response. All api requests should be made over HTTPS. **What can you do with the Level API?** - Easily add printing, framing and fulfillment to any website that has photos, unframed art or digital artwork. - Monetize your visual content without having to set up an e-commerce platform or deal with logistics associated with shipping physical products. - Send an image and get back a mock-up of that image framed, with whatever frame specs you specify (e.g., Black frame with 2" matting) and in the right perspective relative to your print size. - Create new experiences around selling framed artwork; you create compelling content and ways for people to interact with it, we'll provide printing and custom framing when they want it on their wall. Level has full printing capabilities for creating photos and fine art prints. The API can also accommodate partners that prefer to create prints on their own, or have original artwork that would be sent to Level for framing upon order. [block:api-header] { "type": "basic", "title": "Register for an API key" } [/block] To interact with the Level API you must first get an API key. You will be sending this token with every request and it will link orders and data to your account. **[Register for your API Key Here](https://www.levelframes.com/api/users/sign_up)** [block:code] { "codes": [ { "code": "Root API Endpoint\nhttps://www.levelframes.com/api/v1", "language": "text" } ], "sidebar": true } [/block] [block:callout] { "type": "info", "body": "**[Register for your API Key Here](https://www.levelframes.com/api/users/sign_up)**", "sidebar": true } [/block]
{"_id":"55823f306f8ec90d00cf1ad7","link_url":"","slug":"authentication","body":"Level uses token authentication sent in the header to verify your credentials. The response will always be in JSON. In addition to returning a standard HTTP response code, we will also return the code in the JSON response as well. \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Authorization: Token token=YOUR_API_KEY_HERE\\\" https://www.levelframes.com/api/v1/{endpoint}\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response Format:\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"success\\\":true, #true or false\\n  \\\"status\\\": 200, #response code\\n  \\\"data\\\": {\\n  \\t\\\"{resource_name}\\\": {\\n      \\\"{resource_id}\\\":\\\"oIFqGsbzkwlSKUUtW73zpQ\\\"\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"200\",\n    \"0-1\": \"Ok. Successful Request\",\n    \"1-0\": \"400\",\n    \"1-1\": \"Bad request. Missing a required parameter or badly structured hash\",\n    \"2-0\": \"401\",\n    \"2-1\": \"Unauthorized. Bad api key\",\n    \"3-0\": \"402\",\n    \"3-1\": \"Request failed\",\n    \"4-0\": \"404\",\n    \"4-1\": \"Not Found. Did you provide the right URL?\",\n    \"5-0\": \"500\",\n    \"5-1\": \"Server error\",\n    \"h-0\": \"Code\",\n    \"h-1\": \"Description\"\n  },\n  \"cols\": 2,\n  \"rows\": 6\n}\n[/block]\n**[Rest client](https://github.com/rest-client/rest-client)** is a good ruby gem for managing REST resources in a Rails or ruby application. Example of a typical GET request with Rest Client below:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"require 'rest-client'\\n\\nresponse = RestClient.get('https://www.levelframes.com/api/v1/{api_endpoint}', authorization: 'Token token=YOUR_API_KEY')\",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]","hidden":false,"link_external":false,"project":"558233f75b7fa60d0068b466","updates":[],"api":{"auth":"required","params":[],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{}"},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"category":"558233f85b7fa60d0068b46a","excerpt":"How to connect to the API","githubsync":"","sync_unique":"","title":"Authentication","user":"558233c6b806360d00244671","__v":17,"createdAt":"2015-06-18T03:46:56.548Z","version":"558233f75b7fa60d0068b469","order":1,"parentDoc":null,"type":"basic","childrenPages":[]}

Authentication

How to connect to the API

Level uses token authentication sent in the header to verify your credentials. The response will always be in JSON. In addition to returning a standard HTTP response code, we will also return the code in the JSON response as well. [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY_HERE\" https://www.levelframes.com/api/v1/{endpoint}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response Format:", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true, #true or false\n \"status\": 200, #response code\n \"data\": {\n \t\"{resource_name}\": {\n \"{resource_id}\":\"oIFqGsbzkwlSKUUtW73zpQ\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] [block:parameters] { "data": { "0-0": "200", "0-1": "Ok. Successful Request", "1-0": "400", "1-1": "Bad request. Missing a required parameter or badly structured hash", "2-0": "401", "2-1": "Unauthorized. Bad api key", "3-0": "402", "3-1": "Request failed", "4-0": "404", "4-1": "Not Found. Did you provide the right URL?", "5-0": "500", "5-1": "Server error", "h-0": "Code", "h-1": "Description" }, "cols": 2, "rows": 6 } [/block] **[Rest client](https://github.com/rest-client/rest-client)** is a good ruby gem for managing REST resources in a Rails or ruby application. Example of a typical GET request with Rest Client below: [block:code] { "codes": [ { "code": "require 'rest-client'\n\nresponse = RestClient.get('https://www.levelframes.com/api/v1/{api_endpoint}', authorization: 'Token token=YOUR_API_KEY')", "language": "ruby" } ] } [/block]
Level uses token authentication sent in the header to verify your credentials. The response will always be in JSON. In addition to returning a standard HTTP response code, we will also return the code in the JSON response as well. [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY_HERE\" https://www.levelframes.com/api/v1/{endpoint}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response Format:", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true, #true or false\n \"status\": 200, #response code\n \"data\": {\n \t\"{resource_name}\": {\n \"{resource_id}\":\"oIFqGsbzkwlSKUUtW73zpQ\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] [block:parameters] { "data": { "0-0": "200", "0-1": "Ok. Successful Request", "1-0": "400", "1-1": "Bad request. Missing a required parameter or badly structured hash", "2-0": "401", "2-1": "Unauthorized. Bad api key", "3-0": "402", "3-1": "Request failed", "4-0": "404", "4-1": "Not Found. Did you provide the right URL?", "5-0": "500", "5-1": "Server error", "h-0": "Code", "h-1": "Description" }, "cols": 2, "rows": 6 } [/block] **[Rest client](https://github.com/rest-client/rest-client)** is a good ruby gem for managing REST resources in a Rails or ruby application. Example of a typical GET request with Rest Client below: [block:code] { "codes": [ { "code": "require 'rest-client'\n\nresponse = RestClient.get('https://www.levelframes.com/api/v1/{api_endpoint}', authorization: 'Token token=YOUR_API_KEY')", "language": "ruby" } ] } [/block]
{"_id":"55abe02763a6b60d00661708","createdAt":"2015-07-19T17:36:39.354Z","user":"558233c6b806360d00244671","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"excerpt":"Offer your site's images as framed prints to your users.","githubsync":"","sync_unique":"","parentDoc":null,"slug":"sell-framed-prints","title":"Basic Example: Sell Framed Prints in 3 Steps","__v":25,"body":"If you have a website with photos or artwork and want to sell prints and framed versions, Level can handle the printing, framing, shipping and fulfillment. \n\nFor a given photo or piece of artwork, you'll create a Level Print Resource and get back a link that you can place on your site. We'll take care of everything else. \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"1. Register for API Key\"\n}\n[/block]\nTo do anything with the Level API, you must first get your API key. Please register here: [https://www.levelframes.com/users/sign_up?api_user=1](https://www.levelframes.com/users/sign_up?api_user=1) \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"2. Create the Level Print Resources\"\n}\n[/block]\nThe print resources consist of your print information (name, image, etc...) as well as the print sizes you would like to sell. You can set a price for each size and also set default frame options (optional) for your users. The default frame options will be the starting frame options a user will see when they reach the frame customization page on Level. Here is an example of the customization page for a print that has been set: https://www.levelframes.com/frames/new?level_id=9249 \n\nAfter creating a print resource, you will get a Print Detail Page URL which you can link to from your site or store. The prices of the print sizes and other details will also be returned in the request. \n\nRuby example:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"require 'rest-client'\\n\\nparams = { \\n  \\\"combined\\\" => { \\n    \\\"print\\\" => { \\n      \\\"name\\\" => \\\"Washington Landscape\\\", \\n      \\\"high_res_image_url\\\" => \\\"http://i.imgur.com/rtcUAIJ.jpg\\\",\\n      \\\"description\\\" => \\\"A little information about this print here. Some basic html tags are accepted here.\\\",\\n      \\\"print_sizes\\\" => [\\n        {\\n          \\\"width\\\" => 15,\\n          \\\"height\\\" => 8,\\n          \\\"price\\\" => 24.99,\\n          \\\"default_options\\\" => {\\n            \\\"golden_ratio\\\" => true,\\n        \\t\\t\\\"frame_color\\\" => \\\"natural walnut\\\",\\n        \\t\\t\\\"glaze\\\" => \\\"non-glare\\\",\\n            \\\"paper_type\\\" => \\\"matte\\\"\\n      \\t\\t}\\n      \\t}\\n      ]\\n    } \\n \\t},\\n  \\\"postback_url\\\" => \\\"http://www.your-domain.com/webhook\\\"\\n}\\n\\nbegin\\n  response = RestClient.post('https://www.levelframes.com/api/v1/combined', params.to_json, authorization: 'Token token=YOUR_API_KEY', content_type: :json, accept: :json)\\n  \\n  response = JSON.parse(response)\\n  \\n  if response['success'] == true\\n    #capture and save the returned level print id so you can fetch the record later.\\n    level_print_id = response['data']['combined']['print']['id'] \\n    \\n    #capture and save the returned print detail information. Example below just shows the prices and urls being captured from the response and saved to an array.\\n    print_details = [] \\n    \\n    response['data']['combined']['print']['print_sizes'].each do |print_size|\\n      print_details << { \\n        'print_size_id' => print_size['id'], \\n        'total_print_price' => print_size['prices']['total_print_price'],\\n        'frame_price' => print_size['prices']['frame_price'],\\n        'total_price' => print_size['prices']['total_price'],\\n        'print_detail_url' => print_size['product_urls']['print_detail_url'], \\n        'frame_editor_url' => print_size['product_urls']['frame_editor_url'] \\n      }\\n    end\\n  end\\nrescue RestClient::ExceptionWithResponse => err\\n  err.response\\nend\",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"3. Send your users to the print detail page\"\n}\n[/block]\nFrom your site or store, link to either the Print Detail Page or the Frame Editor Page (the URLs were returned in the json response in number 2 above). \n\nAll sales of these items will be linked to your API account and you will be paid on a periodic basis (ask us for details).\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Accept: application/json\\\" -H \\\"Content-type: application/json\\\" -H \\\"Authorization: Token token=YOUR_API_KEY\\\" -X POST -d '{ \\\"combined\\\": {  \\\"print\\\": { \\\"high_res_image_url\\\": \\\"http://i.imgur.com/rtcUAIJ.jpg\\\", \\\"name\\\": \\\"Washington Landscape\\\",  \\\"print_sizes\\\": [{ \\\"width\\\": 15, \\\"height\\\": 8, \\\"price\\\": 24.99, \\\"default_options\\\": { \\\"golden_ratio\\\": true, \\\"frame_color\\\": \\\"natural walnut\\\", \\\"glaze\\\": \\\"non-glare\\\" } }]}}, \\\"postback_url\\\": \\\"http://www.your-domain.com/webhook\\\" }' https://www.levelframes.com/api/v1/combined\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"success\\\":true,\\n  \\\"status\\\":200,\\n  \\\"message\\\":\\\"Individual webhook responses will be sent out for each image that requires processing (print image and your framed images associated with your print sizes).\\\",\\n  \\\"data\\\":{\\n    \\\"combined\\\":{\\n      \\\"print\\\":{\\n        \\\"id\\\":\\\"IVMGKapB5WJ0vQ27vYFKxA\\\",\\n        \\\"name\\\":\\\"Washington Landscape\\\",\\n        \\\"image\\\":null,\\n        \\\"is_active\\\":true,\\n        \\\"description\\\":null,\\n        \\\"printing_in_house\\\":true,\\n        \\\"custom_id\\\":null,\\n        \\\"print_sizes\\\":[{\\n          \\\"id\\\":\\\"p6kzXPlmsywJ8Rt1ASepow\\\",\\n          \\\"width\\\":\\\"15.0\\\",\\n          \\\"height\\\":\\\"8.0\\\",\\n          \\\"is_active\\\":true,\\n          \\\"custom_id\\\":null,\\n          \\\"print_id\\\":\\\"IVMGKapB5WJ0vQ27vYFKxA\\\",\\n          \\\"default_options\\\":{\\n            \\\"frame_width\\\":0.75,\\n            \\\"mat_width\\\":1.5,\\n            \\\"frame_color\\\":\\\"Natural Walnut\\\",\\n            \\\"mat_color\\\":\\\"Off-White\\\",\\n            \\\"glaze\\\":\\\"Non-Glare\\\",\\n            \\\"paper_type\\\":\\\"glossy\\\"\\n          },\\n          \\\"prices\\\":{\\n            \\\"level_printing_price\\\":8.4,\\n            \\\"base_print_price\\\":24.99,\\n            \\\"total_print_price\\\":33.39,\\n            \\\"frame_price\\\":73.0,\\n            \\\"total_price\\\":106.39\\n          },\\n          \\\"product_urls\\\":{\\n            \\\"print_detail_url\\\":\\\"https://www.levelframes.com/prints/washington-landscape--5\\\",\\n            \\\"frame_editor_url\\\":\\\"https://www.levelframes.com/frames/new?level_id=9249\\\"\\n          }\\n        }]\\n      }\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","category":"5582d9efb806360d0024485d","hidden":false,"order":0,"updates":[],"version":"558233f75b7fa60d0068b469","link_external":false,"link_url":"","project":"558233f75b7fa60d0068b466","type":"basic","childrenPages":[]}

Basic Example: Sell Framed Prints in 3 Steps

Offer your site's images as framed prints to your users.

If you have a website with photos or artwork and want to sell prints and framed versions, Level can handle the printing, framing, shipping and fulfillment. For a given photo or piece of artwork, you'll create a Level Print Resource and get back a link that you can place on your site. We'll take care of everything else. [block:api-header] { "type": "basic", "title": "1. Register for API Key" } [/block] To do anything with the Level API, you must first get your API key. Please register here: [https://www.levelframes.com/users/sign_up?api_user=1](https://www.levelframes.com/users/sign_up?api_user=1) [block:api-header] { "type": "basic", "title": "2. Create the Level Print Resources" } [/block] The print resources consist of your print information (name, image, etc...) as well as the print sizes you would like to sell. You can set a price for each size and also set default frame options (optional) for your users. The default frame options will be the starting frame options a user will see when they reach the frame customization page on Level. Here is an example of the customization page for a print that has been set: https://www.levelframes.com/frames/new?level_id=9249 After creating a print resource, you will get a Print Detail Page URL which you can link to from your site or store. The prices of the print sizes and other details will also be returned in the request. Ruby example: [block:code] { "codes": [ { "code": "require 'rest-client'\n\nparams = { \n \"combined\" => { \n \"print\" => { \n \"name\" => \"Washington Landscape\", \n \"high_res_image_url\" => \"http://i.imgur.com/rtcUAIJ.jpg\",\n \"description\" => \"A little information about this print here. Some basic html tags are accepted here.\",\n \"print_sizes\" => [\n {\n \"width\" => 15,\n \"height\" => 8,\n \"price\" => 24.99,\n \"default_options\" => {\n \"golden_ratio\" => true,\n \t\t\"frame_color\" => \"natural walnut\",\n \t\t\"glaze\" => \"non-glare\",\n \"paper_type\" => \"matte\"\n \t\t}\n \t}\n ]\n } \n \t},\n \"postback_url\" => \"http://www.your-domain.com/webhook\"\n}\n\nbegin\n response = RestClient.post('https://www.levelframes.com/api/v1/combined', params.to_json, authorization: 'Token token=YOUR_API_KEY', content_type: :json, accept: :json)\n \n response = JSON.parse(response)\n \n if response['success'] == true\n #capture and save the returned level print id so you can fetch the record later.\n level_print_id = response['data']['combined']['print']['id'] \n \n #capture and save the returned print detail information. Example below just shows the prices and urls being captured from the response and saved to an array.\n print_details = [] \n \n response['data']['combined']['print']['print_sizes'].each do |print_size|\n print_details << { \n 'print_size_id' => print_size['id'], \n 'total_print_price' => print_size['prices']['total_print_price'],\n 'frame_price' => print_size['prices']['frame_price'],\n 'total_price' => print_size['prices']['total_price'],\n 'print_detail_url' => print_size['product_urls']['print_detail_url'], \n 'frame_editor_url' => print_size['product_urls']['frame_editor_url'] \n }\n end\n end\nrescue RestClient::ExceptionWithResponse => err\n err.response\nend", "language": "ruby" } ] } [/block] [block:api-header] { "type": "basic", "title": "3. Send your users to the print detail page" } [/block] From your site or store, link to either the Print Detail Page or the Frame Editor Page (the URLs were returned in the json response in number 2 above). All sales of these items will be linked to your API account and you will be paid on a periodic basis (ask us for details). [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X POST -d '{ \"combined\": { \"print\": { \"high_res_image_url\": \"http://i.imgur.com/rtcUAIJ.jpg\", \"name\": \"Washington Landscape\", \"print_sizes\": [{ \"width\": 15, \"height\": 8, \"price\": 24.99, \"default_options\": { \"golden_ratio\": true, \"frame_color\": \"natural walnut\", \"glaze\": \"non-glare\" } }]}}, \"postback_url\": \"http://www.your-domain.com/webhook\" }' https://www.levelframes.com/api/v1/combined", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\":200,\n \"message\":\"Individual webhook responses will be sent out for each image that requires processing (print image and your framed images associated with your print sizes).\",\n \"data\":{\n \"combined\":{\n \"print\":{\n \"id\":\"IVMGKapB5WJ0vQ27vYFKxA\",\n \"name\":\"Washington Landscape\",\n \"image\":null,\n \"is_active\":true,\n \"description\":null,\n \"printing_in_house\":true,\n \"custom_id\":null,\n \"print_sizes\":[{\n \"id\":\"p6kzXPlmsywJ8Rt1ASepow\",\n \"width\":\"15.0\",\n \"height\":\"8.0\",\n \"is_active\":true,\n \"custom_id\":null,\n \"print_id\":\"IVMGKapB5WJ0vQ27vYFKxA\",\n \"default_options\":{\n \"frame_width\":0.75,\n \"mat_width\":1.5,\n \"frame_color\":\"Natural Walnut\",\n \"mat_color\":\"Off-White\",\n \"glaze\":\"Non-Glare\",\n \"paper_type\":\"glossy\"\n },\n \"prices\":{\n \"level_printing_price\":8.4,\n \"base_print_price\":24.99,\n \"total_print_price\":33.39,\n \"frame_price\":73.0,\n \"total_price\":106.39\n },\n \"product_urls\":{\n \"print_detail_url\":\"https://www.levelframes.com/prints/washington-landscape--5\",\n \"frame_editor_url\":\"https://www.levelframes.com/frames/new?level_id=9249\"\n }\n }]\n }\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
If you have a website with photos or artwork and want to sell prints and framed versions, Level can handle the printing, framing, shipping and fulfillment. For a given photo or piece of artwork, you'll create a Level Print Resource and get back a link that you can place on your site. We'll take care of everything else. [block:api-header] { "type": "basic", "title": "1. Register for API Key" } [/block] To do anything with the Level API, you must first get your API key. Please register here: [https://www.levelframes.com/users/sign_up?api_user=1](https://www.levelframes.com/users/sign_up?api_user=1) [block:api-header] { "type": "basic", "title": "2. Create the Level Print Resources" } [/block] The print resources consist of your print information (name, image, etc...) as well as the print sizes you would like to sell. You can set a price for each size and also set default frame options (optional) for your users. The default frame options will be the starting frame options a user will see when they reach the frame customization page on Level. Here is an example of the customization page for a print that has been set: https://www.levelframes.com/frames/new?level_id=9249 After creating a print resource, you will get a Print Detail Page URL which you can link to from your site or store. The prices of the print sizes and other details will also be returned in the request. Ruby example: [block:code] { "codes": [ { "code": "require 'rest-client'\n\nparams = { \n \"combined\" => { \n \"print\" => { \n \"name\" => \"Washington Landscape\", \n \"high_res_image_url\" => \"http://i.imgur.com/rtcUAIJ.jpg\",\n \"description\" => \"A little information about this print here. Some basic html tags are accepted here.\",\n \"print_sizes\" => [\n {\n \"width\" => 15,\n \"height\" => 8,\n \"price\" => 24.99,\n \"default_options\" => {\n \"golden_ratio\" => true,\n \t\t\"frame_color\" => \"natural walnut\",\n \t\t\"glaze\" => \"non-glare\",\n \"paper_type\" => \"matte\"\n \t\t}\n \t}\n ]\n } \n \t},\n \"postback_url\" => \"http://www.your-domain.com/webhook\"\n}\n\nbegin\n response = RestClient.post('https://www.levelframes.com/api/v1/combined', params.to_json, authorization: 'Token token=YOUR_API_KEY', content_type: :json, accept: :json)\n \n response = JSON.parse(response)\n \n if response['success'] == true\n #capture and save the returned level print id so you can fetch the record later.\n level_print_id = response['data']['combined']['print']['id'] \n \n #capture and save the returned print detail information. Example below just shows the prices and urls being captured from the response and saved to an array.\n print_details = [] \n \n response['data']['combined']['print']['print_sizes'].each do |print_size|\n print_details << { \n 'print_size_id' => print_size['id'], \n 'total_print_price' => print_size['prices']['total_print_price'],\n 'frame_price' => print_size['prices']['frame_price'],\n 'total_price' => print_size['prices']['total_price'],\n 'print_detail_url' => print_size['product_urls']['print_detail_url'], \n 'frame_editor_url' => print_size['product_urls']['frame_editor_url'] \n }\n end\n end\nrescue RestClient::ExceptionWithResponse => err\n err.response\nend", "language": "ruby" } ] } [/block] [block:api-header] { "type": "basic", "title": "3. Send your users to the print detail page" } [/block] From your site or store, link to either the Print Detail Page or the Frame Editor Page (the URLs were returned in the json response in number 2 above). All sales of these items will be linked to your API account and you will be paid on a periodic basis (ask us for details). [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X POST -d '{ \"combined\": { \"print\": { \"high_res_image_url\": \"http://i.imgur.com/rtcUAIJ.jpg\", \"name\": \"Washington Landscape\", \"print_sizes\": [{ \"width\": 15, \"height\": 8, \"price\": 24.99, \"default_options\": { \"golden_ratio\": true, \"frame_color\": \"natural walnut\", \"glaze\": \"non-glare\" } }]}}, \"postback_url\": \"http://www.your-domain.com/webhook\" }' https://www.levelframes.com/api/v1/combined", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\":200,\n \"message\":\"Individual webhook responses will be sent out for each image that requires processing (print image and your framed images associated with your print sizes).\",\n \"data\":{\n \"combined\":{\n \"print\":{\n \"id\":\"IVMGKapB5WJ0vQ27vYFKxA\",\n \"name\":\"Washington Landscape\",\n \"image\":null,\n \"is_active\":true,\n \"description\":null,\n \"printing_in_house\":true,\n \"custom_id\":null,\n \"print_sizes\":[{\n \"id\":\"p6kzXPlmsywJ8Rt1ASepow\",\n \"width\":\"15.0\",\n \"height\":\"8.0\",\n \"is_active\":true,\n \"custom_id\":null,\n \"print_id\":\"IVMGKapB5WJ0vQ27vYFKxA\",\n \"default_options\":{\n \"frame_width\":0.75,\n \"mat_width\":1.5,\n \"frame_color\":\"Natural Walnut\",\n \"mat_color\":\"Off-White\",\n \"glaze\":\"Non-Glare\",\n \"paper_type\":\"glossy\"\n },\n \"prices\":{\n \"level_printing_price\":8.4,\n \"base_print_price\":24.99,\n \"total_print_price\":33.39,\n \"frame_price\":73.0,\n \"total_price\":106.39\n },\n \"product_urls\":{\n \"print_detail_url\":\"https://www.levelframes.com/prints/washington-landscape--5\",\n \"frame_editor_url\":\"https://www.levelframes.com/frames/new?level_id=9249\"\n }\n }]\n }\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
{"_id":"55ad213c18eefd0d0071d692","category":"5582d9efb806360d0024485d","createdAt":"2015-07-20T16:26:36.981Z","excerpt":"Use the combined endpoint for building everything in one request","hidden":false,"updates":[],"version":"558233f75b7fa60d0068b469","__v":7,"body":"The example above creates a Print Resource not associated with a particular artist. Use this example instead If you would like to group your prints by artist on Level. \n\nThis example also creates a framed image from your print options, giving you the option to display a framed version of the artwork on your site. \n\nRuby example:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"require 'rest-client'\\n\\nparams = { \\n  \\\"combined\\\" => {\\n    \\\"artist\\\" => {\\n      \\\"name\\\" => \\\"Pablo Picasso\\\",\\n      \\\"print\\\" => { \\n        \\\"name\\\" => \\\"Washington Landscape\\\", \\n        \\\"high_res_image_url\\\" => \\\"http://i.imgur.com/rtcUAIJ.jpg\\\",\\n        \\\"description\\\" => \\\"A little information about this print here. Some basic html tags are accepted here.\\\",\\n        \\\"print_sizes\\\" => [\\n          {\\n            \\\"width\\\" => 15,\\n            \\\"height\\\" => 8,\\n            \\\"price\\\" => 24.99,\\n            \\\"default_options\\\" => {\\n              \\\"golden_ratio\\\" => true,\\n              \\\"frame_color\\\" => \\\"natural walnut\\\",\\n              \\\"glaze\\\" => \\\"non-glare\\\",\\n              \\\"paper_type\\\" => \\\"matte\\\"\\n            },\\n            \\\"create_framed_image\\\" => true,\\n            \\\"framed_image_options\\\" => {\\n              \\\"image_size\\\" => 600 \\n            }\\n          }\\n        ]\\n      } \\n    }\\n  },\\n  \\\"postback_url\\\" => \\\"http://www.your-domain.com/webhook\\\"\\n}\\n\\nbegin\\n  response = RestClient.post('https://www.levelframes.com/api/v1/combined', params.to_json, authorization: 'Token token=YOUR_API_KEY', content_type: :json, accept: :json)\\n  \\n  response = JSON.parse(response)\\n  \\n  if response['success'] == true\\n    #capture and save the level resource ids for later queries.\\n    level_artist_id = response['data']['combined']['artist']['id'] \\n    level_print_id = response['data']['combined']['artist']['print']['id'] \\n    \\n    #capture and save the returned print detail information. Example below just shows the prices and urls being captured from the response and saved to an array.\\n    print_details = [] \\n    \\n    response['data']['combined']['artist']['print']['print_sizes'].each do |print_size|\\n      \\n      print_details << { \\n        'print_size_id' => print_size['id'], \\n        'total_print_price' => print_size['prices']['total_print_price'],\\n        'frame_price' => print_size['prices']['frame_price'],\\n        'total_price' => print_size['prices']['total_price'],\\n        'print_detail_url' => print_size['product_urls']['print_detail_url'], \\n        'frame_editor_url' => print_size['product_urls']['frame_editor_url'] \\n      }\\n    end\\n  end\\nrescue RestClient::ExceptionWithResponse => err\\n  err.response\\nend\",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]\n**You now have the option of linking to either the Artist Page, the Print Detail Page, or the Frame Customization Page from your site.**\n\nAll sales from any prints created by you will be associated with your account.\n\nAny request that requires image processing will be run in a background job and the results will be posted back to your server, if you include a postback_url in the request. The example above would have 2 separate webhooks sent out:\n\n1. The results of your print image processing\n2. The results and url of the framed image created from your print\n\nYou can also get the results of these tasks by polling the individual endpoints (prints and print_sizes endpoints), but webhooks are the preferred method.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Accept: application/json\\\" -H \\\"Content-type: application/json\\\" -H \\\"Authorization: Token token=YOUR_API_KEY\\\" -X POST -d '{ \\\"combined\\\": { \\\"artist\\\": { \\\"name\\\": \\\"Pablo Picasso\\\", \\\"print\\\": { \\\"high_res_image_url\\\": \\\"http://i.imgur.com/rtcUAIJ.jpg\\\", \\\"name\\\": \\\"Washington Landscape\\\",  \\\"print_sizes\\\": [{ \\\"width\\\": 15, \\\"height\\\": 8, \\\"price\\\": 24.99, \\\"default_options\\\": { \\\"golden_ratio\\\": true, \\\"frame_color\\\": \\\"natural walnut\\\", \\\"glaze\\\": \\\"non-glare\\\" }, \\\"create_framed_image\\\": true, \\\"framed_image_options\\\": { \\\"image_size\\\": \\\"600\\\" } }]}}}, \\\"postback_url\\\": \\\"http://www.your-domain.com/webhook\\\" }' https://www.levelframes.com/api/v1/combined\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"success\\\":true,\\n  \\\"status\\\":200,\\n  \\\"message\\\":\\\"Individual webhook responses will be sent out for each image that requires processing (print image and your framed images associated with your print sizes).\\\",\\n  \\\"data\\\":{\\n    \\\"combined\\\":{\\n      \\\"artist\\\": {\\n        \\\"print\\\":{\\n          \\\"id\\\":\\\"IVMGKapB5WJ0vQ27vYFKxA\\\",\\n          \\\"name\\\":\\\"Washington Landscape\\\",\\n          \\\"image\\\":null,\\n          \\\"is_active\\\":true,\\n          \\\"description\\\":null,\\n          \\\"printing_in_house\\\":true,\\n          \\\"custom_id\\\":null,\\n          \\\"print_sizes\\\":[{\\n            \\\"id\\\":\\\"p6kzXPlmsywJ8Rt1ASepow\\\",\\n            \\\"width\\\":\\\"15.0\\\",\\n            \\\"height\\\":\\\"8.0\\\",\\n            \\\"is_active\\\":true,\\n            \\\"custom_id\\\":null,\\n            \\\"print_id\\\":\\\"IVMGKapB5WJ0vQ27vYFKxA\\\",\\n            \\\"default_options\\\":{\\n              \\\"frame_width\\\":0.75,\\n              \\\"mat_width\\\":1.5,\\n              \\\"frame_color\\\":\\\"Natural Walnut\\\",\\n              \\\"mat_color\\\":\\\"Off-White\\\",\\n              \\\"glaze\\\":\\\"Non-Glare\\\",\\n              \\\"paper_type\\\":\\\"glossy\\\"\\n            },\\n            \\\"prices\\\":{\\n              \\\"level_printing_price\\\":8.4,\\n              \\\"base_print_price\\\":24.99,\\n              \\\"total_print_price\\\":33.39,\\n              \\\"frame_price\\\":73.0,\\n              \\\"total_price\\\":106.39\\n            },\\n            \\\"product_urls\\\":{\\n              \\\"print_detail_url\\\":\\\"https://www.levelframes.com/prints/washington-landscape--6\\\",\\n              \\\"frame_editor_url\\\":\\\"https://www.levelframes.com/frames/new?level_id=9250\\\"\\n            }\\n          }]\\n        }\\n      }\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","slug":"create-an-artist-print-and-framed-image","type":"basic","githubsync":"","link_url":"","project":"558233f75b7fa60d0068b466","user":"558233c6b806360d00244671","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"link_external":false,"order":1,"parentDoc":null,"sync_unique":"","title":"Create an Artist, Print and Framed Image","childrenPages":[]}

Create an Artist, Print and Framed Image

Use the combined endpoint for building everything in one request

The example above creates a Print Resource not associated with a particular artist. Use this example instead If you would like to group your prints by artist on Level. This example also creates a framed image from your print options, giving you the option to display a framed version of the artwork on your site. Ruby example: [block:code] { "codes": [ { "code": "require 'rest-client'\n\nparams = { \n \"combined\" => {\n \"artist\" => {\n \"name\" => \"Pablo Picasso\",\n \"print\" => { \n \"name\" => \"Washington Landscape\", \n \"high_res_image_url\" => \"http://i.imgur.com/rtcUAIJ.jpg\",\n \"description\" => \"A little information about this print here. Some basic html tags are accepted here.\",\n \"print_sizes\" => [\n {\n \"width\" => 15,\n \"height\" => 8,\n \"price\" => 24.99,\n \"default_options\" => {\n \"golden_ratio\" => true,\n \"frame_color\" => \"natural walnut\",\n \"glaze\" => \"non-glare\",\n \"paper_type\" => \"matte\"\n },\n \"create_framed_image\" => true,\n \"framed_image_options\" => {\n \"image_size\" => 600 \n }\n }\n ]\n } \n }\n },\n \"postback_url\" => \"http://www.your-domain.com/webhook\"\n}\n\nbegin\n response = RestClient.post('https://www.levelframes.com/api/v1/combined', params.to_json, authorization: 'Token token=YOUR_API_KEY', content_type: :json, accept: :json)\n \n response = JSON.parse(response)\n \n if response['success'] == true\n #capture and save the level resource ids for later queries.\n level_artist_id = response['data']['combined']['artist']['id'] \n level_print_id = response['data']['combined']['artist']['print']['id'] \n \n #capture and save the returned print detail information. Example below just shows the prices and urls being captured from the response and saved to an array.\n print_details = [] \n \n response['data']['combined']['artist']['print']['print_sizes'].each do |print_size|\n \n print_details << { \n 'print_size_id' => print_size['id'], \n 'total_print_price' => print_size['prices']['total_print_price'],\n 'frame_price' => print_size['prices']['frame_price'],\n 'total_price' => print_size['prices']['total_price'],\n 'print_detail_url' => print_size['product_urls']['print_detail_url'], \n 'frame_editor_url' => print_size['product_urls']['frame_editor_url'] \n }\n end\n end\nrescue RestClient::ExceptionWithResponse => err\n err.response\nend", "language": "ruby" } ] } [/block] **You now have the option of linking to either the Artist Page, the Print Detail Page, or the Frame Customization Page from your site.** All sales from any prints created by you will be associated with your account. Any request that requires image processing will be run in a background job and the results will be posted back to your server, if you include a postback_url in the request. The example above would have 2 separate webhooks sent out: 1. The results of your print image processing 2. The results and url of the framed image created from your print You can also get the results of these tasks by polling the individual endpoints (prints and print_sizes endpoints), but webhooks are the preferred method. [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X POST -d '{ \"combined\": { \"artist\": { \"name\": \"Pablo Picasso\", \"print\": { \"high_res_image_url\": \"http://i.imgur.com/rtcUAIJ.jpg\", \"name\": \"Washington Landscape\", \"print_sizes\": [{ \"width\": 15, \"height\": 8, \"price\": 24.99, \"default_options\": { \"golden_ratio\": true, \"frame_color\": \"natural walnut\", \"glaze\": \"non-glare\" }, \"create_framed_image\": true, \"framed_image_options\": { \"image_size\": \"600\" } }]}}}, \"postback_url\": \"http://www.your-domain.com/webhook\" }' https://www.levelframes.com/api/v1/combined", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\":200,\n \"message\":\"Individual webhook responses will be sent out for each image that requires processing (print image and your framed images associated with your print sizes).\",\n \"data\":{\n \"combined\":{\n \"artist\": {\n \"print\":{\n \"id\":\"IVMGKapB5WJ0vQ27vYFKxA\",\n \"name\":\"Washington Landscape\",\n \"image\":null,\n \"is_active\":true,\n \"description\":null,\n \"printing_in_house\":true,\n \"custom_id\":null,\n \"print_sizes\":[{\n \"id\":\"p6kzXPlmsywJ8Rt1ASepow\",\n \"width\":\"15.0\",\n \"height\":\"8.0\",\n \"is_active\":true,\n \"custom_id\":null,\n \"print_id\":\"IVMGKapB5WJ0vQ27vYFKxA\",\n \"default_options\":{\n \"frame_width\":0.75,\n \"mat_width\":1.5,\n \"frame_color\":\"Natural Walnut\",\n \"mat_color\":\"Off-White\",\n \"glaze\":\"Non-Glare\",\n \"paper_type\":\"glossy\"\n },\n \"prices\":{\n \"level_printing_price\":8.4,\n \"base_print_price\":24.99,\n \"total_print_price\":33.39,\n \"frame_price\":73.0,\n \"total_price\":106.39\n },\n \"product_urls\":{\n \"print_detail_url\":\"https://www.levelframes.com/prints/washington-landscape--6\",\n \"frame_editor_url\":\"https://www.levelframes.com/frames/new?level_id=9250\"\n }\n }]\n }\n }\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
The example above creates a Print Resource not associated with a particular artist. Use this example instead If you would like to group your prints by artist on Level. This example also creates a framed image from your print options, giving you the option to display a framed version of the artwork on your site. Ruby example: [block:code] { "codes": [ { "code": "require 'rest-client'\n\nparams = { \n \"combined\" => {\n \"artist\" => {\n \"name\" => \"Pablo Picasso\",\n \"print\" => { \n \"name\" => \"Washington Landscape\", \n \"high_res_image_url\" => \"http://i.imgur.com/rtcUAIJ.jpg\",\n \"description\" => \"A little information about this print here. Some basic html tags are accepted here.\",\n \"print_sizes\" => [\n {\n \"width\" => 15,\n \"height\" => 8,\n \"price\" => 24.99,\n \"default_options\" => {\n \"golden_ratio\" => true,\n \"frame_color\" => \"natural walnut\",\n \"glaze\" => \"non-glare\",\n \"paper_type\" => \"matte\"\n },\n \"create_framed_image\" => true,\n \"framed_image_options\" => {\n \"image_size\" => 600 \n }\n }\n ]\n } \n }\n },\n \"postback_url\" => \"http://www.your-domain.com/webhook\"\n}\n\nbegin\n response = RestClient.post('https://www.levelframes.com/api/v1/combined', params.to_json, authorization: 'Token token=YOUR_API_KEY', content_type: :json, accept: :json)\n \n response = JSON.parse(response)\n \n if response['success'] == true\n #capture and save the level resource ids for later queries.\n level_artist_id = response['data']['combined']['artist']['id'] \n level_print_id = response['data']['combined']['artist']['print']['id'] \n \n #capture and save the returned print detail information. Example below just shows the prices and urls being captured from the response and saved to an array.\n print_details = [] \n \n response['data']['combined']['artist']['print']['print_sizes'].each do |print_size|\n \n print_details << { \n 'print_size_id' => print_size['id'], \n 'total_print_price' => print_size['prices']['total_print_price'],\n 'frame_price' => print_size['prices']['frame_price'],\n 'total_price' => print_size['prices']['total_price'],\n 'print_detail_url' => print_size['product_urls']['print_detail_url'], \n 'frame_editor_url' => print_size['product_urls']['frame_editor_url'] \n }\n end\n end\nrescue RestClient::ExceptionWithResponse => err\n err.response\nend", "language": "ruby" } ] } [/block] **You now have the option of linking to either the Artist Page, the Print Detail Page, or the Frame Customization Page from your site.** All sales from any prints created by you will be associated with your account. Any request that requires image processing will be run in a background job and the results will be posted back to your server, if you include a postback_url in the request. The example above would have 2 separate webhooks sent out: 1. The results of your print image processing 2. The results and url of the framed image created from your print You can also get the results of these tasks by polling the individual endpoints (prints and print_sizes endpoints), but webhooks are the preferred method. [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X POST -d '{ \"combined\": { \"artist\": { \"name\": \"Pablo Picasso\", \"print\": { \"high_res_image_url\": \"http://i.imgur.com/rtcUAIJ.jpg\", \"name\": \"Washington Landscape\", \"print_sizes\": [{ \"width\": 15, \"height\": 8, \"price\": 24.99, \"default_options\": { \"golden_ratio\": true, \"frame_color\": \"natural walnut\", \"glaze\": \"non-glare\" }, \"create_framed_image\": true, \"framed_image_options\": { \"image_size\": \"600\" } }]}}}, \"postback_url\": \"http://www.your-domain.com/webhook\" }' https://www.levelframes.com/api/v1/combined", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\":200,\n \"message\":\"Individual webhook responses will be sent out for each image that requires processing (print image and your framed images associated with your print sizes).\",\n \"data\":{\n \"combined\":{\n \"artist\": {\n \"print\":{\n \"id\":\"IVMGKapB5WJ0vQ27vYFKxA\",\n \"name\":\"Washington Landscape\",\n \"image\":null,\n \"is_active\":true,\n \"description\":null,\n \"printing_in_house\":true,\n \"custom_id\":null,\n \"print_sizes\":[{\n \"id\":\"p6kzXPlmsywJ8Rt1ASepow\",\n \"width\":\"15.0\",\n \"height\":\"8.0\",\n \"is_active\":true,\n \"custom_id\":null,\n \"print_id\":\"IVMGKapB5WJ0vQ27vYFKxA\",\n \"default_options\":{\n \"frame_width\":0.75,\n \"mat_width\":1.5,\n \"frame_color\":\"Natural Walnut\",\n \"mat_color\":\"Off-White\",\n \"glaze\":\"Non-Glare\",\n \"paper_type\":\"glossy\"\n },\n \"prices\":{\n \"level_printing_price\":8.4,\n \"base_print_price\":24.99,\n \"total_print_price\":33.39,\n \"frame_price\":73.0,\n \"total_price\":106.39\n },\n \"product_urls\":{\n \"print_detail_url\":\"https://www.levelframes.com/prints/washington-landscape--6\",\n \"frame_editor_url\":\"https://www.levelframes.com/frames/new?level_id=9250\"\n }\n }]\n }\n }\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
{"_id":"55ad341d18eefd0d0071d6da","user":"558233c6b806360d00244671","version":"558233f75b7fa60d0068b469","__v":4,"link_url":"","project":"558233f75b7fa60d0068b466","slug":"create-framed-image-1","type":"basic","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":""},"body":"Post any image URL to the framed_images endpoint and it will create a framed version of this image with various frame options to choose from.\n\nRuby example:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"require 'rest-client'\\n\\nparams = { \\n  \\\"framed_image\\\" => {\\n    \\\"image_url\\\" => \\\"http://i.imgur.com/rtcUAIJ.jpg\\\",\\n    \\\"width\\\" => \\\"16.25\\\",\\n    \\\"height\\\" => \\\"11.125\\\",\\n    \\\"framed_image_options\\\" => {\\n      \\\"image_size\\\" => 500,\\n      \\\"golden_ratio\\\" => true,\\n      \\\"frame_color\\\" => \\\"black maple\\\",\\n      \\\"glaze\\\" => \\\"non-glare\\\"\\n    }\\n  },\\n  \\\"postback_url\\\" => \\\"http://your-domain.com/webhook\\\"\\n}\\n\\nbegin\\n  response = RestClient.post('https://www.levelframes.com/api/v1/framed_images', params.to_json, authorization: 'Token token=YOUR_API_KEY', content_type: :json, accept: :json)\\n\\n  response = JSON.parse(response)\\n\\n  if response['success'] == true\\n    framed_image_id = response['data']['framed_image']['id']\\n  end\\nrescue RestClient::ExceptionWithResponse => err\\n  err.response\\nend\",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]\nThe framed image URL will be posted to your \"postback_url\". Or you can query the framed_images endpoint by the id returned in the json response above. \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Accept: application/json\\\" -H \\\"Content-type: application/json\\\" -H \\\"Authorization: Token token=YOUR_API_KEY\\\" -X POST -d '{ \\\"framed_image\\\": { \\\"image_url\\\": \\\"http://i.imgur.com/rtcUAIJ.jpg\\\", \\\"width\\\": 16.25, \\\"height\\\": 11.125, \\\"framed_image_options\\\": { \\\"image_size\\\": 500, \\\"golden_ratio\\\": true, \\\"frame_color\\\": \\\"black maple\\\", \\\"glaze\\\": \\\"non-glare\\\" }}, \\\"postback_url\\\": \\\"https://your-domain.com/webhook\\\" }' https://levelframes.com/api/v1/framed_images\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{ \\n  \\\"success\\\" => true, \\n  \\\"status\\\" => 200,\\n  \\\"data\\\" => {\\n    \\\"framed_image\\\" => {\\n      \\\"id\\\" => \\\"nLk4wj16YuGz_aLv-YxJ8g\\\",\\n      \\\"image_size\\\" => 500,\\n      \\\"url\\\" => :null #the url won't be present until processed successfully\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Webhook Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{ \\n  \\\"success\\\": true, \\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n    \\\"framed_image\\\": {\\n      \\\"id\\\": \\\"nLk4wj16YuGz_aLv-YxJ8g\\\",\\n      \\\"url\\\" => \\\"https://levle.s3.amazonaws.com/frame_renderings/levle/nLk4wj16YuGz_aLv-YxJ8g.jpg\\\"\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","updates":[],"sync_unique":"","title":"Create Framed Image","githubsync":"","hidden":false,"order":2,"parentDoc":null,"category":"5582d9efb806360d0024485d","createdAt":"2015-07-20T17:47:09.157Z","excerpt":"Turn any image on the web into a framed image","link_external":false,"childrenPages":[]}

Create Framed Image

Turn any image on the web into a framed image

Post any image URL to the framed_images endpoint and it will create a framed version of this image with various frame options to choose from. Ruby example: [block:code] { "codes": [ { "code": "require 'rest-client'\n\nparams = { \n \"framed_image\" => {\n \"image_url\" => \"http://i.imgur.com/rtcUAIJ.jpg\",\n \"width\" => \"16.25\",\n \"height\" => \"11.125\",\n \"framed_image_options\" => {\n \"image_size\" => 500,\n \"golden_ratio\" => true,\n \"frame_color\" => \"black maple\",\n \"glaze\" => \"non-glare\"\n }\n },\n \"postback_url\" => \"http://your-domain.com/webhook\"\n}\n\nbegin\n response = RestClient.post('https://www.levelframes.com/api/v1/framed_images', params.to_json, authorization: 'Token token=YOUR_API_KEY', content_type: :json, accept: :json)\n\n response = JSON.parse(response)\n\n if response['success'] == true\n framed_image_id = response['data']['framed_image']['id']\n end\nrescue RestClient::ExceptionWithResponse => err\n err.response\nend", "language": "ruby" } ] } [/block] The framed image URL will be posted to your "postback_url". Or you can query the framed_images endpoint by the id returned in the json response above. [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X POST -d '{ \"framed_image\": { \"image_url\": \"http://i.imgur.com/rtcUAIJ.jpg\", \"width\": 16.25, \"height\": 11.125, \"framed_image_options\": { \"image_size\": 500, \"golden_ratio\": true, \"frame_color\": \"black maple\", \"glaze\": \"non-glare\" }}, \"postback_url\": \"https://your-domain.com/webhook\" }' https://levelframes.com/api/v1/framed_images", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\" => true, \n \"status\" => 200,\n \"data\" => {\n \"framed_image\" => {\n \"id\" => \"nLk4wj16YuGz_aLv-YxJ8g\",\n \"image_size\" => 500,\n \"url\" => :null #the url won't be present until processed successfully\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] [block:textarea] { "text": "Webhook Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\": true, \n \"status\": 200,\n \"data\": {\n \"framed_image\": {\n \"id\": \"nLk4wj16YuGz_aLv-YxJ8g\",\n \"url\" => \"https://levle.s3.amazonaws.com/frame_renderings/levle/nLk4wj16YuGz_aLv-YxJ8g.jpg\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
Post any image URL to the framed_images endpoint and it will create a framed version of this image with various frame options to choose from. Ruby example: [block:code] { "codes": [ { "code": "require 'rest-client'\n\nparams = { \n \"framed_image\" => {\n \"image_url\" => \"http://i.imgur.com/rtcUAIJ.jpg\",\n \"width\" => \"16.25\",\n \"height\" => \"11.125\",\n \"framed_image_options\" => {\n \"image_size\" => 500,\n \"golden_ratio\" => true,\n \"frame_color\" => \"black maple\",\n \"glaze\" => \"non-glare\"\n }\n },\n \"postback_url\" => \"http://your-domain.com/webhook\"\n}\n\nbegin\n response = RestClient.post('https://www.levelframes.com/api/v1/framed_images', params.to_json, authorization: 'Token token=YOUR_API_KEY', content_type: :json, accept: :json)\n\n response = JSON.parse(response)\n\n if response['success'] == true\n framed_image_id = response['data']['framed_image']['id']\n end\nrescue RestClient::ExceptionWithResponse => err\n err.response\nend", "language": "ruby" } ] } [/block] The framed image URL will be posted to your "postback_url". Or you can query the framed_images endpoint by the id returned in the json response above. [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X POST -d '{ \"framed_image\": { \"image_url\": \"http://i.imgur.com/rtcUAIJ.jpg\", \"width\": 16.25, \"height\": 11.125, \"framed_image_options\": { \"image_size\": 500, \"golden_ratio\": true, \"frame_color\": \"black maple\", \"glaze\": \"non-glare\" }}, \"postback_url\": \"https://your-domain.com/webhook\" }' https://levelframes.com/api/v1/framed_images", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\" => true, \n \"status\" => 200,\n \"data\" => {\n \"framed_image\" => {\n \"id\" => \"nLk4wj16YuGz_aLv-YxJ8g\",\n \"image_size\" => 500,\n \"url\" => :null #the url won't be present until processed successfully\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] [block:textarea] { "text": "Webhook Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\": true, \n \"status\": 200,\n \"data\": {\n \"framed_image\": {\n \"id\": \"nLk4wj16YuGz_aLv-YxJ8g\",\n \"url\" => \"https://levle.s3.amazonaws.com/frame_renderings/levle/nLk4wj16YuGz_aLv-YxJ8g.jpg\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
{"_id":"55955b3535f56717009430fc","category":"55955b0d35f56717009430fb","createdAt":"2015-07-02T15:39:33.106Z","githubsync":"","hidden":false,"link_external":false,"api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"body":"[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"id\",\n    \"0-1\": \"*string*\",\n    \"0-2\": \"The unique ID of the artist, created by Level.\",\n    \"1-0\": \"name\",\n    \"1-1\": \"*string*\",\n    \"2-0\": \"bio\",\n    \"2-1\": \"*string*\",\n    \"3-0\": \"personal_website\",\n    \"3-1\": \"*string*\",\n    \"4-0\": \"twitter_url\",\n    \"4-1\": \"*string*\",\n    \"5-0\": \"facebook_url\",\n    \"5-1\": \"*string*\",\n    \"6-0\": \"instagram_url\",\n    \"6-1\": \"*string*\",\n    \"7-0\": \"custom_id\",\n    \"7-1\": \"*string*\",\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"3-2\": \"Social urls can be presented on an auto-generated artist page. Example page: **https://www.levelframes.com/artists/exoplanet-travel-series**\",\n    \"7-2\": \"You can provide your own unique ID for this resource and retrieve the resource by this id in future requests.\",\n    \"8-0\": \"url\",\n    \"8-1\": \"*string*\",\n    \"8-2\": \"The returned artist page URL which you can link to from your site.\"\n  },\n  \"cols\": 3,\n  \"rows\": 9\n}\n[/block]","order":0,"slug":"the-artist-object","version":"558233f75b7fa60d0068b469","user":"558233c6b806360d00244671","project":"558233f75b7fa60d0068b466","sync_unique":"","type":"basic","parentDoc":null,"title":"The Artist Object","updates":[],"__v":9,"excerpt":"This object allows you to associate any piece of content with an artist or creator.","link_url":"","childrenPages":[]}

The Artist Object

This object allows you to associate any piece of content with an artist or creator.

[block:parameters] { "data": { "0-0": "id", "0-1": "*string*", "0-2": "The unique ID of the artist, created by Level.", "1-0": "name", "1-1": "*string*", "2-0": "bio", "2-1": "*string*", "3-0": "personal_website", "3-1": "*string*", "4-0": "twitter_url", "4-1": "*string*", "5-0": "facebook_url", "5-1": "*string*", "6-0": "instagram_url", "6-1": "*string*", "7-0": "custom_id", "7-1": "*string*", "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "3-2": "Social urls can be presented on an auto-generated artist page. Example page: **https://www.levelframes.com/artists/exoplanet-travel-series**", "7-2": "You can provide your own unique ID for this resource and retrieve the resource by this id in future requests.", "8-0": "url", "8-1": "*string*", "8-2": "The returned artist page URL which you can link to from your site." }, "cols": 3, "rows": 9 } [/block]
[block:parameters] { "data": { "0-0": "id", "0-1": "*string*", "0-2": "The unique ID of the artist, created by Level.", "1-0": "name", "1-1": "*string*", "2-0": "bio", "2-1": "*string*", "3-0": "personal_website", "3-1": "*string*", "4-0": "twitter_url", "4-1": "*string*", "5-0": "facebook_url", "5-1": "*string*", "6-0": "instagram_url", "6-1": "*string*", "7-0": "custom_id", "7-1": "*string*", "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "3-2": "Social urls can be presented on an auto-generated artist page. Example page: **https://www.levelframes.com/artists/exoplanet-travel-series**", "7-2": "You can provide your own unique ID for this resource and retrieve the resource by this id in future requests.", "8-0": "url", "8-1": "*string*", "8-2": "The returned artist page URL which you can link to from your site." }, "cols": 3, "rows": 9 } [/block]
{"_id":"5595657a3298ef1900f31e88","user":"558233c6b806360d00244671","__v":16,"createdAt":"2015-07-02T16:23:22.676Z","parentDoc":null,"type":"basic","editedParams":true,"excerpt":"Makes a new artist with the submitted attributes.","order":1,"updates":[],"editedParams2":true,"hidden":false,"link_url":"","project":"558233f75b7fa60d0068b466","githubsync":"","link_external":false,"slug":"create-artist","sync_unique":"","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":"","url":"/artists","auth":"required","params":[{"required":false,"desc":"optional","default":"","type":"string","name":"name","in":"body","_id":"5595f1c4a239010d00648c5e"},{"name":"Bio","in":"body","_id":"5595f206f44370190028895a","required":false,"desc":"optional","default":"","type":"string"},{"name":"personal_website","in":"body","_id":"5595f206f443701900288959","required":false,"desc":"optional","default":"","type":"string"}]},"body":"[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"https://www.levelframes.com/api/v1/artists\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Accept: application/json\\\" -H \\\"Content-type: application/json\\\" -H \\\"Authorization: Token token={YOUR_API_KEY}\\\" -X POST -d '{ \\\"artist\\\": { \\\"name\\\": \\\"John Doe\\\", \\\"bio\\\": \\\"A little about me\\\", \\\"personal_website\\\": \\\"http://www.johndoe.com\\\"}}' https://www.levelframes.com/api/v1/artists\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"success\\\":true,\\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n    \\\"artist\\\": {\\n      \\\"id\\\":\\\"oIFqGsbzkwlSKUUtW73zpQ\\\",\\n      \\\"name\\\":\\\"John Doe\\\",\\n      \\\"bio\\\":\\\"A little about me\\\",\\n      \\\"personal_website\\\":\\\"http://www.johndoe.com\\\",\\n      \\\"twitter_url\\\":null,\\n      \\\"facebook_url\\\":null,\\n      \\\"instagram_url\\\":null,\\n      \\\"custom_id\\\":null,\\n      \\\"url\\\": \\\"https://www.levelframes.com/artists/john-doe\\\"\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"name\",\n    \"0-1\": \"**required**\",\n    \"1-0\": \"bio\",\n    \"1-1\": \"*optional*\",\n    \"2-0\": \"personal_website\",\n    \"2-1\": \"*optional*\",\n    \"3-0\": \"twitter_url\",\n    \"3-1\": \"*optional*\",\n    \"4-0\": \"facebook_url\",\n    \"4-1\": \"*optional*\",\n    \"5-0\": \"instagram_url\",\n    \"5-1\": \"*optional*\",\n    \"6-0\": \"custom_id\",\n    \"6-1\": \"*optional*\",\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\"\n  },\n  \"cols\": 2,\n  \"rows\": 7\n}\n[/block]\nRuby example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"require 'rest-client'\\n\\nparams = { \\\"artist\\\" => { \\\"name\\\" => \\\"John Doe\\\", \\\"bio\\\" => \\\"A little about me.\\\", \\\"personal_website\\\" => \\\"http://www.johndoe.com\\\" } }\\n\\nbegin\\n  response = RestClient.post('https://www.levelframes.com/api/v1/artists', params.to_json, authorization: 'Token token=YOUR_API_KEY', content_type: :json, accept: :json)\\n  \\n  response = JSON.parse(response)\\n  \\n  if response['success'] == true\\n    #capture and save the level artist id\\n    level_artist_id = response['data']['artist']['id']\\n    #...\\n  end\\nrescue RestClient::ExceptionWithResponse => err\\n\\terr.response\\nend\",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]","category":"55955b0d35f56717009430fb","title":"Create Artist","version":"558233f75b7fa60d0068b469","childrenPages":[]}

Create Artist

Makes a new artist with the submitted attributes.

[block:api-header] { "type": "post", "title": "https://www.levelframes.com/api/v1/artists" } [/block] [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token={YOUR_API_KEY}\" -X POST -d '{ \"artist\": { \"name\": \"John Doe\", \"bio\": \"A little about me\", \"personal_website\": \"http://www.johndoe.com\"}}' https://www.levelframes.com/api/v1/artists", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"artist\": {\n \"id\":\"oIFqGsbzkwlSKUUtW73zpQ\",\n \"name\":\"John Doe\",\n \"bio\":\"A little about me\",\n \"personal_website\":\"http://www.johndoe.com\",\n \"twitter_url\":null,\n \"facebook_url\":null,\n \"instagram_url\":null,\n \"custom_id\":null,\n \"url\": \"https://www.levelframes.com/artists/john-doe\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] [block:parameters] { "data": { "0-0": "name", "0-1": "**required**", "1-0": "bio", "1-1": "*optional*", "2-0": "personal_website", "2-1": "*optional*", "3-0": "twitter_url", "3-1": "*optional*", "4-0": "facebook_url", "4-1": "*optional*", "5-0": "instagram_url", "5-1": "*optional*", "6-0": "custom_id", "6-1": "*optional*", "h-0": "Argument", "h-1": "Required" }, "cols": 2, "rows": 7 } [/block] Ruby example [block:code] { "codes": [ { "code": "require 'rest-client'\n\nparams = { \"artist\" => { \"name\" => \"John Doe\", \"bio\" => \"A little about me.\", \"personal_website\" => \"http://www.johndoe.com\" } }\n\nbegin\n response = RestClient.post('https://www.levelframes.com/api/v1/artists', params.to_json, authorization: 'Token token=YOUR_API_KEY', content_type: :json, accept: :json)\n \n response = JSON.parse(response)\n \n if response['success'] == true\n #capture and save the level artist id\n level_artist_id = response['data']['artist']['id']\n #...\n end\nrescue RestClient::ExceptionWithResponse => err\n\terr.response\nend", "language": "ruby" } ] } [/block]
[block:api-header] { "type": "post", "title": "https://www.levelframes.com/api/v1/artists" } [/block] [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token={YOUR_API_KEY}\" -X POST -d '{ \"artist\": { \"name\": \"John Doe\", \"bio\": \"A little about me\", \"personal_website\": \"http://www.johndoe.com\"}}' https://www.levelframes.com/api/v1/artists", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"artist\": {\n \"id\":\"oIFqGsbzkwlSKUUtW73zpQ\",\n \"name\":\"John Doe\",\n \"bio\":\"A little about me\",\n \"personal_website\":\"http://www.johndoe.com\",\n \"twitter_url\":null,\n \"facebook_url\":null,\n \"instagram_url\":null,\n \"custom_id\":null,\n \"url\": \"https://www.levelframes.com/artists/john-doe\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] [block:parameters] { "data": { "0-0": "name", "0-1": "**required**", "1-0": "bio", "1-1": "*optional*", "2-0": "personal_website", "2-1": "*optional*", "3-0": "twitter_url", "3-1": "*optional*", "4-0": "facebook_url", "4-1": "*optional*", "5-0": "instagram_url", "5-1": "*optional*", "6-0": "custom_id", "6-1": "*optional*", "h-0": "Argument", "h-1": "Required" }, "cols": 2, "rows": 7 } [/block] Ruby example [block:code] { "codes": [ { "code": "require 'rest-client'\n\nparams = { \"artist\" => { \"name\" => \"John Doe\", \"bio\" => \"A little about me.\", \"personal_website\" => \"http://www.johndoe.com\" } }\n\nbegin\n response = RestClient.post('https://www.levelframes.com/api/v1/artists', params.to_json, authorization: 'Token token=YOUR_API_KEY', content_type: :json, accept: :json)\n \n response = JSON.parse(response)\n \n if response['success'] == true\n #capture and save the level artist id\n level_artist_id = response['data']['artist']['id']\n #...\n end\nrescue RestClient::ExceptionWithResponse => err\n\terr.response\nend", "language": "ruby" } ] } [/block]
{"_id":"559571df00d52a2300788652","title":"Retrieve Artist","category":"55955b0d35f56717009430fb","excerpt":"Fetch by the artist id that was returned when you created the artist.","order":2,"parentDoc":null,"slug":"retrieve-artist","sync_unique":"","__v":5,"link_external":false,"project":"558233f75b7fa60d0068b466","updates":[],"version":"558233f75b7fa60d0068b469","createdAt":"2015-07-02T17:16:15.607Z","githubsync":"","type":"basic","user":"558233c6b806360d00244671","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"body":"[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"https://www.levelframes.com/api/v1/artists/{id}\"\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Authorization: Token token=YOUR_API_KEY\\\" https://www.levelframes.com/api/v1/artists/{id}\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\nResponse\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"success\\\":true,\\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n    \\\"artist\\\": {\\n      \\\"id\\\":\\\"oIFqGsbzkwlSKUUtW73zpQ\\\",\\n      \\\"name\\\":\\\"John Doe\\\",\\n      \\\"bio\\\":\\\"A little about me\\\",\\n      \\\"personal_website\\\":\\\"http://www.johndoe.com\\\",\\n      \\\"twitter_url\\\":null,\\n      \\\"facebook_url\\\":null,\\n      \\\"instagram_url\\\":null,\\n      \\\"custom_id\\\":null,\\n      \\\"url\\\": \\\"https://www.levelframes.com/artists/john-doe\\\"\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"id\",\n    \"0-1\": \"**required**\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]","hidden":false,"link_url":"","childrenPages":[]}

Retrieve Artist

Fetch by the artist id that was returned when you created the artist.

[block:api-header] { "type": "get", "title": "https://www.levelframes.com/api/v1/artists/{id}" } [/block] [block:textarea] { "text": "", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/artists/{id}", "language": "curl" } ], "sidebar": true } [/block] Response [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"artist\": {\n \"id\":\"oIFqGsbzkwlSKUUtW73zpQ\",\n \"name\":\"John Doe\",\n \"bio\":\"A little about me\",\n \"personal_website\":\"http://www.johndoe.com\",\n \"twitter_url\":null,\n \"facebook_url\":null,\n \"instagram_url\":null,\n \"custom_id\":null,\n \"url\": \"https://www.levelframes.com/artists/john-doe\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block]
[block:api-header] { "type": "get", "title": "https://www.levelframes.com/api/v1/artists/{id}" } [/block] [block:textarea] { "text": "", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/artists/{id}", "language": "curl" } ], "sidebar": true } [/block] Response [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"artist\": {\n \"id\":\"oIFqGsbzkwlSKUUtW73zpQ\",\n \"name\":\"John Doe\",\n \"bio\":\"A little about me\",\n \"personal_website\":\"http://www.johndoe.com\",\n \"twitter_url\":null,\n \"facebook_url\":null,\n \"instagram_url\":null,\n \"custom_id\":null,\n \"url\": \"https://www.levelframes.com/artists/john-doe\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block]
{"_id":"559574db00d52a230078865c","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"","auth":"required","params":[]},"title":"Update Artist","category":"55955b0d35f56717009430fb","sync_unique":"","order":3,"project":"558233f75b7fa60d0068b466","slug":"update-artist","type":"basic","__v":4,"createdAt":"2015-07-02T17:28:59.016Z","link_external":false,"link_url":"","user":"558233c6b806360d00244671","version":"558233f75b7fa60d0068b469","hidden":false,"parentDoc":null,"updates":[],"body":"[block:api-header]\n{\n  \"type\": \"put\",\n  \"title\": \"https://www.levelframes.com/api/v1/artists/{id}\"\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Accept: application/json\\\" -H \\\"Content-type: application/json\\\" -H \\\"Authorization: Token token=YOUR_API_KEY\\\" -X PUT -d '{ \\\"artist\\\": { \\\"name\\\": \\\"John Doe the Second\\\"}}' https://www.levelframes.com/api/v1/artists/{id}\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"success\\\":true,\\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n    \\\"artist\\\": {\\n      \\\"id\\\":\\\"oIFqGsbzkwlSKUUtW73zpQ\\\",\\n      \\\"name\\\":\\\"John Doe the Second\\\",\\n      \\\"bio\\\":\\\"A little about me\\\",\\n      \\\"personal_website\\\":\\\"http://www.johndoe.com\\\",\\n      \\\"twitter_url\\\":null,\\n      \\\"facebook_url\\\":null,\\n      \\\"instagram_url\\\":null,\\n      \\\"custom_id\\\":null,\\n      \\\"url\\\": \\\"https://www.levelframes.com/artists/john-doe-the-second\\\"\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"id\",\n    \"0-1\": \"**required**\",\n    \"1-0\": \"name\",\n    \"1-1\": \"*optional*\",\n    \"2-0\": \"bio\",\n    \"3-0\": \"personal_website\",\n    \"4-0\": \"twitter_url\",\n    \"5-0\": \"facebook_url\",\n    \"6-0\": \"instagram_url\",\n    \"7-0\": \"custom_id\",\n    \"2-1\": \"*optional*\",\n    \"3-1\": \"*optional*\",\n    \"4-1\": \"*optional*\",\n    \"5-1\": \"*optional*\",\n    \"6-1\": \"*optional*\",\n    \"7-1\": \"*optional*\"\n  },\n  \"cols\": 2,\n  \"rows\": 8\n}\n[/block]","excerpt":"Change the artist attributes.","githubsync":"","childrenPages":[]}

Update Artist

Change the artist attributes.

[block:api-header] { "type": "put", "title": "https://www.levelframes.com/api/v1/artists/{id}" } [/block] [block:textarea] { "text": "", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X PUT -d '{ \"artist\": { \"name\": \"John Doe the Second\"}}' https://www.levelframes.com/api/v1/artists/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"artist\": {\n \"id\":\"oIFqGsbzkwlSKUUtW73zpQ\",\n \"name\":\"John Doe the Second\",\n \"bio\":\"A little about me\",\n \"personal_website\":\"http://www.johndoe.com\",\n \"twitter_url\":null,\n \"facebook_url\":null,\n \"instagram_url\":null,\n \"custom_id\":null,\n \"url\": \"https://www.levelframes.com/artists/john-doe-the-second\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**", "1-0": "name", "1-1": "*optional*", "2-0": "bio", "3-0": "personal_website", "4-0": "twitter_url", "5-0": "facebook_url", "6-0": "instagram_url", "7-0": "custom_id", "2-1": "*optional*", "3-1": "*optional*", "4-1": "*optional*", "5-1": "*optional*", "6-1": "*optional*", "7-1": "*optional*" }, "cols": 2, "rows": 8 } [/block]
[block:api-header] { "type": "put", "title": "https://www.levelframes.com/api/v1/artists/{id}" } [/block] [block:textarea] { "text": "", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X PUT -d '{ \"artist\": { \"name\": \"John Doe the Second\"}}' https://www.levelframes.com/api/v1/artists/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"artist\": {\n \"id\":\"oIFqGsbzkwlSKUUtW73zpQ\",\n \"name\":\"John Doe the Second\",\n \"bio\":\"A little about me\",\n \"personal_website\":\"http://www.johndoe.com\",\n \"twitter_url\":null,\n \"facebook_url\":null,\n \"instagram_url\":null,\n \"custom_id\":null,\n \"url\": \"https://www.levelframes.com/artists/john-doe-the-second\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**", "1-0": "name", "1-1": "*optional*", "2-0": "bio", "3-0": "personal_website", "4-0": "twitter_url", "5-0": "facebook_url", "6-0": "instagram_url", "7-0": "custom_id", "2-1": "*optional*", "3-1": "*optional*", "4-1": "*optional*", "5-1": "*optional*", "6-1": "*optional*", "7-1": "*optional*" }, "cols": 2, "rows": 8 } [/block]
{"_id":"5595766900d52a230078865f","body":"[block:api-header]\n{\n  \"type\": \"delete\",\n  \"title\": \"https://www.levelframes.com/api/v1/artists/{id}\"\n}\n[/block]\nThe response will return all of the object attributes that were just deleted.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Authorization: Token token=YOUR_API_KEY\\\" -X DELETE https://www.levelframes.com/api/v1/artists/{id}\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"success\\\":true,\\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n    \\\"artist\\\": {\\n      \\\"id\\\":\\\"oIFqGsbzkwlSKUUtW73zpQ\\\",\\n      \\\"name\\\":\\\"John Doe the Second\\\",\\n      \\\"bio\\\":\\\"A little about me\\\",\\n      \\\"personal_website\\\":\\\"http://www.johndoe.com\\\",\\n      \\\"twitter_url\\\":null,\\n      \\\"facebook_url\\\":null,\\n      \\\"instagram_url\\\":null,\\n      \\\"custom_id\\\":null,\\n      \\\"url\\\": \\\"https://www.levelframes.com/artists/john-doe-the-second\\\"\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"id\",\n    \"0-1\": \"**required**\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]","createdAt":"2015-07-02T17:35:37.720Z","order":4,"parentDoc":null,"__v":2,"project":"558233f75b7fa60d0068b466","sync_unique":"","title":"Delete Artist","version":"558233f75b7fa60d0068b469","updates":[],"user":"558233c6b806360d00244671","category":"55955b0d35f56717009430fb","hidden":false,"link_external":false,"slug":"delete-artist","api":{"params":[],"results":{"codes":[{"code":"{}","name":"","status":200,"language":"json"},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":"","url":"","auth":"required"},"excerpt":"This action permanently deletes the artist.","githubsync":"","link_url":"","type":"basic","childrenPages":[]}

Delete Artist

This action permanently deletes the artist.

[block:api-header] { "type": "delete", "title": "https://www.levelframes.com/api/v1/artists/{id}" } [/block] The response will return all of the object attributes that were just deleted. [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" -X DELETE https://www.levelframes.com/api/v1/artists/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"artist\": {\n \"id\":\"oIFqGsbzkwlSKUUtW73zpQ\",\n \"name\":\"John Doe the Second\",\n \"bio\":\"A little about me\",\n \"personal_website\":\"http://www.johndoe.com\",\n \"twitter_url\":null,\n \"facebook_url\":null,\n \"instagram_url\":null,\n \"custom_id\":null,\n \"url\": \"https://www.levelframes.com/artists/john-doe-the-second\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block]
[block:api-header] { "type": "delete", "title": "https://www.levelframes.com/api/v1/artists/{id}" } [/block] The response will return all of the object attributes that were just deleted. [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" -X DELETE https://www.levelframes.com/api/v1/artists/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"artist\": {\n \"id\":\"oIFqGsbzkwlSKUUtW73zpQ\",\n \"name\":\"John Doe the Second\",\n \"bio\":\"A little about me\",\n \"personal_website\":\"http://www.johndoe.com\",\n \"twitter_url\":null,\n \"facebook_url\":null,\n \"instagram_url\":null,\n \"custom_id\":null,\n \"url\": \"https://www.levelframes.com/artists/john-doe-the-second\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block]
{"_id":"558244196f8ec90d00cf1adc","excerpt":"Returns all artists associated with your account. The artists are returned by creation date, with the most recent artist first.","hidden":false,"sync_unique":"","body":"[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"https://www.levelframes.com/api/v1/artists\"\n}\n[/block]\nRuby example:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"require 'rest-client'\\n\\nbegin\\n\\tresponse = RestClient.get('https://www.levelframes.com/api/v1/artists', authorization: 'Token token=YOUR_API_KEY')\\n  response = JSON.parse(response)\\n  #do something with the returned data...\\nrescue RestClient::ExceptionWithResponse => err\\n\\terr.response\\nend\",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Authorization: Token token=YOUR_API_KEY\\\" https//www.levelframes.com/api/v1/artists\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"success\\\":true,\\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n    \\\"artists\\\": [\\n      {\\n        \\\"id\\\":\\\"oIFqGsbzkwlSKUUtW73zpQ\\\",\\n        \\\"name\\\":\\\"John Doe\\\",\\n        \\\"bio\\\":\\\"A little about me.\\\",\\n        \\\"personal_website\\\":\\\"http://www.johndoe.com\\\",\\n        \\\"twitter_url\\\":null,\\n        \\\"facebook_url\\\":null,\\n        \\\"instagram_url\\\":null,\\n        \\\"custom_id\\\":\\\"23243432\\\",\\n        \\\"url\\\": \\\"https://www.levelframes.com/artists/john-doe\\\"\\n      }\\n    ],\\n    \\\"count\\\": 1\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"JSON Response\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","githubsync":"","parentDoc":null,"project":"558233f75b7fa60d0068b466","title":"List All Artists","createdAt":"2015-06-18T04:07:53.608Z","link_external":false,"type":"basic","updates":[],"__v":19,"api":{"params":[],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{}"},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"","auth":"required"},"category":"55955b0d35f56717009430fb","link_url":"","order":5,"slug":"artists","user":"558233c6b806360d00244671","version":"558233f75b7fa60d0068b469","childrenPages":[]}

List All Artists

Returns all artists associated with your account. The artists are returned by creation date, with the most recent artist first.

[block:api-header] { "type": "get", "title": "https://www.levelframes.com/api/v1/artists" } [/block] Ruby example: [block:code] { "codes": [ { "code": "require 'rest-client'\n\nbegin\n\tresponse = RestClient.get('https://www.levelframes.com/api/v1/artists', authorization: 'Token token=YOUR_API_KEY')\n response = JSON.parse(response)\n #do something with the returned data...\nrescue RestClient::ExceptionWithResponse => err\n\terr.response\nend", "language": "ruby" } ] } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https//www.levelframes.com/api/v1/artists", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"artists\": [\n {\n \"id\":\"oIFqGsbzkwlSKUUtW73zpQ\",\n \"name\":\"John Doe\",\n \"bio\":\"A little about me.\",\n \"personal_website\":\"http://www.johndoe.com\",\n \"twitter_url\":null,\n \"facebook_url\":null,\n \"instagram_url\":null,\n \"custom_id\":\"23243432\",\n \"url\": \"https://www.levelframes.com/artists/john-doe\"\n }\n ],\n \"count\": 1\n }\n}", "language": "json", "name": "JSON Response" } ], "sidebar": true } [/block]
[block:api-header] { "type": "get", "title": "https://www.levelframes.com/api/v1/artists" } [/block] Ruby example: [block:code] { "codes": [ { "code": "require 'rest-client'\n\nbegin\n\tresponse = RestClient.get('https://www.levelframes.com/api/v1/artists', authorization: 'Token token=YOUR_API_KEY')\n response = JSON.parse(response)\n #do something with the returned data...\nrescue RestClient::ExceptionWithResponse => err\n\terr.response\nend", "language": "ruby" } ] } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https//www.levelframes.com/api/v1/artists", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"artists\": [\n {\n \"id\":\"oIFqGsbzkwlSKUUtW73zpQ\",\n \"name\":\"John Doe\",\n \"bio\":\"A little about me.\",\n \"personal_website\":\"http://www.johndoe.com\",\n \"twitter_url\":null,\n \"facebook_url\":null,\n \"instagram_url\":null,\n \"custom_id\":\"23243432\",\n \"url\": \"https://www.levelframes.com/artists/john-doe\"\n }\n ],\n \"count\": 1\n }\n}", "language": "json", "name": "JSON Response" } ], "sidebar": true } [/block]
{"_id":"559577cc9b8d0a25005a7d0c","__v":4,"project":"558233f75b7fa60d0068b466","sync_unique":"","title":"The Print Object","updates":[],"githubsync":"","hidden":false,"link_url":"","order":0,"type":"basic","api":{"url":"","auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":""},"category":"559577ac00d52a2300788662","parentDoc":null,"slug":"the-print-object","version":"558233f75b7fa60d0068b469","body":"[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"id\",\n    \"0-1\": \"string\",\n    \"0-2\": \"The unique Level ID of this print\",\n    \"1-0\": \"name\",\n    \"1-1\": \"string\",\n    \"2-0\": \"high_res_image_url\",\n    \"2-1\": \"string\",\n    \"2-2\": \"The full URL of the print image. If we are printing this, it should be a decent resolution. This original print image will never be shown to customers. We make multiple image sizes from this original.\",\n    \"3-0\": \"is_active\",\n    \"3-1\": \"boolean\\n**Default: true**\",\n    \"3-2\": \"Makes the print cleared for sale.\",\n    \"4-0\": \"description\",\n    \"4-1\": \"text\",\n    \"4-2\": \"HTML tags accepted: p, em, b, a.\",\n    \"5-0\": \"printing_in_house\",\n    \"5-1\": \"boolean\\n**Default: true**\",\n    \"5-2\": \"Set to false if you are printing this item yourself and then shipping it to us to frame it.\",\n    \"6-0\": \"custom_id\",\n    \"6-1\": \"string\",\n    \"6-2\": \"You can set your own custom ID for this resource.\",\n    \"7-0\": \"image\",\n    \"7-1\": \"string\",\n    \"7-2\": \"The compressed and resized version of the print image (created from \\\"high_res_image_url). This is the one shown on the print detail page and the Frame Customization Page.\",\n    \"8-0\": \"url\",\n    \"8-1\": \"string\",\n    \"8-2\": \"The returned Print Detail Page URL which you can link to from your site.\",\n    \"9-0\": \"artist_id\",\n    \"9-1\": \"string\",\n    \"9-2\": \"Present if the print is attached to an artist.\"\n  },\n  \"cols\": 3,\n  \"rows\": 10\n}\n[/block]\nNote that a print doesn't need to be attached to an artist. If you prefer, you can just create a print and print sizes.","createdAt":"2015-07-02T17:41:32.720Z","excerpt":"","link_external":false,"user":"558233c6b806360d00244671","childrenPages":[]}

The Print Object


[block:parameters] { "data": { "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "0-0": "id", "0-1": "string", "0-2": "The unique Level ID of this print", "1-0": "name", "1-1": "string", "2-0": "high_res_image_url", "2-1": "string", "2-2": "The full URL of the print image. If we are printing this, it should be a decent resolution. This original print image will never be shown to customers. We make multiple image sizes from this original.", "3-0": "is_active", "3-1": "boolean\n**Default: true**", "3-2": "Makes the print cleared for sale.", "4-0": "description", "4-1": "text", "4-2": "HTML tags accepted: p, em, b, a.", "5-0": "printing_in_house", "5-1": "boolean\n**Default: true**", "5-2": "Set to false if you are printing this item yourself and then shipping it to us to frame it.", "6-0": "custom_id", "6-1": "string", "6-2": "You can set your own custom ID for this resource.", "7-0": "image", "7-1": "string", "7-2": "The compressed and resized version of the print image (created from \"high_res_image_url). This is the one shown on the print detail page and the Frame Customization Page.", "8-0": "url", "8-1": "string", "8-2": "The returned Print Detail Page URL which you can link to from your site.", "9-0": "artist_id", "9-1": "string", "9-2": "Present if the print is attached to an artist." }, "cols": 3, "rows": 10 } [/block] Note that a print doesn't need to be attached to an artist. If you prefer, you can just create a print and print sizes.
[block:parameters] { "data": { "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "0-0": "id", "0-1": "string", "0-2": "The unique Level ID of this print", "1-0": "name", "1-1": "string", "2-0": "high_res_image_url", "2-1": "string", "2-2": "The full URL of the print image. If we are printing this, it should be a decent resolution. This original print image will never be shown to customers. We make multiple image sizes from this original.", "3-0": "is_active", "3-1": "boolean\n**Default: true**", "3-2": "Makes the print cleared for sale.", "4-0": "description", "4-1": "text", "4-2": "HTML tags accepted: p, em, b, a.", "5-0": "printing_in_house", "5-1": "boolean\n**Default: true**", "5-2": "Set to false if you are printing this item yourself and then shipping it to us to frame it.", "6-0": "custom_id", "6-1": "string", "6-2": "You can set your own custom ID for this resource.", "7-0": "image", "7-1": "string", "7-2": "The compressed and resized version of the print image (created from \"high_res_image_url). This is the one shown on the print detail page and the Frame Customization Page.", "8-0": "url", "8-1": "string", "8-2": "The returned Print Detail Page URL which you can link to from your site.", "9-0": "artist_id", "9-1": "string", "9-2": "Present if the print is attached to an artist." }, "cols": 3, "rows": 10 } [/block] Note that a print doesn't need to be attached to an artist. If you prefer, you can just create a print and print sizes.
{"_id":"559577d95bf6bf0d00fb0cf8","order":1,"sync_unique":"","title":"Create Print","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":"","url":""},"body":"**There are two different API routes for creating a print**. Route #1 is for creating a print  attached to an artist. If you just want to create a print and not worry about making an artist first, use route #2.\n\n##Route #1:  Create a print attached to an artist\n[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"{level_api_url}/artists/{artist_id}/prints\"\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Route #1\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Accept: application/json\\\" -H \\\"Content-type: application/json\\\" -H \\\"Authorization: Token token=YOUR_API_KEY\\\" -X POST -d '{ \\\"print\\\": { \\\"name\\\": \\\"Norway\\\", \\\"description\\\": \\\"Edge of the rock\\\", \\\"high_res_image_url\\\": \\\"https://download.unsplash.com/photo-1429277096327-11ee3b761c93\\\", \\\"is_active\\\": true, \\\"printing_in_house\\\": true }, \\\"postback_url\\\": \\\"https://your-domain.com/webhook\\\" }' https://www.levelframes.com/api/v1/artists/{artist_id}/prints\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"success\\\":true,\\n  \\\"status\\\": 200,\\n  \\\"message\\\": \\\"Processing your image. A JSON response will be posted back to your postback_url once the processing is complete\\\",\\n  \\\"data\\\": {\\n    \\\"print\\\": {\\n      \\\"id\\\":\\\"323njjknj232jkb34\\\",\\n      \\\"name\\\":\\\"Norway\\\",\\n      \\\"image\\\":null, #image is currently processing\\n      \\\"is_active\\\":true,\\n      \\\"description\\\":\\\"Edge of the rock\\\",\\n      \\\"printing_in_house\\\":true,\\n      \\\"url\\\": \\\"https://www.levelframes.com/prints/norway\\\",\\n      \\\"custom_id\\\":null,\\n      \\\"artist_id\\\": \\\"{artist_id}\\\"\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\nAny API method that requires image processing will use webhooks to post the results back to your server if you provide a postback url. The argument \"postback_url\" should be submitted outside of the print object. The webhook response is displayed to the right.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"artist_id\",\n    \"0-1\": \"**required**\",\n    \"1-0\": \"high_res_image_url\",\n    \"1-1\": \"**required**\",\n    \"2-0\": \"name\",\n    \"2-1\": \"*optional*\",\n    \"3-0\": \"is_active\",\n    \"3-1\": \"*optional*\",\n    \"4-1\": \"*optional*\",\n    \"5-1\": \"*optional*\",\n    \"6-1\": \"*optional*\",\n    \"4-0\": \"description\",\n    \"5-0\": \"printing_in_house\",\n    \"6-0\": \"custom_id\",\n    \"7-0\": \"postback_url\",\n    \"7-1\": \"*optional*\"\n  },\n  \"cols\": 2,\n  \"rows\": 8\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Webhook Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{ \\n  \\\"success\\\": true, \\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n    \\\"print\\\": {\\n      \\\"id\\\": \\\"{print_id}\\\",\\n      \\\"name\\\": \\\"Norway\\\",\\n      \\\"description\\\": \\\"Edge of the rock\\\",\\n      \\\"image\\\": \\\"https://levle.s3.amazonaws.com/production/user_uploads/Qe5yfB1MoTpilc7UtrlMRw.jpg\\\", \\n      \\\"is_active\\\": true,\\n      \\\"printing_in_house\\\": true,\\n      \\\"url\\\" => \\\"https://www.levelframes.com/prints/norway\\\",\\n      \\\"custom_id\\\" => null,\\n      \\\"artist_id\\\" => \\\"{artist_id}\\\"\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n##Route #2:  Create a print not attached to an artist\n[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"{level_api_url}/prints\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"high_res_image_url\",\n    \"0-1\": \"**required**\",\n    \"1-0\": \"name\",\n    \"2-0\": \"is_active\",\n    \"3-0\": \"description\",\n    \"4-0\": \"printing_in_house\",\n    \"5-0\": \"custom_id\",\n    \"6-0\": \"postback_url\",\n    \"1-1\": \"*optional*\",\n    \"2-1\": \"*optional*\",\n    \"3-1\": \"*optional*\",\n    \"4-1\": \"*optional*\",\n    \"5-1\": \"*optional*\",\n    \"6-1\": \"*optional*\"\n  },\n  \"cols\": 2,\n  \"rows\": 7\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Route #2\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Accept: application/json\\\" -H \\\"Content-type: application/json\\\" -H \\\"Authorization: Token token=YOUR_API_KEY\\\" -X POST -d '{ \\\"print\\\": { \\\"name\\\": \\\"Norway\\\", \\\"description\\\": \\\"Edge of the rock\\\", \\\"high_res_image_url\\\": \\\"https://download.unsplash.com/photo-1429277096327-11ee3b761c93\\\", \\\"is_active\\\": true, \\\"printing_in_house\\\": true }, \\\"postback_url\\\": \\\"https://your-domain.com/webhook\\\" }' https://www.levelframes.com/api/v1/prints\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","createdAt":"2015-07-02T17:41:45.922Z","hidden":false,"updates":[],"__v":17,"githubsync":"","type":"basic","version":"558233f75b7fa60d0068b469","excerpt":"Creates a print and processes the print image.","link_external":false,"project":"558233f75b7fa60d0068b466","category":"559577ac00d52a2300788662","link_url":"","parentDoc":null,"slug":"create-print","user":"558233c6b806360d00244671","childrenPages":[]}

Create Print

Creates a print and processes the print image.

**There are two different API routes for creating a print**. Route #1 is for creating a print attached to an artist. If you just want to create a print and not worry about making an artist first, use route #2. ##Route #1: Create a print attached to an artist [block:api-header] { "type": "post", "title": "{level_api_url}/artists/{artist_id}/prints" } [/block] [block:textarea] { "text": "Route #1", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X POST -d '{ \"print\": { \"name\": \"Norway\", \"description\": \"Edge of the rock\", \"high_res_image_url\": \"https://download.unsplash.com/photo-1429277096327-11ee3b761c93\", \"is_active\": true, \"printing_in_house\": true }, \"postback_url\": \"https://your-domain.com/webhook\" }' https://www.levelframes.com/api/v1/artists/{artist_id}/prints", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"message\": \"Processing your image. A JSON response will be posted back to your postback_url once the processing is complete\",\n \"data\": {\n \"print\": {\n \"id\":\"323njjknj232jkb34\",\n \"name\":\"Norway\",\n \"image\":null, #image is currently processing\n \"is_active\":true,\n \"description\":\"Edge of the rock\",\n \"printing_in_house\":true,\n \"url\": \"https://www.levelframes.com/prints/norway\",\n \"custom_id\":null,\n \"artist_id\": \"{artist_id}\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] Any API method that requires image processing will use webhooks to post the results back to your server if you provide a postback url. The argument "postback_url" should be submitted outside of the print object. The webhook response is displayed to the right. [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "artist_id", "0-1": "**required**", "1-0": "high_res_image_url", "1-1": "**required**", "2-0": "name", "2-1": "*optional*", "3-0": "is_active", "3-1": "*optional*", "4-1": "*optional*", "5-1": "*optional*", "6-1": "*optional*", "4-0": "description", "5-0": "printing_in_house", "6-0": "custom_id", "7-0": "postback_url", "7-1": "*optional*" }, "cols": 2, "rows": 8 } [/block] [block:textarea] { "text": "Webhook Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\": true, \n \"status\": 200,\n \"data\": {\n \"print\": {\n \"id\": \"{print_id}\",\n \"name\": \"Norway\",\n \"description\": \"Edge of the rock\",\n \"image\": \"https://levle.s3.amazonaws.com/production/user_uploads/Qe5yfB1MoTpilc7UtrlMRw.jpg\", \n \"is_active\": true,\n \"printing_in_house\": true,\n \"url\" => \"https://www.levelframes.com/prints/norway\",\n \"custom_id\" => null,\n \"artist_id\" => \"{artist_id}\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] ##Route #2: Create a print not attached to an artist [block:api-header] { "type": "post", "title": "{level_api_url}/prints" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "high_res_image_url", "0-1": "**required**", "1-0": "name", "2-0": "is_active", "3-0": "description", "4-0": "printing_in_house", "5-0": "custom_id", "6-0": "postback_url", "1-1": "*optional*", "2-1": "*optional*", "3-1": "*optional*", "4-1": "*optional*", "5-1": "*optional*", "6-1": "*optional*" }, "cols": 2, "rows": 7 } [/block] [block:textarea] { "text": "Route #2", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X POST -d '{ \"print\": { \"name\": \"Norway\", \"description\": \"Edge of the rock\", \"high_res_image_url\": \"https://download.unsplash.com/photo-1429277096327-11ee3b761c93\", \"is_active\": true, \"printing_in_house\": true }, \"postback_url\": \"https://your-domain.com/webhook\" }' https://www.levelframes.com/api/v1/prints", "language": "curl" } ], "sidebar": true } [/block]
**There are two different API routes for creating a print**. Route #1 is for creating a print attached to an artist. If you just want to create a print and not worry about making an artist first, use route #2. ##Route #1: Create a print attached to an artist [block:api-header] { "type": "post", "title": "{level_api_url}/artists/{artist_id}/prints" } [/block] [block:textarea] { "text": "Route #1", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X POST -d '{ \"print\": { \"name\": \"Norway\", \"description\": \"Edge of the rock\", \"high_res_image_url\": \"https://download.unsplash.com/photo-1429277096327-11ee3b761c93\", \"is_active\": true, \"printing_in_house\": true }, \"postback_url\": \"https://your-domain.com/webhook\" }' https://www.levelframes.com/api/v1/artists/{artist_id}/prints", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"message\": \"Processing your image. A JSON response will be posted back to your postback_url once the processing is complete\",\n \"data\": {\n \"print\": {\n \"id\":\"323njjknj232jkb34\",\n \"name\":\"Norway\",\n \"image\":null, #image is currently processing\n \"is_active\":true,\n \"description\":\"Edge of the rock\",\n \"printing_in_house\":true,\n \"url\": \"https://www.levelframes.com/prints/norway\",\n \"custom_id\":null,\n \"artist_id\": \"{artist_id}\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] Any API method that requires image processing will use webhooks to post the results back to your server if you provide a postback url. The argument "postback_url" should be submitted outside of the print object. The webhook response is displayed to the right. [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "artist_id", "0-1": "**required**", "1-0": "high_res_image_url", "1-1": "**required**", "2-0": "name", "2-1": "*optional*", "3-0": "is_active", "3-1": "*optional*", "4-1": "*optional*", "5-1": "*optional*", "6-1": "*optional*", "4-0": "description", "5-0": "printing_in_house", "6-0": "custom_id", "7-0": "postback_url", "7-1": "*optional*" }, "cols": 2, "rows": 8 } [/block] [block:textarea] { "text": "Webhook Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\": true, \n \"status\": 200,\n \"data\": {\n \"print\": {\n \"id\": \"{print_id}\",\n \"name\": \"Norway\",\n \"description\": \"Edge of the rock\",\n \"image\": \"https://levle.s3.amazonaws.com/production/user_uploads/Qe5yfB1MoTpilc7UtrlMRw.jpg\", \n \"is_active\": true,\n \"printing_in_house\": true,\n \"url\" => \"https://www.levelframes.com/prints/norway\",\n \"custom_id\" => null,\n \"artist_id\" => \"{artist_id}\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] ##Route #2: Create a print not attached to an artist [block:api-header] { "type": "post", "title": "{level_api_url}/prints" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "high_res_image_url", "0-1": "**required**", "1-0": "name", "2-0": "is_active", "3-0": "description", "4-0": "printing_in_house", "5-0": "custom_id", "6-0": "postback_url", "1-1": "*optional*", "2-1": "*optional*", "3-1": "*optional*", "4-1": "*optional*", "5-1": "*optional*", "6-1": "*optional*" }, "cols": 2, "rows": 7 } [/block] [block:textarea] { "text": "Route #2", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X POST -d '{ \"print\": { \"name\": \"Norway\", \"description\": \"Edge of the rock\", \"high_res_image_url\": \"https://download.unsplash.com/photo-1429277096327-11ee3b761c93\", \"is_active\": true, \"printing_in_house\": true }, \"postback_url\": \"https://your-domain.com/webhook\" }' https://www.levelframes.com/api/v1/prints", "language": "curl" } ], "sidebar": true } [/block]
{"_id":"559577e45bf6bf0d00fb0cfa","api":{"settings":"","url":"","auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"code":"{}","name":"","status":400,"language":"json"}]}},"body":"[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"{level_api_url}/prints/{id}\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"id\",\n    \"0-1\": \"**required**\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Authorization: Token token=YOUR_API_KEY\\\" https://www.levelframes.com/api/v1/prints/{id}\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"success\\\":true,\\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n    \\\"print\\\": {\\n      \\\"id\\\":\\\"{id}\\\",\\n      \\\"name\\\":\\\"Norway\\\",\\n      \\\"image\\\": \\\"https://levle.s3.amazonaws.com/production/user_uploads/Qe5yfB1MoTpilc7UtrlMRw.jpg\\\",\\n      \\\"is_active\\\":true,\\n      \\\"description\\\":\\\"Edge of the rock\\\",\\n      \\\"printing_in_house\\\":true,\\n      \\\"url\\\": \\\"https://www.levelframes.com/prints/norway\\\",\\n      \\\"custom_id\\\":null,\\n      \\\"artist_id\\\": \\\"{artist_id}\\\"\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","category":"559577ac00d52a2300788662","order":2,"user":"558233c6b806360d00244671","excerpt":"Fetch the information related to a specific print.","parentDoc":null,"sync_unique":"","updates":[],"__v":2,"link_url":"","type":"basic","hidden":false,"githubsync":"","link_external":false,"project":"558233f75b7fa60d0068b466","slug":"retrieve-print","title":"Retrieve Print","version":"558233f75b7fa60d0068b469","createdAt":"2015-07-02T17:41:56.551Z","childrenPages":[]}

Retrieve Print

Fetch the information related to a specific print.

[block:api-header] { "type": "get", "title": "{level_api_url}/prints/{id}" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/prints/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"print\": {\n \"id\":\"{id}\",\n \"name\":\"Norway\",\n \"image\": \"https://levle.s3.amazonaws.com/production/user_uploads/Qe5yfB1MoTpilc7UtrlMRw.jpg\",\n \"is_active\":true,\n \"description\":\"Edge of the rock\",\n \"printing_in_house\":true,\n \"url\": \"https://www.levelframes.com/prints/norway\",\n \"custom_id\":null,\n \"artist_id\": \"{artist_id}\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
[block:api-header] { "type": "get", "title": "{level_api_url}/prints/{id}" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/prints/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"print\": {\n \"id\":\"{id}\",\n \"name\":\"Norway\",\n \"image\": \"https://levle.s3.amazonaws.com/production/user_uploads/Qe5yfB1MoTpilc7UtrlMRw.jpg\",\n \"is_active\":true,\n \"description\":\"Edge of the rock\",\n \"printing_in_house\":true,\n \"url\": \"https://www.levelframes.com/prints/norway\",\n \"custom_id\":null,\n \"artist_id\": \"{artist_id}\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
{"_id":"559577ef5bf6bf0d00fb0cfc","link_url":"","title":"Update Print","updates":[],"api":{"auth":"required","params":[],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{}"},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":""},"category":"559577ac00d52a2300788662","createdAt":"2015-07-02T17:42:07.741Z","githubsync":"","parentDoc":null,"version":"558233f75b7fa60d0068b469","__v":8,"excerpt":"Update the attributes related to a specific print.","hidden":false,"link_external":false,"order":3,"body":"[block:api-header]\n{\n  \"type\": \"put\",\n  \"title\": \"{level_api_url}/prints/{id}\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"id\",\n    \"0-1\": \"**required**\",\n    \"1-0\": \"high_res_image_url\",\n    \"1-1\": \"*optional*\",\n    \"2-0\": \"name\",\n    \"3-0\": \"is_active\",\n    \"4-0\": \"description\",\n    \"5-0\": \"printing_in_house\",\n    \"6-0\": \"custom_id\",\n    \"7-0\": \"postback_url\",\n    \"2-1\": \"*optional*\",\n    \"3-1\": \"*optional*\",\n    \"4-1\": \"*optional*\",\n    \"5-1\": \"*optional*\",\n    \"6-1\": \"*optional*\",\n    \"7-1\": \"*optional*\"\n  },\n  \"cols\": 2,\n  \"rows\": 8\n}\n[/block]\n**Note:** Only submit the argument \"high_res_image_url\" if you want to change the image associated with this print. If that argument is present, the image will be processed again and the results will be posted to your webhook.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Accept: application/json\\\" -H \\\"Content-type: application/json\\\" -H \\\"Authorization: Token token=YOUR_API_KEY\\\" -X PUT -d '{ \\\"print\\\": { \\\"name\\\": \\\"Landscape\\\", \\\"description\\\": \\\"Edge of the rock\\\" } }' https://www.levelframes.com/api/v1/prints/{id}\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"success\\\":true,\\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n    \\\"print\\\": {\\n      \\\"id\\\":\\\"{id}\\\",\\n      \\\"name\\\":\\\"Landscape\\\",\\n      \\\"image\\\":\\\"https://levle.s3.amazonaws.com/production/user_uploads/Qe5yfB1MoTpilc7UtrlMRw.jpg\\\",\\n      \\\"is_active\\\":true,\\n      \\\"description\\\":\\\"Edge of the rock\\\",\\n      \\\"printing_in_house\\\":true,\\n      \\\"url\\\": \\\"https://www.levelframes.com/prints/landscape\\\",\\n      \\\"custom_id\\\":null,\\n      \\\"artist_id\\\": \\\"{artist_id}\\\"\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","slug":"update-print","project":"558233f75b7fa60d0068b466","sync_unique":"","type":"basic","user":"558233c6b806360d00244671","childrenPages":[]}

Update Print

Update the attributes related to a specific print.

[block:api-header] { "type": "put", "title": "{level_api_url}/prints/{id}" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**", "1-0": "high_res_image_url", "1-1": "*optional*", "2-0": "name", "3-0": "is_active", "4-0": "description", "5-0": "printing_in_house", "6-0": "custom_id", "7-0": "postback_url", "2-1": "*optional*", "3-1": "*optional*", "4-1": "*optional*", "5-1": "*optional*", "6-1": "*optional*", "7-1": "*optional*" }, "cols": 2, "rows": 8 } [/block] **Note:** Only submit the argument "high_res_image_url" if you want to change the image associated with this print. If that argument is present, the image will be processed again and the results will be posted to your webhook. [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X PUT -d '{ \"print\": { \"name\": \"Landscape\", \"description\": \"Edge of the rock\" } }' https://www.levelframes.com/api/v1/prints/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"print\": {\n \"id\":\"{id}\",\n \"name\":\"Landscape\",\n \"image\":\"https://levle.s3.amazonaws.com/production/user_uploads/Qe5yfB1MoTpilc7UtrlMRw.jpg\",\n \"is_active\":true,\n \"description\":\"Edge of the rock\",\n \"printing_in_house\":true,\n \"url\": \"https://www.levelframes.com/prints/landscape\",\n \"custom_id\":null,\n \"artist_id\": \"{artist_id}\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
[block:api-header] { "type": "put", "title": "{level_api_url}/prints/{id}" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**", "1-0": "high_res_image_url", "1-1": "*optional*", "2-0": "name", "3-0": "is_active", "4-0": "description", "5-0": "printing_in_house", "6-0": "custom_id", "7-0": "postback_url", "2-1": "*optional*", "3-1": "*optional*", "4-1": "*optional*", "5-1": "*optional*", "6-1": "*optional*", "7-1": "*optional*" }, "cols": 2, "rows": 8 } [/block] **Note:** Only submit the argument "high_res_image_url" if you want to change the image associated with this print. If that argument is present, the image will be processed again and the results will be posted to your webhook. [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X PUT -d '{ \"print\": { \"name\": \"Landscape\", \"description\": \"Edge of the rock\" } }' https://www.levelframes.com/api/v1/prints/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"print\": {\n \"id\":\"{id}\",\n \"name\":\"Landscape\",\n \"image\":\"https://levle.s3.amazonaws.com/production/user_uploads/Qe5yfB1MoTpilc7UtrlMRw.jpg\",\n \"is_active\":true,\n \"description\":\"Edge of the rock\",\n \"printing_in_house\":true,\n \"url\": \"https://www.levelframes.com/prints/landscape\",\n \"custom_id\":null,\n \"artist_id\": \"{artist_id}\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
{"_id":"5595780100d52a2300788664","__v":3,"createdAt":"2015-07-02T17:42:25.256Z","link_external":false,"project":"558233f75b7fa60d0068b466","title":"Delete Print","user":"558233c6b806360d00244671","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"","auth":"required","params":[]},"body":"[block:api-header]\n{\n  \"type\": \"delete\",\n  \"title\": \"{level_api_url}/prints/{id}\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"id\",\n    \"0-1\": \"**required**\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Authorization: Token token=YOUR_API_KEY\\\" -X DELETE https://www.levelframes.com/api/v1/prints/{id}\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"success\\\":true,\\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n    \\\"print\\\": {\\n      \\\"id\\\":\\\"{id}\\\",\\n      \\\"name\\\":\\\"Landscape\\\",\\n      \\\"image\\\":\\\"https://levle.s3.amazonaws.com/production/user_uploads/Qe5yfB1MoTpilc7UtrlMRw.jpg\\\",\\n      \\\"is_active\\\":true,\\n      \\\"description\\\":\\\"Edge of the rock\\\",\\n      \\\"printing_in_house\\\":true,\\n      \\\"url\\\": \\\"https://www.levelframes.com/prints/landscape\\\",\\n      \\\"custom_id\\\":null,\\n      \\\"artist_id\\\": \\\"{artist_id}\\\"\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"Permanently delete a print. Not reversible.","parentDoc":null,"slug":"delete-print","sync_unique":"","type":"basic","githubsync":"","updates":[],"category":"559577ac00d52a2300788662","hidden":false,"link_url":"","order":4,"version":"558233f75b7fa60d0068b469","childrenPages":[]}

Delete Print

Permanently delete a print. Not reversible.

[block:api-header] { "type": "delete", "title": "{level_api_url}/prints/{id}" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" -X DELETE https://www.levelframes.com/api/v1/prints/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"print\": {\n \"id\":\"{id}\",\n \"name\":\"Landscape\",\n \"image\":\"https://levle.s3.amazonaws.com/production/user_uploads/Qe5yfB1MoTpilc7UtrlMRw.jpg\",\n \"is_active\":true,\n \"description\":\"Edge of the rock\",\n \"printing_in_house\":true,\n \"url\": \"https://www.levelframes.com/prints/landscape\",\n \"custom_id\":null,\n \"artist_id\": \"{artist_id}\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
[block:api-header] { "type": "delete", "title": "{level_api_url}/prints/{id}" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" -X DELETE https://www.levelframes.com/api/v1/prints/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"print\": {\n \"id\":\"{id}\",\n \"name\":\"Landscape\",\n \"image\":\"https://levle.s3.amazonaws.com/production/user_uploads/Qe5yfB1MoTpilc7UtrlMRw.jpg\",\n \"is_active\":true,\n \"description\":\"Edge of the rock\",\n \"printing_in_house\":true,\n \"url\": \"https://www.levelframes.com/prints/landscape\",\n \"custom_id\":null,\n \"artist_id\": \"{artist_id}\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
{"_id":"559578105bf6bf0d00fb0cff","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":"","url":""},"createdAt":"2015-07-02T17:42:40.842Z","order":5,"user":"558233c6b806360d00244671","title":"List All Prints","body":"**There are two different routes for this method.** \n\n##Route #1: List all prints that belong to an artist\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"{level_api_url}/artists/{artist_id}/prints\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"artist_id\",\n    \"0-1\": \"**required**\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Route #1\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Authorization: Token token=YOUR_API_KEY\\\" https://www.levelframes.com/api/v1/artists/{artist_id}/prints\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{ \\n  \\\"success\\\": true, \\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n    \\\"prints\\\": [\\n      {\\n        \\\"id\\\": \\\"{print_id}\\\",\\n        \\\"name\\\": \\\"Norway\\\",\\n        \\\"description\\\": \\\"Edge of the rock\\\",\\n        \\\"image\\\": \\\"https://levle.s3.amazonaws.com/production/user_uploads/Qe5yfB1MoTpilc7UtrlMRw.jpg\\\", \\n        \\\"is_active\\\": true,\\n        \\\"printing_in_house\\\": true,\\n        \\\"url\\\" => \\\"https://www.levelframes.com/prints/norway\\\",\\n        \\\"custom_id\\\" => null,\\n        \\\"artist_id\\\" => \\\"{artist_id}\\\"\\n      }\\n    ],\\n    \\\"count\\\": 1\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n##Route #2: List all prints associated with your account\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"{level_api_url}/prints\"\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Route #2\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Authorization: Token token=YOUR_API_KEY\\\" https://www.levelframes.com/api/v1/prints\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\nNo required arguments for this method route.","category":"559577ac00d52a2300788662","hidden":false,"link_url":"","sync_unique":"","type":"basic","version":"558233f75b7fa60d0068b469","githubsync":"","link_external":false,"parentDoc":null,"project":"558233f75b7fa60d0068b466","updates":[],"__v":5,"excerpt":"Fetch all prints that belong to a specific artist or all prints that belong to your user account.","slug":"list-all-prints","childrenPages":[]}

List All Prints

Fetch all prints that belong to a specific artist or all prints that belong to your user account.

**There are two different routes for this method.** ##Route #1: List all prints that belong to an artist [block:api-header] { "type": "get", "title": "{level_api_url}/artists/{artist_id}/prints" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "artist_id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block] [block:textarea] { "text": "Route #1", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/artists/{artist_id}/prints", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\": true, \n \"status\": 200,\n \"data\": {\n \"prints\": [\n {\n \"id\": \"{print_id}\",\n \"name\": \"Norway\",\n \"description\": \"Edge of the rock\",\n \"image\": \"https://levle.s3.amazonaws.com/production/user_uploads/Qe5yfB1MoTpilc7UtrlMRw.jpg\", \n \"is_active\": true,\n \"printing_in_house\": true,\n \"url\" => \"https://www.levelframes.com/prints/norway\",\n \"custom_id\" => null,\n \"artist_id\" => \"{artist_id}\"\n }\n ],\n \"count\": 1\n }\n}", "language": "json" } ], "sidebar": true } [/block] ##Route #2: List all prints associated with your account [block:api-header] { "type": "get", "title": "{level_api_url}/prints" } [/block] [block:textarea] { "text": "Route #2", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/prints", "language": "curl" } ], "sidebar": true } [/block] No required arguments for this method route.
**There are two different routes for this method.** ##Route #1: List all prints that belong to an artist [block:api-header] { "type": "get", "title": "{level_api_url}/artists/{artist_id}/prints" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "artist_id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block] [block:textarea] { "text": "Route #1", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/artists/{artist_id}/prints", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\": true, \n \"status\": 200,\n \"data\": {\n \"prints\": [\n {\n \"id\": \"{print_id}\",\n \"name\": \"Norway\",\n \"description\": \"Edge of the rock\",\n \"image\": \"https://levle.s3.amazonaws.com/production/user_uploads/Qe5yfB1MoTpilc7UtrlMRw.jpg\", \n \"is_active\": true,\n \"printing_in_house\": true,\n \"url\" => \"https://www.levelframes.com/prints/norway\",\n \"custom_id\" => null,\n \"artist_id\" => \"{artist_id}\"\n }\n ],\n \"count\": 1\n }\n}", "language": "json" } ], "sidebar": true } [/block] ##Route #2: List all prints associated with your account [block:api-header] { "type": "get", "title": "{level_api_url}/prints" } [/block] [block:textarea] { "text": "Route #2", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/prints", "language": "curl" } ], "sidebar": true } [/block] No required arguments for this method route.
{"_id":"55958b3300d52a23007886ab","api":{"url":"","auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":""},"updates":[],"user":"558233c6b806360d00244671","excerpt":"","hidden":false,"order":0,"project":"558233f75b7fa60d0068b466","type":"basic","__v":12,"body":"[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"id\",\n    \"0-1\": \"string\",\n    \"0-2\": \"The unique Level ID of this print size\",\n    \"1-0\": \"width\",\n    \"1-1\": \"decimal\",\n    \"1-2\": \"The width of your print in inches\",\n    \"2-0\": \"height\",\n    \"2-1\": \"decimal\",\n    \"2-2\": \"The height of your print in inches\",\n    \"3-0\": \"is_active\",\n    \"3-1\": \"boolean\\n**default: true**\",\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"4-0\": \"price\",\n    \"4-1\": \"decimal\",\n    \"4-2\": \"Your price for this print + size. If Level is printing it (determined by setting \\\"printing_in_house\\\" = true in the print object) then the Level printing price will be ADDED to your price. You are indicating here the amount you will be paid for the print when sold.\",\n    \"5-0\": \"quantity\",\n    \"5-1\": \"integer\",\n    \"5-2\": \"if null then infinite will be available.\",\n    \"6-0\": \"default_options\",\n    \"6-1\": \"hash\",\n    \"6-2\": \"The artist recommended frame options for this print size.\\n\\nSee the table below for the attributes inside this object\",\n    \"7-0\": \"create_framed_image\",\n    \"7-1\": \"boolean\\n**default: false**\",\n    \"7-2\": \"if set to true then a framed image will be built from the print size dimensions and the default options. \\n\\nThe framed image will be posted to your webhook. (image is inherited from the print this print size belongs to)\",\n    \"8-0\": \"framed_image_options\",\n    \"8-1\": \"hash\",\n    \"8-2\": \"Builds your framed image thumbnail according to the options passed in.\\n\\nSee the table below for the attributes inside this hash.\",\n    \"10-0\": \"custom_id\",\n    \"10-1\": \"string\",\n    \"10-2\": \"If you want to assign your own custom ID to this print size\",\n    \"9-0\": \"framed_images\",\n    \"9-1\": \"array\",\n    \"9-2\": \"The URL, ID and sizes of the framed images attached to this print + size. \\n\\nSee table below for the attribute information.\",\n    \"11-0\": \"prices\",\n    \"11-1\": \"hash\",\n    \"11-2\": \"The returned, calculated printing and framing prices for the print + size.\",\n    \"12-0\": \"product_urls\",\n    \"12-1\": \"hash\",\n    \"12-2\": \"The returned Level URLs for the print detail page and frame editor page for this print + size.\"\n  },\n  \"cols\": 3,\n  \"rows\": 13\n}\n[/block]\n**Default Options** \nOptional child arguments you can pass into the \"default_options\" hash. These will be the artist recommended options shown to the user when they go to the frame editor page.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"golden_ratio\",\n    \"0-1\": \"boolean\\n**default: false**\",\n    \"0-2\": \"If set to true, your print size will automatically get a starting frame width and mat width assigned based on the proportionality of your print size. (in the frame editor)\",\n    \"1-0\": \"frame_width\",\n    \"1-1\": \"decimal\\n**default: 0.75\\\"**\",\n    \"1-2\": \"Artist recommended frame width for this print size. If set, it will override the frame_width set by the golden_ratio argument above.\",\n    \"2-0\": \"mat_width\",\n    \"2-1\": \"decimal\\n**default: 0**\",\n    \"2-2\": \"Artist recommended mat width for this print size. If set, it will override the mat width set by the \\\"golden_ratio\\\" argument above.\",\n    \"3-0\": \"frame_color\",\n    \"3-1\": \"string\\n**default: \\\"black maple\\\"**\",\n    \"3-2\": \"Artist recommended frame profile color\",\n    \"4-0\": \"mat_color\",\n    \"4-1\": \"string\\n**default: \\\"off-white\\\"**\",\n    \"4-2\": \"Artist recommended mat_color\",\n    \"5-0\": \"glaze\",\n    \"5-1\": \"string\\n**default: \\\"standard\\\"**\",\n    \"5-2\": \"Artist recommended glaze\",\n    \"6-0\": \"paper_type\",\n    \"6-1\": \"string\\n**default: \\\"glossy\\\"**\",\n    \"6-2\": \"The starting paper type\",\n    \"h-3\": \"Options\",\n    \"0-3\": \"true, false\",\n    \"1-3\": \"0.75, 1.25\",\n    \"2-3\": \"0, 1, 1.5, 2, 2.5, 3\",\n    \"4-3\": \"\\\"off-white\\\", \\\"black\\\"\",\n    \"3-3\": \"\\\"black maple\\\", \\\"white maple\\\", \\\"natural maple\\\", \\\"natural walnut\\\"\",\n    \"5-3\": \"\\\"standard\\\", \\\"uv protection\\\", \\\"non-glare\\\"\",\n    \"6-3\": \"\\\"glossy\\\", \\\"matte\\\"\"\n  },\n  \"cols\": 4,\n  \"rows\": 7\n}\n[/block]\n**Framed Image Options** \nOptional child arguments you can pass into the \"framed_image_options\" hash. \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"image_size\",\n    \"0-1\": \"integer\\n**default: 300**\",\n    \"0-2\": \"A framed version of your  image is built from an html/css rendering.\\n\\nThis image size integer is your desired image width or image height, in pixels. It will be optimized to the longer dimension of your print size. \\n(i.e. if your print size is 16\\\" x 20\\\", then the image created will be 300px tall)\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]\n**Framed Images** \nAn array of framed images attached to this print + size. (only present if you've created framed images)\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"id\",\n    \"0-1\": \"string\",\n    \"0-2\": \"The unique framed Image ID associated with this image\",\n    \"1-0\": \"size\",\n    \"1-1\": \"integer\",\n    \"1-2\": \"The size, in pixels, of the image.\",\n    \"2-0\": \"url\",\n    \"2-1\": \"string\",\n    \"2-2\": \"The full URL of the framed image. You can use this on your site to showcase the framed artwork.\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]\n**Prices** \nThe calculated total price of the framed print. This hash also shows the breakdown of costs, including the printing price and the frame price. \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"level_printing_price\",\n    \"0-1\": \"decimal\",\n    \"0-2\": \"The cost for Level to print this item.\",\n    \"1-0\": \"base_print_price\",\n    \"1-1\": \"decimal\",\n    \"1-2\": \"Your print price. Returned alias of \\\"price\\\" attribute above.\",\n    \"2-0\": \"total_print_price\",\n    \"2-1\": \"decimal\",\n    \"2-2\": \"If Level is printing your item, then this is level_printing_price + base_print_price. Otherwise, it is equal to your base_print_price.\",\n    \"3-0\": \"frame_price\",\n    \"3-1\": \"decimal\",\n    \"3-2\": \"The cost of the chosen frame  (frame options set in default_options hash)\",\n    \"4-0\": \"total_price\",\n    \"4-1\": \"decimal\",\n    \"4-2\": \"total_print_price + frame_price\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n**Product URLs** \nThe returned product URLs on Level which you can link to from your site or store. You can either link to the Print Detail Page or the Frame Customization Page.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"print_detail_url\",\n    \"0-1\": \"string\",\n    \"0-2\": \"Full URL to the Print Detail Page on level. You can link to this page from your site.\",\n    \"1-0\": \"frame_editor_url\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Full URL to the Frame Customization Page on Level. You can link to this page from your site and it will direct users into the frame editing process, skipping the Print Detail Page.\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]","version":"558233f75b7fa60d0068b469","link_url":"","slug":"the-print-size-object","category":"55958aca00d52a23007886a9","githubsync":"","link_external":false,"title":"The Print Size Object","createdAt":"2015-07-02T19:04:19.603Z","parentDoc":null,"sync_unique":"","childrenPages":[]}

The Print Size Object


[block:parameters] { "data": { "0-0": "id", "0-1": "string", "0-2": "The unique Level ID of this print size", "1-0": "width", "1-1": "decimal", "1-2": "The width of your print in inches", "2-0": "height", "2-1": "decimal", "2-2": "The height of your print in inches", "3-0": "is_active", "3-1": "boolean\n**default: true**", "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "4-0": "price", "4-1": "decimal", "4-2": "Your price for this print + size. If Level is printing it (determined by setting \"printing_in_house\" = true in the print object) then the Level printing price will be ADDED to your price. You are indicating here the amount you will be paid for the print when sold.", "5-0": "quantity", "5-1": "integer", "5-2": "if null then infinite will be available.", "6-0": "default_options", "6-1": "hash", "6-2": "The artist recommended frame options for this print size.\n\nSee the table below for the attributes inside this object", "7-0": "create_framed_image", "7-1": "boolean\n**default: false**", "7-2": "if set to true then a framed image will be built from the print size dimensions and the default options. \n\nThe framed image will be posted to your webhook. (image is inherited from the print this print size belongs to)", "8-0": "framed_image_options", "8-1": "hash", "8-2": "Builds your framed image thumbnail according to the options passed in.\n\nSee the table below for the attributes inside this hash.", "10-0": "custom_id", "10-1": "string", "10-2": "If you want to assign your own custom ID to this print size", "9-0": "framed_images", "9-1": "array", "9-2": "The URL, ID and sizes of the framed images attached to this print + size. \n\nSee table below for the attribute information.", "11-0": "prices", "11-1": "hash", "11-2": "The returned, calculated printing and framing prices for the print + size.", "12-0": "product_urls", "12-1": "hash", "12-2": "The returned Level URLs for the print detail page and frame editor page for this print + size." }, "cols": 3, "rows": 13 } [/block] **Default Options** Optional child arguments you can pass into the "default_options" hash. These will be the artist recommended options shown to the user when they go to the frame editor page. [block:parameters] { "data": { "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "0-0": "golden_ratio", "0-1": "boolean\n**default: false**", "0-2": "If set to true, your print size will automatically get a starting frame width and mat width assigned based on the proportionality of your print size. (in the frame editor)", "1-0": "frame_width", "1-1": "decimal\n**default: 0.75\"**", "1-2": "Artist recommended frame width for this print size. If set, it will override the frame_width set by the golden_ratio argument above.", "2-0": "mat_width", "2-1": "decimal\n**default: 0**", "2-2": "Artist recommended mat width for this print size. If set, it will override the mat width set by the \"golden_ratio\" argument above.", "3-0": "frame_color", "3-1": "string\n**default: \"black maple\"**", "3-2": "Artist recommended frame profile color", "4-0": "mat_color", "4-1": "string\n**default: \"off-white\"**", "4-2": "Artist recommended mat_color", "5-0": "glaze", "5-1": "string\n**default: \"standard\"**", "5-2": "Artist recommended glaze", "6-0": "paper_type", "6-1": "string\n**default: \"glossy\"**", "6-2": "The starting paper type", "h-3": "Options", "0-3": "true, false", "1-3": "0.75, 1.25", "2-3": "0, 1, 1.5, 2, 2.5, 3", "4-3": "\"off-white\", \"black\"", "3-3": "\"black maple\", \"white maple\", \"natural maple\", \"natural walnut\"", "5-3": "\"standard\", \"uv protection\", \"non-glare\"", "6-3": "\"glossy\", \"matte\"" }, "cols": 4, "rows": 7 } [/block] **Framed Image Options** Optional child arguments you can pass into the "framed_image_options" hash. [block:parameters] { "data": { "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "0-0": "image_size", "0-1": "integer\n**default: 300**", "0-2": "A framed version of your image is built from an html/css rendering.\n\nThis image size integer is your desired image width or image height, in pixels. It will be optimized to the longer dimension of your print size. \n(i.e. if your print size is 16\" x 20\", then the image created will be 300px tall)" }, "cols": 3, "rows": 1 } [/block] **Framed Images** An array of framed images attached to this print + size. (only present if you've created framed images) [block:parameters] { "data": { "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "0-0": "id", "0-1": "string", "0-2": "The unique framed Image ID associated with this image", "1-0": "size", "1-1": "integer", "1-2": "The size, in pixels, of the image.", "2-0": "url", "2-1": "string", "2-2": "The full URL of the framed image. You can use this on your site to showcase the framed artwork." }, "cols": 3, "rows": 3 } [/block] **Prices** The calculated total price of the framed print. This hash also shows the breakdown of costs, including the printing price and the frame price. [block:parameters] { "data": { "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "0-0": "level_printing_price", "0-1": "decimal", "0-2": "The cost for Level to print this item.", "1-0": "base_print_price", "1-1": "decimal", "1-2": "Your print price. Returned alias of \"price\" attribute above.", "2-0": "total_print_price", "2-1": "decimal", "2-2": "If Level is printing your item, then this is level_printing_price + base_print_price. Otherwise, it is equal to your base_print_price.", "3-0": "frame_price", "3-1": "decimal", "3-2": "The cost of the chosen frame (frame options set in default_options hash)", "4-0": "total_price", "4-1": "decimal", "4-2": "total_print_price + frame_price" }, "cols": 3, "rows": 5 } [/block] **Product URLs** The returned product URLs on Level which you can link to from your site or store. You can either link to the Print Detail Page or the Frame Customization Page. [block:parameters] { "data": { "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "0-0": "print_detail_url", "0-1": "string", "0-2": "Full URL to the Print Detail Page on level. You can link to this page from your site.", "1-0": "frame_editor_url", "1-1": "string", "1-2": "Full URL to the Frame Customization Page on Level. You can link to this page from your site and it will direct users into the frame editing process, skipping the Print Detail Page." }, "cols": 3, "rows": 2 } [/block]
[block:parameters] { "data": { "0-0": "id", "0-1": "string", "0-2": "The unique Level ID of this print size", "1-0": "width", "1-1": "decimal", "1-2": "The width of your print in inches", "2-0": "height", "2-1": "decimal", "2-2": "The height of your print in inches", "3-0": "is_active", "3-1": "boolean\n**default: true**", "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "4-0": "price", "4-1": "decimal", "4-2": "Your price for this print + size. If Level is printing it (determined by setting \"printing_in_house\" = true in the print object) then the Level printing price will be ADDED to your price. You are indicating here the amount you will be paid for the print when sold.", "5-0": "quantity", "5-1": "integer", "5-2": "if null then infinite will be available.", "6-0": "default_options", "6-1": "hash", "6-2": "The artist recommended frame options for this print size.\n\nSee the table below for the attributes inside this object", "7-0": "create_framed_image", "7-1": "boolean\n**default: false**", "7-2": "if set to true then a framed image will be built from the print size dimensions and the default options. \n\nThe framed image will be posted to your webhook. (image is inherited from the print this print size belongs to)", "8-0": "framed_image_options", "8-1": "hash", "8-2": "Builds your framed image thumbnail according to the options passed in.\n\nSee the table below for the attributes inside this hash.", "10-0": "custom_id", "10-1": "string", "10-2": "If you want to assign your own custom ID to this print size", "9-0": "framed_images", "9-1": "array", "9-2": "The URL, ID and sizes of the framed images attached to this print + size. \n\nSee table below for the attribute information.", "11-0": "prices", "11-1": "hash", "11-2": "The returned, calculated printing and framing prices for the print + size.", "12-0": "product_urls", "12-1": "hash", "12-2": "The returned Level URLs for the print detail page and frame editor page for this print + size." }, "cols": 3, "rows": 13 } [/block] **Default Options** Optional child arguments you can pass into the "default_options" hash. These will be the artist recommended options shown to the user when they go to the frame editor page. [block:parameters] { "data": { "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "0-0": "golden_ratio", "0-1": "boolean\n**default: false**", "0-2": "If set to true, your print size will automatically get a starting frame width and mat width assigned based on the proportionality of your print size. (in the frame editor)", "1-0": "frame_width", "1-1": "decimal\n**default: 0.75\"**", "1-2": "Artist recommended frame width for this print size. If set, it will override the frame_width set by the golden_ratio argument above.", "2-0": "mat_width", "2-1": "decimal\n**default: 0**", "2-2": "Artist recommended mat width for this print size. If set, it will override the mat width set by the \"golden_ratio\" argument above.", "3-0": "frame_color", "3-1": "string\n**default: \"black maple\"**", "3-2": "Artist recommended frame profile color", "4-0": "mat_color", "4-1": "string\n**default: \"off-white\"**", "4-2": "Artist recommended mat_color", "5-0": "glaze", "5-1": "string\n**default: \"standard\"**", "5-2": "Artist recommended glaze", "6-0": "paper_type", "6-1": "string\n**default: \"glossy\"**", "6-2": "The starting paper type", "h-3": "Options", "0-3": "true, false", "1-3": "0.75, 1.25", "2-3": "0, 1, 1.5, 2, 2.5, 3", "4-3": "\"off-white\", \"black\"", "3-3": "\"black maple\", \"white maple\", \"natural maple\", \"natural walnut\"", "5-3": "\"standard\", \"uv protection\", \"non-glare\"", "6-3": "\"glossy\", \"matte\"" }, "cols": 4, "rows": 7 } [/block] **Framed Image Options** Optional child arguments you can pass into the "framed_image_options" hash. [block:parameters] { "data": { "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "0-0": "image_size", "0-1": "integer\n**default: 300**", "0-2": "A framed version of your image is built from an html/css rendering.\n\nThis image size integer is your desired image width or image height, in pixels. It will be optimized to the longer dimension of your print size. \n(i.e. if your print size is 16\" x 20\", then the image created will be 300px tall)" }, "cols": 3, "rows": 1 } [/block] **Framed Images** An array of framed images attached to this print + size. (only present if you've created framed images) [block:parameters] { "data": { "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "0-0": "id", "0-1": "string", "0-2": "The unique framed Image ID associated with this image", "1-0": "size", "1-1": "integer", "1-2": "The size, in pixels, of the image.", "2-0": "url", "2-1": "string", "2-2": "The full URL of the framed image. You can use this on your site to showcase the framed artwork." }, "cols": 3, "rows": 3 } [/block] **Prices** The calculated total price of the framed print. This hash also shows the breakdown of costs, including the printing price and the frame price. [block:parameters] { "data": { "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "0-0": "level_printing_price", "0-1": "decimal", "0-2": "The cost for Level to print this item.", "1-0": "base_print_price", "1-1": "decimal", "1-2": "Your print price. Returned alias of \"price\" attribute above.", "2-0": "total_print_price", "2-1": "decimal", "2-2": "If Level is printing your item, then this is level_printing_price + base_print_price. Otherwise, it is equal to your base_print_price.", "3-0": "frame_price", "3-1": "decimal", "3-2": "The cost of the chosen frame (frame options set in default_options hash)", "4-0": "total_price", "4-1": "decimal", "4-2": "total_print_price + frame_price" }, "cols": 3, "rows": 5 } [/block] **Product URLs** The returned product URLs on Level which you can link to from your site or store. You can either link to the Print Detail Page or the Frame Customization Page. [block:parameters] { "data": { "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "0-0": "print_detail_url", "0-1": "string", "0-2": "Full URL to the Print Detail Page on level. You can link to this page from your site.", "1-0": "frame_editor_url", "1-1": "string", "1-2": "Full URL to the Frame Customization Page on Level. You can link to this page from your site and it will direct users into the frame editing process, skipping the Print Detail Page." }, "cols": 3, "rows": 2 } [/block]
{"_id":"55958b3e5bf6bf0d00fb0d49","createdAt":"2015-07-02T19:04:30.334Z","project":"558233f75b7fa60d0068b466","type":"basic","updates":[],"user":"558233c6b806360d00244671","body":"[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"{level_api_url}/prints/{print_id}/print_sizes\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"print_id\",\n    \"0-1\": \"**required**\",\n    \"1-0\": \"width\",\n    \"1-1\": \"**required**\",\n    \"2-0\": \"height\",\n    \"2-1\": \"**required**\",\n    \"3-0\": \"price\",\n    \"3-1\": \"*optional*\",\n    \"4-0\": \"is_active\",\n    \"5-0\": \"quantity\",\n    \"6-0\": \"default_options\",\n    \"7-0\": \"create_framed_image\",\n    \"8-0\": \"framed_image_options\",\n    \"9-0\": \"custom_id\",\n    \"10-0\": \"postback_url\",\n    \"4-1\": \"*optional*\",\n    \"5-1\": \"*optional*\",\n    \"6-1\": \"*optional*\",\n    \"7-1\": \"*optional*\",\n    \"8-1\": \"*optional*\",\n    \"9-1\": \"*optional*\",\n    \"10-1\": \"*optional*\"\n  },\n  \"cols\": 2,\n  \"rows\": 11\n}\n[/block]\nIf \"create_framed_image\" is set to true, the framed image will be sent to your postback_url. If you don't have a webhook setup, you can always fetch this framed image data by polling the print size resource after a couple minutes have elapsed (for processing).\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Accept: application/json\\\" -H \\\"Content-type: application/json\\\" -H \\\"Authorization: Token token=YOUR_API_KEY\\\" -X POST -d '{ \\\"print_size\\\": { \\\"width\\\": 25, \\\"height\\\": 18, \\\"price\\\": 22.50, \\\"quantity\\\": 10, \\\"is_active\\\": true, \\\"default_options\\\": { \\\"golden_ratio\\\": true, \\\"frame_color\\\": \\\"natural maple\\\", \\\"mat_color\\\": \\\"black\\\", \\\"glaze\\\": \\\"non-glare\\\" }, \\\"create_framed_image\\\": true, \\\"framed_image_options\\\": { \\\"image_size\\\": \\\"500\\\" }, \\\"custom_id\\\": \\\"124214\\\" }, \\\"postback_url\\\": \\\"http://your-domain/webhook-path\\\" }' https://www.levelframes.com/api/v1/prints/{print_id}/print_sizes\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"success\\\":true,\\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n    \\\"print_size\\\": {\\n      \\\"id\\\":\\\"{id}\\\",\\n      \\\"width\\\":25,\\n\\t\\t\\t\\\"height\\\":18,\\n      \\\"is_active\\\":true,\\n      \\\"custom_id\\\":\\\"124214\\\",\\n      \\\"print_id\\\":\\\"{print_id}\\\",\\n      \\\"default_options\\\": {\\n       \\t\\\"frame_width\\\": 0.75,\\n        \\\"mat_width\\\": 2,\\n        \\\"frame_color\\\": \\\"natural maple\\\",\\n        \\\"mat_color\\\": \\\"black\\\",\\n        \\\"glaze\\\": \\\"non-glare\\\",\\n        \\\"paper_type\\\": \\\"glossy\\\"\\n      },\\n      \\\"prices\\\": {\\n      \\t\\\"level_printing_price\\\": 11.50,\\n        \\\"base_print_price\\\": 22.50,\\n        \\\"total_print_price\\\": 24.00,\\n        \\\"frame_price\\\": 65.00,\\n        \\\"total_price\\\": 89.00\\n      },\\n      \\\"product_urls\\\": {\\n\\t\\t\\t\\t\\\"print_detail_url\\\": \\\"https://www.levelframes.com/prints/{print_slug}\\\",\\n        \\\"frame_editor_url\\\": \\\"https://www.levelframes.com/frames/new?level_id=43452\\\",\\n        \\\"print_add_to_cart_url\\\": \\\"https://www.levelframes.com/prints/add?level_id=43452\\\"\\n      }\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Webhook Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{ \\n  \\\"success\\\": true, \\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n    \\\"framed_image\\\": {\\n      \\\"id\\\": \\\"{framed_image_id}\\\",\\n      \\\"url\\\":  \\\"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\\\"\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","category":"55958aca00d52a23007886a9","hidden":false,"isReference":false,"link_external":false,"parentDoc":null,"__v":5,"excerpt":"Creates a new print size for an existing print. You have the option to pass in artist recommended frame options and can also create a framed image thumbnail.","slug":"create-print-size","title":"Create Print Size","version":"558233f75b7fa60d0068b469","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"order":1,"sync_unique":"","githubsync":"","link_url":"","childrenPages":[]}

Create Print Size

Creates a new print size for an existing print. You have the option to pass in artist recommended frame options and can also create a framed image thumbnail.

[block:api-header] { "type": "post", "title": "{level_api_url}/prints/{print_id}/print_sizes" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "print_id", "0-1": "**required**", "1-0": "width", "1-1": "**required**", "2-0": "height", "2-1": "**required**", "3-0": "price", "3-1": "*optional*", "4-0": "is_active", "5-0": "quantity", "6-0": "default_options", "7-0": "create_framed_image", "8-0": "framed_image_options", "9-0": "custom_id", "10-0": "postback_url", "4-1": "*optional*", "5-1": "*optional*", "6-1": "*optional*", "7-1": "*optional*", "8-1": "*optional*", "9-1": "*optional*", "10-1": "*optional*" }, "cols": 2, "rows": 11 } [/block] If "create_framed_image" is set to true, the framed image will be sent to your postback_url. If you don't have a webhook setup, you can always fetch this framed image data by polling the print size resource after a couple minutes have elapsed (for processing). [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X POST -d '{ \"print_size\": { \"width\": 25, \"height\": 18, \"price\": 22.50, \"quantity\": 10, \"is_active\": true, \"default_options\": { \"golden_ratio\": true, \"frame_color\": \"natural maple\", \"mat_color\": \"black\", \"glaze\": \"non-glare\" }, \"create_framed_image\": true, \"framed_image_options\": { \"image_size\": \"500\" }, \"custom_id\": \"124214\" }, \"postback_url\": \"http://your-domain/webhook-path\" }' https://www.levelframes.com/api/v1/prints/{print_id}/print_sizes", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"print_size\": {\n \"id\":\"{id}\",\n \"width\":25,\n\t\t\t\"height\":18,\n \"is_active\":true,\n \"custom_id\":\"124214\",\n \"print_id\":\"{print_id}\",\n \"default_options\": {\n \t\"frame_width\": 0.75,\n \"mat_width\": 2,\n \"frame_color\": \"natural maple\",\n \"mat_color\": \"black\",\n \"glaze\": \"non-glare\",\n \"paper_type\": \"glossy\"\n },\n \"prices\": {\n \t\"level_printing_price\": 11.50,\n \"base_print_price\": 22.50,\n \"total_print_price\": 24.00,\n \"frame_price\": 65.00,\n \"total_price\": 89.00\n },\n \"product_urls\": {\n\t\t\t\t\"print_detail_url\": \"https://www.levelframes.com/prints/{print_slug}\",\n \"frame_editor_url\": \"https://www.levelframes.com/frames/new?level_id=43452\",\n \"print_add_to_cart_url\": \"https://www.levelframes.com/prints/add?level_id=43452\"\n }\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] [block:textarea] { "text": "Webhook Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\": true, \n \"status\": 200,\n \"data\": {\n \"framed_image\": {\n \"id\": \"{framed_image_id}\",\n \"url\": \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
[block:api-header] { "type": "post", "title": "{level_api_url}/prints/{print_id}/print_sizes" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "print_id", "0-1": "**required**", "1-0": "width", "1-1": "**required**", "2-0": "height", "2-1": "**required**", "3-0": "price", "3-1": "*optional*", "4-0": "is_active", "5-0": "quantity", "6-0": "default_options", "7-0": "create_framed_image", "8-0": "framed_image_options", "9-0": "custom_id", "10-0": "postback_url", "4-1": "*optional*", "5-1": "*optional*", "6-1": "*optional*", "7-1": "*optional*", "8-1": "*optional*", "9-1": "*optional*", "10-1": "*optional*" }, "cols": 2, "rows": 11 } [/block] If "create_framed_image" is set to true, the framed image will be sent to your postback_url. If you don't have a webhook setup, you can always fetch this framed image data by polling the print size resource after a couple minutes have elapsed (for processing). [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X POST -d '{ \"print_size\": { \"width\": 25, \"height\": 18, \"price\": 22.50, \"quantity\": 10, \"is_active\": true, \"default_options\": { \"golden_ratio\": true, \"frame_color\": \"natural maple\", \"mat_color\": \"black\", \"glaze\": \"non-glare\" }, \"create_framed_image\": true, \"framed_image_options\": { \"image_size\": \"500\" }, \"custom_id\": \"124214\" }, \"postback_url\": \"http://your-domain/webhook-path\" }' https://www.levelframes.com/api/v1/prints/{print_id}/print_sizes", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"print_size\": {\n \"id\":\"{id}\",\n \"width\":25,\n\t\t\t\"height\":18,\n \"is_active\":true,\n \"custom_id\":\"124214\",\n \"print_id\":\"{print_id}\",\n \"default_options\": {\n \t\"frame_width\": 0.75,\n \"mat_width\": 2,\n \"frame_color\": \"natural maple\",\n \"mat_color\": \"black\",\n \"glaze\": \"non-glare\",\n \"paper_type\": \"glossy\"\n },\n \"prices\": {\n \t\"level_printing_price\": 11.50,\n \"base_print_price\": 22.50,\n \"total_print_price\": 24.00,\n \"frame_price\": 65.00,\n \"total_price\": 89.00\n },\n \"product_urls\": {\n\t\t\t\t\"print_detail_url\": \"https://www.levelframes.com/prints/{print_slug}\",\n \"frame_editor_url\": \"https://www.levelframes.com/frames/new?level_id=43452\",\n \"print_add_to_cart_url\": \"https://www.levelframes.com/prints/add?level_id=43452\"\n }\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] [block:textarea] { "text": "Webhook Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\": true, \n \"status\": 200,\n \"data\": {\n \"framed_image\": {\n \"id\": \"{framed_image_id}\",\n \"url\": \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
{"_id":"55958b4a9b8d0a25005a7d5c","createdAt":"2015-07-02T19:04:42.017Z","excerpt":"Fetch the data associated with a particular print size.","link_url":"","project":"558233f75b7fa60d0068b466","type":"basic","__v":1,"api":{"url":"","auth":"required","params":[],"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":""},"link_external":false,"parentDoc":null,"updates":[],"user":"558233c6b806360d00244671","body":"[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"{level_api_url}/print_sizes/{id}\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"id\",\n    \"0-1\": \"**required**\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Authorization: Token token=YOUR_API_KEY\\\" https://www.levelframes.com/api/v1/print_sizes/{id}\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"success\\\":true,\\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n    \\\"print_size\\\": {\\n      \\\"id\\\":\\\"{id}\\\",\\n      \\\"width\\\":25,\\n      \\\"height\\\":18,\\n      \\\"is_active\\\":true,\\n      \\\"custom_id\\\":\\\"124214\\\",\\n      \\\"print_id\\\":\\\"{print_id}\\\",\\n      \\\"default_options\\\": {\\n        \\\"frame_width\\\": 0.75,\\n        \\\"mat_width\\\": 2,\\n        \\\"frame_color\\\": \\\"natural maple\\\",\\n        \\\"mat_color\\\": \\\"black\\\",\\n        \\\"glaze\\\": \\\"non-glare\\\",\\n        \\\"paper_type\\\": \\\"glossy\\\"\\n      },\\n      \\\"framed_images\\\": [{\\n      \\t\\\"id\\\": \\\"{framed_image_id}\\\",\\n        \\\"size\\\": 500,\\n        \\\"url\\\": \\\"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\\\"\\n      }],\\n      \\\"prices\\\": {\\n        \\\"level_printing_price\\\": 11.50,\\n        \\\"base_print_price\\\": 22.50,\\n        \\\"total_print_price\\\": 24.00,\\n        \\\"frame_price\\\": 65.00,\\n        \\\"total_price\\\": 89.00\\n      },\\n      \\\"product_urls\\\": {\\n        \\\"print_detail_url\\\": \\\"https://www.levelframes.com/prints/{print_slug}\\\",\\n        \\\"frame_editor_url\\\": \\\"https://www.levelframes.com/frames/new?level_id=43452\\\",\\n        \\\"print_add_to_cart_url\\\": \\\"https://www.levelframes.com/prints/add?level_id=43452\\\"\\n      }\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","isReference":false,"order":2,"githubsync":"","slug":"retrieve-print-size","sync_unique":"","title":"Retrieve Print Size","version":"558233f75b7fa60d0068b469","category":"55958aca00d52a23007886a9","hidden":false,"childrenPages":[]}

Retrieve Print Size

Fetch the data associated with a particular print size.

[block:api-header] { "type": "get", "title": "{level_api_url}/print_sizes/{id}" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/print_sizes/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"print_size\": {\n \"id\":\"{id}\",\n \"width\":25,\n \"height\":18,\n \"is_active\":true,\n \"custom_id\":\"124214\",\n \"print_id\":\"{print_id}\",\n \"default_options\": {\n \"frame_width\": 0.75,\n \"mat_width\": 2,\n \"frame_color\": \"natural maple\",\n \"mat_color\": \"black\",\n \"glaze\": \"non-glare\",\n \"paper_type\": \"glossy\"\n },\n \"framed_images\": [{\n \t\"id\": \"{framed_image_id}\",\n \"size\": 500,\n \"url\": \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\"\n }],\n \"prices\": {\n \"level_printing_price\": 11.50,\n \"base_print_price\": 22.50,\n \"total_print_price\": 24.00,\n \"frame_price\": 65.00,\n \"total_price\": 89.00\n },\n \"product_urls\": {\n \"print_detail_url\": \"https://www.levelframes.com/prints/{print_slug}\",\n \"frame_editor_url\": \"https://www.levelframes.com/frames/new?level_id=43452\",\n \"print_add_to_cart_url\": \"https://www.levelframes.com/prints/add?level_id=43452\"\n }\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
[block:api-header] { "type": "get", "title": "{level_api_url}/print_sizes/{id}" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/print_sizes/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"print_size\": {\n \"id\":\"{id}\",\n \"width\":25,\n \"height\":18,\n \"is_active\":true,\n \"custom_id\":\"124214\",\n \"print_id\":\"{print_id}\",\n \"default_options\": {\n \"frame_width\": 0.75,\n \"mat_width\": 2,\n \"frame_color\": \"natural maple\",\n \"mat_color\": \"black\",\n \"glaze\": \"non-glare\",\n \"paper_type\": \"glossy\"\n },\n \"framed_images\": [{\n \t\"id\": \"{framed_image_id}\",\n \"size\": 500,\n \"url\": \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\"\n }],\n \"prices\": {\n \"level_printing_price\": 11.50,\n \"base_print_price\": 22.50,\n \"total_print_price\": 24.00,\n \"frame_price\": 65.00,\n \"total_price\": 89.00\n },\n \"product_urls\": {\n \"print_detail_url\": \"https://www.levelframes.com/prints/{print_slug}\",\n \"frame_editor_url\": \"https://www.levelframes.com/frames/new?level_id=43452\",\n \"print_add_to_cart_url\": \"https://www.levelframes.com/prints/add?level_id=43452\"\n }\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
{"_id":"55958b595bf6bf0d00fb0d4c","parentDoc":null,"project":"558233f75b7fa60d0068b466","sync_unique":"","__v":4,"category":"55958aca00d52a23007886a9","excerpt":"","api":{"auth":"required","params":[],"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"link_url":"","order":3,"slug":"update-print-size","title":"Update Print Size","user":"558233c6b806360d00244671","body":"[block:api-header]\n{\n  \"type\": \"put\",\n  \"title\": \"{level_api_url}/print_sizes/{id}\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"id\",\n    \"0-1\": \"**required**\",\n    \"2-0\": \"height\",\n    \"3-0\": \"price\",\n    \"4-0\": \"is_active\",\n    \"4-1\": \"*optional*\",\n    \"5-0\": \"quantity\",\n    \"6-0\": \"default_options\",\n    \"7-0\": \"create_framed_image\",\n    \"8-0\": \"framed_image_options\",\n    \"9-0\": \"custom_id\",\n    \"10-0\": \"postback_url\",\n    \"2-1\": \"*optional*\",\n    \"3-1\": \"*optional*\",\n    \"5-1\": \"*optional*\",\n    \"6-1\": \"*optional*\",\n    \"7-1\": \"*optional*\",\n    \"8-1\": \"*optional*\",\n    \"9-1\": \"*optional*\",\n    \"10-1\": \"*optional*\",\n    \"1-0\": \"width\",\n    \"1-1\": \"*optional*\"\n  },\n  \"cols\": 2,\n  \"rows\": 11\n}\n[/block]\nDon't set \"create_framed_image\" = true unless you want to make a new framed image for this print size.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Accept: application/json\\\" -H \\\"Content-type: application/json\\\" -H \\\"Authorization: Token token=YOUR_API_KEY\\\" -X PUT -d '{ \\\"print_size\\\": { \\\"width\\\": 15, \\\"height\\\": 13, \\\"price\\\": 22.50, \\\"default_options\\\": { \\\"golden_ratio\\\": true, \\\"frame_color\\\": \\\"natural maple\\\", \\\"mat_color\\\": \\\"black\\\", \\\"glaze\\\": \\\"non-glare\\\" }, \\\"create_framed_image\\\": true, \\\"framed_image_options\\\": { \\\"image_size\\\": \\\"400\\\" } }, \\\"postback_url\\\": \\\"http://your-domain/webhook-path\\\" }' https://www.levelframes.com/api/v1/print_sizes/{id}\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"success\\\":true,\\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n    \\\"print_size\\\": {\\n      \\\"id\\\":\\\"{id}\\\",\\n      \\\"width\\\":15,\\n      \\\"height\\\":13,\\n      \\\"is_active\\\":true,\\n      \\\"custom_id\\\":\\\"124214\\\",\\n      \\\"print_id\\\":\\\"{print_id}\\\",\\n      \\\"default_options\\\": {\\n        \\\"frame_width\\\": 0.75,\\n        \\\"mat_width\\\": 2,\\n        \\\"frame_color\\\": \\\"natural maple\\\",\\n        \\\"mat_color\\\": \\\"black\\\",\\n        \\\"glaze\\\": \\\"non-glare\\\",\\n        \\\"paper_type\\\": \\\"glossy\\\"\\n      },\\n      \\\"framed_images\\\": [{\\n        \\\"id\\\": \\\"{framed_image_id}\\\",\\n        \\\"size\\\": 500,\\n        \\\"url\\\": \\\"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\\\"\\n      }],\\n      \\\"prices\\\": {\\n        \\\"level_printing_price\\\": 11.50,\\n        \\\"base_print_price\\\": 22.50,\\n        \\\"total_print_price\\\": 24.00,\\n        \\\"frame_price\\\": 65.00,\\n        \\\"total_price\\\": 89.00\\n      },\\n      \\\"product_urls\\\": {\\n        \\\"print_detail_url\\\": \\\"https://www.levelframes.com/prints/{print_slug}\\\",\\n        \\\"frame_editor_url\\\": \\\"https://www.levelframes.com/frames/new?level_id=43452\\\",\\n        \\\"print_add_to_cart_url\\\": \\\"https://www.levelframes.com/prints/add?level_id=43452\\\"\\n      }\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Webhook Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{ \\n  \\\"success\\\": true, \\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n    \\\"framed_image\\\": {\\n      \\\"id\\\": \\\"{framed_image_id}\\\",\\n      \\\"url\\\":  \\\"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\\\"\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","githubsync":"","isReference":false,"link_external":false,"type":"basic","updates":[],"version":"558233f75b7fa60d0068b469","createdAt":"2015-07-02T19:04:57.791Z","hidden":false,"childrenPages":[]}

Update Print Size


[block:api-header] { "type": "put", "title": "{level_api_url}/print_sizes/{id}" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**", "2-0": "height", "3-0": "price", "4-0": "is_active", "4-1": "*optional*", "5-0": "quantity", "6-0": "default_options", "7-0": "create_framed_image", "8-0": "framed_image_options", "9-0": "custom_id", "10-0": "postback_url", "2-1": "*optional*", "3-1": "*optional*", "5-1": "*optional*", "6-1": "*optional*", "7-1": "*optional*", "8-1": "*optional*", "9-1": "*optional*", "10-1": "*optional*", "1-0": "width", "1-1": "*optional*" }, "cols": 2, "rows": 11 } [/block] Don't set "create_framed_image" = true unless you want to make a new framed image for this print size. [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X PUT -d '{ \"print_size\": { \"width\": 15, \"height\": 13, \"price\": 22.50, \"default_options\": { \"golden_ratio\": true, \"frame_color\": \"natural maple\", \"mat_color\": \"black\", \"glaze\": \"non-glare\" }, \"create_framed_image\": true, \"framed_image_options\": { \"image_size\": \"400\" } }, \"postback_url\": \"http://your-domain/webhook-path\" }' https://www.levelframes.com/api/v1/print_sizes/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"print_size\": {\n \"id\":\"{id}\",\n \"width\":15,\n \"height\":13,\n \"is_active\":true,\n \"custom_id\":\"124214\",\n \"print_id\":\"{print_id}\",\n \"default_options\": {\n \"frame_width\": 0.75,\n \"mat_width\": 2,\n \"frame_color\": \"natural maple\",\n \"mat_color\": \"black\",\n \"glaze\": \"non-glare\",\n \"paper_type\": \"glossy\"\n },\n \"framed_images\": [{\n \"id\": \"{framed_image_id}\",\n \"size\": 500,\n \"url\": \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\"\n }],\n \"prices\": {\n \"level_printing_price\": 11.50,\n \"base_print_price\": 22.50,\n \"total_print_price\": 24.00,\n \"frame_price\": 65.00,\n \"total_price\": 89.00\n },\n \"product_urls\": {\n \"print_detail_url\": \"https://www.levelframes.com/prints/{print_slug}\",\n \"frame_editor_url\": \"https://www.levelframes.com/frames/new?level_id=43452\",\n \"print_add_to_cart_url\": \"https://www.levelframes.com/prints/add?level_id=43452\"\n }\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] [block:textarea] { "text": "Webhook Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\": true, \n \"status\": 200,\n \"data\": {\n \"framed_image\": {\n \"id\": \"{framed_image_id}\",\n \"url\": \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
[block:api-header] { "type": "put", "title": "{level_api_url}/print_sizes/{id}" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**", "2-0": "height", "3-0": "price", "4-0": "is_active", "4-1": "*optional*", "5-0": "quantity", "6-0": "default_options", "7-0": "create_framed_image", "8-0": "framed_image_options", "9-0": "custom_id", "10-0": "postback_url", "2-1": "*optional*", "3-1": "*optional*", "5-1": "*optional*", "6-1": "*optional*", "7-1": "*optional*", "8-1": "*optional*", "9-1": "*optional*", "10-1": "*optional*", "1-0": "width", "1-1": "*optional*" }, "cols": 2, "rows": 11 } [/block] Don't set "create_framed_image" = true unless you want to make a new framed image for this print size. [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X PUT -d '{ \"print_size\": { \"width\": 15, \"height\": 13, \"price\": 22.50, \"default_options\": { \"golden_ratio\": true, \"frame_color\": \"natural maple\", \"mat_color\": \"black\", \"glaze\": \"non-glare\" }, \"create_framed_image\": true, \"framed_image_options\": { \"image_size\": \"400\" } }, \"postback_url\": \"http://your-domain/webhook-path\" }' https://www.levelframes.com/api/v1/print_sizes/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"print_size\": {\n \"id\":\"{id}\",\n \"width\":15,\n \"height\":13,\n \"is_active\":true,\n \"custom_id\":\"124214\",\n \"print_id\":\"{print_id}\",\n \"default_options\": {\n \"frame_width\": 0.75,\n \"mat_width\": 2,\n \"frame_color\": \"natural maple\",\n \"mat_color\": \"black\",\n \"glaze\": \"non-glare\",\n \"paper_type\": \"glossy\"\n },\n \"framed_images\": [{\n \"id\": \"{framed_image_id}\",\n \"size\": 500,\n \"url\": \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\"\n }],\n \"prices\": {\n \"level_printing_price\": 11.50,\n \"base_print_price\": 22.50,\n \"total_print_price\": 24.00,\n \"frame_price\": 65.00,\n \"total_price\": 89.00\n },\n \"product_urls\": {\n \"print_detail_url\": \"https://www.levelframes.com/prints/{print_slug}\",\n \"frame_editor_url\": \"https://www.levelframes.com/frames/new?level_id=43452\",\n \"print_add_to_cart_url\": \"https://www.levelframes.com/prints/add?level_id=43452\"\n }\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] [block:textarea] { "text": "Webhook Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\": true, \n \"status\": 200,\n \"data\": {\n \"framed_image\": {\n \"id\": \"{framed_image_id}\",\n \"url\": \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
{"_id":"55958b6600d52a23007886ad","body":"[block:api-header]\n{\n  \"type\": \"delete\",\n  \"title\": \"{level_api_url}/print_sizes/{id}\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"id\",\n    \"0-1\": \"**required**\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\nThe entire print size object that was just destroyed will be returned in the response. \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Authorization: Token token=YOUR_API_KEY\\\" -X DELETE https://www.levelframes.com/api/v1/print_sizes/{id}\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"success\\\":true,\\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n    \\\"print_size\\\": {\\n      \\\"id\\\":\\\"{id}\\\",\\n      \\\"width\\\":25,\\n      \\\"height\\\":18,\\n      \\\"is_active\\\":true,\\n      \\\"custom_id\\\":\\\"124214\\\",\\n      \\\"print_id\\\":\\\"{print_id}\\\",\\n      \\\"default_options\\\": {\\n        \\\"frame_width\\\": 0.75,\\n        \\\"mat_width\\\": 2,\\n        \\\"frame_color\\\": \\\"natural maple\\\",\\n        \\\"mat_color\\\": \\\"black\\\",\\n        \\\"glaze\\\": \\\"non-glare\\\",\\n        \\\"paper_type\\\": \\\"glossy\\\"\\n      },\\n      \\\"framed_images\\\": [{\\n        \\\"id\\\": \\\"{framed_image_id}\\\",\\n        \\\"size\\\": 500,\\n        \\\"url\\\": \\\"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\\\"\\n      }],\\n      \\\"prices\\\": {\\n        \\\"level_printing_price\\\": 11.50,\\n        \\\"base_print_price\\\": 22.50,\\n        \\\"total_print_price\\\": 24.00,\\n        \\\"frame_price\\\": 65.00,\\n        \\\"total_price\\\": 89.00\\n      },\\n      \\\"product_urls\\\": {\\n        \\\"print_detail_url\\\": \\\"https://www.levelframes.com/prints/{print_slug}\\\",\\n        \\\"frame_editor_url\\\": \\\"https://www.levelframes.com/frames/new?level_id=43452\\\",\\n        \\\"print_add_to_cart_url\\\": \\\"https://www.levelframes.com/prints/add?level_id=43452\\\"\\n      }\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","createdAt":"2015-07-02T19:05:10.404Z","link_url":"","sync_unique":"","updates":[],"type":"basic","githubsync":"","link_external":false,"parentDoc":null,"project":"558233f75b7fa60d0068b466","version":"558233f75b7fa60d0068b469","__v":1,"excerpt":"Permanently delete the print size","isReference":false,"title":"Delete Print Size","user":"558233c6b806360d00244671","api":{"auth":"required","params":[],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{}"},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"category":"55958aca00d52a23007886a9","hidden":false,"order":4,"slug":"delete-print-size","childrenPages":[]}

Delete Print Size

Permanently delete the print size

[block:api-header] { "type": "delete", "title": "{level_api_url}/print_sizes/{id}" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block] The entire print size object that was just destroyed will be returned in the response. [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" -X DELETE https://www.levelframes.com/api/v1/print_sizes/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"print_size\": {\n \"id\":\"{id}\",\n \"width\":25,\n \"height\":18,\n \"is_active\":true,\n \"custom_id\":\"124214\",\n \"print_id\":\"{print_id}\",\n \"default_options\": {\n \"frame_width\": 0.75,\n \"mat_width\": 2,\n \"frame_color\": \"natural maple\",\n \"mat_color\": \"black\",\n \"glaze\": \"non-glare\",\n \"paper_type\": \"glossy\"\n },\n \"framed_images\": [{\n \"id\": \"{framed_image_id}\",\n \"size\": 500,\n \"url\": \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\"\n }],\n \"prices\": {\n \"level_printing_price\": 11.50,\n \"base_print_price\": 22.50,\n \"total_print_price\": 24.00,\n \"frame_price\": 65.00,\n \"total_price\": 89.00\n },\n \"product_urls\": {\n \"print_detail_url\": \"https://www.levelframes.com/prints/{print_slug}\",\n \"frame_editor_url\": \"https://www.levelframes.com/frames/new?level_id=43452\",\n \"print_add_to_cart_url\": \"https://www.levelframes.com/prints/add?level_id=43452\"\n }\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
[block:api-header] { "type": "delete", "title": "{level_api_url}/print_sizes/{id}" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block] The entire print size object that was just destroyed will be returned in the response. [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" -X DELETE https://www.levelframes.com/api/v1/print_sizes/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"print_size\": {\n \"id\":\"{id}\",\n \"width\":25,\n \"height\":18,\n \"is_active\":true,\n \"custom_id\":\"124214\",\n \"print_id\":\"{print_id}\",\n \"default_options\": {\n \"frame_width\": 0.75,\n \"mat_width\": 2,\n \"frame_color\": \"natural maple\",\n \"mat_color\": \"black\",\n \"glaze\": \"non-glare\",\n \"paper_type\": \"glossy\"\n },\n \"framed_images\": [{\n \"id\": \"{framed_image_id}\",\n \"size\": 500,\n \"url\": \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\"\n }],\n \"prices\": {\n \"level_printing_price\": 11.50,\n \"base_print_price\": 22.50,\n \"total_print_price\": 24.00,\n \"frame_price\": 65.00,\n \"total_price\": 89.00\n },\n \"product_urls\": {\n \"print_detail_url\": \"https://www.levelframes.com/prints/{print_slug}\",\n \"frame_editor_url\": \"https://www.levelframes.com/frames/new?level_id=43452\",\n \"print_add_to_cart_url\": \"https://www.levelframes.com/prints/add?level_id=43452\"\n }\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
{"_id":"55958b7400d52a23007886af","githubsync":"","isReference":false,"order":5,"parentDoc":null,"project":"558233f75b7fa60d0068b466","type":"basic","updates":[],"api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"slug":"list-all-print-sizes","sync_unique":"","user":"558233c6b806360d00244671","createdAt":"2015-07-02T19:05:24.053Z","hidden":false,"link_external":false,"link_url":"","__v":1,"body":"[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"{level_api_url}/prints/{print_id}/print_sizes\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"print_id\",\n    \"0-1\": \"**required**\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Authorization: Token token=YOUR_API_KEY\\\" https://www.levelframes.com/api/v1/prints/{print_id}/print_sizes\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"success\\\":true,\\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n    \\\"print_sizes\\\": [{\\n      \\\"id\\\":\\\"{id}\\\",\\n      \\\"width\\\":25,\\n      \\\"height\\\":18,\\n      \\\"is_active\\\":true,\\n      \\\"custom_id\\\":\\\"124214\\\",\\n      \\\"print_id\\\":\\\"{print_id}\\\",\\n      \\\"default_options\\\": {\\n        \\\"frame_width\\\": 0.75,\\n        \\\"mat_width\\\": 2,\\n        \\\"frame_color\\\": \\\"natural maple\\\",\\n        \\\"mat_color\\\": \\\"black\\\",\\n        \\\"glaze\\\": \\\"non-glare\\\",\\n        \\\"paper_type\\\": \\\"glossy\\\"\\n      },\\n      \\\"framed_images\\\": [{\\n        \\\"id\\\": \\\"{framed_image_id}\\\",\\n        \\\"size\\\": 500,\\n        \\\"url\\\": \\\"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\\\"\\n      }],\\n      \\\"prices\\\": {\\n        \\\"level_printing_price\\\": 11.50,\\n        \\\"base_print_price\\\": 22.50,\\n        \\\"total_print_price\\\": 24.00,\\n        \\\"frame_price\\\": 65.00,\\n        \\\"total_price\\\": 89.00\\n      },\\n      \\\"product_urls\\\": {\\n        \\\"print_detail_url\\\": \\\"https://www.levelframes.com/prints/{print_slug}\\\",\\n        \\\"frame_editor_url\\\": \\\"https://www.levelframes.com/frames/new?level_id=43452\\\",\\n        \\\"print_add_to_cart_url\\\": \\\"https://www.levelframes.com/prints/add?level_id=43452\\\"\\n      }\\n    }],\\n    count: 1\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","category":"55958aca00d52a23007886a9","excerpt":"Fetch all print sizes that belong to a particular print.","title":"List All Print Sizes","version":"558233f75b7fa60d0068b469","childrenPages":[]}

List All Print Sizes

Fetch all print sizes that belong to a particular print.

[block:api-header] { "type": "get", "title": "{level_api_url}/prints/{print_id}/print_sizes" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "print_id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/prints/{print_id}/print_sizes", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"print_sizes\": [{\n \"id\":\"{id}\",\n \"width\":25,\n \"height\":18,\n \"is_active\":true,\n \"custom_id\":\"124214\",\n \"print_id\":\"{print_id}\",\n \"default_options\": {\n \"frame_width\": 0.75,\n \"mat_width\": 2,\n \"frame_color\": \"natural maple\",\n \"mat_color\": \"black\",\n \"glaze\": \"non-glare\",\n \"paper_type\": \"glossy\"\n },\n \"framed_images\": [{\n \"id\": \"{framed_image_id}\",\n \"size\": 500,\n \"url\": \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\"\n }],\n \"prices\": {\n \"level_printing_price\": 11.50,\n \"base_print_price\": 22.50,\n \"total_print_price\": 24.00,\n \"frame_price\": 65.00,\n \"total_price\": 89.00\n },\n \"product_urls\": {\n \"print_detail_url\": \"https://www.levelframes.com/prints/{print_slug}\",\n \"frame_editor_url\": \"https://www.levelframes.com/frames/new?level_id=43452\",\n \"print_add_to_cart_url\": \"https://www.levelframes.com/prints/add?level_id=43452\"\n }\n }],\n count: 1\n }\n}", "language": "json" } ], "sidebar": true } [/block]
[block:api-header] { "type": "get", "title": "{level_api_url}/prints/{print_id}/print_sizes" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "print_id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/prints/{print_id}/print_sizes", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\": 200,\n \"data\": {\n \"print_sizes\": [{\n \"id\":\"{id}\",\n \"width\":25,\n \"height\":18,\n \"is_active\":true,\n \"custom_id\":\"124214\",\n \"print_id\":\"{print_id}\",\n \"default_options\": {\n \"frame_width\": 0.75,\n \"mat_width\": 2,\n \"frame_color\": \"natural maple\",\n \"mat_color\": \"black\",\n \"glaze\": \"non-glare\",\n \"paper_type\": \"glossy\"\n },\n \"framed_images\": [{\n \"id\": \"{framed_image_id}\",\n \"size\": 500,\n \"url\": \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\"\n }],\n \"prices\": {\n \"level_printing_price\": 11.50,\n \"base_print_price\": 22.50,\n \"total_print_price\": 24.00,\n \"frame_price\": 65.00,\n \"total_price\": 89.00\n },\n \"product_urls\": {\n \"print_detail_url\": \"https://www.levelframes.com/prints/{print_slug}\",\n \"frame_editor_url\": \"https://www.levelframes.com/frames/new?level_id=43452\",\n \"print_add_to_cart_url\": \"https://www.levelframes.com/prints/add?level_id=43452\"\n }\n }],\n count: 1\n }\n}", "language": "json" } ], "sidebar": true } [/block]
{"_id":"55958bb000d52a23007886b1","body":"[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"id\",\n    \"0-1\": \"string\",\n    \"0-2\": \"The unique ID for this framed image\",\n    \"1-0\": \"url\",\n    \"1-1\": \"string\",\n    \"1-2\": \"Full URL path to the framed image. You can embed this image on your site.\",\n    \"2-0\": \"framed_image_options\",\n    \"2-1\": \"hash\",\n    \"2-2\": \"Pass in specifications for the image to have (e.g. Black Maple frame with 2\\\" mat)\",\n    \"3-0\": \"print_size_id\",\n    \"4-0\": \"image_url\",\n    \"3-1\": \"string\",\n    \"3-2\": \"The print size associated with the framed image, if applicable\",\n    \"4-1\": \"string\",\n    \"4-2\": \"The path (full URL) to the image you want to turn into a framed image\",\n    \"5-0\": \"width\",\n    \"5-1\": \"decimal\",\n    \"5-2\": \"Width of the print in inches (needed to give the frame the proper scale relative to the image).\",\n    \"6-0\": \"height\",\n    \"6-1\": \"decimal\",\n    \"6-2\": \"Height of the print in inches (needed to give the frame the proper scale relative to the image).\"\n  },\n  \"cols\": 3,\n  \"rows\": 7\n}\n[/block]\n**Framed Image Options**\nOptional child arguments for the framed_image_options hash. \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"image_size\",\n    \"0-1\": \"integer\\n**default: 300**\",\n    \"0-2\": \"The desired length, in pixels, of the longest edge of your image (either width or height)\",\n    \"1-0\": \"golden_ratio\",\n    \"1-1\": \"boolean\\n**default: false**\",\n    \"1-2\": \"If set to true the frame width and mat width will be set automatically according to good proportionality principles.\",\n    \"2-0\": \"frame_width\",\n    \"2-1\": \"decimal\\n**default: 0.75\\\"**\",\n    \"2-2\": \"Build your image with a specific frame width. If set, it will override the frame_width set by the golden_ratio argument above.\",\n    \"h-3\": \"Options\",\n    \"0-3\": \"\",\n    \"1-3\": \"true, false\",\n    \"2-3\": \"0.75, 1.25\",\n    \"3-0\": \"mat_width\",\n    \"3-1\": \"decimal\\n**default: 0**\",\n    \"3-2\": \"Build your image with a specific mat width. If set, it will override the mat width set by the \\\"golden_ratio\\\" argument above.\",\n    \"3-3\": \"0, 1, 1.5, 2, 2.5, 3\",\n    \"4-0\": \"frame_color\",\n    \"4-1\": \"string\\n**default: \\\"black maple\\\"**\",\n    \"4-2\": \"Build your image with a specific frame color.\",\n    \"4-3\": \"\\\"black maple\\\", \\\"white maple\\\", \\\"natural maple\\\", \\\"natural walnut\\\"\",\n    \"5-0\": \"mat_color\",\n    \"5-1\": \"string\\n**default: \\\"off-white\\\"**\",\n    \"5-2\": \"Build your image with a specific mat color.\",\n    \"5-3\": \"\\\"off-white\\\", \\\"black\\\"\",\n    \"6-0\": \"glaze\",\n    \"6-1\": \"string\\n**default: \\\"standard\\\"**\",\n    \"6-2\": \"Build your image with a specific glaze. \\\"non-glare\\\" will get rid of the reflection across the image\",\n    \"6-3\": \"\\\"standard\\\", \\\"uv protection\\\", \\\"non-glare\\\"\"\n  },\n  \"cols\": 4,\n  \"rows\": 7\n}\n[/block]","githubsync":"","hidden":false,"title":"The Framed Image Object","type":"basic","category":"55958b985bf6bf0d00fb0d4e","createdAt":"2015-07-02T19:06:24.359Z","link_external":false,"order":0,"parentDoc":null,"__v":3,"excerpt":"Post an image to create a framed version of the image with various frame options to choose from.","slug":"the-framed-image-object","sync_unique":"","updates":[],"version":"558233f75b7fa60d0068b469","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":""},"link_url":"","project":"558233f75b7fa60d0068b466","user":"558233c6b806360d00244671","childrenPages":[]}

The Framed Image Object

Post an image to create a framed version of the image with various frame options to choose from.

[block:parameters] { "data": { "h-0": "Argument", "h-1": "Type", "h-2": "Description", "0-0": "id", "0-1": "string", "0-2": "The unique ID for this framed image", "1-0": "url", "1-1": "string", "1-2": "Full URL path to the framed image. You can embed this image on your site.", "2-0": "framed_image_options", "2-1": "hash", "2-2": "Pass in specifications for the image to have (e.g. Black Maple frame with 2\" mat)", "3-0": "print_size_id", "4-0": "image_url", "3-1": "string", "3-2": "The print size associated with the framed image, if applicable", "4-1": "string", "4-2": "The path (full URL) to the image you want to turn into a framed image", "5-0": "width", "5-1": "decimal", "5-2": "Width of the print in inches (needed to give the frame the proper scale relative to the image).", "6-0": "height", "6-1": "decimal", "6-2": "Height of the print in inches (needed to give the frame the proper scale relative to the image)." }, "cols": 3, "rows": 7 } [/block] **Framed Image Options** Optional child arguments for the framed_image_options hash. [block:parameters] { "data": { "h-0": "Argument", "h-1": "Type", "h-2": "Description", "0-0": "image_size", "0-1": "integer\n**default: 300**", "0-2": "The desired length, in pixels, of the longest edge of your image (either width or height)", "1-0": "golden_ratio", "1-1": "boolean\n**default: false**", "1-2": "If set to true the frame width and mat width will be set automatically according to good proportionality principles.", "2-0": "frame_width", "2-1": "decimal\n**default: 0.75\"**", "2-2": "Build your image with a specific frame width. If set, it will override the frame_width set by the golden_ratio argument above.", "h-3": "Options", "0-3": "", "1-3": "true, false", "2-3": "0.75, 1.25", "3-0": "mat_width", "3-1": "decimal\n**default: 0**", "3-2": "Build your image with a specific mat width. If set, it will override the mat width set by the \"golden_ratio\" argument above.", "3-3": "0, 1, 1.5, 2, 2.5, 3", "4-0": "frame_color", "4-1": "string\n**default: \"black maple\"**", "4-2": "Build your image with a specific frame color.", "4-3": "\"black maple\", \"white maple\", \"natural maple\", \"natural walnut\"", "5-0": "mat_color", "5-1": "string\n**default: \"off-white\"**", "5-2": "Build your image with a specific mat color.", "5-3": "\"off-white\", \"black\"", "6-0": "glaze", "6-1": "string\n**default: \"standard\"**", "6-2": "Build your image with a specific glaze. \"non-glare\" will get rid of the reflection across the image", "6-3": "\"standard\", \"uv protection\", \"non-glare\"" }, "cols": 4, "rows": 7 } [/block]
[block:parameters] { "data": { "h-0": "Argument", "h-1": "Type", "h-2": "Description", "0-0": "id", "0-1": "string", "0-2": "The unique ID for this framed image", "1-0": "url", "1-1": "string", "1-2": "Full URL path to the framed image. You can embed this image on your site.", "2-0": "framed_image_options", "2-1": "hash", "2-2": "Pass in specifications for the image to have (e.g. Black Maple frame with 2\" mat)", "3-0": "print_size_id", "4-0": "image_url", "3-1": "string", "3-2": "The print size associated with the framed image, if applicable", "4-1": "string", "4-2": "The path (full URL) to the image you want to turn into a framed image", "5-0": "width", "5-1": "decimal", "5-2": "Width of the print in inches (needed to give the frame the proper scale relative to the image).", "6-0": "height", "6-1": "decimal", "6-2": "Height of the print in inches (needed to give the frame the proper scale relative to the image)." }, "cols": 3, "rows": 7 } [/block] **Framed Image Options** Optional child arguments for the framed_image_options hash. [block:parameters] { "data": { "h-0": "Argument", "h-1": "Type", "h-2": "Description", "0-0": "image_size", "0-1": "integer\n**default: 300**", "0-2": "The desired length, in pixels, of the longest edge of your image (either width or height)", "1-0": "golden_ratio", "1-1": "boolean\n**default: false**", "1-2": "If set to true the frame width and mat width will be set automatically according to good proportionality principles.", "2-0": "frame_width", "2-1": "decimal\n**default: 0.75\"**", "2-2": "Build your image with a specific frame width. If set, it will override the frame_width set by the golden_ratio argument above.", "h-3": "Options", "0-3": "", "1-3": "true, false", "2-3": "0.75, 1.25", "3-0": "mat_width", "3-1": "decimal\n**default: 0**", "3-2": "Build your image with a specific mat width. If set, it will override the mat width set by the \"golden_ratio\" argument above.", "3-3": "0, 1, 1.5, 2, 2.5, 3", "4-0": "frame_color", "4-1": "string\n**default: \"black maple\"**", "4-2": "Build your image with a specific frame color.", "4-3": "\"black maple\", \"white maple\", \"natural maple\", \"natural walnut\"", "5-0": "mat_color", "5-1": "string\n**default: \"off-white\"**", "5-2": "Build your image with a specific mat color.", "5-3": "\"off-white\", \"black\"", "6-0": "glaze", "6-1": "string\n**default: \"standard\"**", "6-2": "Build your image with a specific glaze. \"non-glare\" will get rid of the reflection across the image", "6-3": "\"standard\", \"uv protection\", \"non-glare\"" }, "cols": 4, "rows": 7 } [/block]
{"_id":"55958bbd5bf6bf0d00fb0d4f","sync_unique":"","body":"**There are two different routes for creating a framed image**. They vary based on whether you want to create a framed image for an existing print_size, or if you just want to pass in any image and get a framed version of it back (image not associated with an artist, print or print_size). \n\n##Route #1:  Create a framed image from a print_size\n[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"{level_api_url}/print_sizes/{print_size_id}/framed_images\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"print_size_id\",\n    \"0-1\": \"**required**\",\n    \"1-0\": \"framed_image_options\\n(hash)\",\n    \"1-1\": \"*optional*\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]\n**Framed Image Options**\nOptional child arguments for the framed_image_options hash. \n\nThe only framed_image_option available to Route #1 is image_size. The framed image options such as frame_width and mat_width are inherited from the print_size attached to this framed_image and thus can't be defined with this route. Use Route #2 to define frame options different from the default options of the print_size.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"image_size\",\n    \"0-1\": \"The desired length, in pixels, of the longest edge of your image (either width or height)\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\n##Route #2: Create a framed image from any image on the web\n[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"{level_api_url}/framed_images\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"image_url\",\n    \"0-1\": \"**required**\",\n    \"1-0\": \"width\",\n    \"1-1\": \"**required**\",\n    \"2-0\": \"height\",\n    \"2-1\": \"**required**\",\n    \"3-0\": \"framed_image_options\",\n    \"3-1\": \"*optional*\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n**Framed Image Options**\nOptional child arguments for the framed_image_options hash. \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"image_size\",\n    \"0-1\": \"*optional*\",\n    \"1-0\": \"golden_ratio\",\n    \"1-1\": \"*optional*\",\n    \"2-0\": \"frame_width\",\n    \"3-0\": \"mat_width\",\n    \"4-0\": \"frame_color\",\n    \"5-0\": \"mat_color\",\n    \"6-0\": \"glaze\",\n    \"2-1\": \"*optional*\",\n    \"3-1\": \"*optional*\",\n    \"4-1\": \"*optional*\",\n    \"5-1\": \"*optional*\",\n    \"6-1\": \"*optional*\"\n  },\n  \"cols\": 2,\n  \"rows\": 7\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Route #1\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Accept: application/json\\\" -H \\\"Content-type: application/json\\\" -H \\\"Authorization: Token token=YOUR_API_KEY\\\" -X POST -d '{ \\\"framed_image\\\": { \\\"framed_image_options\\\": { \\\"image_size\\\": 600 }}, \\\"postback_url\\\": \\\"https://your-domain.com/webhook\\\" }' https://levelframes.com/api/v1/print_sizes/{print_size_id}/framed_images\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{ \\n  \\\"success\\\" => true, \\n  \\\"status\\\" => 200,\\n  \\\"data\\\" => {\\n    \\\"framed_image\\\" => {\\n      \\\"id\\\" => \\\"{framed_image_id}\\\",\\n\\t\\t\\t\\\"print_size_id\\\" => \\\"{print_size_id}\\\",\\n  \\t\\t\\\"print_id\\\" => \\\"{print_id}\\\",\\n  \\t\\t\\\"image_size\\\" => 600,\\n      \\\"url\\\" => \\\"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4w.jpg\\\"\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Route #2\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Accept: application/json\\\" -H \\\"Content-type: application/json\\\" -H \\\"Authorization: Token token=YOUR_API_KEY\\\" -X POST -d '{ \\\"framed_image\\\": { \\\"image_url\\\": \\\"http://wearestardust.smugmug.com/Iceland/i-fHZz9pm/0/X3/stacks%20HD%20UP-X3.jpg\\\", \\\"width\\\": 16.25, \\\"height\\\": 11.125, \\\"framed_image_options\\\": { \\\"image_size\\\": 400, \\\"golden_ratio\\\": true, \\\"frame_color\\\": \\\"black maple\\\", \\\"mat_color\\\": \\\"black\\\", \\\"glaze\\\": \\\"non-glare\\\" }}, \\\"postback_url\\\": \\\"https://your-domain.com/webhook\\\" }' https://levelframes.com/api/v1/framed_images\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response #2\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{ \\n  \\\"success\\\" => true, \\n  \\\"status\\\" => 200,\\n  \\\"data\\\" => {\\n    \\\"framed_image\\\" => {\\n      \\\"id\\\" => \\\"{framed_image_id}\\\",\\n  \\t\\t\\\"image_size\\\" => 400,\\n      \\\"url\\\" => \\\"https://levle.s3.amazonaws.com/frame_renderings/production/32jjk2312.jpg\\\"\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Webhook Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{ \\n  \\\"success\\\": true, \\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n    \\\"framed_image\\\": {\\n      \\\"id\\\": \\\"{id}\\\",\\n      \\\"url\\\" => \\\"https://levle.s3.amazonaws.com/frame_renderings/production/dsfjbJ32.jpg\\\"\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","createdAt":"2015-07-02T19:06:37.914Z","link_url":"","parentDoc":null,"project":"558233f75b7fa60d0068b466","hidden":false,"slug":"create-framed-image","title":"Create Framed Image","updates":[],"__v":14,"category":"55958b985bf6bf0d00fb0d4e","excerpt":"Turn any image into a framed version of your image.","order":1,"api":{"auth":"required","params":[],"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"githubsync":"","link_external":false,"type":"basic","user":"558233c6b806360d00244671","version":"558233f75b7fa60d0068b469","childrenPages":[]}

Create Framed Image

Turn any image into a framed version of your image.

**There are two different routes for creating a framed image**. They vary based on whether you want to create a framed image for an existing print_size, or if you just want to pass in any image and get a framed version of it back (image not associated with an artist, print or print_size). ##Route #1: Create a framed image from a print_size [block:api-header] { "type": "post", "title": "{level_api_url}/print_sizes/{print_size_id}/framed_images" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "print_size_id", "0-1": "**required**", "1-0": "framed_image_options\n(hash)", "1-1": "*optional*" }, "cols": 2, "rows": 2 } [/block] **Framed Image Options** Optional child arguments for the framed_image_options hash. The only framed_image_option available to Route #1 is image_size. The framed image options such as frame_width and mat_width are inherited from the print_size attached to this framed_image and thus can't be defined with this route. Use Route #2 to define frame options different from the default options of the print_size. [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "image_size", "0-1": "The desired length, in pixels, of the longest edge of your image (either width or height)" }, "cols": 2, "rows": 1 } [/block] ##Route #2: Create a framed image from any image on the web [block:api-header] { "type": "post", "title": "{level_api_url}/framed_images" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "image_url", "0-1": "**required**", "1-0": "width", "1-1": "**required**", "2-0": "height", "2-1": "**required**", "3-0": "framed_image_options", "3-1": "*optional*" }, "cols": 2, "rows": 4 } [/block] **Framed Image Options** Optional child arguments for the framed_image_options hash. [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "image_size", "0-1": "*optional*", "1-0": "golden_ratio", "1-1": "*optional*", "2-0": "frame_width", "3-0": "mat_width", "4-0": "frame_color", "5-0": "mat_color", "6-0": "glaze", "2-1": "*optional*", "3-1": "*optional*", "4-1": "*optional*", "5-1": "*optional*", "6-1": "*optional*" }, "cols": 2, "rows": 7 } [/block] [block:textarea] { "text": "Route #1", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X POST -d '{ \"framed_image\": { \"framed_image_options\": { \"image_size\": 600 }}, \"postback_url\": \"https://your-domain.com/webhook\" }' https://levelframes.com/api/v1/print_sizes/{print_size_id}/framed_images", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\" => true, \n \"status\" => 200,\n \"data\" => {\n \"framed_image\" => {\n \"id\" => \"{framed_image_id}\",\n\t\t\t\"print_size_id\" => \"{print_size_id}\",\n \t\t\"print_id\" => \"{print_id}\",\n \t\t\"image_size\" => 600,\n \"url\" => \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4w.jpg\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] [block:textarea] { "text": "Route #2", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X POST -d '{ \"framed_image\": { \"image_url\": \"http://wearestardust.smugmug.com/Iceland/i-fHZz9pm/0/X3/stacks%20HD%20UP-X3.jpg\", \"width\": 16.25, \"height\": 11.125, \"framed_image_options\": { \"image_size\": 400, \"golden_ratio\": true, \"frame_color\": \"black maple\", \"mat_color\": \"black\", \"glaze\": \"non-glare\" }}, \"postback_url\": \"https://your-domain.com/webhook\" }' https://levelframes.com/api/v1/framed_images", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response #2", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\" => true, \n \"status\" => 200,\n \"data\" => {\n \"framed_image\" => {\n \"id\" => \"{framed_image_id}\",\n \t\t\"image_size\" => 400,\n \"url\" => \"https://levle.s3.amazonaws.com/frame_renderings/production/32jjk2312.jpg\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] [block:textarea] { "text": "Webhook Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\": true, \n \"status\": 200,\n \"data\": {\n \"framed_image\": {\n \"id\": \"{id}\",\n \"url\" => \"https://levle.s3.amazonaws.com/frame_renderings/production/dsfjbJ32.jpg\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
**There are two different routes for creating a framed image**. They vary based on whether you want to create a framed image for an existing print_size, or if you just want to pass in any image and get a framed version of it back (image not associated with an artist, print or print_size). ##Route #1: Create a framed image from a print_size [block:api-header] { "type": "post", "title": "{level_api_url}/print_sizes/{print_size_id}/framed_images" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "print_size_id", "0-1": "**required**", "1-0": "framed_image_options\n(hash)", "1-1": "*optional*" }, "cols": 2, "rows": 2 } [/block] **Framed Image Options** Optional child arguments for the framed_image_options hash. The only framed_image_option available to Route #1 is image_size. The framed image options such as frame_width and mat_width are inherited from the print_size attached to this framed_image and thus can't be defined with this route. Use Route #2 to define frame options different from the default options of the print_size. [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "image_size", "0-1": "The desired length, in pixels, of the longest edge of your image (either width or height)" }, "cols": 2, "rows": 1 } [/block] ##Route #2: Create a framed image from any image on the web [block:api-header] { "type": "post", "title": "{level_api_url}/framed_images" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "image_url", "0-1": "**required**", "1-0": "width", "1-1": "**required**", "2-0": "height", "2-1": "**required**", "3-0": "framed_image_options", "3-1": "*optional*" }, "cols": 2, "rows": 4 } [/block] **Framed Image Options** Optional child arguments for the framed_image_options hash. [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "image_size", "0-1": "*optional*", "1-0": "golden_ratio", "1-1": "*optional*", "2-0": "frame_width", "3-0": "mat_width", "4-0": "frame_color", "5-0": "mat_color", "6-0": "glaze", "2-1": "*optional*", "3-1": "*optional*", "4-1": "*optional*", "5-1": "*optional*", "6-1": "*optional*" }, "cols": 2, "rows": 7 } [/block] [block:textarea] { "text": "Route #1", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X POST -d '{ \"framed_image\": { \"framed_image_options\": { \"image_size\": 600 }}, \"postback_url\": \"https://your-domain.com/webhook\" }' https://levelframes.com/api/v1/print_sizes/{print_size_id}/framed_images", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\" => true, \n \"status\" => 200,\n \"data\" => {\n \"framed_image\" => {\n \"id\" => \"{framed_image_id}\",\n\t\t\t\"print_size_id\" => \"{print_size_id}\",\n \t\t\"print_id\" => \"{print_id}\",\n \t\t\"image_size\" => 600,\n \"url\" => \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4w.jpg\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] [block:textarea] { "text": "Route #2", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X POST -d '{ \"framed_image\": { \"image_url\": \"http://wearestardust.smugmug.com/Iceland/i-fHZz9pm/0/X3/stacks%20HD%20UP-X3.jpg\", \"width\": 16.25, \"height\": 11.125, \"framed_image_options\": { \"image_size\": 400, \"golden_ratio\": true, \"frame_color\": \"black maple\", \"mat_color\": \"black\", \"glaze\": \"non-glare\" }}, \"postback_url\": \"https://your-domain.com/webhook\" }' https://levelframes.com/api/v1/framed_images", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response #2", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\" => true, \n \"status\" => 200,\n \"data\" => {\n \"framed_image\" => {\n \"id\" => \"{framed_image_id}\",\n \t\t\"image_size\" => 400,\n \"url\" => \"https://levle.s3.amazonaws.com/frame_renderings/production/32jjk2312.jpg\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block] [block:textarea] { "text": "Webhook Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\": true, \n \"status\": 200,\n \"data\": {\n \"framed_image\": {\n \"id\": \"{id}\",\n \"url\" => \"https://levle.s3.amazonaws.com/frame_renderings/production/dsfjbJ32.jpg\"\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
{"_id":"55958bd800d52a23007886b3","user":"558233c6b806360d00244671","editedParams":true,"link_external":false,"link_url":"","parentDoc":null,"sync_unique":"","title":"Retrieve Framed Image","updates":[],"body":"[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"{level_api_url}/framed_images/{id}\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"id\",\n    \"0-1\": \"**required**\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Authorization: Token token=YOUR_API_KEY\\\" https://www.levelframes.com/api/v1/framed_images/{id}\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{ \\n  \\\"success\\\" => true, \\n  \\\"status\\\" => 200,\\n  \\\"data\\\" => {\\n    \\\"framed_image\\\" => {\\n      \\\"id\\\" => \\\"{framed_image_id}\\\",\\n      \\\"url\\\" => \\\"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4w.jpg\\\",\\n\\t\\t\\t\\\"print_size_id\\\": \\\"{print_size_id}\\\", #if present\\n  \\t\\t\\\"print_id\\\": \\\"{print_id}\\\", #if present\\n  \\t\\t\\\"image_size\\\": 300\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"Fetch data about a specific framed image","githubsync":"","hidden":false,"project":"558233f75b7fa60d0068b466","api":{"params":[{"default":"","type":"string","name":"id","in":"path","_id":"5595ecfca239010d00648c59","required":false,"desc":"framed image id"}],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":"/framed_images/:id","auth":"required","examples":{"codes":[{"language":"text","code":"","name":""}]}},"createdAt":"2015-07-02T19:07:04.369Z","slug":"retrieve-framed-image","type":"basic","version":"558233f75b7fa60d0068b469","__v":2,"category":"55958b985bf6bf0d00fb0d4e","editedParams2":true,"order":2,"childrenPages":[]}

Retrieve Framed Image

Fetch data about a specific framed image

[block:api-header] { "type": "get", "title": "{level_api_url}/framed_images/{id}" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/framed_images/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\" => true, \n \"status\" => 200,\n \"data\" => {\n \"framed_image\" => {\n \"id\" => \"{framed_image_id}\",\n \"url\" => \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4w.jpg\",\n\t\t\t\"print_size_id\": \"{print_size_id}\", #if present\n \t\t\"print_id\": \"{print_id}\", #if present\n \t\t\"image_size\": 300\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
[block:api-header] { "type": "get", "title": "{level_api_url}/framed_images/{id}" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/framed_images/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\" => true, \n \"status\" => 200,\n \"data\" => {\n \"framed_image\" => {\n \"id\" => \"{framed_image_id}\",\n \"url\" => \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4w.jpg\",\n\t\t\t\"print_size_id\": \"{print_size_id}\", #if present\n \t\t\"print_id\": \"{print_id}\", #if present\n \t\t\"image_size\": 300\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
{"_id":"55958bf49b8d0a25005a7d5f","version":"558233f75b7fa60d0068b469","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"body":"There is no update route for this endpoint. Just use the \"create framed image\" method to make a new framed image with different options.\n\nIf you want a new framed image for an existing print size, please use the put route for print_size, and set the following argument: **\"create_framed_image\": true**","excerpt":"No route. No need for this action","link_external":false,"slug":"update-framed-image","sync_unique":"","user":"558233c6b806360d00244671","createdAt":"2015-07-02T19:07:32.674Z","githubsync":"","link_url":"","order":3,"parentDoc":null,"project":"558233f75b7fa60d0068b466","title":"Update Framed Image","type":"basic","__v":1,"category":"55958b985bf6bf0d00fb0d4e","hidden":false,"updates":[],"childrenPages":[]}

Update Framed Image

No route. No need for this action

There is no update route for this endpoint. Just use the "create framed image" method to make a new framed image with different options. If you want a new framed image for an existing print size, please use the put route for print_size, and set the following argument: **"create_framed_image": true**
There is no update route for this endpoint. Just use the "create framed image" method to make a new framed image with different options. If you want a new framed image for an existing print size, please use the put route for print_size, and set the following argument: **"create_framed_image": true**
{"_id":"55958c025bf6bf0d00fb0d51","link_url":"","slug":"delete-framed-image","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"excerpt":"Permanently delete a framed image","githubsync":"","link_external":false,"sync_unique":"","type":"basic","user":"558233c6b806360d00244671","__v":1,"category":"55958b985bf6bf0d00fb0d4e","hidden":false,"parentDoc":null,"project":"558233f75b7fa60d0068b466","title":"Delete Framed Image","body":"This is only needed if you have an unwanted framed image attached to a print_size object. \n[block:api-header]\n{\n  \"type\": \"delete\",\n  \"title\": \"{level_api_url}/framed_images/{id}\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"id\",\n    \"0-1\": \"**required**\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Authorization: Token token=YOUR_API_KEY\\\" -X DELETE https://www.levelframes.com/api/v1/framed_images/{id}\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{ \\n  \\\"success\\\" => true, \\n  \\\"status\\\" => 200,\\n  \\\"data\\\" => {\\n    \\\"framed_image\\\" => {\\n      \\\"id\\\" => \\\"{framed_image_id}\\\",\\n      \\\"url\\\" => \\\"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4w.jpg\\\",\\n      \\\"print_size_id\\\": \\\"{print_size_id}\\\", #if present\\n      \\\"print_id\\\": \\\"{print_id}\\\", #if present\\n      \\\"image_size\\\": 300\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","createdAt":"2015-07-02T19:07:46.262Z","order":4,"updates":[],"version":"558233f75b7fa60d0068b469","childrenPages":[]}

Delete Framed Image

Permanently delete a framed image

This is only needed if you have an unwanted framed image attached to a print_size object. [block:api-header] { "type": "delete", "title": "{level_api_url}/framed_images/{id}" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" -X DELETE https://www.levelframes.com/api/v1/framed_images/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\" => true, \n \"status\" => 200,\n \"data\" => {\n \"framed_image\" => {\n \"id\" => \"{framed_image_id}\",\n \"url\" => \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4w.jpg\",\n \"print_size_id\": \"{print_size_id}\", #if present\n \"print_id\": \"{print_id}\", #if present\n \"image_size\": 300\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
This is only needed if you have an unwanted framed image attached to a print_size object. [block:api-header] { "type": "delete", "title": "{level_api_url}/framed_images/{id}" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" -X DELETE https://www.levelframes.com/api/v1/framed_images/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\" => true, \n \"status\" => 200,\n \"data\" => {\n \"framed_image\" => {\n \"id\" => \"{framed_image_id}\",\n \"url\" => \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4w.jpg\",\n \"print_size_id\": \"{print_size_id}\", #if present\n \"print_id\": \"{print_id}\", #if present\n \"image_size\": 300\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
{"_id":"55958c115bf6bf0d00fb0d53","project":"558233f75b7fa60d0068b466","__v":2,"api":{"url":"","auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"language":"json","code":"{}","name":"","status":400}]},"settings":""},"body":"**There are two different routes for this method.** \n\n##Route #1: List all framed images that belong to a print_size\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"{level_api_url}/print_sizes/{print_size_id}/framed_images\"\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Route #1\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"print_size_id\",\n    \"0-1\": \"**required**\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\n##Route #2: List all framed images associated with your account\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"{level_api_url}/framed_images\"\n}\n[/block]\nNo required arguments for this method route. \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Authorization: Token token=YOUR_API_KEY\\\" https://www.levelframes.com/api/v1/print_sizes/{print_size_id}/framed_images\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Route #2\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Authorization: Token token=YOUR_API_KEY\\\" https://www.levelframes.com/api/v1/framed_images\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{ \\n  \\\"success\\\" => true, \\n  \\\"status\\\" => 200,\\n  \\\"data\\\" => {\\n    \\\"framed_images\\\" => [ \\n  \\t\\t{\\n        \\\"id\\\" => \\\"{framed_image_id}\\\",\\n        \\\"print_size_id\\\" => \\\"{print_size_id}\\\",\\n        \\\"print_id\\\" => \\\"{print_id}\\\",\\n        \\\"image_size\\\" => 600,\\n        \\\"url\\\" => \\\"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4w.jpg\\\"\\n    \\t}\\n\\t\\t],\\n\\t\\t\\\"count\\\": 1\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","githubsync":"","hidden":false,"order":5,"category":"55958b985bf6bf0d00fb0d4e","createdAt":"2015-07-02T19:08:01.930Z","link_external":false,"slug":"list-all-framed-images","link_url":"","title":"List All Framed Images","type":"basic","updates":[],"user":"558233c6b806360d00244671","parentDoc":null,"sync_unique":"","version":"558233f75b7fa60d0068b469","childrenPages":[]}

List All Framed Images


**There are two different routes for this method.** ##Route #1: List all framed images that belong to a print_size [block:api-header] { "type": "get", "title": "{level_api_url}/print_sizes/{print_size_id}/framed_images" } [/block] [block:textarea] { "text": "Route #1", "sidebar": true } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "print_size_id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block] ##Route #2: List all framed images associated with your account [block:api-header] { "type": "get", "title": "{level_api_url}/framed_images" } [/block] No required arguments for this method route. [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/print_sizes/{print_size_id}/framed_images", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Route #2", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/framed_images", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\" => true, \n \"status\" => 200,\n \"data\" => {\n \"framed_images\" => [ \n \t\t{\n \"id\" => \"{framed_image_id}\",\n \"print_size_id\" => \"{print_size_id}\",\n \"print_id\" => \"{print_id}\",\n \"image_size\" => 600,\n \"url\" => \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4w.jpg\"\n \t}\n\t\t],\n\t\t\"count\": 1\n }\n}", "language": "json" } ], "sidebar": true } [/block]
**There are two different routes for this method.** ##Route #1: List all framed images that belong to a print_size [block:api-header] { "type": "get", "title": "{level_api_url}/print_sizes/{print_size_id}/framed_images" } [/block] [block:textarea] { "text": "Route #1", "sidebar": true } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "print_size_id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block] ##Route #2: List all framed images associated with your account [block:api-header] { "type": "get", "title": "{level_api_url}/framed_images" } [/block] No required arguments for this method route. [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/print_sizes/{print_size_id}/framed_images", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Route #2", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/framed_images", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\" => true, \n \"status\" => 200,\n \"data\" => {\n \"framed_images\" => [ \n \t\t{\n \"id\" => \"{framed_image_id}\",\n \"print_size_id\" => \"{print_size_id}\",\n \"print_id\" => \"{print_id}\",\n \"image_size\" => 600,\n \"url\" => \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4w.jpg\"\n \t}\n\t\t],\n\t\t\"count\": 1\n }\n}", "language": "json" } ], "sidebar": true } [/block]
{"_id":"55958cd19b8d0a25005a7d62","isReference":false,"order":0,"parentDoc":null,"project":"558233f75b7fa60d0068b466","title":"Create Combined Content","updates":[],"__v":9,"excerpt":"Create an artist, a print and multiple print sizes in one request","link_url":"","category":"55958c9a00d52a23007886b6","githubsync":"","hidden":false,"link_external":false,"slug":"create-combined-content-1","api":{"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":"","auth":"required","params":[]},"body":"Build up everything in one API request. This method combines the create methods for artists, prints, print_sizes and framed_images.\n[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"{level_api_url}/combined\"\n}\n[/block]\nIn the combined method you have the option of creating prints and print sizes that are independent of an artist, or you can also create an artist and attach the prints to the artist.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"artist\\n(hash)\",\n    \"0-1\": \"*optional*\",\n    \"1-0\": \"print\\n(hash)\",\n    \"1-1\": \"*optional*\",\n    \"2-0\": \"postback_url\",\n    \"2-1\": \"*optional*\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\n**Artist**\nHash object for artist arguments\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"name\",\n    \"0-1\": \"**required**\",\n    \"1-0\": \"print\\n(hash)\",\n    \"1-1\": \"*optional*\",\n    \"2-0\": \"(all other **[artist arguments listed above](http://level.readme.io/v1.0/docs/the-artist-object)** are available here as optional arguments)\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\n**Print**\nHash object for print arguments\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"high_res_image_url\",\n    \"0-1\": \"**required**\",\n    \"1-0\": \"print_sizes\\n(array of hash objects)\",\n    \"2-0\": \"(all other **[print arguments listed above](http://level.readme.io/v1.0/docs/the-print-object)** are available here as optional arguments)\",\n    \"1-1\": \"*optional*\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\n**Print Sizes**\nHash object print size arguments\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"width\",\n    \"0-1\": \"**required**\",\n    \"1-0\": \"height\",\n    \"1-1\": \"**required**\",\n    \"2-0\": \"create_framed_image\",\n    \"2-1\": \"*optional*\",\n    \"3-0\": \"framed_image_options\\n(**[Hash arguments documented above](http://level.readme.io/v1.0/docs/list-all-print-sizes)**)\",\n    \"3-1\": \"*optional*\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Accept: application/json\\\" -H \\\"Content-type: application/json\\\" -H \\\"Authorization: Token token=YOUR_API_KEY\\\" -X POST -d '{ \\\"combined\\\": { \\\"artist\\\": { \\\"name\\\": \\\"John Doe\\\", \\\"print\\\": { \\\"high_res_image_url\\\": \\\"http://i.imgur.com/ZpbUPor.jpg\\\", \\\"name\\\": \\\"Test Print\\\", \\\"is_active\\\": true, \\\"print_sizes\\\": [{ \\\"width\\\": 20, \\\"height\\\": 18, \\\"price\\\": 22.50, \\\"quantity\\\": 10, \\\"is_active\\\": true, \\\"default_options\\\": { \\\"golden_ratio\\\": true, \\\"frame_color\\\": \\\"natural maple\\\", \\\"glaze\\\": \\\"non-glare\\\" }, \\\"create_framed_image\\\": true, \\\"framed_image_options\\\": { \\\"image_size\\\": \\\"400\\\" }, \\\"custom_id\\\": \\\"34342fdsfssss\\\" }, { \\\"width\\\": 23, \\\"height\\\": 15, \\\"price\\\": 49.50, \\\"quantity\\\": 10, \\\"is_active\\\": true, \\\"default_options\\\": { \\\"frame_color\\\": \\\"black maple\\\", \\\"glaze\\\": \\\"non-glare\\\", \\\"paper_type\\\": \\\"matte\\\" }, \\\"create_framed_image\\\": true, \\\"framed_image_options\\\": { \\\"image_size\\\": \\\"600\\\" }, \\\"custom_id\\\": \\\"34342fdsfs23f\\\" }]}}}, \\\"postback_url\\\": \\\"http://www.your-domain.com/webhook\\\" }' https://www.levelframes.com/api/v1/combined\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{ \\n  \\\"success\\\": true, \\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n    \\\"combined\\\": {\\n      \\\"artist\\\": {\\n        \\\"id\\\":\\\"{artist_id}\\\",\\n        \\\"name\\\":\\\"John Doe\\\",\\n        \\\"bio\\\":\\\"A little about me\\\",\\n        \\\"personal_website\\\":\\\"http://www.johndoe.com\\\",\\n        \\\"twitter_url\\\":null,\\n        \\\"facebook_url\\\":null,\\n        \\\"instagram_url\\\":null,\\n        \\\"custom_id\\\":null,\\n        \\\"url\\\": \\\"https://www.levelframes.com/artists/john-doe\\\",\\n        \\\"print\\\": {\\n          \\\"id\\\":\\\"323njjknj232jkb34\\\",\\n          \\\"name\\\":\\\"Test Print\\\",\\n          \\\"image\\\":null,\\n          \\\"is_active\\\":true,\\n          \\\"description\\\":null,\\n          \\\"printing_in_house\\\":true,\\n          \\\"url\\\": \\\"https://www.levelframes.com/prints/test-print\\\",\\n          \\\"custom_id\\\":null,\\n          \\\"artist_id\\\": \\\"{artist_id}\\\",\\n          \\\"print_sizes\\\": [\\n            {\\n              \\\"id\\\":\\\"{id}\\\",\\n              \\\"width\\\":20,\\n              \\\"height\\\":18,\\n              \\\"is_active\\\":true,\\n              \\\"custom_id\\\":\\\"124214\\\",\\n              \\\"print_id\\\":\\\"{print_id}\\\",\\n              \\\"default_options\\\": {\\n                \\\"frame_width\\\": 0.75,\\n                \\\"mat_width\\\": 2,\\n                \\\"frame_color\\\": \\\"natural maple\\\",\\n                \\\"mat_color\\\": \\\"black\\\",\\n                \\\"glaze\\\": \\\"non-glare\\\",\\n                \\\"paper_type\\\": \\\"glossy\\\"\\n              },\\n              \\\"framed_images\\\": [{\\n                \\\"id\\\": \\\"{framed_image_id}\\\",\\n                \\\"size\\\": 500,\\n                \\\"url\\\": \\\"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\\\"\\n              }],\\n              \\\"prices\\\": {\\n                \\\"level_printing_price\\\": 11.50,\\n                \\\"base_print_price\\\": 22.50,\\n                \\\"total_print_price\\\": 24.00,\\n                \\\"frame_price\\\": 65.00,\\n                \\\"total_price\\\": 89.00\\n              },\\n              \\\"product_urls\\\": {\\n                \\\"print_detail_url\\\": \\\"https://www.levelframes.com/prints/{print_slug}\\\",\\n                \\\"frame_editor_url\\\": \\\"https://www.levelframes.com/frames/new?level_id=43452\\\",\\n                \\\"print_add_to_cart_url\\\": \\\"https://www.levelframes.com/prints/add?level_id=43452\\\"\\n              }\\n            },\\n            {\\n              \\\"id\\\":\\\"{id}\\\",\\n              \\\"width\\\":23,\\n              \\\"height\\\":15,\\n              \\\"is_active\\\":true,\\n              \\\"print_id\\\":\\\"{print_id}\\\",\\n              \\\"default_options\\\": {\\n                \\\"frame_width\\\": 0.75,\\n                \\\"mat_width\\\": 2,\\n                \\\"frame_color\\\": \\\"natural maple\\\",\\n                \\\"mat_color\\\": \\\"black\\\",\\n                \\\"glaze\\\": \\\"non-glare\\\",\\n                \\\"paper_type\\\": \\\"glossy\\\"\\n              },\\n              \\\"framed_images\\\": [{\\n                \\\"id\\\": \\\"{framed_image_id}\\\",\\n                \\\"size\\\": 600,\\n                \\\"url\\\": \\\"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\\\"\\n              }],\\n              \\\"prices\\\": {\\n                \\\"level_printing_price\\\": 11.50,\\n                \\\"base_print_price\\\": 22.50,\\n                \\\"total_print_price\\\": 24.00,\\n                \\\"frame_price\\\": 65.00,\\n                \\\"total_price\\\": 89.00\\n              },\\n              \\\"product_urls\\\": {\\n                \\\"print_detail_url\\\": \\\"https://www.levelframes.com/prints/{print_slug}\\\",\\n                \\\"frame_editor_url\\\": \\\"https://www.levelframes.com/frames/new?level_id=434522\\\",\\n                \\\"print_add_to_cart_url\\\": \\\"https://www.levelframes.com/prints/add?level_id=43452\\\"\\n              }\\n            }\\n          ]\\n        }\\n      }\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","version":"558233f75b7fa60d0068b469","user":"558233c6b806360d00244671","createdAt":"2015-07-02T19:11:13.229Z","sync_unique":"","type":"basic","childrenPages":[]}

Create Combined Content

Create an artist, a print and multiple print sizes in one request

Build up everything in one API request. This method combines the create methods for artists, prints, print_sizes and framed_images. [block:api-header] { "type": "post", "title": "{level_api_url}/combined" } [/block] In the combined method you have the option of creating prints and print sizes that are independent of an artist, or you can also create an artist and attach the prints to the artist. [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "artist\n(hash)", "0-1": "*optional*", "1-0": "print\n(hash)", "1-1": "*optional*", "2-0": "postback_url", "2-1": "*optional*" }, "cols": 2, "rows": 3 } [/block] **Artist** Hash object for artist arguments [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "name", "0-1": "**required**", "1-0": "print\n(hash)", "1-1": "*optional*", "2-0": "(all other **[artist arguments listed above](http://level.readme.io/v1.0/docs/the-artist-object)** are available here as optional arguments)" }, "cols": 2, "rows": 3 } [/block] **Print** Hash object for print arguments [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "high_res_image_url", "0-1": "**required**", "1-0": "print_sizes\n(array of hash objects)", "2-0": "(all other **[print arguments listed above](http://level.readme.io/v1.0/docs/the-print-object)** are available here as optional arguments)", "1-1": "*optional*" }, "cols": 2, "rows": 3 } [/block] **Print Sizes** Hash object print size arguments [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "width", "0-1": "**required**", "1-0": "height", "1-1": "**required**", "2-0": "create_framed_image", "2-1": "*optional*", "3-0": "framed_image_options\n(**[Hash arguments documented above](http://level.readme.io/v1.0/docs/list-all-print-sizes)**)", "3-1": "*optional*" }, "cols": 2, "rows": 4 } [/block] [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X POST -d '{ \"combined\": { \"artist\": { \"name\": \"John Doe\", \"print\": { \"high_res_image_url\": \"http://i.imgur.com/ZpbUPor.jpg\", \"name\": \"Test Print\", \"is_active\": true, \"print_sizes\": [{ \"width\": 20, \"height\": 18, \"price\": 22.50, \"quantity\": 10, \"is_active\": true, \"default_options\": { \"golden_ratio\": true, \"frame_color\": \"natural maple\", \"glaze\": \"non-glare\" }, \"create_framed_image\": true, \"framed_image_options\": { \"image_size\": \"400\" }, \"custom_id\": \"34342fdsfssss\" }, { \"width\": 23, \"height\": 15, \"price\": 49.50, \"quantity\": 10, \"is_active\": true, \"default_options\": { \"frame_color\": \"black maple\", \"glaze\": \"non-glare\", \"paper_type\": \"matte\" }, \"create_framed_image\": true, \"framed_image_options\": { \"image_size\": \"600\" }, \"custom_id\": \"34342fdsfs23f\" }]}}}, \"postback_url\": \"http://www.your-domain.com/webhook\" }' https://www.levelframes.com/api/v1/combined", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\": true, \n \"status\": 200,\n \"data\": {\n \"combined\": {\n \"artist\": {\n \"id\":\"{artist_id}\",\n \"name\":\"John Doe\",\n \"bio\":\"A little about me\",\n \"personal_website\":\"http://www.johndoe.com\",\n \"twitter_url\":null,\n \"facebook_url\":null,\n \"instagram_url\":null,\n \"custom_id\":null,\n \"url\": \"https://www.levelframes.com/artists/john-doe\",\n \"print\": {\n \"id\":\"323njjknj232jkb34\",\n \"name\":\"Test Print\",\n \"image\":null,\n \"is_active\":true,\n \"description\":null,\n \"printing_in_house\":true,\n \"url\": \"https://www.levelframes.com/prints/test-print\",\n \"custom_id\":null,\n \"artist_id\": \"{artist_id}\",\n \"print_sizes\": [\n {\n \"id\":\"{id}\",\n \"width\":20,\n \"height\":18,\n \"is_active\":true,\n \"custom_id\":\"124214\",\n \"print_id\":\"{print_id}\",\n \"default_options\": {\n \"frame_width\": 0.75,\n \"mat_width\": 2,\n \"frame_color\": \"natural maple\",\n \"mat_color\": \"black\",\n \"glaze\": \"non-glare\",\n \"paper_type\": \"glossy\"\n },\n \"framed_images\": [{\n \"id\": \"{framed_image_id}\",\n \"size\": 500,\n \"url\": \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\"\n }],\n \"prices\": {\n \"level_printing_price\": 11.50,\n \"base_print_price\": 22.50,\n \"total_print_price\": 24.00,\n \"frame_price\": 65.00,\n \"total_price\": 89.00\n },\n \"product_urls\": {\n \"print_detail_url\": \"https://www.levelframes.com/prints/{print_slug}\",\n \"frame_editor_url\": \"https://www.levelframes.com/frames/new?level_id=43452\",\n \"print_add_to_cart_url\": \"https://www.levelframes.com/prints/add?level_id=43452\"\n }\n },\n {\n \"id\":\"{id}\",\n \"width\":23,\n \"height\":15,\n \"is_active\":true,\n \"print_id\":\"{print_id}\",\n \"default_options\": {\n \"frame_width\": 0.75,\n \"mat_width\": 2,\n \"frame_color\": \"natural maple\",\n \"mat_color\": \"black\",\n \"glaze\": \"non-glare\",\n \"paper_type\": \"glossy\"\n },\n \"framed_images\": [{\n \"id\": \"{framed_image_id}\",\n \"size\": 600,\n \"url\": \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\"\n }],\n \"prices\": {\n \"level_printing_price\": 11.50,\n \"base_print_price\": 22.50,\n \"total_print_price\": 24.00,\n \"frame_price\": 65.00,\n \"total_price\": 89.00\n },\n \"product_urls\": {\n \"print_detail_url\": \"https://www.levelframes.com/prints/{print_slug}\",\n \"frame_editor_url\": \"https://www.levelframes.com/frames/new?level_id=434522\",\n \"print_add_to_cart_url\": \"https://www.levelframes.com/prints/add?level_id=43452\"\n }\n }\n ]\n }\n }\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
Build up everything in one API request. This method combines the create methods for artists, prints, print_sizes and framed_images. [block:api-header] { "type": "post", "title": "{level_api_url}/combined" } [/block] In the combined method you have the option of creating prints and print sizes that are independent of an artist, or you can also create an artist and attach the prints to the artist. [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "artist\n(hash)", "0-1": "*optional*", "1-0": "print\n(hash)", "1-1": "*optional*", "2-0": "postback_url", "2-1": "*optional*" }, "cols": 2, "rows": 3 } [/block] **Artist** Hash object for artist arguments [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "name", "0-1": "**required**", "1-0": "print\n(hash)", "1-1": "*optional*", "2-0": "(all other **[artist arguments listed above](http://level.readme.io/v1.0/docs/the-artist-object)** are available here as optional arguments)" }, "cols": 2, "rows": 3 } [/block] **Print** Hash object for print arguments [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "high_res_image_url", "0-1": "**required**", "1-0": "print_sizes\n(array of hash objects)", "2-0": "(all other **[print arguments listed above](http://level.readme.io/v1.0/docs/the-print-object)** are available here as optional arguments)", "1-1": "*optional*" }, "cols": 2, "rows": 3 } [/block] **Print Sizes** Hash object print size arguments [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "width", "0-1": "**required**", "1-0": "height", "1-1": "**required**", "2-0": "create_framed_image", "2-1": "*optional*", "3-0": "framed_image_options\n(**[Hash arguments documented above](http://level.readme.io/v1.0/docs/list-all-print-sizes)**)", "3-1": "*optional*" }, "cols": 2, "rows": 4 } [/block] [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X POST -d '{ \"combined\": { \"artist\": { \"name\": \"John Doe\", \"print\": { \"high_res_image_url\": \"http://i.imgur.com/ZpbUPor.jpg\", \"name\": \"Test Print\", \"is_active\": true, \"print_sizes\": [{ \"width\": 20, \"height\": 18, \"price\": 22.50, \"quantity\": 10, \"is_active\": true, \"default_options\": { \"golden_ratio\": true, \"frame_color\": \"natural maple\", \"glaze\": \"non-glare\" }, \"create_framed_image\": true, \"framed_image_options\": { \"image_size\": \"400\" }, \"custom_id\": \"34342fdsfssss\" }, { \"width\": 23, \"height\": 15, \"price\": 49.50, \"quantity\": 10, \"is_active\": true, \"default_options\": { \"frame_color\": \"black maple\", \"glaze\": \"non-glare\", \"paper_type\": \"matte\" }, \"create_framed_image\": true, \"framed_image_options\": { \"image_size\": \"600\" }, \"custom_id\": \"34342fdsfs23f\" }]}}}, \"postback_url\": \"http://www.your-domain.com/webhook\" }' https://www.levelframes.com/api/v1/combined", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\": true, \n \"status\": 200,\n \"data\": {\n \"combined\": {\n \"artist\": {\n \"id\":\"{artist_id}\",\n \"name\":\"John Doe\",\n \"bio\":\"A little about me\",\n \"personal_website\":\"http://www.johndoe.com\",\n \"twitter_url\":null,\n \"facebook_url\":null,\n \"instagram_url\":null,\n \"custom_id\":null,\n \"url\": \"https://www.levelframes.com/artists/john-doe\",\n \"print\": {\n \"id\":\"323njjknj232jkb34\",\n \"name\":\"Test Print\",\n \"image\":null,\n \"is_active\":true,\n \"description\":null,\n \"printing_in_house\":true,\n \"url\": \"https://www.levelframes.com/prints/test-print\",\n \"custom_id\":null,\n \"artist_id\": \"{artist_id}\",\n \"print_sizes\": [\n {\n \"id\":\"{id}\",\n \"width\":20,\n \"height\":18,\n \"is_active\":true,\n \"custom_id\":\"124214\",\n \"print_id\":\"{print_id}\",\n \"default_options\": {\n \"frame_width\": 0.75,\n \"mat_width\": 2,\n \"frame_color\": \"natural maple\",\n \"mat_color\": \"black\",\n \"glaze\": \"non-glare\",\n \"paper_type\": \"glossy\"\n },\n \"framed_images\": [{\n \"id\": \"{framed_image_id}\",\n \"size\": 500,\n \"url\": \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\"\n }],\n \"prices\": {\n \"level_printing_price\": 11.50,\n \"base_print_price\": 22.50,\n \"total_print_price\": 24.00,\n \"frame_price\": 65.00,\n \"total_price\": 89.00\n },\n \"product_urls\": {\n \"print_detail_url\": \"https://www.levelframes.com/prints/{print_slug}\",\n \"frame_editor_url\": \"https://www.levelframes.com/frames/new?level_id=43452\",\n \"print_add_to_cart_url\": \"https://www.levelframes.com/prints/add?level_id=43452\"\n }\n },\n {\n \"id\":\"{id}\",\n \"width\":23,\n \"height\":15,\n \"is_active\":true,\n \"print_id\":\"{print_id}\",\n \"default_options\": {\n \"frame_width\": 0.75,\n \"mat_width\": 2,\n \"frame_color\": \"natural maple\",\n \"mat_color\": \"black\",\n \"glaze\": \"non-glare\",\n \"paper_type\": \"glossy\"\n },\n \"framed_images\": [{\n \"id\": \"{framed_image_id}\",\n \"size\": 600,\n \"url\": \"https://levle.s3.amazonaws.com/frame_renderings/production/23hj3k2h4.jpg\"\n }],\n \"prices\": {\n \"level_printing_price\": 11.50,\n \"base_print_price\": 22.50,\n \"total_print_price\": 24.00,\n \"frame_price\": 65.00,\n \"total_price\": 89.00\n },\n \"product_urls\": {\n \"print_detail_url\": \"https://www.levelframes.com/prints/{print_slug}\",\n \"frame_editor_url\": \"https://www.levelframes.com/frames/new?level_id=434522\",\n \"print_add_to_cart_url\": \"https://www.levelframes.com/prints/add?level_id=43452\"\n }\n }\n ]\n }\n }\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
{"_id":"55bb9bad7313650d00c46f19","category":"55bb9b077313650d00c46f17","createdAt":"2015-07-31T16:00:45.345Z","githubsync":"","link_external":false,"version":"558233f75b7fa60d0068b469","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"body":"[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"https://www.levelframes.com/api/v1/orders\"\n}\n[/block]\nUse this endpoint for creating new orders with Level. Send us your print information and frame options (if framing the print) along with the customer shipping address. We will print, frame and fulfill the order. The customer will receive a tracking email when the item is shipped.\n\nExample JSON post params for creating a new order:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"json_post_params = {\\n  \\\"order\\\": {\\n    \\\"customer_email\\\": \\\"text\\\",\\n    \\\"is_gift\\\": boolean,\\n    \\\"gift_message\\\": \\\"text\\\",\\n    \\\"shipping_address\\\": {\\n      \\\"full_name\\\": \\\"text\\\",\\n      \\\"address1\\\": \\\"text\\\",\\n      \\\"address2\\\": \\\"text (optional)\\\",\\n      \\\"city\\\": \\\"text\\\",\\n      \\\"state\\\": \\\"text\\\",\\n      \\\"zip\\\": \\\"text\\\",\\n      \\\"country\\\": \\\"text\\\",\\n      \\\"phone\\\": \\\"text (optional)\\\"\\n    },\\n    \\\"products\\\": [{\\n      \\\"print\\\": {\\n        \\\"name\\\": \\\"text\\\",\\n        \\\"high_res_image_url\\\": \\\"text\\\",\\n        \\\"width\\\": \\\"decimal\\\",\\n        \\\"height\\\": \\\"decimal\\\",\\n        \\\"artist_id\\\": \\\"text (optional. The Level artist id)\\\",\\n        \\\"artist_name\\\": \\\"text (optional)\\\",\\n        \\\"quantity\\\": \\\"integer (optional. Default = 1)\\\",\\n        \\\"paper_type\\\": \\\"text (optional. default = 'glossy')\\\",\\n        \\\"framed\\\": \\\"boolean (optional. default = false)\\\",\\n        \\\"frame_options\\\": {\\n          \\\"golden_ratio\\\": \\\"boolean (optional. default = false)\\\",\\n          \\\"mat_width\\\": \\\"decimal (optional. default = 0)\\\",\\n          \\\"frame_width\\\": \\\"decimal (optional. default = 0.75)\\\",\\n          \\\"frame_color\\\": \\\"text (optional. default = 'black maple')\\\",\\n          \\\"mat_color\\\": \\\"text (optional. default = 'off-white')\\\",\\n          \\\"glaze\\\": \\\"text (optional. default = 'standard')\\n        }\\n      }\\n    }]\\n  },\\n  \\\"postback_url\\\": \\\"text (optional)\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nA summary of the order arguments is below:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required & Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"customer_email\",\n    \"0-1\": \"**required**\\ntext\",\n    \"0-2\": \"We will email the customer tracking information when the item ships.\",\n    \"3-0\": \"shipping_address\",\n    \"3-1\": \"**required**\\ntext\",\n    \"3-2\": \"Hash object\",\n    \"4-0\": \"full_name\",\n    \"4-1\": \"**required**\\ntext\",\n    \"4-2\": \"\",\n    \"5-0\": \"address1\",\n    \"5-1\": \"**required**\\ntext\",\n    \"5-2\": \"\",\n    \"6-0\": \"address2\",\n    \"6-1\": \"*optional*\\ntext\",\n    \"7-0\": \"city\",\n    \"7-1\": \"**required**\\ntext\",\n    \"6-2\": \"\",\n    \"7-2\": \"\",\n    \"8-0\": \"state\",\n    \"8-1\": \"**required**\\ntext\",\n    \"8-2\": \"\",\n    \"9-0\": \"zip\",\n    \"9-1\": \"**required**\\ntext\",\n    \"9-2\": \"\",\n    \"10-0\": \"country\",\n    \"10-1\": \"**required**\\ntext\",\n    \"10-2\": \"\",\n    \"11-0\": \"phone\",\n    \"11-1\": \"*optional*\\ntext\",\n    \"11-2\": \"\",\n    \"12-0\": \"products\",\n    \"12-1\": \"**required**\\nobject\",\n    \"12-2\": \"Hash object array\",\n    \"13-0\": \"print\",\n    \"13-1\": \"**required**\\nobject\",\n    \"13-2\": \"Hash object\",\n    \"14-0\": \"name\",\n    \"14-1\": \"**required**\\ntext\",\n    \"14-2\": \"Print name\",\n    \"15-0\": \"high_res_image_url\",\n    \"15-1\": \"**required**\\ntext\",\n    \"15-2\": \"The full url path to a high res version of your image.\",\n    \"16-0\": \"artist_id\",\n    \"16-1\": \"*optional*\\ntext\",\n    \"16-2\": \"The unique level artist id. You can submit this is you want to attach the order print to existing artist.\",\n    \"17-0\": \"artist_name\",\n    \"17-1\": \"*optional*\\ntext\",\n    \"17-2\": \"Submit an artist name if you want there to be artist data associated with the print\",\n    \"18-0\": \"width\",\n    \"18-1\": \"**required**\\ndecimal\",\n    \"18-2\": \"The width of the print\",\n    \"19-0\": \"height\",\n    \"19-1\": \"**required**\\ndecimal\",\n    \"19-2\": \"The height of the print\",\n    \"20-0\": \"quantity\",\n    \"20-1\": \"*optional*\\nDefault = 1\",\n    \"20-2\": \"Quantity of product being ordered\",\n    \"21-0\": \"paper_type\",\n    \"21-1\": \"*optional*\\ntext\\nDefault = \\\"glossy\\\"\",\n    \"21-2\": \"\\\"glossy\\\", \\\"matte\\\"\",\n    \"22-0\": \"framed\",\n    \"22-1\": \"*optional*\\nboolean\\nDefault = false\",\n    \"22-2\": \"If the print being ordered is a framed print, set to true.\",\n    \"23-0\": \"frame_options\",\n    \"23-1\": \"*optional*\\nobject\",\n    \"23-2\": \"If a framed print is being ordered, you can provide frame options\",\n    \"24-0\": \"golden_ratio\",\n    \"25-0\": \"mat_width\",\n    \"24-1\": \"*optional*\\nboolean\\nDefault = false\",\n    \"24-2\": \"Set to true to have the mat and frame width automatically selected for you. This will make it look good.\",\n    \"25-1\": \"*optional*\\ndecimal\\nDefault = 0\",\n    \"25-2\": \"Set the mat width. This will override the golden ratio mat width if it is set.\",\n    \"26-0\": \"frame_width\",\n    \"27-0\": \"frame_color\",\n    \"26-1\": \"*optional*\\ndecimal\\nDefault = 0.75\",\n    \"26-2\": \"Set the frame width. This will override the golden ratio frame width if it is set.\",\n    \"27-1\": \"*optional*\\ntext\\nDefault = 'black maple'\",\n    \"27-2\": \"\\\"black maple\\\", \\\"white maple\\\", \\\"natural maple\\\", \\\"natural walnut\\\"\",\n    \"28-0\": \"mat_color\",\n    \"29-0\": \"\\\"glaze\\\"\",\n    \"28-1\": \"*optional*\\ntext\\nDefault = 'off-white'\",\n    \"28-2\": \"\\\"off-white\\\", \\\"black\\\"\",\n    \"29-1\": \"*optional*\\ntext\\nDefault = 'standard'\",\n    \"29-2\": \"\\\"standard\\\", \\\"uv protection\\\", \\\"non-glare\\\"\",\n    \"30-0\": \"postback_url\",\n    \"30-1\": \"*optional*\\ntext\",\n    \"30-2\": \"Include your webhook postback url to receive the image processing response\",\n    \"1-0\": \"is_gift\",\n    \"1-1\": \"*optional*\\nboolean\",\n    \"1-2\": \"If set to true we will gift wrap the items.\",\n    \"2-0\": \"gift_message\",\n    \"2-1\": \"*optional*\",\n    \"2-2\": \"If a gift message is included we will handwrite the message onto a nice card to include with the order.\"\n  },\n  \"cols\": 3,\n  \"rows\": 31\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Accept: application/json\\\" -H \\\"Content-type: application/json\\\" -H \\\"Authorization: Token token=YOUR_API_KEY\\\" -X POST -d '{ \\\"order\\\": { \\\"customer_email\\\": \\\"johndoe@example.com\\\", \\\"shipping_address\\\": { \\\"full_name\\\": \\\"Calvin n Hobbes\\\", \\\"address1\\\": \\\"231 Elm Street\\\", \\\"city\\\": \\\"San Francisco\\\", \\\"state\\\": \\\"CA\\\", \\\"zip\\\": \\\"99211\\\", \\\"country\\\": \\\"United States\\\" }, \\\"products\\\": [{ \\\"print\\\": { \\\"name\\\": \\\"Earth From Space\\\", \\\"high_res_image_url\\\": \\\"http://i.imgur.com/yrGdFy7.jpg\\\", \\\"width\\\": 18, \\\"height\\\": 15, \\\"paper_type\\\": \\\"matte\\\", \\\"framed\\\": true, \\\"frame_options\\\": { \\\"golden_ratio\\\": true, \\\"frame_color\\\": \\\"Natural Maple\\\", \\\"glaze\\\": \\\"non-glare\\\" }}}]}, \\\"postback_url\\\": \\\"http://your-domain.com/webhook\\\" }' https://www.levelframes.com/api/v1/orders\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"success\\\":true,\\n  \\\"status\\\":200,\\n  \\\"message\\\":\\\"If you're submitting new prints with this order then the your high_res_image_url will be processed in background tasks and the results posted back to your postback_url. The field 'print_image' will be null until this completes successfully.\\\",\\n  \\\"data\\\":{\\n    \\\"order\\\":{\\n      \\\"id\\\":\\\"abvmu3auxr41hi55b3s3\\\",\\n      \\\"total_price\\\":\\\"124.26\\\",\\n      \\\"total_products_price\\\":\\\"121.4\\\",\\n      \\\"shipping_price\\\":\\\"15.0\\\",\\n      \\\"discounts\\\":\\\"12.14\\\",\\n      \\\"shipping_address\\\":{\\n        \\\"full_name\\\":\\\"Calvin n Hobbes\\\",\\n        \\\"address1\\\":\\\"231 Elm Street\\\",\\n        \\\"address2\\\":null,\\n        \\\"city\\\":\\\"San Francisco\\\",\\n        \\\"state\\\":\\\"CA\\\",\\n        \\\"country\\\":\\\"United States\\\",\\n        \\\"phone\\\":null\\n      },\\n      \\\"order_products\\\":[{\\n        \\\"product_price\\\":121.4,\\n        \\\"level_printing_price\\\":18.9,\\n        \\\"paper_type\\\":\\\"matte\\\",\\n        \\\"print_id\\\":\\\"384ez19jnQrhfJUb6A8vGg\\\",\\n        \\\"print_name\\\":\\\"Earth From Space\\\",\\n        \\\"print_image\\\":null,\\n        \\\"artist_id\\\":null,\\n        \\\"artist_name\\\":null,\\n        \\\"print_size_id\\\":\\\"0jGHtlNAWbLhdVcXR60uDQ\\\",\\n        \\\"frame_price\\\":102.5,\\n        \\\"outer_frame_width\\\":22.0,\\n        \\\"outer_frame_height\\\":19.0,\\n        \\\"frame_options\\\":{\\n          \\\"profile\\\":\\\"Natural Maple\\\",\\n          \\\"frame_width\\\":\\\"0.75\\\",\\n          \\\"mat_width\\\":\\\"1.5\\\",\\n          \\\"mat_color\\\":\\\"Off-White\\\",\\n          \\\"glaze\\\":\\\"Non-Glare\\\"\\n        }\\n      }]\\n    }\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","title":"Create Order","user":"558233c6b806360d00244671","__v":8,"hidden":false,"parentDoc":null,"project":"558233f75b7fa60d0068b466","sync_unique":"","excerpt":"Place an order for a print or framed print from the API.","order":0,"slug":"create-order","type":"basic","updates":[],"link_url":"","childrenPages":[]}

Create Order

Place an order for a print or framed print from the API.

[block:api-header] { "type": "post", "title": "https://www.levelframes.com/api/v1/orders" } [/block] Use this endpoint for creating new orders with Level. Send us your print information and frame options (if framing the print) along with the customer shipping address. We will print, frame and fulfill the order. The customer will receive a tracking email when the item is shipped. Example JSON post params for creating a new order: [block:code] { "codes": [ { "code": "json_post_params = {\n \"order\": {\n \"customer_email\": \"text\",\n \"is_gift\": boolean,\n \"gift_message\": \"text\",\n \"shipping_address\": {\n \"full_name\": \"text\",\n \"address1\": \"text\",\n \"address2\": \"text (optional)\",\n \"city\": \"text\",\n \"state\": \"text\",\n \"zip\": \"text\",\n \"country\": \"text\",\n \"phone\": \"text (optional)\"\n },\n \"products\": [{\n \"print\": {\n \"name\": \"text\",\n \"high_res_image_url\": \"text\",\n \"width\": \"decimal\",\n \"height\": \"decimal\",\n \"artist_id\": \"text (optional. The Level artist id)\",\n \"artist_name\": \"text (optional)\",\n \"quantity\": \"integer (optional. Default = 1)\",\n \"paper_type\": \"text (optional. default = 'glossy')\",\n \"framed\": \"boolean (optional. default = false)\",\n \"frame_options\": {\n \"golden_ratio\": \"boolean (optional. default = false)\",\n \"mat_width\": \"decimal (optional. default = 0)\",\n \"frame_width\": \"decimal (optional. default = 0.75)\",\n \"frame_color\": \"text (optional. default = 'black maple')\",\n \"mat_color\": \"text (optional. default = 'off-white')\",\n \"glaze\": \"text (optional. default = 'standard')\n }\n }\n }]\n },\n \"postback_url\": \"text (optional)\"\n}", "language": "json" } ] } [/block] A summary of the order arguments is below: [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required & Type", "h-2": "Description", "0-0": "customer_email", "0-1": "**required**\ntext", "0-2": "We will email the customer tracking information when the item ships.", "3-0": "shipping_address", "3-1": "**required**\ntext", "3-2": "Hash object", "4-0": "full_name", "4-1": "**required**\ntext", "4-2": "", "5-0": "address1", "5-1": "**required**\ntext", "5-2": "", "6-0": "address2", "6-1": "*optional*\ntext", "7-0": "city", "7-1": "**required**\ntext", "6-2": "", "7-2": "", "8-0": "state", "8-1": "**required**\ntext", "8-2": "", "9-0": "zip", "9-1": "**required**\ntext", "9-2": "", "10-0": "country", "10-1": "**required**\ntext", "10-2": "", "11-0": "phone", "11-1": "*optional*\ntext", "11-2": "", "12-0": "products", "12-1": "**required**\nobject", "12-2": "Hash object array", "13-0": "print", "13-1": "**required**\nobject", "13-2": "Hash object", "14-0": "name", "14-1": "**required**\ntext", "14-2": "Print name", "15-0": "high_res_image_url", "15-1": "**required**\ntext", "15-2": "The full url path to a high res version of your image.", "16-0": "artist_id", "16-1": "*optional*\ntext", "16-2": "The unique level artist id. You can submit this is you want to attach the order print to existing artist.", "17-0": "artist_name", "17-1": "*optional*\ntext", "17-2": "Submit an artist name if you want there to be artist data associated with the print", "18-0": "width", "18-1": "**required**\ndecimal", "18-2": "The width of the print", "19-0": "height", "19-1": "**required**\ndecimal", "19-2": "The height of the print", "20-0": "quantity", "20-1": "*optional*\nDefault = 1", "20-2": "Quantity of product being ordered", "21-0": "paper_type", "21-1": "*optional*\ntext\nDefault = \"glossy\"", "21-2": "\"glossy\", \"matte\"", "22-0": "framed", "22-1": "*optional*\nboolean\nDefault = false", "22-2": "If the print being ordered is a framed print, set to true.", "23-0": "frame_options", "23-1": "*optional*\nobject", "23-2": "If a framed print is being ordered, you can provide frame options", "24-0": "golden_ratio", "25-0": "mat_width", "24-1": "*optional*\nboolean\nDefault = false", "24-2": "Set to true to have the mat and frame width automatically selected for you. This will make it look good.", "25-1": "*optional*\ndecimal\nDefault = 0", "25-2": "Set the mat width. This will override the golden ratio mat width if it is set.", "26-0": "frame_width", "27-0": "frame_color", "26-1": "*optional*\ndecimal\nDefault = 0.75", "26-2": "Set the frame width. This will override the golden ratio frame width if it is set.", "27-1": "*optional*\ntext\nDefault = 'black maple'", "27-2": "\"black maple\", \"white maple\", \"natural maple\", \"natural walnut\"", "28-0": "mat_color", "29-0": "\"glaze\"", "28-1": "*optional*\ntext\nDefault = 'off-white'", "28-2": "\"off-white\", \"black\"", "29-1": "*optional*\ntext\nDefault = 'standard'", "29-2": "\"standard\", \"uv protection\", \"non-glare\"", "30-0": "postback_url", "30-1": "*optional*\ntext", "30-2": "Include your webhook postback url to receive the image processing response", "1-0": "is_gift", "1-1": "*optional*\nboolean", "1-2": "If set to true we will gift wrap the items.", "2-0": "gift_message", "2-1": "*optional*", "2-2": "If a gift message is included we will handwrite the message onto a nice card to include with the order." }, "cols": 3, "rows": 31 } [/block] [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X POST -d '{ \"order\": { \"customer_email\": \"johndoe@example.com\", \"shipping_address\": { \"full_name\": \"Calvin n Hobbes\", \"address1\": \"231 Elm Street\", \"city\": \"San Francisco\", \"state\": \"CA\", \"zip\": \"99211\", \"country\": \"United States\" }, \"products\": [{ \"print\": { \"name\": \"Earth From Space\", \"high_res_image_url\": \"http://i.imgur.com/yrGdFy7.jpg\", \"width\": 18, \"height\": 15, \"paper_type\": \"matte\", \"framed\": true, \"frame_options\": { \"golden_ratio\": true, \"frame_color\": \"Natural Maple\", \"glaze\": \"non-glare\" }}}]}, \"postback_url\": \"http://your-domain.com/webhook\" }' https://www.levelframes.com/api/v1/orders", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\":200,\n \"message\":\"If you're submitting new prints with this order then the your high_res_image_url will be processed in background tasks and the results posted back to your postback_url. The field 'print_image' will be null until this completes successfully.\",\n \"data\":{\n \"order\":{\n \"id\":\"abvmu3auxr41hi55b3s3\",\n \"total_price\":\"124.26\",\n \"total_products_price\":\"121.4\",\n \"shipping_price\":\"15.0\",\n \"discounts\":\"12.14\",\n \"shipping_address\":{\n \"full_name\":\"Calvin n Hobbes\",\n \"address1\":\"231 Elm Street\",\n \"address2\":null,\n \"city\":\"San Francisco\",\n \"state\":\"CA\",\n \"country\":\"United States\",\n \"phone\":null\n },\n \"order_products\":[{\n \"product_price\":121.4,\n \"level_printing_price\":18.9,\n \"paper_type\":\"matte\",\n \"print_id\":\"384ez19jnQrhfJUb6A8vGg\",\n \"print_name\":\"Earth From Space\",\n \"print_image\":null,\n \"artist_id\":null,\n \"artist_name\":null,\n \"print_size_id\":\"0jGHtlNAWbLhdVcXR60uDQ\",\n \"frame_price\":102.5,\n \"outer_frame_width\":22.0,\n \"outer_frame_height\":19.0,\n \"frame_options\":{\n \"profile\":\"Natural Maple\",\n \"frame_width\":\"0.75\",\n \"mat_width\":\"1.5\",\n \"mat_color\":\"Off-White\",\n \"glaze\":\"Non-Glare\"\n }\n }]\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
[block:api-header] { "type": "post", "title": "https://www.levelframes.com/api/v1/orders" } [/block] Use this endpoint for creating new orders with Level. Send us your print information and frame options (if framing the print) along with the customer shipping address. We will print, frame and fulfill the order. The customer will receive a tracking email when the item is shipped. Example JSON post params for creating a new order: [block:code] { "codes": [ { "code": "json_post_params = {\n \"order\": {\n \"customer_email\": \"text\",\n \"is_gift\": boolean,\n \"gift_message\": \"text\",\n \"shipping_address\": {\n \"full_name\": \"text\",\n \"address1\": \"text\",\n \"address2\": \"text (optional)\",\n \"city\": \"text\",\n \"state\": \"text\",\n \"zip\": \"text\",\n \"country\": \"text\",\n \"phone\": \"text (optional)\"\n },\n \"products\": [{\n \"print\": {\n \"name\": \"text\",\n \"high_res_image_url\": \"text\",\n \"width\": \"decimal\",\n \"height\": \"decimal\",\n \"artist_id\": \"text (optional. The Level artist id)\",\n \"artist_name\": \"text (optional)\",\n \"quantity\": \"integer (optional. Default = 1)\",\n \"paper_type\": \"text (optional. default = 'glossy')\",\n \"framed\": \"boolean (optional. default = false)\",\n \"frame_options\": {\n \"golden_ratio\": \"boolean (optional. default = false)\",\n \"mat_width\": \"decimal (optional. default = 0)\",\n \"frame_width\": \"decimal (optional. default = 0.75)\",\n \"frame_color\": \"text (optional. default = 'black maple')\",\n \"mat_color\": \"text (optional. default = 'off-white')\",\n \"glaze\": \"text (optional. default = 'standard')\n }\n }\n }]\n },\n \"postback_url\": \"text (optional)\"\n}", "language": "json" } ] } [/block] A summary of the order arguments is below: [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required & Type", "h-2": "Description", "0-0": "customer_email", "0-1": "**required**\ntext", "0-2": "We will email the customer tracking information when the item ships.", "3-0": "shipping_address", "3-1": "**required**\ntext", "3-2": "Hash object", "4-0": "full_name", "4-1": "**required**\ntext", "4-2": "", "5-0": "address1", "5-1": "**required**\ntext", "5-2": "", "6-0": "address2", "6-1": "*optional*\ntext", "7-0": "city", "7-1": "**required**\ntext", "6-2": "", "7-2": "", "8-0": "state", "8-1": "**required**\ntext", "8-2": "", "9-0": "zip", "9-1": "**required**\ntext", "9-2": "", "10-0": "country", "10-1": "**required**\ntext", "10-2": "", "11-0": "phone", "11-1": "*optional*\ntext", "11-2": "", "12-0": "products", "12-1": "**required**\nobject", "12-2": "Hash object array", "13-0": "print", "13-1": "**required**\nobject", "13-2": "Hash object", "14-0": "name", "14-1": "**required**\ntext", "14-2": "Print name", "15-0": "high_res_image_url", "15-1": "**required**\ntext", "15-2": "The full url path to a high res version of your image.", "16-0": "artist_id", "16-1": "*optional*\ntext", "16-2": "The unique level artist id. You can submit this is you want to attach the order print to existing artist.", "17-0": "artist_name", "17-1": "*optional*\ntext", "17-2": "Submit an artist name if you want there to be artist data associated with the print", "18-0": "width", "18-1": "**required**\ndecimal", "18-2": "The width of the print", "19-0": "height", "19-1": "**required**\ndecimal", "19-2": "The height of the print", "20-0": "quantity", "20-1": "*optional*\nDefault = 1", "20-2": "Quantity of product being ordered", "21-0": "paper_type", "21-1": "*optional*\ntext\nDefault = \"glossy\"", "21-2": "\"glossy\", \"matte\"", "22-0": "framed", "22-1": "*optional*\nboolean\nDefault = false", "22-2": "If the print being ordered is a framed print, set to true.", "23-0": "frame_options", "23-1": "*optional*\nobject", "23-2": "If a framed print is being ordered, you can provide frame options", "24-0": "golden_ratio", "25-0": "mat_width", "24-1": "*optional*\nboolean\nDefault = false", "24-2": "Set to true to have the mat and frame width automatically selected for you. This will make it look good.", "25-1": "*optional*\ndecimal\nDefault = 0", "25-2": "Set the mat width. This will override the golden ratio mat width if it is set.", "26-0": "frame_width", "27-0": "frame_color", "26-1": "*optional*\ndecimal\nDefault = 0.75", "26-2": "Set the frame width. This will override the golden ratio frame width if it is set.", "27-1": "*optional*\ntext\nDefault = 'black maple'", "27-2": "\"black maple\", \"white maple\", \"natural maple\", \"natural walnut\"", "28-0": "mat_color", "29-0": "\"glaze\"", "28-1": "*optional*\ntext\nDefault = 'off-white'", "28-2": "\"off-white\", \"black\"", "29-1": "*optional*\ntext\nDefault = 'standard'", "29-2": "\"standard\", \"uv protection\", \"non-glare\"", "30-0": "postback_url", "30-1": "*optional*\ntext", "30-2": "Include your webhook postback url to receive the image processing response", "1-0": "is_gift", "1-1": "*optional*\nboolean", "1-2": "If set to true we will gift wrap the items.", "2-0": "gift_message", "2-1": "*optional*", "2-2": "If a gift message is included we will handwrite the message onto a nice card to include with the order." }, "cols": 3, "rows": 31 } [/block] [block:code] { "codes": [ { "code": "curl -H \"Accept: application/json\" -H \"Content-type: application/json\" -H \"Authorization: Token token=YOUR_API_KEY\" -X POST -d '{ \"order\": { \"customer_email\": \"johndoe@example.com\", \"shipping_address\": { \"full_name\": \"Calvin n Hobbes\", \"address1\": \"231 Elm Street\", \"city\": \"San Francisco\", \"state\": \"CA\", \"zip\": \"99211\", \"country\": \"United States\" }, \"products\": [{ \"print\": { \"name\": \"Earth From Space\", \"high_res_image_url\": \"http://i.imgur.com/yrGdFy7.jpg\", \"width\": 18, \"height\": 15, \"paper_type\": \"matte\", \"framed\": true, \"frame_options\": { \"golden_ratio\": true, \"frame_color\": \"Natural Maple\", \"glaze\": \"non-glare\" }}}]}, \"postback_url\": \"http://your-domain.com/webhook\" }' https://www.levelframes.com/api/v1/orders", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"success\":true,\n \"status\":200,\n \"message\":\"If you're submitting new prints with this order then the your high_res_image_url will be processed in background tasks and the results posted back to your postback_url. The field 'print_image' will be null until this completes successfully.\",\n \"data\":{\n \"order\":{\n \"id\":\"abvmu3auxr41hi55b3s3\",\n \"total_price\":\"124.26\",\n \"total_products_price\":\"121.4\",\n \"shipping_price\":\"15.0\",\n \"discounts\":\"12.14\",\n \"shipping_address\":{\n \"full_name\":\"Calvin n Hobbes\",\n \"address1\":\"231 Elm Street\",\n \"address2\":null,\n \"city\":\"San Francisco\",\n \"state\":\"CA\",\n \"country\":\"United States\",\n \"phone\":null\n },\n \"order_products\":[{\n \"product_price\":121.4,\n \"level_printing_price\":18.9,\n \"paper_type\":\"matte\",\n \"print_id\":\"384ez19jnQrhfJUb6A8vGg\",\n \"print_name\":\"Earth From Space\",\n \"print_image\":null,\n \"artist_id\":null,\n \"artist_name\":null,\n \"print_size_id\":\"0jGHtlNAWbLhdVcXR60uDQ\",\n \"frame_price\":102.5,\n \"outer_frame_width\":22.0,\n \"outer_frame_height\":19.0,\n \"frame_options\":{\n \"profile\":\"Natural Maple\",\n \"frame_width\":\"0.75\",\n \"mat_width\":\"1.5\",\n \"mat_color\":\"Off-White\",\n \"glaze\":\"Non-Glare\"\n }\n }]\n }\n }\n}", "language": "json" } ], "sidebar": true } [/block]
{"_id":"56787441bc803b0d0017c1d4","category":"55bb9b077313650d00c46f17","link_external":false,"order":1,"title":"Get Sales by Print","__v":4,"body":"[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"{level_api_url}/orders/get_sales_by_print/{id}\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"id\",\n    \"0-1\": \"**required**\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Authorization: Token token=YOUR_API_KEY\\\" https://www.levelframes.com/api/v1/orders/get_sales_by_print/{id}\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{ \\n  \\\"success\\\": true, \\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n    \\\"print_id\\\": \\\"h232h3br3hr3r23jh\\\",\\n  \\t\\\"print_name\\\": \\\"Example Print\\\",\\n  \\t\\\"transactions_count\\\": 1,\\n  \\t\\\"total_commissions_earned\\\": \\\"25.00\\\",\\n  \\t\\\"transactions\\\": [{\\n  \\t\\t\\\"order_date\\\":\\\"2015-12-21 14:32:23 -0500\\\",\\n  \\t\\t\\\"order_id\\\":\\\"tuochehi9nhnq2erfk690\\\",\\n  \\t\\t\\\"print_name\\\":\\\"Example Print\\\",\\n  \\t\\t\\\"print_id\\\":\\\"nK6gy_f7sMp3GOsawJ2HcVA\\\",\\n  \\t\\t\\\"artist_name\\\":\\\"John Doe\\\",\\n  \\t\\t\\\"artist_id\\\":\\\"ogAfNJKIodC_J0VoBqERTiQ\\\",\\n \\t\\t\\t\\\"content_price\\\":\\\"25.00\\\",\\n  \\t\\t\\\"level_printing_price\\\":\\\"8.00\\\",\\n  \\t\\t\\\"frame_price\\\":\\\"74.00\\\",\\n  \\t\\t\\\"total_item_price\\\":\\\"107.00\\\",\\n  \\t\\t\\\"total_commissions_earned\\\":\\\"25.00\\\"\\n\\t\\t}]\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","createdAt":"2015-12-21T21:50:57.471Z","slug":"get-sales-by-print","api":{"auth":"required","params":[],"results":{"codes":[{"name":"","status":200,"language":"json","code":"{}"},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"githubsync":"","link_url":"","parentDoc":null,"project":"558233f75b7fa60d0068b466","version":"558233f75b7fa60d0068b469","excerpt":"Fetch content sales data by a print id","hidden":false,"sync_unique":"","type":"basic","updates":[],"user":"558233c6b806360d00244671","childrenPages":[]}

Get Sales by Print

Fetch content sales data by a print id

[block:api-header] { "type": "get", "title": "{level_api_url}/orders/get_sales_by_print/{id}" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/orders/get_sales_by_print/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\": true, \n \"status\": 200,\n \"data\": {\n \"print_id\": \"h232h3br3hr3r23jh\",\n \t\"print_name\": \"Example Print\",\n \t\"transactions_count\": 1,\n \t\"total_commissions_earned\": \"25.00\",\n \t\"transactions\": [{\n \t\t\"order_date\":\"2015-12-21 14:32:23 -0500\",\n \t\t\"order_id\":\"tuochehi9nhnq2erfk690\",\n \t\t\"print_name\":\"Example Print\",\n \t\t\"print_id\":\"nK6gy_f7sMp3GOsawJ2HcVA\",\n \t\t\"artist_name\":\"John Doe\",\n \t\t\"artist_id\":\"ogAfNJKIodC_J0VoBqERTiQ\",\n \t\t\t\"content_price\":\"25.00\",\n \t\t\"level_printing_price\":\"8.00\",\n \t\t\"frame_price\":\"74.00\",\n \t\t\"total_item_price\":\"107.00\",\n \t\t\"total_commissions_earned\":\"25.00\"\n\t\t}]\n }\n}", "language": "json" } ], "sidebar": true } [/block]
[block:api-header] { "type": "get", "title": "{level_api_url}/orders/get_sales_by_print/{id}" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/orders/get_sales_by_print/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\": true, \n \"status\": 200,\n \"data\": {\n \"print_id\": \"h232h3br3hr3r23jh\",\n \t\"print_name\": \"Example Print\",\n \t\"transactions_count\": 1,\n \t\"total_commissions_earned\": \"25.00\",\n \t\"transactions\": [{\n \t\t\"order_date\":\"2015-12-21 14:32:23 -0500\",\n \t\t\"order_id\":\"tuochehi9nhnq2erfk690\",\n \t\t\"print_name\":\"Example Print\",\n \t\t\"print_id\":\"nK6gy_f7sMp3GOsawJ2HcVA\",\n \t\t\"artist_name\":\"John Doe\",\n \t\t\"artist_id\":\"ogAfNJKIodC_J0VoBqERTiQ\",\n \t\t\t\"content_price\":\"25.00\",\n \t\t\"level_printing_price\":\"8.00\",\n \t\t\"frame_price\":\"74.00\",\n \t\t\"total_item_price\":\"107.00\",\n \t\t\"total_commissions_earned\":\"25.00\"\n\t\t}]\n }\n}", "language": "json" } ], "sidebar": true } [/block]
{"_id":"56787810092f210d00e30502","category":"55bb9b077313650d00c46f17","createdAt":"2015-12-21T22:07:12.210Z","link_url":"","version":"558233f75b7fa60d0068b469","api":{"settings":"","results":{"codes":[{"name":"","status":200,"language":"json","code":"{}"},{"language":"json","code":"{}","name":"","status":400}]},"auth":"required","params":[],"url":""},"body":"[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"{level_api_url}/orders/get_sales_by_artist/{id}\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Required\",\n    \"0-0\": \"id\",\n    \"0-1\": \"**required**\"\n  },\n  \"cols\": 2,\n  \"rows\": 1\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Authorization: Token token=YOUR_API_KEY\\\" https://www.levelframes.com/api/v1/orders/get_sales_by_artist/{id}\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{ \\n  \\\"success\\\": true, \\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n    \\\"artist_id\\\": \\\"ogAfNJKIodC_J0VoBqERTiQ\\\",\\n  \\t\\\"artist_name\\\": \\\"John Doe\\\",\\n  \\t\\\"transactions_count\\\": 1,\\n  \\t\\\"total_commissions_earned\\\": \\\"25.00\\\",\\n  \\t\\\"transactions\\\": [{\\n  \\t\\t\\\"order_date\\\":\\\"2015-12-21 14:32:23 -0500\\\",\\n  \\t\\t\\\"order_id\\\":\\\"tuochehi9nhnq2erfk690\\\",\\n  \\t\\t\\\"print_name\\\":\\\"Example Print\\\",\\n  \\t\\t\\\"print_id\\\":\\\"nK6gy_f7sMp3GOsawJ2HcVA\\\",\\n  \\t\\t\\\"artist_name\\\":\\\"John Doe\\\",\\n  \\t\\t\\\"artist_id\\\":\\\"ogAfNJKIodC_J0VoBqERTiQ\\\",\\n \\t\\t\\t\\\"content_price\\\":\\\"25.00\\\",\\n  \\t\\t\\\"level_printing_price\\\":\\\"8.00\\\",\\n  \\t\\t\\\"frame_price\\\":\\\"74.00\\\",\\n  \\t\\t\\\"total_item_price\\\":\\\"107.00\\\",\\n  \\t\\t\\\"total_commissions_earned\\\":\\\"25.00\\\"\\n\\t\\t}]\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","githubsync":"","project":"558233f75b7fa60d0068b466","slug":"get-sales-by-artist","updates":[],"user":"558233c6b806360d00244671","__v":0,"link_external":false,"title":"Get Sales by Artist","excerpt":"Fetch content sales data by an artist id","hidden":false,"sync_unique":"","type":"basic","order":2,"parentDoc":null,"childrenPages":[]}

Get Sales by Artist

Fetch content sales data by an artist id

[block:api-header] { "type": "get", "title": "{level_api_url}/orders/get_sales_by_artist/{id}" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/orders/get_sales_by_artist/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\": true, \n \"status\": 200,\n \"data\": {\n \"artist_id\": \"ogAfNJKIodC_J0VoBqERTiQ\",\n \t\"artist_name\": \"John Doe\",\n \t\"transactions_count\": 1,\n \t\"total_commissions_earned\": \"25.00\",\n \t\"transactions\": [{\n \t\t\"order_date\":\"2015-12-21 14:32:23 -0500\",\n \t\t\"order_id\":\"tuochehi9nhnq2erfk690\",\n \t\t\"print_name\":\"Example Print\",\n \t\t\"print_id\":\"nK6gy_f7sMp3GOsawJ2HcVA\",\n \t\t\"artist_name\":\"John Doe\",\n \t\t\"artist_id\":\"ogAfNJKIodC_J0VoBqERTiQ\",\n \t\t\t\"content_price\":\"25.00\",\n \t\t\"level_printing_price\":\"8.00\",\n \t\t\"frame_price\":\"74.00\",\n \t\t\"total_item_price\":\"107.00\",\n \t\t\"total_commissions_earned\":\"25.00\"\n\t\t}]\n }\n}", "language": "json" } ], "sidebar": true } [/block]
[block:api-header] { "type": "get", "title": "{level_api_url}/orders/get_sales_by_artist/{id}" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Required", "0-0": "id", "0-1": "**required**" }, "cols": 2, "rows": 1 } [/block] [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/orders/get_sales_by_artist/{id}", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\": true, \n \"status\": 200,\n \"data\": {\n \"artist_id\": \"ogAfNJKIodC_J0VoBqERTiQ\",\n \t\"artist_name\": \"John Doe\",\n \t\"transactions_count\": 1,\n \t\"total_commissions_earned\": \"25.00\",\n \t\"transactions\": [{\n \t\t\"order_date\":\"2015-12-21 14:32:23 -0500\",\n \t\t\"order_id\":\"tuochehi9nhnq2erfk690\",\n \t\t\"print_name\":\"Example Print\",\n \t\t\"print_id\":\"nK6gy_f7sMp3GOsawJ2HcVA\",\n \t\t\"artist_name\":\"John Doe\",\n \t\t\"artist_id\":\"ogAfNJKIodC_J0VoBqERTiQ\",\n \t\t\t\"content_price\":\"25.00\",\n \t\t\"level_printing_price\":\"8.00\",\n \t\t\"frame_price\":\"74.00\",\n \t\t\"total_item_price\":\"107.00\",\n \t\t\"total_commissions_earned\":\"25.00\"\n\t\t}]\n }\n}", "language": "json" } ], "sidebar": true } [/block]
{"_id":"567879423473bc0d008e1353","api":{"results":{"codes":[{"language":"json","code":"{}","name":"","status":200},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":"","auth":"required","params":[]},"slug":"list-all-content-sales","updates":[],"category":"55bb9b077313650d00c46f17","createdAt":"2015-12-21T22:12:18.433Z","hidden":false,"project":"558233f75b7fa60d0068b466","type":"basic","user":"558233c6b806360d00244671","version":"558233f75b7fa60d0068b469","body":"[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"{level_api_url}/orders/get_all_content_sales\"\n}\n[/block]\nNo required arguments for this method route.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -H \\\"Authorization: Token token=YOUR_API_KEY\\\" https://www.levelframes.com/api/v1/orders/get_all_content_sales\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"Response\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{ \\n  \\\"success\\\": true, \\n  \\\"status\\\": 200,\\n  \\\"data\\\": {\\n  \\t\\\"transactions_count\\\": 1,\\n  \\t\\\"total_commissions_earned\\\": \\\"25.00\\\",\\n  \\t\\\"transactions\\\": [{\\n  \\t\\t\\\"order_date\\\":\\\"2015-12-21 14:32:23 -0500\\\",\\n  \\t\\t\\\"order_id\\\":\\\"tuochehi9nhnq2erfk690\\\",\\n  \\t\\t\\\"print_name\\\":\\\"Example Print\\\",\\n  \\t\\t\\\"print_id\\\":\\\"nK6gy_f7sMp3GOsawJ2HcVA\\\",\\n  \\t\\t\\\"artist_name\\\":\\\"John Doe\\\",\\n  \\t\\t\\\"artist_id\\\":\\\"ogAfNJKIodC_J0VoBqERTiQ\\\",\\n \\t\\t\\t\\\"content_price\\\":\\\"25.00\\\",\\n  \\t\\t\\\"level_printing_price\\\":\\\"8.00\\\",\\n  \\t\\t\\\"frame_price\\\":\\\"74.00\\\",\\n  \\t\\t\\\"total_item_price\\\":\\\"107.00\\\",\\n  \\t\\t\\\"total_commissions_earned\\\":\\\"25.00\\\"\\n\\t\\t}]\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"Fetch all content sales data associated with your api user account","link_external":false,"sync_unique":"","title":"List all Content Sales","__v":1,"githubsync":"","link_url":"","order":3,"parentDoc":null,"childrenPages":[]}

List all Content Sales

Fetch all content sales data associated with your api user account

[block:api-header] { "type": "get", "title": "{level_api_url}/orders/get_all_content_sales" } [/block] No required arguments for this method route. [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/orders/get_all_content_sales", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\": true, \n \"status\": 200,\n \"data\": {\n \t\"transactions_count\": 1,\n \t\"total_commissions_earned\": \"25.00\",\n \t\"transactions\": [{\n \t\t\"order_date\":\"2015-12-21 14:32:23 -0500\",\n \t\t\"order_id\":\"tuochehi9nhnq2erfk690\",\n \t\t\"print_name\":\"Example Print\",\n \t\t\"print_id\":\"nK6gy_f7sMp3GOsawJ2HcVA\",\n \t\t\"artist_name\":\"John Doe\",\n \t\t\"artist_id\":\"ogAfNJKIodC_J0VoBqERTiQ\",\n \t\t\t\"content_price\":\"25.00\",\n \t\t\"level_printing_price\":\"8.00\",\n \t\t\"frame_price\":\"74.00\",\n \t\t\"total_item_price\":\"107.00\",\n \t\t\"total_commissions_earned\":\"25.00\"\n\t\t}]\n }\n}", "language": "json" } ], "sidebar": true } [/block]
[block:api-header] { "type": "get", "title": "{level_api_url}/orders/get_all_content_sales" } [/block] No required arguments for this method route. [block:code] { "codes": [ { "code": "curl -H \"Authorization: Token token=YOUR_API_KEY\" https://www.levelframes.com/api/v1/orders/get_all_content_sales", "language": "curl" } ], "sidebar": true } [/block] [block:textarea] { "text": "Response", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{ \n \"success\": true, \n \"status\": 200,\n \"data\": {\n \t\"transactions_count\": 1,\n \t\"total_commissions_earned\": \"25.00\",\n \t\"transactions\": [{\n \t\t\"order_date\":\"2015-12-21 14:32:23 -0500\",\n \t\t\"order_id\":\"tuochehi9nhnq2erfk690\",\n \t\t\"print_name\":\"Example Print\",\n \t\t\"print_id\":\"nK6gy_f7sMp3GOsawJ2HcVA\",\n \t\t\"artist_name\":\"John Doe\",\n \t\t\"artist_id\":\"ogAfNJKIodC_J0VoBqERTiQ\",\n \t\t\t\"content_price\":\"25.00\",\n \t\t\"level_printing_price\":\"8.00\",\n \t\t\"frame_price\":\"74.00\",\n \t\t\"total_item_price\":\"107.00\",\n \t\t\"total_commissions_earned\":\"25.00\"\n\t\t}]\n }\n}", "language": "json" } ], "sidebar": true } [/block]