OrdersLast updated: 2020-06-09
An order is a customer's completed request to purchase one or more products from the online store.
What you can do with an Order:
-
GET
/api/v3/orders?ordernumber=1234
Searches for Orders that match a supplied query -
GET
/api/v3/orders/{order_oid}
Retrieves a single Order -
POST
/api/v3/orders/{order_oid}/acknowledge
Acknowledged receipt of an order, updating its status so that it is no longer "new".
Order Properties
| Property | Description |
|---|---|
| OID |
"OID":
12321
The marketAgility ID for the order |
| UserID |
"UserID":
34543
The marketAgility ID for the registered user that placed thie order (if available) |
| SiteID |
"SiteID":
1
The marketAgility ID for the site |
| Created |
"Created":
"2019-04-21T12:43:12"
The date the order was placed |
| Modified |
"Modified":
"2020-05-12T08:03:00"
The date the order was last modified |
| OrderNumber |
"OrderNumber":
"TEST0001"
The customer-friendly order number |
| LanguageCode |
"LanguageCode":
""
The language the customer was using when the order was placed. Note: This is only populated if the language is different from the base site language |
| FullName |
"FullName":
"Bob Smith"
The full name of the customer |
|
"Email":
"[email protected]"
The email of the customer |
|
| ExternalOrderNumber |
"ExternalOrderNumber":
"AMZ-1234"
The order number in the source system (if the order was placed through an affiliate such as Amazon or eBay) |
| IPAddress |
"IPAddress":
"127.0.0.1"
The IP address of the customer (if available) |
| OrderState |
"OrderState":
1
Status of the order (1 = New, 6 = Reviewing, 7 = Verifying, 9 = Processing, 10 = Complete, 21 = Cancelled) |
| Total |
"Total":
0.0000
The total for this order |
| SubTotal |
"SubTotal":
0.0000
The merchandise subtotal for this order |
| TotalShipping |
"TotalShipping":
0.0000
The total shipping charge for this order |
| TotalServices |
"TotalServices":
0.0000
The total services charge for this order |
| TotalTaxes |
"TotalTaxes":
0.0000
The total tax charge for this order |
| TotalDiscount |
"TotalDiscount":
0.0000
The total discounts for this order |
| SourceCode |
"SourceCode":
""
The source code for the order (if used) |
| PromoCode |
"PromoCode":
""
The promotion code for the order (if used) |
| CustomerNumber |
"CustomerNumber":
"1432"
The user's customer number |
| Incentives |
"Incentives":
"FREESHIP,20% Off"
A list of incentives used on the order |
| EmployeeNumber |
"EmployeeNumber":
""
The Employee number that assisted the order (if provided) |
| StoreLocation |
"StoreLocation":
""
The Store number from where the order was placed (if provided) |
| OrderSource |
"OrderSource":
""
The source of the order (Normal, CallCenter, Amazon, ThirdParty, International) |
Search Orders
Retrieves a list of orders that share a common element. The following parameters are available:
| GET | /api/v3/orders?ordernumber=123456 |
|---|
| Parameter | Description |
|---|---|
| OrderNumber |
Type:
String
The customer-facing order number |
|
Type:
String
The customer's email address |
|
| Name |
Type:
String
The customer's name |
| OrderState |
Type:
String
The status of the order (new, reviewing, hold, processing) |
| UserId |
Type:
Numeric
The customer's id (if registered) |
| StartDate |
Type:
DateTime
Include orders placed on or after this date |
| EndDate |
Type:
DateTime
Include orders placed on or before this date |
| PageRows |
Type:
Numeric
How many results do you want back (default: 25) |
| PageNumber |
Type:
Numeric
Which page of results do you want to retrieve (default: 1) |
HTTP/1.1 200 OK
[
{
"OID": 12321,
"UserID": 0,
"SiteID": 0,
"Created": "0001-01-01T00:00:00",
"Modified": "0001-01-01T00:00:00",
"OrderNumber": "TEST1234",
"LanguageCode": "EN",
"FullName": "Bob Smith",
"Email": "[email protected]",
"ExternalOrderNumber": "",
"IPAddress": "127.0.0.1",
"OrderState": 1,
"Total": 33.1900,
"SubTotal": 23.9900,
"TotalShipping": 8.0000,
"TotalServices": 0.0000,
"TotalTaxes": 1.2000,
"TotalDiscount": 0.0000,
"SourceCode": "",
"PromoCode": "",
"Incentives": [],
"EmployeeNumber": "",
"StoreLocation": "",
"OrderSource": 0,
}
]
Get Order
Gets a single order by Id
| GET | /api/v3/orders/12321 |
|---|
HTTP/1.1 200 OK
{
"OID": 12321,
"UserID": 0,
"SiteID": 0,
"Created": "0001-01-01T00:00:00",
"Modified": "0001-01-01T00:00:00",
"OrderNumber": "TEST1234",
"LanguageCode": "EN",
"FullName": "Bob Smith",
"Email": "[email protected]",
"ExternalOrderNumber": "",
"IPAddress": "127.0.0.1",
"OrderState": 1,
"Total": 33.1900,
"SubTotal": 23.9900,
"TotalShipping": 8.0000,
"TotalServices": 0.0000,
"TotalTaxes": 1.2000,
"TotalDiscount": 0.0000,
"SourceCode": "",
"PromoCode": "",
"Incentives": [],
"EmployeeNumber": "",
"StoreLocation": "",
"OrderSource": 0,
}
List Order Shipment Addresses
Retrieves a list of shipping addresses for an order.
| GET | /api/v3/orders/12321/shipments |
|---|
HTTP/1.1 200 OK
[
{
"OID": 12321,
"Alias": "Work",
"FirstName": "Bob",
"MiddleName": "",
"LastName": "Smith",
"FullName": "Bob Smith",
"Company": "Virid, Inc",
"Address": "12005 Sunrise Valley Drive",
"Address2": "Suite 400",
"City": "Reston",
"StateOrProvince": "VA",
"PostalCode": "20147",
"Country": "US",
"Phone": "7036892121",
"Fax": "",
"MobilePhone": "",
"StoreNumber": "",
"Email": "[email protected]",
"ShipType": "STD",
"ShipDescription": "STD",
"ShipInstructions": "STD",
"ShipCharge": 0.000,
"TotalTax": 0.000,
"TotalCounty": 0.000,
"TotalCity": 0.000,
"TotalState": 0.000,
"TotalDistrict": 0.000,
"DestinationType": "Business",
"NoSplitShip": false,
"ProcessorMessage": "",
"CarrierCode": "UPS"
}
]
Acknowledge Order
Aknowledges a single order
| POST | /api/v3/orders/12321/acknowledge |
|---|
HTTP/1.1 204 No Content
