> For the complete documentation index, see [llms.txt](https://docs.prestashop-project.org/1-5-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.prestashop-project.org/1-5-documentation/english-documentation/developer-guide/developer-tutorials/using-the-prestashop-web-service.md).

# Using the PrestaShop Web Service

**Table of content**

* [Using the PrestaShop Web Service](/1-5-documentation/english-documentation/developer-guide/developer-tutorials/using-the-prestashop-web-service.md#UsingthePrestaShopWebService-UsingthePrestaShopWebService)
  * [Prerequisites](/1-5-documentation/english-documentation/developer-guide/developer-tutorials/using-the-prestashop-web-service.md#UsingthePrestaShopWebService-Prerequisites)
  * [About CRUD & REST](https://docs.prestashop-project.org/1-5-documentation/english-documentation/developer-guide/developer-tutorials/pages/-MEb-h2QXEaUpPOPlG8R#UsingthePrestaShopWebService-AboutCRUD\&REST)
  * [About this tutorial](/1-5-documentation/english-documentation/developer-guide/developer-tutorials/using-the-prestashop-web-service.md#UsingthePrestaShopWebService-Aboutthistutorial)
  * [Implementations](/1-5-documentation/english-documentation/developer-guide/developer-tutorials/using-the-prestashop-web-service.md#UsingthePrestaShopWebService-Implementations)
  * [Files](/1-5-documentation/english-documentation/developer-guide/developer-tutorials/using-the-prestashop-web-service.md#UsingthePrestaShopWebService-Files)

## Using the PrestaShop Web Service <a href="#usingtheprestashopwebservice-usingtheprestashopwebservice" id="usingtheprestashopwebservice-usingtheprestashopwebservice"></a>

This tutorial demonstrates how to use the PrestaShop web service, using the dedicated PHP library to create a "CRUD" application.

*Instead of using the tutorial, you can directly go read the* [*Webservice one-page documentation*](/1-5-documentation/english-documentation/developer-guide/developer-tutorials/using-the-prestashop-web-service/webservice-one-page-documentation.md)*.*

### Prerequisites <a href="#usingtheprestashopwebservice-prerequisites" id="usingtheprestashopwebservice-prerequisites"></a>

* PrestaShop 1.5 installed on a server with `mod_rewrite` enabled (Apache only).
* A local xAMP server with PHP5 enabled.

### About CRUD & REST <a href="#usingtheprestashopwebservice-aboutcrud-and-rest" id="usingtheprestashopwebservice-aboutcrud-and-rest"></a>

The PrestaShop web service uses the REST architecture in order to be available on as many platforms as possible, since the HTTP protocol and XML files are understood by most platforms, if not all.

[**CRUD**](http://en.wikipedia.org/wiki/Create,_read,_update_and_delete) is an acronym that stands for "Create, Read, Update, and Delete". These are the four basic operations for managing data in an application.

[**REST**](http://en.wikipedia.org/wiki/REST) defines roughly a style of software architecture, which promotes the use of HTTP methods when building web application, instead of custom methods or protocols such as SOAP or WSDL. It defines several rules, including one that is similar to CRUD, which is described below.

HTTP has several methods that can perform processing on data as defined in the REST architecture, among which are 4 main methods. See this page: <http://en.wikipedia.org/wiki/HTTP#Request_methods>

The table below offers a comparison with CRUD and SQL:

| HTTP / REST | CRUD     | SQL    |
| ----------- | -------- | ------ |
| POST        | Create   | INSERT |
| GET         | Retrieve | SELECT |
| PUT         | Update   | UPDATE |
| DELETE      | Delete   | DELETE |

### About this tutorial <a href="#usingtheprestashopwebservice-aboutthistutorial" id="usingtheprestashopwebservice-aboutthistutorial"></a>

This tutorial explores how to create a small application to perform these four basic operations for customers.

Chapters 1, 2 and 3 are mandatory, as they contain the fundamental knowledge for using the web service.

The next chapters, explores ways to interact with the web service using each of the REST operations, in order to give you the tools to make a full CRUD application.

If you only want to retrieve data, for example when developing a web application to notify you of orders, you might only be interested in Chapter 4.

If you prefer to develop a more complete application, chapters 4 to 7 will interest you.

Chapters 9 and 10 give you more detail on specific content management.

[Chapter 1 - Introduction: Creating Access to Back Office](/1-5-documentation/english-documentation/developer-guide/developer-tutorials/using-the-prestashop-web-service/chapter-1-creating-access-to-back-office.md)\
[Chapter 2 - Discovery: Testing access to the web service with the browser](/1-5-documentation/english-documentation/developer-guide/developer-tutorials/using-the-prestashop-web-service/chapter-2-discovery-testing-access-to-the-web-service-with-the-browser.md)\
[Chapter 3 - First steps: Access the Web service and list client](/1-5-documentation/english-documentation/developer-guide/developer-tutorials/using-the-prestashop-web-service/chapter-3-first-steps-access-the-web-service-and-list-client.md)\
[Chapter 4 - Retrieve Data: Retrieving a client](/1-5-documentation/english-documentation/developer-guide/developer-tutorials/using-the-prestashop-web-service/chapter-4-retrieve-data-retrieving-a-client.md)\
[Chapter 5 - Modification: Update client](/1-5-documentation/english-documentation/developer-guide/developer-tutorials/using-the-prestashop-web-service/chapter-5-modification-update-client.md)\
[Chapter 6 - Creation: Remote Online Form](/1-5-documentation/english-documentation/developer-guide/developer-tutorials/using-the-prestashop-web-service/chapter-6-creation-remote-online-form.md)\
[Chapter 7 - Removal: Remove customer accounts from the database](/1-5-documentation/english-documentation/developer-guide/developer-tutorials/using-the-prestashop-web-service/chapter-7-removal-remove-customer-accounts-from-the-database.md)\
[Chapter 8 - Advanced Use](/1-5-documentation/english-documentation/developer-guide/developer-tutorials/using-the-prestashop-web-service/chapter-8-advanced-use.md)\
[Chapter 9 - Image management](/1-5-documentation/english-documentation/developer-guide/developer-tutorials/using-the-prestashop-web-service/chapter-9-image-management.md)\
[Chapter 10 - Price management](/1-5-documentation/english-documentation/developer-guide/developer-tutorials/using-the-prestashop-web-service/chapter-10-price-management.md)\
[Cheat-sheet - Concepts outlined in this tutorial](/1-5-documentation/english-documentation/developer-guide/developer-tutorials/using-the-prestashop-web-service/cheat-sheet-concepts-outlined-in-this-tutorial.md)

### Implementations <a href="#usingtheprestashopwebservice-implementations" id="usingtheprestashopwebservice-implementations"></a>

* Manage your PrestaShop website through Open ERP: [Prestashop OpenERP Connector](https://launchpad.net/prestashoperpconnect/) by Akretion & CampToCamp (GNU Affero GPLv3)
* A Scala library to access the PrestaShop web service: [prestasac](https://github.com/orderly/prestashop-scala-client) by Alex Dean (GNU Affero GPLv3)
* A Python library to access the PrestaShop web service: [prestapyt](https://github.com/guewen/prestapyt) by Guewen Baconnier (GNU Affero GPLv3)

### Files <a href="#usingtheprestashopwebservice-files" id="usingtheprestashopwebservice-files"></a>

#### Web service library <a href="#usingtheprestashopwebservice-webservicelibrary" id="usingtheprestashopwebservice-webservicelibrary"></a>

The latest version of the **PSWebServiceLibrary.php** file can be found on our code repository: <https://github.com/PrestaShop/PrestaShop-webservice-lib/blob/master/PSWebServiceLibrary.php>\
To download the file:

1. Click here to view the raw file: <https://raw.github.com/PrestaShop/PrestaShop-webservice-lib/master/PSWebServiceLibrary.php>
2. Copy/paste the file into an empty text local file, using for instance Notepad.
3. Save the file as `PSWebServiceLibrary.php`

You can also directly download a zip archive of all the files in this repository, including the example files, by clicking here: <https://github.com/PrestaShop/PrestaShop-webservice-lib/archive/master.zip>

#### Examples files <a href="#usingtheprestashopwebservice-examplesfiles" id="usingtheprestashopwebservice-examplesfiles"></a>

All the example files can be found on our code repository: <https://github.com/PrestaShop/PrestaShop-webservice-lib/tree/master/examples>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.prestashop-project.org/1-5-documentation/english-documentation/developer-guide/developer-tutorials/using-the-prestashop-web-service.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
