Appearance
Query Existing Images from Cart
API Information
- Request Path:
/market/shoppingCart/query - Request Method:
POST - Content-Type:
application/json
Request Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | String | Yes | User authentication token |
| Content-Type | String | Yes | Must be set to application/json |
Request Body Structure
None required (User ID is injected from token).
Request Body Example
json
{}Response Body Structure
CommonResponse Object
| Field | Type | Description |
|---|---|---|
| code | Integer | Response status code |
| message | String | Response message |
| data | ShoppingCartResp | Response data |
ShoppingCartResp Object
| Field | Type | Description |
|---|---|---|
| total | Integer | Total items |
| content | List<ImageListRespItem> | List of cart items |
| totalAmount | BigDecimal | Total amount |
| discountAmount | BigDecimal | Discount amount |
| finalAmount | BigDecimal | Final amount |
ImageListRespItem Object
| Field | Type | Description |
|---|---|---|
| id | Long | Item ID |
| productId | String | Product ID |
| thumb | String | Thumbnail URL |
| name | String | Product Name |
| resolution | String | Resolution |
| imageTime | String | Image Time |
| minSize | BigDecimal | Minimum Size |
| deliveryIn | BigDecimal | Delivery Time |
| unitPrice | BigDecimal | Unit Price |
| geometry | String | Geometry |
| area | BigDecimal | Area |
| amount | BigDecimal | Amount |
| discount | BigDecimal | Discount |
| discountAmount | BigDecimal | Discount Amount |
| discountUnitPrice | BigDecimal | Discount Unit Price |
| provider | String | Provider |
| satelliteAngle | BigDecimal | Satellite Angle |
| centerLongitude | BigDecimal | Center Longitude |
| centerLatitude | BigDecimal | Center Latitude |
Response Examples
Success Response
json
{
"code": 200,
"message": "success",
"data": {
"total": 1,
"content": [
{
"id": 12345,
"productId": "product_123",
"thumb": "http://example.com/thumb.jpg",
"name": "SAR Image",
"resolution": "0.5m",
"imageTime": "2023-10-27 10:00:00",
"minSize": 25.0,
"deliveryIn": 24.0,
"unitPrice": 100.0,
"geometry": "{\"type\":\"Polygon\",\"coordinates\":[[[102.61282157031928,21.488503948497097],[106.99114976403081,21.488503948497097],[106.99114976403081,18.594746845159506],[102.61282157031928,18.594746845159506],[102.61282157031928,21.488503948497097]]]}",
"area": 50.0,
"amount": 5000.0,
"discount": 0.9,
"discountAmount": 500.0,
"discountUnitPrice": 90.0,
"provider": "tianyi",
"satelliteAngle": 15.0,
"centerLongitude": 120.0,
"centerLatitude": 30.0
}
],
"totalAmount": 5000.0,
"discountAmount": 500.0,
"finalAmount": 4500.0
}
}Failure Response
json
{
"code": 400,
"message": "Error querying cart",
"data": null
}Error Code Description
| Error Code | Description |
|---|---|
| 200 | Success |
| 400 | Request parameter error |
| 401 | Unauthorized |
| 500 | Server internal error |
Usage Instructions
- This API is used to query the current user's shopping cart
- User authentication is required
- Returns cart items and total price
Notes
- User ID is obtained from the authorization token