LogoLogo
Homepage
  • Documentations for PrestaShop 1.5
  • English documentation 1.5
    • About PrestaShop 1.5
    • New features in PrestaShop 1.5
    • Getting Started
      • What you need to get started
      • Installing PrestaShop
      • Installing PrestaShop using the command line
      • Updating & Uninstalling
      • Misc. information
    • Updating PrestaShop
      • Automatic update
      • Manual update
      • Making and restoring your own backup
      • In case of issues
    • User Guide
      • Training
      • Customizing your shop
      • Browsing the front-office
      • Connecting to the PrestaShop back-office
      • First steps with PrestaShop 1.5
      • Adding Products and Product Categories
      • A Look Inside the Catalog
      • Managing Orders
      • Managing Customers
      • Creating Price Rules and Vouchers
      • Managing Shipping
      • Understanding Local Settings
      • Managing Modules and Themes
      • Making the Native Modules Work
      • Understanding the Preferences
      • Understanding the Advanced Parameters
      • Administering the Back-Office
      • Understanding Statistics
      • Advanced Stock Management
      • Managing Multiple Shops
    • Developer Guide
      • Developer tutorials
        • Using the PrestaShop Web Service
          • Webservice one-page documentation
          • Chapter 1 - Creating Access to Back Office
          • Chapter 2 - Discovery - Testing access to the web service with the browser
          • Chapter 3 - First steps - Access the Web service and list client
          • Chapter 4 - Retrieve Data - Retrieving a Client
          • Chapter 5 - Modification - Update client
          • Chapter 6 - Creation - Remote Online Form
          • Chapter 7 - Removal - Remove customer accounts from the database
          • Chapter 8 - Advanced Use
          • Chapter 9 - Image management
          • Chapter 10 - Price management
          • Cheat-sheet - Concepts outlined in this tutorial
          • Web service reference
        • Helpers
          • HelperForm
          • HelperOptions
          • HelperList
          • Using helpers to overload a back-office template
        • New Developers Features In PrestaShop 1.5
        • Using the Context Object
        • DB class best practices
        • Public and overloadable methods
        • Overriding default behaviors
        • Using addJquery(), addJqueryPlugin() and addJqueryUI()
        • Handling special characters in links
        • Auto-updating modules
        • Front-Office Controllers
        • Controllers correspondence table
        • Specifics of multistore module development
        • Developer tips and tricks
        • PrestaShop's developer tools
        • Using the backward compatibility toolkit
      • Fundamentals
      • Coding Standards
      • Setting up your local development environment
      • Diving into PrestaShop Core development
      • Creating a PrestaShop module
      • Creating a front-office module
      • Creating a module with both front-end and back-end controllers
      • Hooks in PrestaShop 1.5
      • Translations in PrestaShop 1.5
      • How to use the Forge to contribute to PrestaShop
      • How to write a commit message
      • Contributing code to PrestaShop
    • Designer Guide
      • Theme development fundamentals
      • Integrating content in a page using hooks
      • Characteristics of a front-office theme
      • Characteristics of a back-office theme
      • Creating your own theme
      • Theme templates and Smarty
      • Using jQuery and Ajax
      • Best practices
      • Designer tutorials
        • Changes in version 1.5 which impact theme development
        • Changing a 1.4 theme to support gift products
        • Implementing layered navigation in a theme
    • System Administrator Guide
    • Merchant's Guide
      • Our advices
      • Sample price rules
    • FAQ
      • Using PrestaShop with WordPress
    • Troubleshooting
  • Documentation française 1.5
    • À propos de PrestaShop 1.5
    • Nouveautés de PrestaShop 1.5
    • Guide de démarrage
      • Ce dont vous avez besoin
      • Installer PrestaShop
      • Installer PrestaShop en ligne de commande
      • Mettre PrestaShop à jour
      • Informations diverses
    • Guide de mise à jour
      • Mise à jour automatique
      • Mise à jour manuelle
      • Faire une sauvegarde et la restaurer
      • En cas de problème
    • Guide de l'utilisateur
      • Formations
      • Personnaliser votre boutique
      • Parcourir le front-office
      • Se connecter au back-office de Prestashop
      • Premiers pas avec PrestaShop 1.5
      • Ajouter des produits et des catégories de produits
      • Un aperçu du catalogue
      • Gérer les commandes
      • Gérer les clients
      • Mettre en place des promotions
      • Gérer les transporteurs
      • Comprendre les réglages locaux
      • Gérer les modules et les thèmes
      • Configurer les modules natifs
      • Comprendre les préférences
      • Comprendre les paramètres avancés
      • Administrer le back-office
      • Comprendre les statistiques
      • Gestion avancée des stocks
      • Gérer plusieurs boutiques
    • Guide du développeur
      • Fondamentaux
      • Norme de développement
      • Mettre en place votre environnement de développement
      • Plonger dans le développement PrestaShop
      • Créer un module PrestaShop
      • Les hooks de PrestaShop 1.5
      • Les traductions dans PrestaShop 1.5
      • Comment utiliser la Forge pour contribuer à PrestaShop
      • Comment écrire un descriptif de modification
    • Guide de l'intégrateur
      • Fondamentaux de la création de thème
      • Intégrer du contenu dans une page à l'aide de hooks
      • Caractéristiques d'un thème front-office
      • Caractéristiques d'un thème back-office
      • Template de thème et Smarty
      • Utiliser jQuery et Ajax
      • Bonnes pratiques
    • Guide de l'administrateur système
    • Guide du vendeur
      • Exemples de promotions
      • Nos bons conseils
    • Questions fréquentes
    • Dépannage
  • Documentación española 1.5
    • Acerca de PrestaShop 1.5
    • Introducción
      • Lo que necesita para empezar
    • Guía del usuario
      • Formación
      • Personalización de su tienda
      • Exploración del front-office
      • Conexión al back-office de PrestaShop
      • Primeros pasos con PrestaShop 1.5
      • Añadir productos y categorías de productos
      • Una mirada interna al catálogo
      • Gestionar pedidos
      • Gestionar clientes
      • Crear reglas de precios y cupones
      • Gestionar el transporte
      • Comprender la Configuración Local
      • Gestionar módulos y temas
      • Configurar los Módulos Nativos
      • Comprender las Preferencias
      • Comprender los Parámetros avanzados
      • Administrar el Back-Office
      • Comprender las estadísticas
      • Gestión avanzada de stock
      • Gestionar varias tiendas
    • Guía del Desarrollador
      • Tutoriales para Desarrolladores
        • Uso del Web Service de Prestashop
          • Capítulo 1 - Creación de acceso al Back Office
  • Документация на русском языке 1.5
    • Информация о PrestaShop 1.5
    • Новые функции в PrestaShop 1.5
    • Приступая к работе
      • Что нужно чтобы приступить к работе
      • Установка PrestaShop
      • Установка PrestaShop при помощи командной строки
      • Обновление и удаление PrestaShop
      • Прочая информация
    • Руководство пользователя
      • Обучение
      • Настройка вашего магазина
      • Изучение публичной части сайта
      • Бэк-офис PrestaShop
      • Первые шаги в PrestaShop 1.5
      • Добавление товаров и товарных категорий
      • Внутри каталога
      • Управление заказами
      • Работа с клиентами
      • Создание правил ценообразования корзины и ваучеров
      • Управление доставкой
      • Ориентация в локальных настройках
      • Управление модулями и темами
      • Настойка встроенных модулей
      • Ориентация в настройках
      • Ориентация в расширенных параметрах
      • Администрирование Back-Office
      • Ориентация в статистике
      • Расширенное управление запасами
      • Управление мультимагазином
