Voog.com

Store settings

Summary of store settings endpoints

All endpoints take optional query parameters that enhance the response objects:

  • include — enhance the response objects (e.g. include=translations). Supported values are:
    • translations — includes translations for all translatable objects and keys.
  • language_code — display all top-level values in the given language context.

Get store settings data

GET /admin/api/ecommerce/v1/settings

Example response:

Status: 200 OK
{
  "uuid": "48a094e9-de92-471d-812a-8894b724731a",
  "id": 1,
  "notification_email": "admin@mystore.com",
  "notification_email_with_idn": "admin@mystore.com",
  "notification_language": "en",
  "reply_email": "admin@mystore.com",
  "reply_email_with_idn": "admin@mystore.com",
  "cancel_url": "http://helloworld.voog.com",
  "return_url": "http://helloworld.voog.com",
  "currency": "EUR",
  "currency_symbol": "€",
  "tax_rate": "20.0",
  "value_date_days": 14,
  "created_at": "2016-11-21T12:24:36.000Z",
  "updated_at": "2017-03-29T14:11:59.000Z",
  "missing_required_settings?": false,
  "missing_required_settings": [],
  "enabled": true,
  "default_language": "en",
  "image_id": 1,
  "decimal_places": 2,
  "company_name": "MyStore (EN)",
  "bank_details": "http://helloworld.voog.com",
  "terms_url": "http://helloworld.voog.com/terms",
  "products_url_slug": "products",
  "invoice_branding": true,
  "min_cart_total": "12.0",
  "shopping_cart_version": 2,
  "mountpoint_node_id": null,
  "preferred_payment_types": [],
  "is_publicly_unavailable": false,
  "robots_header": null,
  "address": {
    "id": 1,
    "name": "MyStore Admin",
    "company_name": "MyStore",
    "address1": "W 5th Ave, 1",
    "address2": "",
    "city": "Anchorage",
    "zip_code": "99507",
    "state": "Alaska",
    "country_code": "US",
    "phone": null,
    "instructions": null,
    "created_at": "2016-10-11T14:24:21.000Z",
    "updated_at": "2017-03-27T08:20:59.000Z"
  },
  "order_sequence": {
    "prefix": "#",
    "suffix": null,
    "padding": 4,
    "last_number": 0
  },
  "translations": {
    "company_name": {
      "et": "MyStore (EN)",
      "en": "MyStore (ET)"
    },
    "bank_details": {
      "et": "",
      "en": ""
    },
    "terms_url": {
      "et": "http://helloworld.voog.com/tingimused",
      "en": "http://helloworld.voog.com/terms"
    },
    "products_url_slug": {
      "et": "tooted",
      "en": "products"
    }
  }
}

Attributes

  • notification_email - all store notification emails are sent to this email address
  • notification_email_with_idn - Unicode version of notification_email; equal to notification_email if the latter is not punycoded. This is a read-only field.
  • notification_language - all store notification emails are sent out in this language
  • reply_email - used for the "Reply-To" address in customer emails
  • reply_email_with_idn - Unicode version of reply_email; equal to reply_email if the latter is not punycoded. This is a read-only field.
  • return_url - When paying with outside gateways (Paypal/Bank links), this address is used as a return path for successful payments
  • cancel_url - Similar to return_url, but used for cancelled or rejected payments
  • currency - three-digit currency code, e.g "EUR", "USD" etc.
  • currency_symbol - this is used to compact prices, so instead of "200 EUR", we'd use "€200"
  • tax_rate - VAT percentage, e.g. "20.0"
  • value_date_days - used to determine the invoice's payment due date
  • decimal_places - determines how numbers are rounded when displaying amounts
  • missing_required_settings? - if this is true, all buy buttons are disabled and no purchases can be made in your store
  • missing_required_settings - list of fields that are invalid
  • enabled - if set to "false", the whole store is disabled and no purchases can be made
  • default_language - language code that is used for default translation strings
  • image_id - points to an image asset that is used as the logo on the store's invoices. See the Assets API.
  • company_name - Your company's name that is used on the invoice and email notifications
  • bank_details- payment data for offline invoices (Bank name, account no., reference codes etc.)
  • terms_url - URL that points to the Terms of Service of your store
  • invoice_branding - If "true", Voog branding is displayed on invoices, otherwise the branding is removed. Defaults to "true".
  • min_cart_total - The minimum cart total (incl. tax and shipping) required for checkout.
  • shopping_cart_version - The shopping cart version, either 1 (legacy) or 2 (default).
  • mountpoint_node_id — ID of the Node to consider the root of the canonical category and product pages structure, the root node by default.
  • preferred_payment_types - an array of preferred payment types to determine the order of payment type options in Checkout. Supported payment types are card, direct, credit, split, gift, offline.
  • is_publicly_unavailable - if "true", all buy buttons are publicly disabled and no purchases can be made in your store
  • robots_header - HTTP X-Robots-Tag header value for store canonical product pages (read more). When set then HTTP header X-Robots-Tag is added to all store canonical product pages. Example values: noindex or noindex, nofollow. Default value is null.
  • address - Your store's address that is shown on the invoice

  • order_sequence - this can be used to customize the order numbers in the store

    • prefix - This is prepended to the order number
    • suffix - This is appended to the order number
    • padding - Minimum number of digits to display
    • last_number- Which number is used to start counting from
      {
        "prefix": "#",
        "suffix": "-04-2017",
        "padding": 4,
        "last_number": 10
      }
    

    this will output #0011-04-2017 as the next order number

  • translations - Read more about translations.

