# prestashop/webservice-postman-examples architecture

> Architecture diagram of the GitHub repository prestashop/webservice-postman-examples, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/prestashop/webservice-postman-examples
- Repository: https://github.com/prestashop/webservice-postman-examples

## Overview

##### Project type and purpose
- This is not a running application or library, but a set of Postman collections (“demo_product_collection.json”, “demo_custom_resource_collection.json”, etc.) illustrating how to call PrestaShop’s REST/webservice API endpoints for built-in and custom resources.
- Purpose: help developers learn and test CRUD operations against a PrestaShop instance using Postman.

##### File structure
- Top-level files only: no code or folders, just README.md and three .json collection files.
- “demo_product_collection.json” – standard product CRUD
- “demo_custom_resource_collection.json” – CRUD on a custom “articles” resource provided by the “demowsextend” example module
- “demo_product_az.json” – likely another variant or filter example for products

##### README for additional insights
- Confirms this is a Postman example repo
- Points to PrestaShop devdocs for details on testing webservices and extending webservices with custom resources

##### Key points to capture
- Both built-in and custom resource flows side by side
- End-to-end path of a request and response
- Distinguish client vs. server vs. data store layers
- Extensibility via modules for custom resources
- Keep it simple and focused on the API surface exposed by PrestaShop

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Layer
    subgraph "Client Layer"
        Postman["Postman"]:::client
        DPC["demo_product_collection.json"]:::client
        DCRC["demo_custom_resource_collection.json"]:::client
        DPZ["demo_product_az.json"]:::client
        README["README.md"]:::client
    end

    %% Server Layer
    subgraph "Server Layer"
        API["PrestaShop Webservice API"]:::server
        subgraph "Controllers"
            PC["Product Controller"]:::server
            AC["Articles Controller (demowsextend)"]:::server
        end
    end

    %% Database Layer
    DB["Database"]:::database

    %% Client to Server Requests
    DPC -->|"HTTP GET/POST/PUT/DELETE"| API
    DCRC -->|"HTTP GET/POST/PUT/DELETE"| API
    DPZ -->|"HTTP GET/POST/PUT/DELETE"| API

    %% Server Routing
    API -->|"route & validate"| PC
    API -->|"route & validate"| AC

    %% Controllers to Database
    PC -->|"SQL CRUD"| DB
    AC -->|"SQL CRUD"| DB

    %% Response Flow
    DB -->|"Response (XML/JSON)"| PC
    DB -->|"Response (XML/JSON)"| AC
    PC -->|"Response"| API
    AC -->|"Response"| API
    API -->|"Response (XML/JSON)"| Postman

    %% Documentation link
    Postman --> README

    %% Click Events
    click DPC "https://github.com/prestashop/webservice-postman-examples/blob/main/demo_product_collection.json"
    click DCRC "https://github.com/prestashop/webservice-postman-examples/blob/main/demo_custom_resource_collection.json"
    click DPZ "https://github.com/prestashop/webservice-postman-examples/blob/main/demo_product_az.json"
    click README "https://github.com/prestashop/webservice-postman-examples/blob/main/README.md"

    %% Styles
    classDef client fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef server fill:#90EE90,stroke:#333,stroke-width:1px
    classDef database fill:#FFA500,stroke:#333,stroke-width:1px
```
