# Store API Integration Guide

## 1. Overview

Keeta stores have an operational status that determines whether the store is visible to customers and able to accept orders. One can open or close a store through the API, with the same level of control as the merchant's own business tools (Keeta Merchant Management Portal).

While the API only allows the merchant to open or close a store as a whole, the store's status is actually composed of two independent service lines: Delivery and Pickup (self-collection). The Keeta platform may suspend one service independently during certain events.

### 1.1 Webhook

Keeta's webhook notification service delivers real-time alerts for critical store operational changes. The platform pushes these events to your registered endpoint using standardized payloads containing unique identifiers and contextual details.

| **eventId** | **Event Description** |
|  --- | --- |
| 1101 | Store Business Hours Change Notification |
| 1102 | Store Status Change Notification |


### 1.2 **Store Management API**

For comprehensive specifications of the Store Management API, please refer to the [Store Api Reference](/apis/standard/shop). The API suite provides granular control over store configurations through these core endpoints:

| **URL Endpoints** | **Functionality** |
|  --- | --- |
| /api/open/scm/shop/base/get | Retrieves comprehensive store metadata. |
| /api/open/scm/shop/business/hour/effective/get | Queries the store's standard weekly operating schedule, including time ranges for each weekday. |
| /api/open/scm/shop/special/business/hour/effective/get | Retrieves special operating schedules typically used for holiday periods or exceptional events. |
| /api/open/scm/shop/picture/main/update | Updates the store's primary display image used in high-visibility contexts including search results, homepage recommendations, and store header banners, requiring strict adherence to resolution and format guidelines. |
| /api/open/scm/shop/contact/update | Updates the store's official contact telephone number. |
| /api/open/scm/shop/status/open | Transitions a store from suspended status (Status 4) back to operational status (Status 3), triggering real-time availability updates across platforms. |
| /api/open/scm/shop/status/rest | Places an actively operating store into suspended status (Status 4), immediately disabling order acceptance capabilities. |
| /api/open/scm/shop/business/hour/effective/update | Modifies the regular business hours configuration. |
| /api/open/scm/shop/special/business/hour/effective/update | Modifies temporary operating hours for specific dates. |


## 2. How Store Status Works

### 2.1 Overall Status

A store is either Open or Closed:

- Open: The store is visible to customers and can accept orders, provided the current time falls within the store's published business hours.
- Closed: The store is under operational pause. All order placement is disabled regardless of business hours.


### 2.3 Delivery and Pickup as Separate Service Lines

Each store can offer two types of service, and each has its own availability:

- Delivery: Whether the store can fulfill delivery orders.
- Pickup: Whether customers can place orders for self-collection.


The overall store status is derived from these two service lines:

- If either service is available, the store is Open.
- If both services are unavailable, the store is Closed.
- A service that is not enabled does not factor into the overall status.


### 2.3 What You Can Control via API

Through the Suspend Store and Reactivate Store endpoints, you can:

- Call [Suspend Store](https://api-docs.mykeeta.com/apis/standard/shop/endpoints/suspendstore): this suspends both delivery and pickup at the same time.
- Call [Store Reactivation](https://api-docs.mykeeta.com/apis/standard/shop/endpoints/reactivatestore): this reactivates both delivery and pickup at the same time.


You cannot independently suspend or reactivate just one service line through the API.

## 3. Platform Override

In certain situations, such as severe weather (typhoons, black rainstorms), the Keeta platform may suspend delivery only while keeping pickup available. This allows customers to still collect orders in person when delivery riders cannot operate safely.
During a platform override:

- The store's overall status remains Open because pickup is still available.
- Delivery is marked as unavailable, controlled by the platform.
- The platform override takes priority. Delivery service can only be restored when the platform lifts the suspension. Once the platform lifts the override, you can call Reactivate Store to restore full operation.
- Calling Suspend Store will still close the entire store, shutting down pickup as well.