Skip to content

Core API

The Core API provides essential functionality for sales operations, SAV (Service After Sale) management, and contact lead handling.

Overview

17 endpoints organized into three categories: - Sale Operations (12 endpoints): Order and sale management - SAV Operations (4 endpoints): After-sales service management - Contact Management (1 endpoint): Lead capture


Sale Operations

Get Sale by ID

GET /api/sale/{id}

Retrieve detailed information about a sale including all sale products and tracking information.

Parameters: - id (integer, required): Sale ID

Authentication: Token Bearer required

Response: JSON object containing sale details with encoded tracking numbers

Example:

curl -H "Authorization: Bearer {token}" \
  https://api.menzzo.fr/api/sale/12345


Get Sale Refund

GET /api/sale-refund/{id}

Retrieve refund information for a specific sale.

Parameters: - id (integer, required): Sale ID

Authentication: Token Bearer required

Response: JSON array of refund objects

Example:

curl -H "Authorization: Bearer {token}" \
  https://api.menzzo.fr/api/sale-refund/12345


Get Sale RDV Configuration

GET /api/sale-rdv/{id}

Retrieve appointment (rendez-vous) dates and configuration for a sale.

Parameters: - id (integer, required): Sale RDV ID

Authentication: Token Bearer required

Response: JSON object containing available appointment dates and configuration

Example:

curl -H "Authorization: Bearer {token}" \
  https://api.menzzo.fr/api/sale-rdv/123


Check/Update Sale RDV

GET /api/sale-rdv-check/{token}

Check and update customer appointment preferences.

Parameters: - token (string, required): Encoded token containing appointment details

Authentication: Token Bearer required

Response: JSON with appointment status and available dates


Get Sale by Increment ID

GET /api/get-sale-info-by-increment-id/{incrementId}

Retrieve sale information using the Magento increment ID.

Parameters: - incrementId (string, required): Magento order increment ID (e.g., "15000012345")

Authentication: Token Bearer required

Response: JSON object with sale details

Example:

curl -H "Authorization: Bearer {token}" \
  https://api.menzzo.fr/api/get-sale-info-by-increment-id/15000012345


Update Sale Address

GET /api/set-sale-info-address/{token}

Add or update shipping/billing address for a sale.

Parameters: - token (string, required): Encoded token with address data

Authentication: Token Bearer required

Response: JSON with update status


Save Trusk Appointment

GET /api/save-trusk-sale-rdv/{token}

Save appointment details for Trusk delivery service.

Parameters: - token (string, required): Encoded token with appointment data

Authentication: Token Bearer required

Response: JSON with save status


Get Sale Invoice

GET /api/sale-invoice/{token}

Generate and download sale invoice as PDF.

Parameters: - token (string, required): Encoded token with sale information

Authentication: Token Bearer required

Response: PDF file (Binary)

Example:

curl -H "Authorization: Bearer {token}" \
  https://api.menzzo.fr/api/sale-invoice/{token} -o invoice.pdf


Cancel Sale or Product

GET /api/cancel-sale-or-product/{token}

Cancel entire sale or specific products within a sale.

Parameters: - token (string, required): Encoded token with cancellation details

Authentication: Token Bearer required

Response: JSON with cancellation status

Side Effects: - Updates sale/product status to cancelled - May trigger refund processes - Logs cancellation action


Import Order from API Shopping

POST /api/api-add-new-order-api-shopping

Import a new order from an external shopping API.

Parameters: (JSON body) - Order data structure (various fields)

Authentication: Token Bearer required

Response: JSON with import status

Example:

curl -X POST \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"order_data": "..."}' \
  https://api.menzzo.fr/api/api-add-new-order-api-shopping


Search EAN14 Product

POST /api/search-ean14-product-colis

Search for products using EAN14 barcode for package scanning operations.

Parameters: (JSON body) - sku (string, optional): Product SKU - columns (array, optional): Columns to return - order (object, optional): Sort order

Authentication: Token Bearer required

Response: JSON array of matching products

Example:

curl -X POST \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"sku": "PROD-12345"}' \
  https://api.menzzo.fr/api/search-ean14-product-colis


Contact & Lead Management

Add Contact Lead

POST /api/contact-lead

Create a new contact lead for wholesale inquiries.

Parameters: (JSON body)

{
  "name": "string",
  "email": "string",
  "phone": "string",
  "project_name": "string"
}

Authentication: Token Bearer required

Response:

{
  "message": "Contact added successfully"
}

