#

SUD

Description

  • Batch Create Orders

Request URL

Request Method

  • Transmission protocol: HTTPS
  • Request method: POST
  • Parameters are transmitted in the body in JSON format (see request example)
  • Add the following headers to the request: Content-Type: application/json;charset=utf-8
  • Add the following headers to the request: Authentication header Authorization

Request Header [Authorization]

Request Parameters

Parameter Required Type Description
mg_id Yes string Game ID
room_id Yes string Room ID
orders Yes BatchCreateOrderEntry[] Array of order data
  • BatchCreateOrderEntry
Parameter Required Type Description
out_order_id Yes string Merchant-defined unique order ID (up to 64 characters)
cmd Yes string Triggered action
from_uid Yes string Paying user UID
from_nickname No string Paying user nickname
from_avatar_url No string Paying user avatar URL
to_uid Yes string Target user UID
value Yes int32 Associated game value
random No bool Whether to select randomly (When to_uid is not in the player list, whether to trigger for a random player. Defaults to false if not provided.)
true: Trigger for a random player, false: Execution fails
payload No object Additional data (When the game client transparently transmits this parameter value to the app client, it needs to be transparently transmitted as is)
  • Game cmd | value | payload Parameter Correspondence Table:

1.Deminers, Game ID=1472142640866779138

cmd value cmd Additional Data (payload) Description
change_hand Specific price Change hand, can be changed up to 1 time at the beginning of each round
gift_cover_clouds Example:{"count":1,"count_limit":20,"show_time":50}
count:clouds count,default to 1
count_limit: limit of clouds,default to 20
show_time: clouds show time,default to 20 seconds
Clouds
gift_cover_big_chain Example:{"show_time": 10}
show_time:show time,default to 10 seconds
Big chain
gift_windy Example:{"count":1}
count: The number of clouds blown away, default to 1
Windy
gift_discover_big_chain Unlock the chain
gift_exchange_hands Hand Swap
gift_add_card Draw one card
gift_del_card Discard one card
gift_give_remove_card Give dismantle card
gift_give_throw_card Give throwing mine cards
gift_next_bomb Replace mines
gift_free_change_hand Free change hands

2.EightBall, Game ID=1739914495960793090

cmd value cmd Additional Data (payload) Description
gift_increase_friction Example:"payload":{"count":5} Lush Green Grass - Increase Friction
gift_decrease_friction Example:"payload":{"count":5} Frozen Field - Decrease Friction
gift_fake_black_8 Example:"payload":{"count":5} Disguise - Disguise a ball as the black 8-ball
block_hole Example:"payload":{"count":5} Block the Hole - Block one pocket for one turn
gift_increase_aimline Example:"payload":{"count":5} Far-Sighted - Extend the aiming line
gift_decrease_aimline Example:"payload":{"count":5} Short-Sighted - Shorten the aiming line
gift_enhance_cue_ball Example:"payload":{"count":5} Blazing Shield - Restore friction for one turn
gift_wind_force Example:"payload":{"count":5} Harness the Wind - Apply wind field for one turn
  1. Monster Elimination Game, Game ID=1664525565526667266
cmd value cmd additional data (payload) Description
gift_cover_clouds Example:{"count":1,"count_limit":20,"show_time":50}
count:clouds count,default to 1
count_limit: limit of clouds,default to 20
show_time: clouds show time,default to 20 seconds
Drifting Clouds
gift_cover_big_chain Example:{"show_time": 10}
show_time:show time,default to 10 seconds
Big Chain
gift_windy Example:{"count":1}
count: The number of clouds blown away, default to 1
Windy
gift_discover_big_chain Unlock
gift_exchange_boards Exchange Boards
gift_add_chains count: int32 Quantity
count_limit: int32 Quantity Limit
Add Small Chains
gift_add_ice_blocks count: int32 Quantity
count_limit: in32 Quantity Limit
Add Ice Blocks
gift_eliminate_chains count: int32 Quantity Clear Chains
gift_eliminate_ice_blocks count: int32 Quantity Clear Ice
gift_clear_all_chains One-Click Clear Chains
gift_clear_all_ice_blocks One-Click Clear Ice
gift_annoying_monster count: int32 Quantity
count_limit: in32 Quantity Limit
Annoying Monster
gift_send_rockets count: int32 Quantity
count_limit: in32 Quantity Limit
Send Rockets
gift_send_bombs count: int32 Quantity
count_limit: in32 Quantity Limit
Send bombs
gift_send_rainbows count: int32 Quantity
count_limit: in32 Maximum quantity
Send rainbows

Request Example

{
  "mg_id": "xxx",
  "room_id": "xxx",
  "orders": [
    {
      "out_order_id": "xxx",
      "cmd": "gift_cover_big_chain",
      "value": 1,
      "from_uid": "15493",
      "to_uid": "15444",
      "payload": {}
    },
    {
      "out_order_id": "xxx",
      "cmd": "gift_cover_big_chain",
      "value": 1,
      "from_uid": "15493",
      "to_uid": "15445",
      "payload": {}
    }
  ]
}

Return Parameters

Parameter Required Type Description
ret_code Yes int Response code
ret_msg Yes string Response information
data Yes AppServerCreateOrderResp Response data
  • BatchCreateOrderResp
Parameter Required Type Description
orders Yes OrderEntry[] Array of order data
  • OrderEntry
Parameter Required Type Description
out_order_id Yes string Merchant order ID
order_id Yes string SUD order ID

Return Example

{
  "ret_code": 0,
  "ret_msg": "success",
  "data": {
    "orders": [
      {
        "order_id": "xxx",
        "out_order_id": "xxx"
      },
      {
        "order_id": "xxx",
        "out_order_id": "xxx"
      }
    ]
  }
}

业务错误码

Error Code Error Description Solution
10002 Parameter error Check the request parameters, modify them and send the request again
70501 Order ID already exists Modify the merchant-defined order ID to ensure uniqueness and send the request again

results matching ""

    No results matching ""