Order
Status: Trusted Tester
An order records a sale to a business location. For example requests see the Sales guide.
AG-1234:ORD-1234567Possible values: [orders]
ordersattributes object
The 3 letter currency code as defined by ISO 4217
Possible values: >= 3 characters and <= 3 characters
CADlineItems object[]
The unique identifier of a product, product edition or package. It can be obtained by following this guide.
A-123lineItemlineItemThe number of units to ordered
1The unit price in cents. If not provided the default price for this sku in the marketplace will be used.
0The billing frequency
Possible values: [onetime, monthly, yearly, ``]
Indicates if this lineitem is a package instead of a product or an addon.
Holds the SKU of the package that this lineitem is part of. Products inside of a package do not have pricing so refer to the lineitem of the package SKU to find the price.
MP-123:EDITION-123The status of the order will be automatically set to one of the following by the system:
draft: The order has not yet been sent for approvalsubmitted: The order is ready for approvalprocessing: The order and its items are being processeddeclined: The order has been declined by an admin or a customerfulfilled: The order and its items have been successfully processed. This includes activating the products with the vendor(s).error: One or more of the orders items failed to be processedarchived: The order has been marked as archivedNotReady: The order could not be created as a dependent resource is not yet ready to be used
Possible values: [draft, submitted, processing, declined, fulfilled, error, archived, NotReady]
processingA tag is a label that can be used for grouping and filtering your list of orders. They may be any string upto 30 characters in length.
Possible values: <= 30
Free-text notes associated with the order.
relationships object
businessLocation object
Required during creation: The business location the order is for
data objectrequired
AG-1234567Possible values: [businessLocations]
businessLocationssalesPerson object
The user who will be credited with the sale. Used to associate orders with salespersons in reports.
Note the user must have the salesperson role.
data objectrequired
U-1234567Possible values: [users]
users{
"id": "AG-1234:ORD-1234567",
"type": "orders",
"attributes": {
"currencyCode": "CAD",
"lineItems": [
{
"sku": "A-123",
"type": "lineItem",
"quantity": 1,
"amount": 0,
"intervalCode": "onetime",
"isPackage": true,
"containedInPackage": "MP-123:EDITION-123"
}
],
"statusCode": "processing",
"tags": [
"string"
],
"notes": "string"
},
"relationships": {
"businessLocation": {
"data": {
"id": "AG-1234567",
"type": "businessLocations"
}
},
"salesPerson": {
"data": {
"id": "U-1234567",
"type": "users"
}
}
}
}