Skip to content

Vendor Store Information API

This API allows vendor to manage store details.


Endpoints Overview

Method Endpoint Description
GET /api/v1/vendor/accounts/store/ Retrieve vendor store details.
PATCH /api/v1/vendor/accounts/store/ Update vendor store details

Vendor Store Detail API

1. Retrieve Vendor Store Details

Endpoint

  • URL: /api/v1/vendor/accounts/store/
  • Method: GET
  • Permission Required: IsAuthenticated (Vendor Only)

Description

Retrieves the store details of the authenticated vendor.

Example Request

This is the example request

GET /api/v1/vendor/accounts/store/


Success

{
    "shop_name": "Vendor's Shop",
    "phone_number": "+1234567890",
    "shop_location": "123 Market Street, City, Country",
    "warehouse_location": "Warehouse District, City, Country",
    "shop_image": "https://example.com/image.jpg",
    "shop_cover_image": "https://example.com/cover.jpg",
    "follower_count": 120,
    "average_ratings": {
        "overall_average": 4.5,
        "total_ratings": 200,
        "average_per_star": {
            "5_star": 120,
            "4_star": 50,
            "3_star": 20,
            "2_star": 5,
            "1_star": 5
        }
    },
    "created_at": "2025-01-01T12:00:00Z"
}


2. Update Vendor Store Details

Endpoint

  • URL: /api/v1/vendor/accounts/store/
  • Method: PATCH
  • Permission Required: IsAuthenticated (Vendor Only)

Description

Allows vendors to update their store details.

Example Request

This is the example request

PATCH /api/v1/vendor/accounts/store/


Request Body

This is the request body

{
  "shop_name": "Updated Shop Name",
  "phone_number": "+9876543210",
  "shop_location": "New Market Street, City, Country"
}


Success

{
    "message": "Your store details have been updated successfully.",
    "data": {
        "shop_name": "Updated Shop Name",
        "phone_number": "+9876543210",
        "shop_location": "New Market Street, City, Country"
    }
}


Error

{
  "error": "Shop not found"
}
{
  "error": "Invalid request data"
}