> ## Documentation Index
> Fetch the complete documentation index at: https://developer.lulacommerce.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Change Store Status

> This endpoint controls the operational status of a store across delivery service partners. You can open or close the store on all platforms simultaneously, or manage individual platforms (UberEats, DoorDash, GrubHub) separately. This is essential for managing store hours, temporary closures, and platform-specific operations.

This endpoint provides granular control over store availability across delivery platforms. You can manage store status globally or per platform, with optional scheduling for automatic status changes.

### Path Parameters

<ParamField path="store_id" type="string" required>
  The unique identifier of the store to update status for
</ParamField>

<Accordion title="Request Body Fields">
  <ResponseField name="dsp_name" type="string" required>
    Delivery Service Provider to control. Options:

    * `"All"` - Controls all platforms simultaneously
    * `"UberEats"` - Controls only UberEats
    * `"DoorDash"` - Controls only DoorDash
    * `"GrubHub"` - Controls only GrubHub
  </ResponseField>

  <ResponseField name="is_active" type="boolean" required>
    Store operational status:

    * `true` - Opens the store (ONLINE)
    * `false` - Closes the store (OFFLINE)
  </ResponseField>

  <ResponseField name="end_time" type="string" optional>
    When the status change should automatically revert. ISO 8601 format with timezone.

    Example: "2024-11-15T23:59:00-07:00"

    <Note>If omitted, the status change is permanent until manually changed</Note>
  </ResponseField>

  <ResponseField name="start_time" type="string" optional>
    When the status change should take effect (for scheduled changes).

    Example: "2024-11-15T00:00:00-05:00"

    <Tip>Used primarily for scheduling future status changes</Tip>
  </ResponseField>
</Accordion>

## Common Operations

### Open All Platforms

Opens the store on all delivery platforms simultaneously.

```json theme={null}
{
    "dsp_name": "All",
    "is_active": true,
    "end_time": "2024-11-15T23:59:00-07:00"
}
```

### Close All Platforms

Closes the store on all delivery platforms simultaneously.

```json theme={null}
{
    "dsp_name": "All",
    "is_active": false
}
```

### Platform-Specific Control

#### Open UberEats Only

```json theme={null}
{
    "dsp_name": "UberEats",
    "is_active": true,
    "end_time": "2024-11-15T23:59:00-07:00"
}
```

#### Close DoorDash Only

```json theme={null}
{
    "dsp_name": "DoorDash",
    "is_active": false,
    "end_time": "2024-11-15T23:59:00-07:00"
}
```

#### Pause GrubHub

```json theme={null}
{
    "dsp_name": "GrubHub",
    "is_active": false,
    "end_time": "2024-06-21T17:08:30.000Z"
}
```

### Scheduled Operations

#### Schedule Store Pause

```json theme={null}
{
    "dsp_name": "All",
    "is_active": false,
    "end_time": "2024-11-15T23:59:00-05:00",
    "start_time": "2024-11-15T00:00:00-05:00"
}
```

## Response Types

### Successful Status Change

<ResponseField name="success" type="boolean">
  Indicates whether the status change was successful
</ResponseField>

<ResponseField name="status" type="object" optional>
  Detailed status information after the change (included for "All" operations)

  <Expandable title="Status Object">
    <ResponseField name="current_pause" type="string">
      Any current pause affecting all platforms
    </ResponseField>

    <ResponseField name="is_close" type="boolean">
      Overall store closure status
    </ResponseField>

    <ResponseField name="UberEats" type="array">
      UberEats status after change
    </ResponseField>

    <ResponseField name="DoorDash" type="array">
      DoorDash status after change
    </ResponseField>

    <ResponseField name="GrubHub" type="array">
      GrubHub status after change
    </ResponseField>
  </Expandable>
</ResponseField>

### Simple Success Response

For single platform operations or basic operations:

```json theme={null}
{
    "success": true
}
```

### Detailed Response Example

For "All" platform operations with full status:

```json theme={null}
{
    "success": true,
    "status": {
        "current_pause": null,
        "is_close": false,
        "UberEats": [
            {
                "success": true,
                "is_open": true,
                "status": "ONLINE",
                "end_time": null,
                "current_pause": null,
                "description": [
                    {
                        "status": "ONLINE"
                    }
                ],
                "id": "37fa9980-33ba-4419-92c2-a6e5144fdc82",
                "partner_store_id": "15be0357-9b4d-4f05-9a5a-9485b5f783e5",
                "name": "Lula Convenience Store",
                "status_changed_from": true
            }
        ],
        "DoorDash": [
            {
                "success": true,
                "is_open": true,
                "status": "ONLINE",
                "end_time": null,
                "current_pause": null,
                "description": [],
                "id": "1704fecd-e6ca-45bb-b1b5-776aee294af8",
                "partner_store_id": "b1015bdb-e831-42ef-b6f8-720fab19321f",
                "name": "Lula Convenience Store",
                "status_changed_from": true
            }
        ],
        "GrubHub": [
            {
                "success": true,
                "is_open": true,
                "status": "ONLINE",
                "end_time": null,
                "current_pause": null,
                "description": [
                    {
                        "merchant_status": "PT_PREMIUM",
                        "merchant_status_descriptor": "Premium",
                        "pos_merchant_status": "online",
                        "holds_active_account": true,
                        "accepting_phone_orders": true,
                        "accepting_online_orders": true
                    }
                ],
                "id": "d0b3e829-299f-42cc-a768-2f9a908f3355",
                "partner_store_id": "1240569280",
                "name": "Lula Convenience Store",
                "status_changed_from": true
            }
        ]
    }
}
```

## Best Practices

<Accordion title="Status Management Recommendations">
  <ResponseField name="Coordinated Operations" type="best-practice">
    Use "All" for consistent customer experience across platforms

    <Tip>Customers expect consistent availability across all delivery apps</Tip>
  </ResponseField>

  <ResponseField name="Platform-Specific Issues" type="best-practice">
    Use individual platform controls when specific integrations have issues

    <Note>This allows you to maintain operations on working platforms</Note>
  </ResponseField>

  <ResponseField name="Scheduled Changes" type="best-practice">
    Use end\_time for temporary closures (breaks, maintenance, etc.)

    <Warning>Without end\_time, status changes are permanent</Warning>
  </ResponseField>

  <ResponseField name="Emergency Closure" type="best-practice">
    For immediate closures, use "All" with is\_active: false

    <Info>This immediately stops new orders across all platforms</Info>
  </ResponseField>
</Accordion>

<Info>
  **Real-time Effect:** Status changes take effect immediately on all specified platforms. Existing orders in progress are not affected.
</Info>

<Warning>
  **Timezone Awareness:** When using end\_time, ensure the timezone offset matches the store's local timezone to avoid unexpected behavior.
</Warning>

<Note>
  **Platform Dependencies:** Some platforms may have additional requirements or delays in reflecting status changes. The response indicates the success of the API call, not necessarily the immediate platform reflection.
</Note>
