# 1.Restaurant List Query API

# Brief Description

  • Query all restaurant information under the developer account by appId, including restaurant number, third-party store identifier, restaurant push URL, and restaurant display name

# HTTP Request Information

# Request Method

  • POST

# Request URL

{domain}/open-api/merchant/restaurant/list

# Request Headers

Parameter Name Required Type Description
Content-Type Yes string application/json

# Request Body Parameters

Parameter Name Required Type Length Limit Example Description
param Yes string - {} Parameter body
sign Yes string - 45eebd745dcf0b5f6d6f9fcde28cd9fe8116a892 Signature
appId Yes string - - APPID

# Request Body Example

{
  "appId": "123456",
  "sign": "abcdef",
  "param": "{}"
}

# Response Example

# code Refer to this list

# Response Parameters

Parameter Name Type Example Description
code int 10000 Status code Refer to list
message string success Status code message
data Object - Restaurant list data

# data Parameter Description

Parameter Name Required Type Length Limit Example Description
pushUrl Yes string - https://example.com/webhook Restaurant push URL
list Yes list - - Restaurant list

# list Parameter Description

Parameter Name Required Type Length Limit Example Description
storeKey Yes string - - Restaurant key
restaurantNo Yes string - REST123456 Restaurant number
branchIdentifier Yes string - BRANCH001 Third-party store identifier
restaurantName Yes string - Swifood Restaurant Restaurant name
displayName Yes string - 美食餐厅 Restaurant display name

# Success Response Example

{
  "code": 10000,
  "message": "success",
  "data": {
    "pushUrl": "https://example.com/webhook",
    "list": [
      {
        "storeKey": "12332",
        "restaurantNo": "REST123456",
        "branchIdentifier": "BRANCH001",
        "restaurantName": "Swifood Restaurant",
        "displayName": "美食餐厅"
      },
      {
        "storeKey": "12333",
        "restaurantNo": "REST789012",
        "branchIdentifier": "BRANCH002",
        "restaurantName": "Snack Shop",
        "displayName": "小食馆"
      }
    ]
  }
}

# Failure Response Example

{
  "code": 21000,
  "message": "Service error, please contact administrator",
  "data": null
}

# Notes

  1. Authentication: The API will automatically validate the validity of appId and sign. Validation failure will return the corresponding error code
  2. Data Source: The returned pushUrl is configured at the developer account level, and all restaurants under this developer share the same pushUrl
  3. Empty Result Handling: If there are no associated restaurants under the appId, data.list will return an empty array []
  4. Data Integrity: The returned restaurant information includes only activated and normally operating restaurants, excluding deleted or deactivated restaurants
  5. Call Frequency: It is recommended that merchants cache the query results to avoid frequent calls to this API