Orders
An order is a request made by a buyer to create/update an agreement with a one-time purchase or/and set of subscriptions. There are three types of Orders.
Purchase - A purchase order is the first order created in the lifecycle of an agreement. The purchase order is always the first order and there is only one within an agreement.
Change - A change order is a request to update the agreement. There can be multiple change orders in an agreement.
Termination - A termination order is a request to terminate the agreement or terminate a specific subscription within the agreement. There can be multiple termination orders.
Order object
Field | Type | Description |
---|---|---|
| string | Primary order identifier Example: "ORD-5542-1187-3130-0991" |
| string | Relative reference to object on API (always /commerce/orders/{id}) Example: "/commerce/orders/ORD-5542-1187-3130-0991" |
| string | Specified on creation of order, cannot be updated. Example: "Purchase" |
| string | Example: "Processing" |
| ExternalIds | External IDs for either client/vendor/distributor. Example: |
| string | Contains initial customer notes added by Buyer during purchase process. Buyer can edit and add notes at any time for all order statuses. Managed by client. Not used by vendor extensions. Example: "Order of 2 subs for 2 ppl from accounting dept." |
| Message Object | Notes added during status change by vendor or vendor extensions to indicate reason of order failure or status change. Should be shown on order screen (as part of template or standalone). Example: |
| Message Object | Standard error object. Means some error appeared on parameters validation, which can include markup. Used to indicate validation error by vendor or vendor extension during order validation. Should be reflected in purchase wizard while parameters validation and on the parameters and the items screens of order. Should behave like errors in parametes, i.e. reset on order status changes. Example: |
| Agreement | The agreement represents an instance of a relationship between Seller, Buyer, and Licensee. It may refer to one-time purchases or/and set of subscriptions. Example: |
| Authorization | Reference to Authorization object which was used for ther order. Example: |
| Listing | Reference to Listing which was used for the order. Example: |
| Template | Example: |
| User | Example: |
| AuditObject | AuditObject is a dictionary with events that happened with the object, every event has “at” part which specifies the last time the event occurred, and “by” part which specifies who the actor executed the event. Example: |
| Line[] | An Order Lines contains the information about the specific item the Buyer is purchasing/updating. Example: |
| Order Parameter Object [] | An object that holds a concise definition of a parameter, its value, and any associated errors. Example: |
| Order Parameter Object [] | An object that holds a concise definition of a parameter, its value, and any associated errors. Example: |
| Subscription | List of subscription references, for these subscriptions that going to be added/updated by the order. On POST or PUT, lines property of subscription can be provided to reflect these changes. Example: |
| Price | This represents the total price for an Order and is displayed to the various actors. Object is
Please note not all fields are visible to all actors. Example: |