Powered by GitBook
On this page
  • Web service reference
  • Using the API
  • Value formats

Was this helpful?

  1. English documentation 1.5
  2. Developer Guide
  3. Developer tutorials
  4. Using the PrestaShop Web Service

Web service reference

PreviousCheat-sheet - Concepts outlined in this tutorialNextHelpers

Last updated 4 years ago

Was this helpful?

Table of contents

/*<![CDATA[*/ div.rbtoc1597308497945 {padding: 0px;} div.rbtoc1597308497945 ul {list-style: disc;margin-left: 0px;} div.rbtoc1597308497945 li {margin-left: 0px;padding-left: 0px;} /*]]>*/

Web service reference

Using the API

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

Available HTTP methods

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

  • product_suppliers: only GET and HEAD.

  • search: only GET and HEAD.

  • stock_availables: only GET, POST, and HEAD.

  • stock_movements: only GET and HEAD.

  • stocks: only GET and HEAD.

  • supply_order_details: only GET and HEAD.

  • supply_order_histories: only GET and HEAD.

  • supply_order_receipt_histories: only GET and HEAD.

  • supply_order_states: only GET and HEAD.

  • supply_orders: only GET and HEAD.

  • warehouse_product_locations: only GET and HEAD.

  • warehouses: only GET, POST, PUT, and HEAD.

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).

