Bajie Charging
  1. PriceStrategy
Bajie Charging
  • Open API
    • 1.Get Device Info
      GET
    • 2.Create Rent Order
      POST
    • 3.Query Rent Order Status
      POST
    • 4.Mark order status as completed
      POST
    • 5.Get Order Detail
      GET
    • 6.Get Deivice List
      POST
  • Advance API
    • Cabinet
      • Device Operation
      • eject the battery for the specified device slot by repair
      • Rent and eject the battery for the specified device slot
      • Query All Device List
      • Query details based on Device Id
      • get device list by shop id
      • get all device list by page
      • Query battery list based on Device Id
      • Query slot list based on Device Id
      • binding device to shop
      • Update cabinet advertising information
    • Shop
      • get all shop list
      • get shop detail
      • create new shop
      • update shop
      • Delete shop
    • PriceStrategy
      • 1.Get Price Strategy Page
        POST
      • 2.Get Price Strategy Detail
        GET
      • 3.Create Or Update Price Strategy
        POST
      • 4.Delete Price Strategy
        POST
      • 5.Shop Bind Price Strategy
        POST
      • 6.Shop Unbind Price Strategy
        POST
    • Order
      • Order list
  • Cabinet Event Push
    • Cabinet Event Push Config
      POST
    • GET Cabinet Event Push Config
      GET
    • Cabinet Event Push
      POST
  1. PriceStrategy

3.Create Or Update Price Strategy

Production
https://developer.chargenow.top/cdb-open-api/v1
Production
https://developer.chargenow.top/cdb-open-api/v1
POST
https://developer.chargenow.top/cdb-open-api/v1
/shop/priceStrategy/saveOrUpdate
3.Create Or Update Price Strategy

Request

Authorization
Send your HTTP requests with an
Authorization
header that contains the word Basic followed by a space and a base64-encoded string username:password
Example:
Authorization: Basic *****************
Body Params application/json
priceId
integer 
optional
价格ID,新增为null
name
string 
Price Strategy Name
required
价格策略名称
shopId
string  | null 
Shop ID
optional
店铺ID
type
integer 
Price strategy type: 1. Advanced mode, billed on a per hour basis with a 24-hour maximum amount; 2. Timetable, corresponding price for query on a per hour basis; 3. General mode
required
价格策略类型:
1:高级模式,按时长单位计费,有24小时封顶金额
2:时间表,按时长查询时间表的对应价格
3:通用模式
customType
integer 
Custom pricing strategy: 0: Universal 1: POS
required
自定义价格策略:
0:通用
1:POS
priority
integer 
priority
optional
优先级
isDeposit
boolean 
optional
是否收押金
depositAmount
number 
Deposit amount
required
押金金额
timeoutAmount
number 
Overdue amount
required
超时金额
timeoutDay
integer 
Timeout days
required
超时天数
freeMinutes
integer 
Free usage minutes
required
免费使用分钟
dayUseFreeCount
integer 
Tenant's daily free usage frequency
optional
租客每日免费时长使用次数
price
number 
Billing unit price
required
计费单价
priceTime
integer 
Billing time (minutes/hour/day)
required
计费时间(分钟/小时/天
priceUnit
integer 
Billing unit granularity (0-minute, 1-hour, 2-day)
required
计费单位粒度(0-分钟 1-小时 2-天)
dailyMaxPrice
number 
Daily cap amount
required
日封顶金额
priceStrategyDetailList
array[object (OpenPriceStrategyDetailSaveDto) {5}] 
Price Strategy Details (Schedule)
optional
价格策略明细(时间表)
startMinute
integer 
Start minute
optional
开始分钟
endMinute
integer 
End minute
optional
结束分钟
setcionFee
number 
The fee amount for this section
optional
此段收费金额
totalFee
number 
Total fee amount
optional
总收费金额
seqno
integer 
Serial Number
optional
序号
Example
{
    "priceId": 0,
    "name": "string",
    "shopId": "string",
    "type": 0,
    "customType": 0,
    "priority": 0,
    "isDeposit": true,
    "depositAmount": 0,
    "timeoutAmount": 0,
    "timeoutDay": 0,
    "freeMinutes": 0,
    "dayUseFreeCount": 0,
    "price": 0,
    "priceTime": 0,
    "priceUnit": 0,
    "dailyMaxPrice": 0,
    "priceStrategyDetailList": [
        {
            "startMinute": 0,
            "endMinute": 0,
            "setcionFee": 0,
            "totalFee": 0,
            "seqno": 0
        }
    ]
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://developer.chargenow.top/cdb-open-api/v1/shop/priceStrategy/saveOrUpdate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Og==' \
--data-raw '{
    "priceId": 0,
    "name": "string",
    "shopId": "string",
    "type": 0,
    "customType": 0,
    "priority": 0,
    "isDeposit": true,
    "depositAmount": 0,
    "timeoutAmount": 0,
    "timeoutDay": 0,
    "freeMinutes": 0,
    "dayUseFreeCount": 0,
    "price": 0,
    "priceTime": 0,
    "priceUnit": 0,
    "dailyMaxPrice": 0,
    "priceStrategyDetailList": [
        {
            "startMinute": 0,
            "endMinute": 0,
            "setcionFee": 0,
            "totalFee": 0,
            "seqno": 0
        }
    ]
}'

Responses

🟢200成功
application/json
Body
返回数据
key
object 
optional
Example
{
  "": {}
}
Previous
2.Get Price Strategy Detail
Next
4.Delete Price Strategy
Built with