Skip to content

Create Existing Images Order ​

API Information ​

  • Request Path: /market/order/create
  • Request Method: POST
  • Content-Type: application/json

Request Headers ​

ParameterTypeRequiredDescription
AuthorizationStringYesUser authentication token
Content-TypeStringYesMust be set to application/json

Request Body Structure ​

FieldTypeRequiredDescriptionConstraints
productsList<ProductItemDto>YesList of products-
thumbStringNoThumbnail URL-

ProductItemDto Structure ​

FieldTypeRequiredDescriptionConstraints
idLongNoID-
providerStringYesProvider-
productIdStringYesProduct ID-
aoiIdsList<Long>NoAOI 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 ​

FieldTypeDescription
codeIntegerResponse status code
messageStringResponse message
dataOrderCreateRespResponse data

OrderCreateResp Object ​

FieldTypeDescription
orderNoStringCreated 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 CodeDescription
200Success
400Request parameter error
401Unauthorized
500Server internal error

Usage Instructions ​

  1. This API is used to create a new order
  2. User authentication is required
  3. Provide list of products and total amount

Notes ​

  • Total amount should match the sum of product prices