Available resources

This list is current as of v1.5.4.1 of PrestaShop.

Method

Description

addresses

The Customer, Manufacturer and Customer addresses

carriers

The Carriers

cart_rules

Cart rules management

carts

Customer's carts

categories

The product categories

combinations

The product combination

configurations

Shop configuration

contacts

Shop contacts

content_management_system

Content management system

countries

The countries

currencies

The currencies

customer_messages

Customer services messages

customer_threads

Customer services threads

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_carriers

Details of an order

order_details

Details of an order

order_discounts

Discounts of an order

order_histories

The Order histories

order_invoices

The Order invoices

order_payments

The Order payments

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

product_suppliers

Product Suppliers

products

The products

search

Search

shop_groups

Shop groups from multi-shop feature

shops

Shops from multi-shop feature

specific_price_rules

Specific price management

specific_prices

Specific price management

states

The available states of countries

stock_availables

Available quantities

stock_movement_reasons

The stock movement reason

stock_movements

Stock movements management

stocks

Stocks

stores

The stores

suppliers

The product suppliers

supply_order_details

Supply Order Details

supply_order_histories

Supply Order Histories

supply_order_receipt_histories

Supply Order Receipt Histories

supply_order_states

Supply Order States

supply_orders

Supply Orders

tags

The Products tags

tax_rule_groups

Tax rule groups

tax_rules

Tax rules entity

taxes

The tax rate

translated_configurations

Shop configuration

warehouse_product_locations

Location of products in warehouses

warehouses

Warehouses

weight_ranges

Weight ranges

zones

The Countries zones

Value formats

When displaying a data schema in synopsis mode, the API gives some useful indication of the expected data type.

For instance:

<?xml version="1.0" encoding="UTF-8"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
  <customer>
    <id_default_group></id_default_group>
    <id_lang format="isUnsignedId"></id_lang>
    <newsletter_date_add></newsletter_date_add>
    <ip_registration_newsletter></ip_registration_newsletter>
    <last_passwd_gen></last_passwd_gen>
    <secure_key format="isMd5"></secure_key>
    <deleted format="isBool"></deleted>
    <passwd required="true" maxSize="32" format="isPasswd"></passwd>
    <lastname required="true" maxSize="32" format="isName"></lastname>
    <firstname required="true" maxSize="32" format="isName"></firstname>
    <email required="true" maxSize="128" format="isEmail"></email>
    ...
  </customer>
</prestashop>

Here are the descriptions of the expected value types.

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 (between 0 and 4294967296), or a NULL value.

n/a

isSerializedArray

PHP serialized data.

isString

A string of characters.

n/a

isUnsignedId

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

n/a

Specific value types

Format

Description

Expected value, in regexp form

isBirthDate

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

isCleanHtml

Must not contain invalid HTML tags, nor XSS.

isColor

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

isEmail

A valid e-mail address.

isImageSize

A valid image size, between 0 and 9999.

isLanguageCode

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

isLanguageIsoCode

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

isLinkRewrite

A valid link rewrite.

isMd5

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

isNumericIsoCode

A valid ISO code, in 00 or 000 format.

isPasswd

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

isPasswdAdmin

A valid password, between 8 and 32 characters long.

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.

isUrl

A valid URL.

Names

Format

Description

Expected value, in regexp form

isCatalogName

A valid product or category name.

isCarrierName

A valid carrier name.

isConfigName

A valid configuration key.

isGenericName

A valid standard name.

isImageTypeName

A valid image type.

isName

A valid name.

isTplName

A valid template name.

Locations

Format

Description

Expected value, in regexp form

isAddress

A valid postal address.

isCityName

A valid city name.

isCoordinate

A valid latitude-longitude coordinates, in 00000.0000 form.

isMessage

A valid message.

isPhoneNumber

A valid phone number.

isPostCode

A valid postal code.

isStateIsoCode

A valid state ISO code.

isZipCodeFormat

A valid zipcode format.

Products

Format

Description

Expected value, in regexp form

isAbsoluteUrl

A valid absolute URL.

isDniLite

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

isEan13

A valid barcode (EAN13).

isLinkRewrite

A valid friendly URL.

isPrice

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

n/a

isUpc

A valid barcode (UPC).

Web service reference
Using the API
Available HTTP methods
Available resources
Value formats
Generic value types
Specific value types
Names
Locations
Products