Appearance
Create Existing Images Order
API Information
- Request Path:
/market/order/create - 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
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| products | List<ProductItemDto> | Yes | List of products | - |
| thumb | String | No | Thumbnail URL | - |
ProductItemDto Structure
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
| id | Long | No | ID | - |
| provider | String | Yes | Provider | - |
| productId | String | Yes | Product ID | - |
| aoiIds | List<Long> | No | AOI IDs | - |
Request Body Example
json
{
"products": [
{
"id": 1,
"provider": "changguang",
"productId": "product_123",
"aoiIds": [1, 2]
}
],
"thumb": "http://example.com/thumb.jpg"
}Response Body Structure
CommonResponse Object
| Field | Type | Description |
|---|---|---|
| code | Integer | Response status code |
| message | String | Response message |
| data | OrderCreateResp | Response data |
OrderCreateResp Object
| Field | Type | Description |
|---|---|---|
| orderNo | String | Created order number |
Response Examples
Success Response
json
{
"code": 200,
"message": "success",
"data": {
"orderNo": "ORDER_202310270001"
}
}Failure Response
json
{
"code": 400,
"message": "Invalid total amount",
"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 create a new order
- User authentication is required
- Provide list of products and total amount
Notes
- Total amount should match the sum of product prices