Side Effects: - Creates new ContactLead entity - Sends notification email to Menzzo team (technique@menzzo.fr, emilie@menzzo.fr, sarah@menzzo.fr, aquiba@menzzo.fr)

Example:

curl -X POST \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Doe",
    "email": "john@example.com",
    "phone": "+33612345678",
    "project_name": "Wholesale Project"
  }' \
  https://api.menzzo.fr/api/contact-lead


SAV (Service After Sale) Operations

Create SAV for Sale Product

POST /api/sale-sav/create-for-sale-product

Create a new SAV (after-sales service) request for one or more sale products.

Parameters: (JSON body) - saleProductId (integer|array, required): Sale product ID(s) - data (object, required): SAV data including: - complaint (string): Complaint type - complaint_name (string): Complaint category - sav_type (string): Type of SAV request - rdv_date (string, optional): Appointment date (YYYY-MM-DD) - rdv_time (string, optional): Appointment time (HH:MM) - rdv_phone (string, optional): Contact phone - rdv_comment (string, optional): Comments - videos (array, optional): Video URLs - images (array, optional): Image data

Authentication: Token Bearer required

Response: JSON with SAV creation status and ID

Side Effects: - Creates SAV record in database - Optionally schedules appointment if rdv_date and rdv_time provided - Uploads videos and images if provided - Logs SAV creation in sale log

Example:

curl -X POST \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "saleProductId": [123, 456],
    "data": {
      "complaint": "damage",
      "sav_type": "garantie",
      "rdv_date": "2026-02-15",
      "rdv_time": "14:00",
      "rdv_phone": "+33612345678",
      "rdv_comment": "Product damaged during delivery"
    }
  }' \
  https://api.menzzo.fr/api/sale-sav/create-for-sale-product


Get SAV Holidays

GET /api/sale-sav/get-holidays

Retrieve SAV service holiday dates when appointments are not available.

Parameters: None

Authentication: Token Bearer required

Response: JSON array of holiday dates

Example:

curl -H "Authorization: Bearer {token}" \
  https://api.menzzo.fr/api/sale-sav/get-holidays

Response Example:

[
  "2026-12-25",
  "2026-01-01",
  "2026-05-01"
]


Upload SAV File

POST /api/sale-sav/upload-file

Upload supporting documents (images, PDFs) for a SAV request.

Parameters: (JSON body) - complaint_id (integer, required): SAV complaint ID - prefix (string, required): File prefix/category - file_url (string, required): URL of file to upload - file_name (string, required): Original filename

Authentication: Token Bearer required

Response: JSON with upload status

Example:

curl -X POST \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "complaint_id": 789,
    "prefix": "damage",
    "file_url": "https://example.com/image.jpg",
    "file_name": "damage_photo.jpg"
  }' \
  https://api.menzzo.fr/api/sale-sav/upload-file


Get SAV Planning Occupied Slots

GET /api/sale-sav/planning/occupied

Retrieve occupied time slots for SAV appointment scheduling.

Parameters: (Query string) - date (string, optional): Single date (YYYY-MM-DD) - dates (array, optional): Multiple dates (comma-separated) - start_date (string, optional): Range start date (YYYY-MM-DD) - end_date (string, optional): Range end date (YYYY-MM-DD) - planning_types (array, optional): Types of appointments to check - complaint (string, optional): Complaint type filter

Authentication: Token Bearer required

Response: JSON object with occupied slots, holidays, and timezone information

Example:

curl -H "Authorization: Bearer {token}" \
  "https://api.menzzo.fr/api/sale-sav/planning/occupied?start_date=2026-02-15&end_date=2026-02-20"

Response Example:

{
  "success": true,
  "dates": ["2026-02-15", "2026-02-16"],
  "range": {
    "start": "2026-02-15",
    "end": "2026-02-20"
  },
  "occupied": {
    "2026-02-15": {
      "09:00": 2,
      "10:00": 3,
      "14:00": 1
    },
    "2026-02-16": {
      "09:00": 1
    }
  },
  "holidays": ["2026-12-25"],
  "timezone": "Europe/Paris"
}


Error Handling

All Core API endpoints follow standard error patterns:

400 Bad Request:

{
  "success": false,
  "error": "Invalid parameters",
  "message": "Missing required field: saleProductId"
}

401 Unauthorized:

{
  "success": false,
  "error": "Unauthorized",
  "message": "Invalid or missing authentication token"
}

404 Not Found:

{
  "success": false,
  "error": "Not found",
  "message": "Sale with ID 12345 not found"
}

500 Internal Server Error:

{
  "success": false,
  "error": "Internal server error",
  "message": "An unexpected error occurred"
}