Order Representation
An order representation is a JSON document which represents the contents of an order or a customer's personal shopping cart.
Its MIME type is application/vnd.fotoware.order+json
{ "href": "...", "created": "2016-01-01T00:00:00Z", "modified": "2016-01-01T00:00:00Z", "state": "created" | "pending" | "approved" | "rejected" | "expired" | "cart", "expires": "2016-01-01T00:00:00Z" | null, "orderItems": [ { "adminComment": "", "asset": "...", "expires": "2016-01-01T00:00:00Z" | null, "expired": true | false, "itemData": [ {"id": "...", "value": "..."}, {...}, ... ] "rendition": { "name": "...", "href": "...", "download: "..." } }, {...}, ], "orderData": [ {"id": "...", "value": "..."}, {...}, ... ], "orderReference": "...", "checkoutPageLocation": "..." | null, "adminComment": "", "userComment": "", "owner": {...} }
where
Attribute |
Type |
Description |
Example |
---|---|---|---|
href |
Link (string) to Order representation | URL of the order |
|
created |
ISO8601 Date/Time | Time when order was created |
|
modified |
ISO8601 Date/Time | Time when order was last modified |
|
state |
String |
Current state of the order:
Changes when an order is submitted, approved or rejected. |
|
expires |
ISO8601 Date/Time |
Time when order expires, An administrator or API client may set an expiry time when approving an order. |
|
orderItems |
Array |
Ordered items. See below. Contains the renditions ordered by the customer, but may also be modified by an administrator. |
|
orderItems.asset |
Link (string) to Asset representation | Asset whose rendition is ordered | /fotoweb/archives/5000-Example/sub/folder/image.jpg |
orderItems.rendition |
Object | Rendition that is ordered. For more information, see Renditions. | |
orderItems.rendition.name |
String |
Human-readable display name of the rendition. Should be shown in user interfaces. Typically matches processing profile name. This is a display name. Do NOT use it as an ID for identifying a rendition! Use |
|
orderItems.rendition.href |
Link (string) |
Original URL of the ordered rendition. This is the same as the Can be used to match against |
|
orderItems.rendition.download |
Link (string) |
Download URL of the ordered rendition or If not For more information, see the section about downloading renditions in Using the Shopping Cart API. This is not a direct download URL. The URL does not accept any requests. |
|
orderItems.expires |
ISO 8601 Date/Time |
Time when item expires, An administrator or API client may set an expiry time on each item when approving an order. |
"2016-01-01T00:00:00Z" |
orderItems.expired |
Boolean | true if item has expired, false otherwise |
|
orderItems.itemData |
Array | Custom order data. See Custom Order Data | |
orderitems.adminComment |
String |
Comment on this item by the administrator. An administrator may add a comment to each item when approving or rejecting an order. |
|
orderData |
Array | Custom order data. See Custom Order Data | |
orderReference |
String |
A human-readable string that uniquely identifies the order on the site. May be shown in notifications and used for communication with users. |
|
checkoutPageLocation |
String |
URL of the custom checkout page. If the standard checkout page is used (custom integration is disabled), then this is This is equal to |
|
adminComment |
String |
Comment on this order by the administrator. An administrator may add a comment when approving or rejecting an order. |
|
userComment |
String |
Comment on this order by the customer. A customer may add a comment when submitting an order or modifying the shopping cart. |
|
owner |
Object |
User representation of the customer that placed the order. Contains information such as the user's email address and user name. |