Child pages
  • Web-service reference
Skip to end of metadata
Go to start of metadata

Table of contents

Web service methods reference

Using the API

All methods are to be called through the /api/ gateway. For instance, http://www.maboutique.com/api/carriers

Most methods can be accessed in a REST manner, with the 5 main HTTP request methods: HEAD, GET, POST, PUT, DELETE.
The only exceptions are:

  • search: can only be accessed using GET and HEAD.
  • stock_movements: cannot be accessed with PUT.

All methods have two optional types, which are simply to be added at the end of the URL:

  • ?blank: returns a blank XML tree of the chosen object.
  • ?synopsis: returns a blank XML tree of the chosen object, with the format that is expected for each value (see below) and specific indicators (ie, if the node is required, and its maximum size in number of characters).

The methods

Method

Description

addresses

The Customer, Manufacturer and Customer addresses

carriers

The Carriers

carts

Customer's carts

categories

The product categories

combinations

The product combination

configurations

Shop configuration

content_management_system

Content management system

countries

The countries

currencies

The currencies

customers

The e-shop's customers

deliveries

Product delivery

employees

The Employees

groups

The customer's groups

guests

The guests

image_types

The image types

images

The images

images/general/header

The shop's logo in the header

images/general/mail

The shop's logo in the e-mails

images/general/invoice

The shop's logo in the invoice

images/general/store_icon

The shop's logo as a favicon

images/products

The products images.

images/categories

The categories images

images/manufacturers

The manufacturers images.

images/suppliers

The suppliers images.

images/stores

The stores images.

languages

Shop languages

manufacturers

The product manufacturers

order_details

Details of an order

order_discounts

Discounts of an order

order_histories

The Order histories

order_states

The Order states

orders

The Customers orders

price_ranges

Price range

product_feature_values

The product feature values

product_features

The product features

product_option_values

The product options value

product_options

The product options

products

The products

search

Search

states

The available states of countries

stock_movement_reasons

The stock movement reason

stock_movements

Stock movements management

stores

The stores

suppliers

The product suppliers

tags

The Products tags

taxes

The tax rate

translated_configurations

Shop configuration

weight_ranges

Weight ranges

zones

The Countries zones

Value formats

Generic value types

Format

Description

Expected value, in regexp form

isBool

A boolean value (true or false).

n/a

isFloat

A floating-point value (between -3.4 × 10^38 and +3.4 × 10^38).

n/a

isInt

An integral value (between -2,147,483,648 and 2,147,483,647).

n/a

isNullOrUnsignedId

An integral and unsigned value (betwee 0 and 4294967296), or a NULL value.

n/a

isSerializedArray

PHP serialized data

/^a:[0-9]+:{.*;}$/s

isString

A string of characters.

n/a

isUnsignedId

An integral and unsigned value (betwee 0 and 4294967296).

n/a

Specific value types

Format

Description

Expected value, in regexp form

isBirthDate

A valid date, in YYYY-MM-DD format.

/^([0-9]{4})-((0?[1-9])|(1[0-2]))-((0?[1-9])|([1-2][0-9])|(3[01]))( [0-9]{2}:[0-9]{2}:[0-9]{2})?$/

isCleanHtml

Must not contain invalid HTML tags, nor XSS.

isColor

A valid HTML/CSS color, in #xxxxxx format or text format.

/^(#[0-9a-fA-F]{6}|[a-zA-Z0-9-]*)$/

isEmail

A valid e-mail address.

/^[a-z0-9!#$%&\'*+\/=?^`{}|~_-]+[.a-z0-9!#$%&\'*+\/=?^`{}|~_-]*@[a-z0-9]+[._a-z0-9-]*\.[a-z0-9]+$/ui

isImageSize

A valid image size, between 0 and 9999.

/^[0-9]{1,4}$/

isLanguageCode

A valid language code, in XX or XX-XX format.

/^[a-zA-Z]{2}(-[a-zA-Z]{2})?$/

isLanguageIsoCode

A valide ISO language code, in XX or XXX format.

/^[a-zA-Z]{2,3}$/

isLinkRewrite

A valid link rewrite.

/^[_a-zA-Z0-9-]+$/

isMd5

A valid MDR5 string: 32 characters, mixing lowercase, uppercase and numerals.

/^[a-f0-9A-F]{32}$/

isNumericIsoCode

A valid ISO code, in 00 or 000 format.

/^[0-9]{2,3}$/

isPasswd

A valid password, in. between 5 and 32 characters long.

/^[.a-zA-Z_0-9-!@#$%\^&*()]{5,32}$/

isPasswdAdmin

A valid password, in. between 8 and 32 characters long.

/^[.a-zA-Z_0-9-!@#$%\^&*()]{8,32}$/

isPhpDateFormat

A valid PHP date – in fact, a string without '<' nor '>'.

/^[^<>]+$/

isPriceDisplayMethod

A valid price display method, meaning the value be equals to constants PS_TAX_EXC or PS_TAX_INC

n/a

isReference

A valid product reference.

/^[^<>;={}]*$/u

isUrl

A valid URL.

/^[~:#,%&_=\(\)\.\? \+\-@\/a-zA-Z0-9]+$/

Names

Format

Description

Expected value, in regexp form

isCatalogName

A valid product or category name.

/^[^<>;=#{}]*$/u

isCarrierName

A valid carrier name.

/^[^<>;=#{}]*$/u

isConfigName

A valid configuration key.

/^[a-zA-Z_0-9-]+$/

isGenericName

A valid standard name.

/^[^<>;=#{}]*$/u

isImageTypeName

A valid image type.

/^[a-zA-Z0-9_ -]+$/

isName

A valid name.

/^[^0-9!<>,;?=+()@#"°{}_$%:]*$/u

isTplName

A valid template name.

/^[a-zA-Z0-9_-]+$/

Location

Format

Description

Expected value, in regexp form

isAddress

A valid postal address.

/^[^!<>?=+@{}_$%]*$/u

isCityName

A valid city name.

/^[^!<>;?=+@#"°{}_$%]*$/u

isCoordinate

A valid LatLong coordinate, in 00000.0000 form.

/^\-?[0-9]{1,8}\.[0-9]{1,8}$/s

isMessage

A valid message.

/[<>{}]/i

isPhoneNumber

A valid phone number.

/^[+0-9. ()-]*$/

isPostCode

A valid postal code.

/^[a-zA-Z 0-9-]+$/

isStateIsoCode

A valid state ISO code.

/^[a-zA-Z0-9]{2,3}((-)[a-zA-Z0-9]{1,3})?$/

isZipCodeFormat

A valid zipcode format.

/^[NLCnlc -]+$/

Products

Format

Description

Expected value, in regexp form

isAbsoluteUrl

A valid absolut URL.

/^https?:\/\/[:#%&_=\(\)\.\? \+\-@\/a-zA-Z0-9]+$/

isDniLite

A valid DNI (Documento Nacional de Identidad) identifier. Specific to Spanish shops.

/^[0-9A-Za-z-.]{1,16}$/U

isEan13

A valid barcode (EAN13).

/^[0-9]{0,13}$/

isLinkRewrite

A valid friendly URL.

/^[_a-zA-Z0-9-]+$/

isPrice

A valid price display method (either PS_TAX_EXC or PS_TAX_INC).

n/a

isUpc

A valid barcode (UPC).

/^[0-9]{0,12}$/
  • No labels