Update store settings

PUT /admin/api/ecommerce/v1/settings

This request updates the store settings with the given attributes

Example request:

PUT http://helloworld.voog.co/admin/api/ecommerce/v1/settings?include=translations

Example data:

{
  "notification_email": "notifications@mystore.com",
  "value_date_days": 7,
  "translations": {
    "company_name": {
      "et": "MyStore English",
      "en": "MyStore Eesti"
    },
  }
}

Example response:

Status: 200 OK
{
  "uuid": "48a094e9-de92-471d-812a-8894b724731a",
  "id": 1,
  "notification_email": "notifications@mystore.com",
  "notification_email_with_idn": "notifications@mystore.com",
  "notification_language": "en",
  "reply_email": "admin@mystore.com",
  "reply_email_with_idn": "admin@mystore.com",
  "cancel_url": "http://helloworld.voog.com",
  "return_url": "http://helloworld.voog.com",
  "currency": "EUR",
  "currency_symbol": "€",
  "tax_rate": "20.0",
  "value_date_days": 7,
  "created_at": "2016-11-21T12:24:36.000Z",
  "updated_at": "2017-03-29T14:11:59.000Z",
  "missing_required_settings?": false,
  "missing_required_settings": [],
  "enabled": true,
  "default_language": "en",
  "image_id": 1,
  "decimal_places": 2,
  "company_name": "MyStore English",
  "bank_details": "http://helloworld.voog.com",
  "terms_url": "http://helloworld.voog.com/terms",
  "products_url_slug": "products",
  "invoice_branding": true,
  "min_cart_total": "12.0",
  "shopping_cart_version": 2,
  "mountpoint_node_id": null,
  "preferred_payment_types": [],
  "is_publicly_unavailable": false,
  "robots_header": null,
  "address": {
    "id": 1,
    "name": "MyStore Admin",
    "company_name": "MyStore",
    "address1": "W 5th Ave, 1",
    "address2": "",
    "city": "Anchorage",
    "zip_code": "99507",
    "state": "Alaska",
    "country_code": "US",
    "phone": null,
    "instructions": null,
    "created_at": "2016-10-11T14:24:21.000Z",
    "updated_at": "2017-03-27T08:20:59.000Z"
  },
  "order_sequence": {
    "prefix": "#",
    "suffix": null,
    "padding": 4,
    "last_number": 0
  },
  "translations": {
    "company_name": {
      "et": "MyStore English",
      "en": "MyStore Eesti"
    },
    "bank_details": {
      "et": "",
      "en": ""
    },
    "terms_url": {
      "et": "http://helloworld.voog.com/tingimused",
      "en": "http://helloworld.voog.com/terms"
    },
    "products_url_slug": {
      "et": "tooted",
      "en": "products"
    }
  }
}