Skip to content

Keeta Basic API Reference (v.1.0.0)

This API provides basic functionality for Keeta platform integration, including webhook configuration, authorization management, and OAuth token operations.

Download OpenAPI description
Overview
Keeta Developer Website

https://developers.mykeeta.com/

Languages
Servers

https://open.mykeeta.com/api/open/

Request

This API enables developers to configure webhook URLs for receiving real-time notifications from the Keeta platform regarding orders, stores, menus, and other relevant business events.

Bodyapplication/jsonrequired
eventIdintegerrequired

Represents the message type code for push notifications

Example: 1001
urlstringrequired

The webhook URL provided by developers where Keeta system will send notifications

Example: "https://open.mykeeta.com/api/open/base/image/upload"
isTestintegerrequired

Indicates whether this request comes from a test store:

  • 0: Production store (non-test)

  • 1: Test store (default value if not specified)

Example: 1
curl -i -X POST \
  https://open.mykeeta.com/api/open/base/callback/url/set \
  -H 'Content-Type: application/json' \
  -d '{
    "eventId": 1001,
    "url": "https://open.mykeeta.com/api/open/base/image/upload",
    "isTest": 1
  }'

Responses

Webhook URL configuration result.

Bodyapplication/json
codeintegerrequired

A numeric status identifier indicating the result of the interface call, used to determine whether the operation executed successfully.

Enum ValueDescription
0

The request was executed successfully.

Non-zero value

The request execution failed. Specific error details can be viewed in the message field.

Example: 0
messagestringrequired

Text description corresponding to the status code, explaining the operation result or error cause to users.

Example: "Success"
Response
application/json
{ "code": 0, "message": "Success" }

Get Merchant Authorization Information

Request

This API retrieves merchant information and authorized store lists based on the authentication token provided in the request, enabling developers to validate access permissions and obtain essential business context.

Bodyapplication/jsonrequired
pageNumintegerrequired

Pagination parameter: indicates the current page number (starting from 1)

Example: 1
pageSizeintegerrequired

Pagination parameter: indicates the number of items per page

Example: 1
curl -i -X POST \
  https://open.mykeeta.com/api/open/base/authorized/resource/get \
  -H 'Content-Type: application/json' \
  -d '{
    "pageNum": 1,
    "pageSize": 1
  }'

Responses

Successful retrieval of authorized resources.

Bodyapplication/json
codeintegerrequired

A numeric status identifier indicating the result of the interface call, used to determine whether the operation executed successfully.

Enum ValueDescription
0

The request was executed successfully.

Non-zero value

The request execution failed. Specific error details can be viewed in the message field.

Example: 0
messagestringrequired

Text description corresponding to the status code, explaining the operation result or error cause to users.

Example: "Success"
dataobject(AuthorizedResourceResponse)
Response
application/json
{ "code": 0, "message": "Success", "data": { "userId": "593890666", "brandId": 4323, "brandName": "GUI JI", "authorizedShops": [ … ], "page": { … } } }

Request

This endpoint handles both access token acquisition and token refresh operations based on the grantType parameter.

For Access Token Acquisition (grantType = "authorization_code"): This endpoint enables developers to acquire access token from Keeta.

For Token Refresh (grantType = "refresh_token"): This endpoint enables developers to refresh access token validity period from Keeta platform.

Bodyapplication/jsonrequired
appIdinteger(int64)required

Unique application ID assigned by Keeta

Example: 3340612437
timestampintegerrequired

Unix timestamp (seconds since 1970-01-01)

Example: 1740151097
sigstringrequired

Result of the sig calculation

Example: "7713bf15971faf402341bd0a372af7af5d788c25a8b08d7f238314b43a46f768"
grantTypestringrequired

This field represents the mode of the authorization code, and its value should be fixed as "authorization_code".

Value"authorization_code"
Example: "authorization_code"
Discriminator
codestringrequired

Authorization code

Example: "885000242"
curl -i -X POST \
  https://open.mykeeta.com/api/open/base/oauth/token \
  -H 'Content-Type: application/json' \
  -d '{
    "appId": 3340612437,
    "timestamp": 1740151097,
    "sig": "7713bf15971faf402341bd0a372af7af5d788c25a8b08d7f238314b43a46f768",
    "grantType": "authorization_code",
    "code": "885000242"
  }'

Responses

OAuth token operation result.

Bodyapplication/json
accessTokenstring

The access token serves as the primary credential for authenticating API requests.

Example: "911b56fbc7c14ef397261f5efd1d1b99"
tokenTypestring

This field specifies the type of token issued, with the fixed value "bearer" indicating that the token is a bearer token.

Example: "bearer"
expiresIninteger

The expiration period of the access token, measured in seconds. Tokens remain valid for precisely 90 days (7,776,000 seconds)

Example: 7776000
refreshTokenstring

A credential used to obtain new access tokens when the current token nears expiration. Each refresh token may only be used once and becomes invalid immediately after use. The system automatically issues a new refresh token with each access token refresh.

Example: "q11bd86271e844cca7dbc139bb3f00f7"
scopestring

Defines the permissions granted to the token, corresponding to the scopes requested by the client application. The default value "all" grants complete access.

Example: "all"
issuedAtTimeinteger(int64)

The precise timestamp of token issuance represented as Unix epoch time in milliseconds.

Example: 1740151097721
Response
application/json
{ "accessToken": "911b56fbc7c14ef397261f5efd1d1b99", "tokenType": "bearer", "expiresIn": 7776000, "refreshToken": "q11bd86271e844cca7dbc139bb3f00f7", "scope": "all", "issuedAtTime": 1740151097721 }