An object representing a shop. The unique identifier of the shop is shown in the admin web interface at the top of the page next to its name.
Property | Type | Description |
---|---|---|
uid | integer | The unique identifier of a shop. |
type | string | Webshop version, e.g. "lite" , "basic" , "plus" , "one" , "poly" or "expert" . |
edition | string | Webshop edition, e.g. "Textalk Webshop" or "Abicart" . |
is_demo | boolean | If the webshop is a demo shop. |
loginRequiredToView | boolean | If the webshop requires customers to be signed in to view the webshop. |
companyInfo | companyInfo | The webshop's company information. |
companyNumber | string | The organisation number displayed on the shop site. |
created | string | Date and time of when the shop was created. Visible to shop administrators only. |
expirationDate | string | Date of when the shop subscription expires. Absent for demo shops. Visible to shop administrators only. |
name | object | The name of the shop as an object, by language. |
logotype | object | The URL of the logotype image, by language. |
category | string | The category of products sold in the shop. |
logolink | object | The URL to which the user is redirected when clicking on the shop logotype as an object, by language. |
favicon | string | The URL of the favicon, if any. |
priceStoredWithVat | boolean | Indicates if the prices are entered with or without VAT. |
vatSupport | boolean | If VAT is used in the webshop. |
showPricesIncludingVat | boolean | Whether VAT should be included in price as default. |
vatCountry | string | In which country VAT is paid. |
url | object | The URL to the start page, by language. |
adminLanguage | string | Administration-interface language. Visible and writable by administrators only. |
subscriptionInvoices | array | Unique identifiers of the webshop's invoices. |
baseCurrency | string | The base currency of the shop. |
activeCurrencies | array | An array of active currencies in the webshop. |
defaultLanguage | string | The default language of the shop. |
defaultDeliveryCountry | string | The default delivery country when orders are placed in the shop. |
deliveryCountries | array | <> |
languages | array | A list of IETF language codes. Administrators will see all the existing languages in the shop while non-administrators will see only those that are active. |
piwikId | string | The piwid identifier of the webshop. DEPRECATED. |
articlegroupPageTitleFormat | string | The format for titles on article-group pages if they are not explicitly set. |
articlePageTitleFormat | string | The format for titles on article pages if they are not explicitly set. |
customPagePageTitleFormat | string | The format for titles on custom pages if they are not explicitly set. |
startPageTitle | object | The title of the start page, by language. |
startPageMetaDescription | object | Text to be used for the HTML meta element named description on the start page, by language. |
startPageMetaKeywords | object | Text to be used for the HTML meta element named keywords on the start page, by language. |
contactEmail | string | The contact email of the shop. |
isShopSystem | boolean | Whether or not this webshop is included in a shop system. |
parent | integer | Whether or not this webshop has a parent. This combined with isShopsystem can be used to identify a subshop or supershop. |
children | array | All subshops in the case this shop is a supershop. |
minimalOrderCost | minimalOrderCost | The minimum order cost per currency that is needed to allow an order checkout. |
checkoutNewsletter | string | "disabled" , "optin" or "optout" . |
orderEmailSettings | orderEmailSettings | <> |
textAfterCheckoutComplete | object | Text to be shown after an order has been complete, by language. |
allowCustomerRegistration | boolean | <> |
checkoutIntroductionText | object | <>, by language. |
defaultCustomerType | string | The default customer type. |
hasCustomergroupAssortment | boolean | <> |
danads | object | DEPRECATED. |
publicSocialMediaParams | object | <> |
privateSocialMediaParams | object | <> |
subscriptionInvoices | array | An array of unique identifiers for subscription invoices. Visible to administrators only. See SubscriptionInvoice. |
Property | Type | Description |
---|---|---|
string | Email-address to reach the company. | |
phone | string | Phone number to reach the company. |
name | string | Name of the company. |
address | string | Address of the company. |
address2 | string | Address line 2 of the company. |
city | string | City part of the address to the company. |
postcode | string | Postcode/zipcode part of the address to the company. |
country | string | Country part of the address to the company. |
Property | Type | Description |
---|---|---|
cost | object | Cost, by currency. |
target | string | Wether it affects total or basket cost. |
{
"minimalOrderCost": {
"cost": {
"SEK": 1000,
"USD": 200
},
"target": "total"
}
}
Property | Type | Description |
---|---|---|
from | string | Email-address to reach to company. |
smtp | smtp | SMTP-settings. |
logotype | object | Logotype, by language. |
Property | Type | Description |
---|---|---|
relay | string | SMTP-relay |
port | integer | SMTP-port |
username | string | SMTP-username |
password | string | SMTP-password |
security | string | SMTP-encryption. "none" , "starttls" , "tls" or "auto" . |
When called the shop expirationDate
will be set 30 days from the current date. This will only work with admin access and only if expirationDate
has not been set earlier.
Code | Message | Description |
---|---|---|
4001 | Trial period already set. | The expirationDate has already been set with a date. |
Webshop.activateTrialPeriod()
Sends an email to the webshop. Follows the schema gotten from getContactForm.
Webshop.contact({
"name": "Jane Doe",
"email": "jane.doe@example.com",
"phone": "+442071838750",
"subject": "Return #12345678",
"body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit...",
"recaptchaResponse": "03AOLTBLQahGmqGY0pMQeYaoAFpjVdPBzfSOUReLsg2Nfaf9QnM7b..."
})
Takes a filter object and returns the number of shops found, as an integer.
A filter object specifying which shops to count. See Filter objects on the page List selection.
The request below returns the number of shops found where the base currency is Euro.
Webshop.count({
"/baseCurrency": "EUR"
})
Fetches information about a shop, if you supply its unique identifier.
Parameter | Description |
---|---|
uid | The unique identifier of a shop. |
query | Which info to return. See Query language. |
Webshop.get(22222, [
"uid",
"name"
])
Fetches a an object representing the contact form.
Webshop.getContactForm()
Fetches a JSON Schema that can be used for client-side validation.
The unique identifier of a webshop.
Fetches multiple shops as an array of objects. You can only list the shops for which you are an administrator.
Parameter | Description |
---|---|
query | Which info to return. See Query language. |
selection | Which shops to list. See List selection. |
Updates a webshop.
Parameter | Description |
---|---|
uid | The unique identifier of a shop. |
patch | An object containing the properties and values to set for the shop. |
query | A query specifying what to return after a successful set (optional). |
Webshop.set(123456, {
"name": {
"en": "Bird shop",
"sv": "Fågelbutiken"
}
}, [
"uid",
"name"
])
Validates the data to be set. The performed validation is the same as in set; it validates the resulting object and includes all the required properties. However, nothing is saved.
Parameter | Description |
---|---|
uid | The unique identifier of an existing shop. |
patch | An object containing the properties and values to set before validating. |
An array of validation-error objects, each containing the keys pointer
(a property referenced using a JSON Pointer) and message
(a readable text in the language of the context). If there are no validation errors, then an empty array is returned.