Skip to main content

PrestaShop

Read and update a PrestaShop store's products, orders, customers and stock through its Webservice.

Connect it with: API key. PrestaShop's own documentation: https://devdocs.prestashop-project.org/8/webservice/tutorials/testing-access/.

What agents can do​

Connect PrestaShop so the agents working your tasks can reach it. With it connected, they can:

  • Look up an order, its customer, carrier and payment state when a support task names an order reference.
  • List products with low stock, or products missing a description or image, and report them.
  • Update a product's price, stock or description when a task asks for it (needs Modify on the products resource).
  • Export orders for a date range to build a sales report.

Before you start​

  • A PrestaShop 1.7 or 8 store served over https, reachable from the internet (Jaah refuses private and local addresses).
  • A back-office employee with access to Advanced Parameters > Webservice (usually the SuperAdmin profile).
  • Friendly URLs or URL rewriting working on the server: the Webservice answers under /api only when it is.
  • A Jaah account. Anyone can add a personal secret; an organization secret needs an Org Owner or Admin.

Connect with PrestaShop​

Jaah connects to PrestaShop with an API key, not with a sign-in button.

Connect with an API key​

Find each value first:

  • Shop URL: Your shop's public https address, the one customers visit, without /api or /admin at the end. If the shop lives in a folder, include it, such as https://example.com/shop.
  • Webservice key: In the PrestaShop back office, open Advanced Parameters > Webservice, set Enable PrestaShop's webservice to Yes and save. Then select Add new webservice key, select Generate, enter Jaah as the description, set Status to Yes, tick View (GET) for every resource agents should read (and Add, Modify or Delete only where they must write), and save.

Then add it to Jaah:

  1. In Jaah, open Secrets, select New, and pick the PrestaShop card.
  2. Name the secret and choose who can use it.
  3. Fill in Shop URL, Webservice key.
  4. Select Save. Jaah tests the secret straight away (see Test the connection).

Jaah encrypts what you type and never shows it again — not to you, and not to an admin.

Use your own OAuth app​

Not used: Jaah connects to PrestaShop with an API key, not through an OAuth app.

Test the connection​

Select Test on the secret. Jaah calls PrestaShop's API once (GET <Shop URL>/api/?output_format=JSON) with the stored values, and shows whether PrestaShop accepted it, or which value PrestaShop refused and the status it answered. Jaah also tests automatically when you save or reconnect.

The last result and its time stay on the secret's page, so you can see whether it still works without testing again.

Who can use it​

Every secret has an owner, and the owner decides who can use it:

  • Personal — only your own tasks can use it. This is the default.
  • Organization — every task in the organization can use it. Only Org Owners and Admins can choose this.
  • Attached to a project — every task on that project can use it, whoever started the task. See Attach a secret to a project.

More on owners and access: How secrets work.

Use it in an agent session​

An agent asks for the secret with its credential_get tool, by the secret's path, when it needs it, and gets the values for that one call. The path is the owner's prefix and the secret's name:

  • org/<name> for an organization secret,
  • projects/<project>/<name> for one attached to a project,
  • me/<name> for your personal one.

A key connection hands the agent its fields: shop_url, webservice_key.

Tell the agent in your task description which secret to use, for example “use the PrestaShop secret org/prestashop”.

Manage, rotate or disconnect​

Everything is on the secret's page under Secrets:

  • Rotate a key: create a new key at the vendor first, then select Replace on the secret and paste it. Revoke the old key at PrestaShop once the test passes. Steps: Replace or delete a secret.
  • Disconnect: select Delete. The stored values are destroyed and agents lose access on their next call. To end access at PrestaShop's side too, revoke or delete the key at PrestaShop.

Limitations​

  • The key's permission grid is the limit: an agent can use only the resources and methods ticked on the key.
  • PrestaShop returns JSON from version 8.1 on; older stores answer in XML, which agents can still read but Test cannot check.
  • In multistore mode a key reaches only the shops it is associated with.
  • Agents can do only what the connected PrestaShop account allows.

Troubleshooting​

Test says PrestaShop rejected the webservice key (401)

The key was disabled, deleted or mistyped, or the Webservice is switched off. In Advanced Parameters > Webservice check Enable PrestaShop's webservice is Yes and the key's Status is Yes, then select Replace and paste the key again.

Test keeps failing with 401 although the key is right

The web server drops the Authorization header before PrestaShop sees it. On Apache add CGIPassAuth On (or SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1) to the shop's .htaccess, then test again.

Test says PrestaShop answered, but not with an API response

/api is not reaching the Webservice: URL rewriting is off, or Shop URL points at a page other than the shop root. Turn on Friendly URL in Shop Parameters > Traffic & SEO and check Shop URL has no /admin or /api suffix.

Still stuck? Select Test and read the result: it names the value PrestaShop refused and the status it answered.

FAQ​

Can I give agents read-only access?

Yes. Tick only View (GET) on the key's resources. Agents then cannot add, change or delete anything.

My shop is on a private network. Can Jaah reach it?

No. Jaah only calls public https addresses, so the shop must be reachable from the internet.

Can Jaah or an admin see the key or token?

No. Jaah stores it encrypted and never shows it again. Only the tasks allowed to use the secret receive it, at the moment they ask for it.

Can I connect more than one PrestaShop account?

Yes. Add one secret per account, each with its own name, and tell the agent which one to use.