### Retrieve All Products Import Tasks - Example Request Source: https://www.voog.com/developers/api/ecommerce/products_imports An example of how to make a GET request to retrieve all product import tasks from the Voog API. ```http GET http://helloworld.voog.com/admin/api/ecommerce/v1/products_imports ``` -------------------------------- ### Download Order Invoices - Example Request (HTTP) Source: https://www.voog.com/developers/api/ecommerce/orders This snippet demonstrates an example HTTP POST request to download order invoices. It includes the endpoint URL and the 'Content-Type' header. ```http POST http://helloworld.voog.com/admin/api/ecommerce/v1/orders/download_invoices Content-Type: application/json ``` -------------------------------- ### Example Product Data Response (JSON) Source: https://www.voog.com/developers/api/ecommerce/products This is an example JSON response for the 'Get data for a single product' API endpoint. It includes detailed information about the product, such as its ID, price, stock status, physical properties, images, assets, variant types, and individual variants. ```JSON { "id": 5, "price": 21.0, "price_min": 21.0, "price_max": 21.0, "sale_price": null, "effective_price": 21.0, "effective_price_min": 21.0, "effective_price_max": 21.0, "status": "live", "stock": null, "reserved_quantity": 0, "in_stock": true, "on_sale": false, "sku": null, "uses_variants": true, "variants_count": 2, "created_at": "2016-12-10T09:14:15.000Z", "updated_at": "2016-12-11T18:41:53.000Z", "name": "Product (en)", "slug": "product-en", "description": "Product description", "physical_properties": { "dimensions": { "length": "3.14", "width": "2.72", "height": "4.2", "unit": "m", "display_unit": "m" }, "weight": { "weight": "0.808", "unit": "kg", "display_unit": "kg" } }, "image_id": 88, "asset_ids": [88, 89], "image": { "content_type": "image/jpeg", "width": 948, "height": 506, "id": 88, "url": "http://media.voog.com/0000/0000/0001/photos/img.jpg", "thumbnail": { "content_type": "image/jpeg", "width": 150, "height": 80, "url": "http://media.voog.com/0000/0000/0001/photos/img_medium.jpg" }, "sizes": [ { "content_type": "image/jpeg", "width": 600, "height": 320, "url": "http://media.voog.com/0000/0000/0001/photos/img_block.jpg" }, { "content_type": "image/jpeg", "width": 948, "height": 506, "url": "http://media.voog.com/0000/0000/0001/photos/img.jpg" } ] }, "assets": [ { "content_type": "image/jpeg", "width": 948, "height": 506, "id": 88, "url": "http://media.voog.com/0000/0000/0001/photos/img.jpg", "thumbnail": { "content_type": "image/jpeg", "width": 150, "height": 80, "url": "http://media.voog.com/0000/0000/0001/photos/img_medium.jpg" }, "sizes": [ { "content_type": "image/jpeg", "width": 600, "height": 320, "url": "http://media.voog.com/0000/0000/0001/photos/img_block.jpg" }, { "content_type": "image/jpeg", "width": 948, "height": 506, "url": "http://media.voog.com/0000/0000/0001/photos/img.jpg" } ] }, { "content_type": "image/jpeg", "width": 948, "height": 506, "id": 89, "url": "http://media.voog.com/0000/0000/0002/photos/img.jpg", "thumbnail": { "content_type": "image/jpeg", "width": 150, "height": 80, "url": "http://media.voog.com/0000/0000/0002/photos/img_medium.jpg" }, "sizes": [ { "content_type": "image/jpeg", "width": 600, "height": 320, "url": "http://media.voog.com/0000/0000/0002/photos/img_block.jpg" }, { "content_type": "image/jpeg", "width": 948, "height": 506, "url": "http://media.voog.com/0000/0000/0002/photos/img.jpg" } ] } ], "variant_types": [ { "id": 2, "name": "Color", "translations": { "name": {"en": "Color", "et": "Värv"} }, "values": [ { "id": 3, "name": "Blue", "translations": { "name": {"en": "Blue", "et": "Sinine"} } }, { "id": 4, "name": "Red", "translations": { "name": {"en": "Red", "et": "Punane"} } } ] } ], "variants": [ { "id": 6, "price": null, "sale_price": null, "effective_price": 21.0, "status": "live", "stock": null, "reserved_quantity": 0, "in_stock": true, "on_sale": false, "sku": null, "physical_properties": { "dimensions": { "length": "23.12", "width": "14.2" } } } ] } ``` -------------------------------- ### Retrieve Single Products Import Task - Example Request Source: https://www.voog.com/developers/api/ecommerce/products_imports An example of how to make a GET request to retrieve a specific product import task by its ID. ```http GET http://helloworld.voog.com/admin/api/ecommerce/v1/products_imports/1 ``` -------------------------------- ### Download Package Labels - Example Request (HTTP) Source: https://www.voog.com/developers/api/ecommerce/orders This snippet demonstrates an example HTTP POST request to download shipping package labels. It includes the endpoint URL and the 'Content-Type' header. ```http POST http://helloworld.voog.com/admin/api/ecommerce/v1/orders/download_package_labels Content-Type: application/json ``` -------------------------------- ### List Discounts API Response Example Source: https://www.voog.com/developers/api/ecommerce/discounts This snippet shows an example of a successful (200 OK) response when retrieving a list of discounts from the Voog API. It includes a JSON array of discount objects. ```JSON [ { "id": 14, "name": "Lorem ipsum", "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", "code": "XMAS", "status": "open", "applies_to": "products", "discount_type": "percentage", "amount": "25.0", "amount_mode": "net", "stackable": false, "currency": "EUR", "redemption_count": 2, "redemption_limit": 2, "valid_from": null, "valid_to": null, "created_at": "2017-12-14T09:24:50.000Z", "updated_at": "2017-12-14T09:24:50.000Z", "redeemable": false, "orders_count": 0 }, { "id": 13, "name": null, "description": null, "code": "MIDSUMMER", "status": "open", "applies_to": "products", "discount_type": "fixed", "amount": "33.0", "amount_mode": "net", "stackable": false, "currency": "EUR", "redemption_count": 0, "redemption_limit": null, "valid_from": null, "valid_to": null, "created_at": "2017-12-14T09:23:18.000Z", "updated_at": "2017-12-14T09:23:18.000Z", "redeemable": true, "orders_count": 0 } ] ``` -------------------------------- ### Get Single Asset Data - Example Response Source: https://www.voog.com/developers/api/resources/assets An example JSON response for a single asset request. It details the asset's properties, including its ID, filename, type, URLs, and for image types, dimensions and available sizes. Media set information is included if requested. ```json | { | "id": 3, | "filename": "new_image.png", | "content_type": "image/png", | "size": 95708, | "extension": "png", | "type": "image", | "status": "done", | "created_at": "2014-02-04T11:03:11.000Z", | "updated_at": "2014-02-04T11:04:01.000Z", | "url": "http://helloworld.voog.co/admin/api/assets/3", | "public_url": "http://media.voog.com/0000/0000/0001/photos/new_image.png", | "sizes": [ | { | "thumbnail": "block", | "filename": "new_image_block.png", | "content_type": "image/png", | "size": 124204, | "width": 500, | "height": 344, | "public_url": "http://media.voog.com/0000/0000/0001/photos/new_image_block.png" | }, | { | "thumbnail": "medium", | "filename": "new_image_medium.jpg", | "content_type": "image/jpeg", | "size": 4887, | "width": 150, | "height": 103, | "public_url": "http://media.voog.com/0000/0000/0001/photos/new_image_medium.jpg" | } | ], | "width": 880, | "height": 550, | "media_sets": [{ | "id": 1, | "title": "", | "created_at": "2014-01-16T08:04:27.000Z", | "updated_at": "2014-01-16T08:04:27.000Z", | "url": "http://media.voog.com/admin/api/media_sets/1", | "add_assets_url": "http://media.voog.com/admin/api/media_sets/1/add_assets" | }] | } ``` -------------------------------- ### Retrieve Single Product Data with Parameters (API Request) Source: https://www.voog.com/developers/api/ecommerce/products An example of a GET request to the Voog Developers API to retrieve a single product's data. This example includes query parameters to fetch associated translations and variants, and specifies the language code for the translation. ```HTTP GET http://helloworld.voog.com/admin/api/ecommerce/v1/products/5?include=translations,variants&language_code=en ``` -------------------------------- ### Example Product and Variant Data (API Response) Source: https://www.voog.com/developers/api/ecommerce/products This is an example JSON response for the product listing endpoint. It showcases the detailed structure of product objects, including their prices, stock information, physical properties, and associated variants. Each variant can have its own specific attributes and pricing. ```json [ { "id": 1, "price": 166.67, "price_min": 166.67, "price_max": 166.67, "sale_price": 133.33, "effective_price": 133.33, "effective_price_min": 133.33, "effective_price_max": 133.33, "status": "live", "stock": 10, "reserved_quantity": 1, "in_stock": true, "on_sale": true, "sku": "0001", "image_id": 88, "asset_ids": [88, 89, 90], "uses_variants": false, "variants_count": 0, "created_at": "2016-12-10T15:59:23.000Z", "updated_at": "2016-12-10T15:59:23.000Z", "name": "Sample product", "slug": "sample-product", "description": "Product description", "physical_properties": { "dimensions": { "length": "3.14", "width": "2.72", "height": "4.2", "unit": "m", "display_unit": "m" }, "weight": { "weight": "0.808", "unit": "kg", "display_unit": "kg" } } }, { "id": 2, "price": 166.67, "price_min": 200.0, "price_max": 250.0, "sale_price": 133.33, "effective_price": 133.33, "effective_price_min": 166.67, "effective_price_max": 208.33, "status": "live", "stock": null, "reserved_quantity": 0, "in_stock": true, "sku": null, "image_id": 91, "asset_ids": [91, 92, 93], "uses_variants": true, "variants_count": 2, "created_at": "2016-12-10T09:14:15.000Z", "updated_at": "2016-12-11T18:41:53.000Z", "name": "Sample product", "slug": "sample-product-1", "description": "Product description", "physical_properties": { "dimensions": { "length": "3.14", "width": "2.72", "height": "4.2", "unit": "m", "display_unit": "m" }, "weight": { "weight": "0.808", "unit": "kg", "display_unit": "kg" } }, "variant_types": [ { "id": 1, "name": "Color", "values": [ { "id": 1, "name": "Red" }, { "id": 2, "name": "Blue" } ] } ], "variants": [ { "id": 3, "price": 200.0, "sale_price": 166.67, "effective_price": 166.67, "status": "live", "stock": null, "reserved_quantity": 0, "in_stock": true, "on_sale": true, "sku": "0002", "physical_properties": { "dimensions": { "length": "23.12", "width": "14.2", "height": "33.2", "unit": "m", "display_unit": "m" }, "weight": { "weight": "15.22", "unit": "kg", "display_unit": "kg" } }, "created_at": "2017-03-22T12:47:44.000Z", "updated_at": "2017-03-22T12:53:07.000Z", "variant_attributes_text": "Color: Red", "variant_attributes": [ { "type_id": 1, "value_id": 1 } ] }, { "id": 4, "price": 250.0, "sale_price": 208.33, "effective_price": 208.33, "status": "live", "stock": null, "reserved_quantity": 0, "in_stock": true, "on_sale": true, "sku": "0003", "physical_properties": { "dimensions": { "length": "23.12", "width": "14.2", "height": "33.2", "unit": "m", "display_unit": "m" }, "weight": { "weight": "15.22", "unit": "kg", "display_unit": "kg" } }, "created_at": "2017-03-22T12:47:44.000Z", "updated_at": "2017-03-22T12:53:07.000Z", "variant_attributes_text": "Color: Blue", "variant_attributes": [ { "type_id": 1, "value_id": 2 } ] } ] } ] ``` -------------------------------- ### Example Article Response (Authenticated) Source: https://www.voog.com/developers/api/resources/articles An example JSON response for an authenticated request to list articles. It includes detailed information about each article, its associated page, language, author, and SEO data. This response structure is consistent for all article listings. ```JSON [ { "id": 2, "title": "How I wrote my first article", "autosaved_title": "How I wrote my first article", "path": "how-i-wrote-my-first-article", "description": "", "recaptcha": null, "comments_count": 0, "public_comments_count": 0, "publishing": true, "published": true, "data": {}, "title_format": null, "title_separator": null, "created_at": "2014-01-23T09:22:04.000Z", "updated_at": "2014-01-23T09:22:04.000Z", "published_at": "2014-01-23T09:22:04.000Z", "url": "http://helloworld.voog.co/admin/api/articles/2", "public_url": "http://helloworld.voog.co/blog/how-i-wrote-my-first-article", "contents_url": "http://helloworld.voog.co/admin/api/articles/2/contents", "comments_url": "http://helloworld.voog.co/admin/api/articles/2/comments", "page": { "id": 3, "path": "blog", "title": "Blog", "content_type": "blog", "created_at": "2014-01-23T09:19:04.000Z", "updated_at": "2014-01-23T09:19:04.000Z", "published_at": "2014-01-23T09:19:04.000Z", "url": "http://helloworld.voog.co/admin/api/pages/3", "public_url": "http://helloworld.voog.co/blog" }, "language": { "id": 1, "code": "en", "title": "ENG", "created_at": "2014-01-23T09:19:04.000Z", "updated_at": "2014-01-23T09:19:04.000Z", "url": "http://helloworld.voog.co/admin/api/languages/1" }, "author": { "id": 1, "name": "John Smith", "url": "http://helloworld.voog.co/admin/api/people/1" }, "seo": { "full_title": "How I wrote my first article – My new site", "title_format": " ", "score": 87, "metrics": [ { "key": "title_length", "score": 75, "result": "warning" }, { "key": "description_length", "score": 100, "result": "pass" } ] } }, { "id": 1, "title": "Having sample news pieces?", "autosaved_title": "Having sample news pieces?", "path": "having-sample-news-pieces", "description": "", "recaptcha": null, "comments_count": 0, "public_comments_count": 0, "publishing": true, "published": true, "data": {}, "title_format": null, "title_separator": "<", "created_at": "2014-01-23T09:19:04.000Z", "updated_at": "2014-01-23T09:19:04.000Z", "published_at": "2014-01-23T09:19:04.000Z", "url": "http://helloworld.voog.co/admin/api/articles/1", "public_url": "http://helloworld.voog.co/blog/having-sample-news-pieces", "contents_url": "http://helloworld.voog.co/admin/api/articles/1/contents", "comments_url": "http://helloworld.voog.co/admin/api/articles/1/comments", "page": { "id": 3, "path": "blog", "title": "Blog", "content_type": "blog", "created_at": "2014-01-23T09:19:04.000Z", "updated_at": "2014-01-23T09:19:04.000Z", "published_at": "2014-01-23T09:19:04.000Z", "url": "http://helloworld.voog.co/admin/api/pages/3", "public_url": "http://helloworld.voog.co/blog" }, "language": { "id": 1, "code": "en", "title": "ENG", "created_at": "2014-01-23T09:19:04.000Z", "updated_at": "2014-01-23T09:19:04.000Z", "url": "http://helloworld.voog.co/admin/api/languages/1" }, "author": { "id": 1, "name": "John Smith", "url": "http://helloworld.voog.co/admin/api/people/1" }, "seo": { "full_title": "Having sample news pieces? < My new site", "title_format": " ", "score": 87, "metrics": [ { "key": "title_length", "score": 75, "result": "warning" }, { "key": "description_length", "score": 100, "result": "pass" } ] } } ] ``` -------------------------------- ### Example PUT Request for Voog Form Update Source: https://www.voog.com/developers/api/resources/forms This example shows a complete PUT request, including the target URL and the JSON payload for updating a form. It illustrates how to specify form-level settings and define individual fields with their properties. ```HTTP PUT http://helloworld.voog.co/admin/api/forms/2 { "title": "Form new name", "submit_label": "Click me!", "submit_emails": "test@example.com", "submit_email_subject": "Email from page", "submit_action": "message", "submit_success_message": "Thank you!", "submit_failure_message": "Invalid data has been submitted!", "fields": [ { "id": "field_1389863908999", "type": "textfield", "title": "My only field in this form", "required": true, "field_size": "small", "placeholder": "This is placeholder" } ] } ``` -------------------------------- ### Retrieve Single Discount API Response Example Source: https://www.voog.com/developers/api/ecommerce/discounts This snippet displays an example of a successful (200 OK) response when retrieving a single discount by its ID. It returns a JSON object representing the specified discount. ```JSON { "id": 14, "name": "Lorem ipsum", "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", "code": "XMAS", "status": "open", "applies_to": "products", "discount_type": "percentage", "amount": "25.0", "amount_mode": "net", "stackable": false, "currency": "EUR", "redemption_count": 0, "redemption_limit": null, "valid_from": null, "valid_to": null, "created_at": "2017-12-14T09:24:50.000Z", "updated_at": "2017-12-14T09:24:50.000Z", "redeemable": false, "orders_count": 1 } ``` -------------------------------- ### Example Response Data (JSON) Source: https://www.voog.com/developers/api/ecommerce/cart_fields This JSON structure shows an example response after successfully replacing cart fields. It includes the updated or newly created fields with their full configurations, including system-generated fields like 'id', 'enabled', 'position', 'name', 'created_at', and 'updated_at'. ```JSON [ { "id": 62, "enabled": true, "position": 1, "kind": "email", "name": "an-e-mail", "label": "An e-mail", "description": "Please enter your e-mail here", "classname": null, "mapping": "customer.email", "required": true, "options": null, "hints": { "skip_newline": false }, "created_at": "2021-03-15T14:59:25.000Z", "updated_at": "2021-03-15T14:59:25.000Z" }, { "id": 63, "enabled": true, "position": 2, "kind": "select", "name": "pick-a-fruit", "label": "Pick a fruit", "description": "Please pick your preferred fruit", "classname": null, "mapping": null, "required": true, "options": { "elements": ["Apple", "Orange", "Fig"] }, "hints": { "skip_newline": true }, "created_at": "2021-03-15T14:59:25.000Z", "updated_at": "2021-03-15T14:59:25.000Z" } ] ``` -------------------------------- ### API Sorting: Example with Multiple Attributes Source: https://www.voog.com/developers/api/basics/filters Provides an example of how to sort API results by multiple attributes. Attributes are separated by a comma (`,`) in the `s` parameter. ```http /admin/api/elements?s=page.id.$asc,element.position.$desc ``` -------------------------------- ### Example Element Response JSON Source: https://www.voog.com/developers/api/resources/elements This is an example JSON response for a relocated element. It includes details such as the element's ID, creation and update timestamps, position, path, title, URLs, and associated element definition and page information. ```JSON { "id": 3, "created_at": "2015-01-27T11:29:51.000Z", "updated_at": "2015-01-27T11:53:02.000Z", "position": 1, "path": "john", "title": "John Smith I", "path_with_page": "people/john-smith", "url": "http://helloworld.voog.co/admin/api/elements/3", "move_url": "http://helloworld.voog.co/admin/api/elements/3/move", "contents_url": "http://helloworld.voog.co/admin/api/elements/3/contents", "public_url": "http://helloworld.voog.co/people/john", "element_definition": { "id": 1, "title": "Person", "created_at": "2015-01-27T11:22:47.000Z", "updated_at": "2015-01-27T11:22:47.000Z", "url": "http://helloworld.voog.co/admin/api/element_definitions/1" }, "page": { "id": 2, "title": "People", "path": "people", "language_id": 1, "created_at": "2015-01-27T11:26:19.000Z", "updated_at": "2015-01-27T11:26:42.000Z", "content_type": "elements", "published_at": "2015-01-27T11:26:19.000Z", "url": "http://helloworld.voog.co/admin/api/pages/2", "public_url": "http://helloworld.voog.co/people" } } ``` -------------------------------- ### Example Article Response (Anonymous) Source: https://www.voog.com/developers/api/resources/articles An example response for an anonymous request to list articles. This response will only contain published articles and will not include any private blog page content. The structure is similar to the authenticated response but may omit certain fields not relevant to public view. ```JSON Status: 200 OK ``` -------------------------------- ### List Contents for a Parent (GET Request) Source: https://www.voog.com/developers/api/resources/contents This snippet demonstrates how to make a GET request to retrieve a list of all contents for a specific parent. It can be used with or without authentication. The response format differs based on authentication status, with authenticated requests providing more detailed information. ```HTTP GET /admin/api/pages/1/contents ``` -------------------------------- ### GET /admin/api/ecommerce/v1/settings Source: https://www.voog.com/developers/api/ecommerce/store_settings Retrieves the current configuration settings for the ecommerce store. ```APIDOC ## GET /admin/api/ecommerce/v1/settings ### Description Fetch the current store settings object. ### Method GET ### Endpoint /admin/api/ecommerce/v1/settings ### Parameters #### Query Parameters - **include** (string) - Optional - Enhance response objects. Supported: `translations` - **language_code** (string) - Optional - Display top-level values in a specific language context. ### Response #### Success Response (200) - **settings** (object) - The store settings configuration object. #### Response Example { "currency": "EUR", "price_entry_mode": "tax_excluded" } ``` -------------------------------- ### Retrieve Product Translations via API Source: https://www.voog.com/developers/api/ecommerce/translations Demonstrates how to fetch product data and switch the returned language context using URL parameters. ```HTTP GET /admin/api/ecommerce/v1/products/1 ``` ```HTTP GET /admin/api/ecommerce/v1/products/1?language_code=et ``` -------------------------------- ### API Sorting: Multiple Attributes Example Source: https://www.voog.com/developers/api/basics/filters Shows an example of sorting by more than one attribute using the `s` parameter. Attributes are separated by a comma. ```http /admin/api/elements?s=page.title,element.position ``` -------------------------------- ### Example Response for Anonymous Request Source: https://www.voog.com/developers/api/resources/comments This is an example JSON response when an anonymous request is made to list comments for an article. It only includes non-spam comments and omits fields like 'id' and 'spam'. ```JSON [ { "author": "I'm a Spammer!", "body": "Buy something!", "created_at": "2014-02-07T10:54:08.000Z", "article": { "id": 1, "title": "How I wrote my first article", "created_at": "2014-02-07T10:56:07.000Z", "url": "http://helloworld.voog.co/admin/api/articles/1", "public_url": "http://helloworld.voog.co/blog/how-i-wrote-my-first-article" } }, { "author": "Me", "body": "Hi!\r\n\r\nThis is a comment!!", "created_at": "2014-02-06T15:53:01.000Z", "article": { "id": 1, "title": "How I wrote my first article", "created_at": "2014-02-07T10:56:07.000Z", "url": "http://helloworld.voog.co/admin/api/articles/1", "public_url": "http://helloworld.voog.co/blog/how-i-wrote-my-first-article" } } ] ``` -------------------------------- ### Create a new product via API Source: https://www.voog.com/developers/api/ecommerce/products Sends a POST request to the products endpoint with a JSON body containing product details such as price, SKU, assets, and translations. The response returns the created product object with generated IDs and metadata. ```http POST /admin/api/ecommerce/v1/products?include=translations&language_code=en ``` ```json { "product": { "price": 21.0, "sale_price": 16.0, "status": "live", "name": "Product (en)", "slug": "product-en", "description": "Product description", "sku": "0004", "assets": [ {"id": 88}, {"id": 89} ], "variant_types": [ { "name": "Color", "translations": { "name": {"en": "Color", "et": "Värv"} }, "values": [ { "name": "Blue", "translations": { "name": {"en": "Blue", "et": "Sinine"} } }, { "name": "Red", "translations": { "name": {"en": "Red", "et": "Punane"} } } ] } ], "category_ids": [14556, 32321, 11679], "physical_properties": { "dimensions": { "length": "3.14", "width": "2.72", "height": "4.2" }, "weight": { "weight": "0.808" } }, "translations": { "name": { "en": "Product (en)", "et": "Product (et)" }, "slug": { "en": "product-en", "et": "product-et" }, "description": { "en": "Product description", "et": "Tootekirjeldus" } } } } ``` -------------------------------- ### Example Response for Authenticated Request Source: https://www.voog.com/developers/api/resources/comments This is an example JSON response when an authenticated request is made to list comments for an article. It includes details for both spam and non-spam comments, along with article information. ```JSON [ { "id": 2, "author": "I'm a Spammer!", "body": "Buy something!", "spam": false, "created_at": "2014-02-07T10:54:08.000Z", "updated_at": "2014-02-07T10:56:07.000Z", "url": "http://helloworld.voog.co/admin/api/articles/1/comments/2", "article": { "id": 1, "title": "How I wrote my first article", "created_at": "2014-02-07T10:56:07.000Z", "updated_at": "2014-02-07T10:56:07.000Z", "url": "http://helloworld.voog.co/admin/api/articles/1", "public_url": "http://helloworld.voog.co/blog/how-i-wrote-my-first-article" } }, { "id": 1, "author": "Me", "body": "Hi!\r\n\r\nThis is a comment!!", "spam": false, "created_at": "2014-02-06T15:53:01.000Z", "updated_at": "2014-02-06T15:53:01.000Z", "url": "http://helloworld.voog.co/admin/api/articles/1/comments/1", "article": { "id": 1, "title": "How I wrote my first article", "created_at": "2014-02-07T10:56:07.000Z", "updated_at": "2014-02-07T10:56:07.000Z", "url": "http://helloworld.voog.co/admin/api/articles/1", "public_url": "http://helloworld.voog.co/blog/how-i-wrote-my-first-article" } } ] ``` -------------------------------- ### Get Single Language Details (GET /admin/api/languages/{id}) Source: https://www.voog.com/developers/api/resources/languages Retrieves detailed information for a specific language identified by its ID. The response includes all language attributes such as code, region, titles, and URLs for related resources. ```HTTP GET /admin/api/languages/1 ``` -------------------------------- ### Example Shipping Method Response (JSON) Source: https://www.voog.com/developers/api/ecommerce/shipping_methods This JSON object illustrates a successful response after updating a shipping method. It includes the method's ID, name, amount, description, enabled status, creation and update timestamps, delivery method details, and associated options. It also contains the translated names and descriptions. ```JSON { "id": 1, "name": "Normal shipping", "amount": "10.0", "description": "Basic shipping without secondary options", "enabled": true, "created_at": "2016-12-05T14:57:52.000Z", "updated_at": "2017-03-30T11:48:07.000Z", "tax_rate": null, "delivery_method": { "code": "itella_pup", "provider_code": "itella", "configuration": { "country_code": "ee" } }, "options": [ "Elva, Elva Maxima", "Elva, Elva mini-Rimi", "Haapsalu, Haapsalu Rimi", "Haljala, Haljala Grossi Toidukaubad", "Harjumaa, Peetri Selver", "Imavere, Imavere Alexela", "Jõgeva, Jõgeva Kaubahall", "Jõgeva, Jõgeva Pae Konsum", "Jõhvi, Jõhvi Grossi Toidukaubad", "Jõhvi, Jõhvi Tsentraal" ], "original_options": [ "First", "Second" ], "translations": { "name": { "en": "Normal shipping", "et": "Tavatarne" }, "description": { "en": "Basic shipping without secondary options", "et": "Tavatarne ilma valikuteta" } } } ``` -------------------------------- ### Get Single Redirect Rule (GET /admin/api/redirect_rules/{id}) Source: https://www.voog.com/developers/api/resources/redirect_rules Fetches data for a specific redirect rule identified by its ID. This is useful for inspecting the details of an existing rule before modification or deletion. ```HTTP GET /admin/api/redirect_rules/1 ``` -------------------------------- ### Create an import file object Source: https://www.voog.com/developers/api/resources/import_files Initializes a new import file object in the system. The response provides an upload_url where the actual file content should be sent. ```HTTP POST /admin/api/import_files { "filename": "product-import.xls", "size": 1111, "content_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" } ``` -------------------------------- ### Checkout Request Body Example Source: https://www.voog.com/developers/api/ecommerce/carts Example JSON payload for the checkout request. It specifies the 'gateway_code' and 'payment_method' to be used for the transaction. Ensure these values are valid for your Voog store configuration. ```JSON { "gateway_code": "offline", "payment_method": "offline" } ``` -------------------------------- ### Retrieve all discounts via GET Source: https://www.voog.com/developers/api/ecommerce/discounts Retrieves a paginated list of all discounts configured for the site. Supports query parameters for pagination control. ```http GET /admin/api/ecommerce/v1/discounts/?per_page=50&page=1 ``` -------------------------------- ### Create Article Response - Success Source: https://www.voog.com/developers/api/resources/articles This example shows a successful response (Status 201 Created) after creating an article. It includes the newly created article's details, such as its ID, title, and URLs. ```http Status: 201 Created ``` -------------------------------- ### GET /admin/api/site/settings Source: https://www.voog.com/developers/api/ecommerce/store_settings Retrieves the current configuration settings for the store, including email notifications, currency, and tax information. ```APIDOC ## GET /admin/api/site/settings ### Description Retrieves the store's configuration object containing all settings related to notifications, payments, and branding. ### Method GET ### Endpoint /admin/api/site/settings ### Response #### Success Response (200) - **notification_email** (string) - Store notification email address. - **currency** (string) - Three-digit currency code (e.g., "USD"). - **tax_rate** (string) - VAT percentage. - **enabled** (boolean) - Whether the store is currently accepting purchases. - **order_sequence** (object) - Configuration for order numbering (prefix, suffix, padding, last_number). #### Response Example { "notification_email": "admin@example.com", "currency": "EUR", "tax_rate": "20.0", "enabled": true, "order_sequence": { "prefix": "#", "suffix": "-2023", "padding": 4, "last_number": 10 } } ``` -------------------------------- ### Get Package Label for Shipment (GET) Source: https://www.voog.com/developers/api/ecommerce/shipments Retrieves the PDF package label for a specific shipment. On success, it returns the PDF content with a 200 OK status and `application/pdf` Content-Type. On error, it returns a JSON payload explaining the error. ```HTTP GET /admin/api/ecommerce/v1/orders/1/shipment/package_label ``` ```HTTP GET http://helloworld.voog.com/admin/api/ecommerce/v1/orders/1/shipment/package_label ``` -------------------------------- ### Get Single Category Data (GET) Source: https://www.voog.com/developers/api/ecommerce/categories Retrieves detailed information for a specific category by its ID. This endpoint also allows anonymous access for live categories and supports query parameters like `include` for related data and `language_code` for translations. ```HTTP GET /admin/api/ecommerce/v1/categories/1 ``` -------------------------------- ### List all site assets via GET request Source: https://www.voog.com/developers/api/resources/assets Retrieves a list of all assets for the current site, sorted by newest first. The response includes asset details like status, type, and specific image dimensions if applicable. ```HTTP GET /assets ``` -------------------------------- ### Example JSON response for assets Source: https://www.voog.com/developers/api/resources/assets A sample JSON structure returned by the /assets endpoint, demonstrating the schema for document and image assets, including nested image size variants. ```JSON [ { "id": 2, "filename": "report.pdf", "content_type": "application/pdf", "size": 36657, "extension": "pdf", "status": "done", "type": "document", "created_at": "2014-02-04T14:37:41.000Z", "updated_at": "2014-02-04T14:37:41.000Z", "url": "http://helloworld.voog.co/admin/api/assets/2", "public_url": "http://media.voog.com/0000/0000/0001/files/report.pdf" }, { "id": 1, "filename": "Screen Shot 2014-01-28 at 10.53.26.png", "content_type": "image/png", "size": 5305339, "extension": "png", "type": "image", "status": "done", "sizes": [ { "thumbnail": "huge", "width": 2048, "height": 1365 } ], "width": 5184, "height": 3456 } ] ``` -------------------------------- ### POST /admin/api/ecommerce/v1/templates Source: https://www.voog.com/developers/api/ecommerce/templates Creates a new template for the current site. ```APIDOC ## POST /admin/api/ecommerce/v1/templates ### Description Creates a new template or component with the provided attributes. ### Method POST ### Endpoint /admin/api/ecommerce/v1/templates ### Parameters #### Request Body - **enabled** (boolean) - Optional - Flag to switch template on/off. - **content_type** (string) - Required - Type of template (customer_invoice, component, etc.). - **component_name** (string) - Optional - Unique name if type is component. - **subject** (string) - Optional - Email subject line. - **content** (string) - Optional - Liquid-enhanced HTML content. ### Response #### Success Response (201) - **template** (object) - The created template object. #### Response Example { "id": 3, "enabled": true, "content_type": "component" } ``` -------------------------------- ### Get Specific Layout Asset (GET /admin/api/layout_assets/{id}) Source: https://www.voog.com/developers/api/resources/layout_assets Retrieves detailed information for a specific layout asset identified by its ID. The response includes all properties of the asset, similar to the list response, and provides a 'url' to access the asset's content directly. ```HTTP GET /admin/api/layout_assets/1 ```