Skip to main content

MageMe EasyQuote Magento 2 Module | REST API

The EasyQuote REST API enables programmatic access to the EasyQuote functionalities within a Magento 2 environment. This documentation outlines the various API endpoints available for managing quotes and requests via EasyQuote.

Quote API

To access the EasyQuote API endpoints, you need to authenticate and obtain authorization. Ensure that you have the appropriate permissions (EasyQuote > Quotes) assigned to your API integration or user role.

1. Retrieve Quote Details

  • Endpoint: /V1/easyquote/quote/:id
  • Method: GET
  • Description: Fetches detailed information about a specific quote by ID.
  • Parameters:
    • id (required): The ID of the quote.
    • addItems (optional): A boolean parameter to decide whether to include the items in the quote in the response.
  • Response: Returns detailed data about the quote, including items if addItems is true.

Example Usage:

curl -X GET "https://example.com/rest/V1/easyquote/quote/123?addItems=true" \
-H "Authorization: Bearer <access_token>"

2. Retrieve Quote Items

  • Endpoint: /V1/easyquote/quote/:quoteId/items
  • Method: GET
  • Description: Retrieves all items associated with a specific quote.
  • Parameters:
    • quoteId (required): The ID of the quote.

Example Usage:

curl -X GET "https://example.com/rest/V1/easyquote/quote/123/items" \
-H "Authorization: Bearer <access_token>"

3. Retrieve Multiple Quotes

  • Endpoint: /V1/easyquote/quotes
  • Method: GET
  • Description: Fetches data for multiple quotes.
  • Parameters:
    • addItems (optional): A boolean parameter to decide whether to include the items in the quotes in the response.

Example Usage:

curl -X GET "https://example.com/rest/V1/easyquote/quotes?addItems=false" \
-H "Authorization: Bearer <access_token>"

4. Add Quote to Cart

  • Endpoint: /V1/easyquote/quotes/:quoteId/addToCart
  • Method: POST
  • Description: Adds a specified quote to the cart.
  • Parameters:
    • quoteId (required): The ID of the quote.
    • cartId (required): The cart ID.
    • customerId (required): The customer ID.

Example Usage:

curl -X POST "https://example.com/rest/V1/easyquote/quotes/123/addToCart" \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{"cartId":"456", "customerId":"789"}'

Request API

To access the EasyQuote API endpoints, you need to authenticate and obtain authorization. Ensure that you have the appropriate permissions (EasyQuote > Requests) assigned to your API integration or user role.

1. Retrieve Requests

  • Endpoint: /V1/easyquote/requests
  • Method: GET
  • Description: Fetches all requests available in the system.

Example Usage:

curl -X GET "https://example.com/rest/V1/easyquote/requests" \
-H "Authorization: Bearer <access_token>"

2. Retrieve Requests by Customer ID

  • Endpoint: /V1/easyquote/customer/:customerId/requests
  • Method: GET
  • Description: Retrieves all requests made by a specific customer.
  • Parameters:
    • customerId (required): The customer ID.

Example Usage:

curl -X GET "https://example.com/rest/V1/easyquote/customer/789/requests" \
-H "Authorization: Bearer <access_token>"

3. Retrieve Request Details

  • Endpoint: /V1/easyquote/request/:requestId
  • Method: GET
  • Description: Fetches detailed information about a specific request by ID.
  • Parameters:
    • requestId (required): The ID of the request.

Example Usage:

curl -X GET "https://example.com/rest/V1/easyquote/request/456" \
-H "Authorization: Bearer <access_token>"

4. Submit a Request by Customer ID

  • Endpoint: /V1/easyquote/request/customer/:customerId/submit
  • Method: POST
  • Description: Submits a new request for a quote on behalf of a customer.
  • Parameters:
    • customerId (required): The customer ID.

Example Usage:

curl -X POST "https://example.com/rest/V1/easyquote/request/customer/789/submit" \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{"details": "Request details here..."}'

5. Submit a Request by Cart ID

  • Endpoint: /V1/easyquote/request/cart/:cartId/submit
  • Method: POST
  • Description: Submits a new quote request based on the cart ID.
  • Parameters:
    • cartId (required): The cart ID.

Example Usage:

curl -X POST "https://example.com/rest/V1/easyquote/request/cart/321/submit" \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{"details": "Specific cart request details..."}'