OPEN-API-English
  1. Orders
OPEN-API-English
  • Default Group
    • Product
      • Create/Edit Products
      • Create Product Identification Code
      • Query SKU
      • SKU Batch Query
    • Inbound Plan
      • Create Inbound Plan
      • Inbound Plan Shipping Operation
      • Add Inbound Plan Attachment
      • Cancel Inbound Plan
      • Inbound Plan Information Query
    • Inventory
      • Batch Inventory Query
      • Inventory Query
      • Batch Query of Inventory Age
    • Orders
      • Create Sales Order (with attachments)
        POST
      • Get Order Details
        POST
      • Orders - Query List
        GET
      • Order Attachment Upload
        POST
      • Cancel Order
        POST
  1. Orders

Create Sales Order (with attachments)

POST
/v1/saleOrder/create

Request

Header Params
x-api-key
string 
required
Example:
abc123(认证信息)
Content-Type
string 
required
Example:
application/json
Body Params application/json
orderNo
string 
required
Source Number
carrier
string 
optional
Shipping Carrier (FedEx, UPS, etc)
carrierCode
string 
optional
Carrier Service Code
warehouseCode
string 
optional
Warehouse Code (need to maintain the correspondence between this code and the repository in the COPE system)
currency
string 
optional
Currency (if not filled, default is USD)
paidAt
string 
optional
Payment Time (leave blank for current time)
shipToCountry
string 
required
Destination Country Code (2-character)
shipToState
string 
required
Destination State (US: standard 2-character)
shipToCity
string 
required
Destination City
shipToPostal
string 
required
Destination Zip Code
shipToAddress1
string 
required
Shipment Address 1
shipToAddress2
string 
optional
Shipment Address 2
shipToContact
string 
required
Contact Person
buyerName
string 
optional
Customer Name
buyerEmail
string 
optional
Customer Email
shipToTelephone
string 
required
Contact Phone
thirdPartyAccount
string 
optional
Third-Party Account
shipServiceLevel
string 
optional
'Standard-48 Hours' :Standard (48-hour delivery);'Same Day Ship Out' : Urgent same-day shipping, defult Standard if not specified
poNumber
string 
optional
PO Number
channelAccount
string 
optional
Store Name, if this name is passed in, it will be checked in the system to see if it exists
isPrime
integer 
optional
Prime (SFP) order? 0: No, 1: Yes, not filled by default No
productItems
array [object {6}] 
required
Product Items
sku
string 
optional
SKU
quantity
integer 
optional
Quantity
isInsure
integer 
optional
Is insurance included? 0 No, 1 Yes. If not filled, it will be taken from the product center
isSignature
integer 
optional
Sign-off types: 0 No sign-off, 1 Direct sign-off, 2 Adult sign-off, 3 Indirect sign-off. Not specified, default is retrieved from the product center
skuAmount
number 
optional
Total amount
insureAmount
number 
optional
Insured Amount (mandatory for insured situations)
attachInfoItems
array [object {5}] 
optional
Attachment Information (optional, if provided, the following required items must be filled in) 0: No 1: Yes. Default to No if not filled
name
string 
optional
Attachment Name (preferably in TrackingNo, without suffix)
url
string 
optional
Attachment URL
file
string 
optional
Base 64 string, if filled in, the content in the URL above will not be recognized (URL and file are required, one of them must be filled in)
type
integer 
optional
Attachment Type: 0 Shippinglabel, 1 Packinglist, 2 BOL, 3 Other
remark
string 
optional
Remarks
Example
{
    "orderNo": "string",
    "carrier": "string",
    "carrierCode": "string",
    "warehouseCode": "string",
    "currency": "string",
    "paidAt": "string",
    "shipToCountry": "string",
    "shipToState": "string",
    "shipToCity": "string",
    "shipToPostal": "string",
    "shipToAddress1": "string",
    "shipToAddress2": "string",
    "shipToContact": "string",
    "buyerName": "string",
    "buyerEmail": "string",
    "shipToTelephone": "string",
    "thirdPartyAccount": "string",
    "shipServiceLevel": "string",
    "poNumber": "string",
    "channelAccount": "string",
    "isPrime": 0,
    "productItems": [
        {
            "sku": "string",
            "quantity": 0,
            "isInsure": 0,
            "isSignature": 0,
            "skuAmount": 0,
            "insureAmount": 0
        }
    ],
    "attachInfoItems": [
        {
            "name": "string",
            "url": "string",
            "file": "string",
            "type": 0,
            "remark": "string"
        }
    ]
}

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 'http://127.0.0.1/v1/saleOrder/create' \
--header 'x-api-key: abc123(认证信息)' \
--header 'Content-Type: application/json' \
--data-raw '{
    "orderNo": "string",
    "carrier": "string",
    "carrierCode": "string",
    "warehouseCode": "string",
    "currency": "string",
    "paidAt": "string",
    "shipToCountry": "string",
    "shipToState": "string",
    "shipToCity": "string",
    "shipToPostal": "string",
    "shipToAddress1": "string",
    "shipToAddress2": "string",
    "shipToContact": "string",
    "buyerName": "string",
    "buyerEmail": "string",
    "shipToTelephone": "string",
    "thirdPartyAccount": "string",
    "shipServiceLevel": "string",
    "poNumber": "string",
    "channelAccount": "string",
    "isPrime": 0,
    "productItems": [
        {
            "sku": "string",
            "quantity": 0,
            "isInsure": 0,
            "isSignature": 0,
            "skuAmount": 0,
            "insureAmount": 0
        }
    ],
    "attachInfoItems": [
        {
            "name": "string",
            "url": "string",
            "file": "string",
            "type": 0,
            "remark": "string"
        }
    ]
}'

Responses

🟢200成功
application/json
Body
statusCode
number 
required
Return code 200 is successful, others are error codes
status
number 
required
Result Processing Type
code
number 
required
Processing result code 200 indicates success, others are error codes
message
string 
required
Return Message
data
object 
required
orderId
integer 
required
Return the order ID (this ID can be used as a query condition when searching in the list of orders)
Example
{
    "statusCode": 200,
    "status": 0,
    "code": 200,
    "message": "创建订单成功",
    "data": {
        "orderId": 193252852
    }
}
Modified at 2023-12-12 02:15:02
Previous
Batch Query of Inventory Age
Next
Get Order Details
Built with