Skip to main content
Documentation & User Guides | Fotoware

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
  • /fotoweb/orders/12345
  • /fotoweb/me/cart
created ISO8601 Date/Time Time when order was created
"2016-01-01T00:00:00Z"
modified ISO8601 Date/Time Time when order was last modified
"2016-01-01T00:00:00Z"
state String

Current state of the order:

  • pending: The order is waiting for administrator approval.
  • approved: The order has been approved.
  • rejected: The order has been rejected.
  • expired: The order has expired.
  • created: The order has been created but not submitted yet.
  • cart: the order is a customer's personal shopping cart.

Changes when an order is submitted, approved or rejected.

  • "cart"
  • "created"
  • "pending",
  • "approved"
  • "rejected"
  • "expired"
expires ISO8601 Date/Time

Time when order expires, null if it never expires.

An administrator or API client may set an expiry time when approving an order.

  • "2016-01-01T00:00:00Z"
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 hrefinstead!

 
orderItems.rendition.href Link (string)

Original URL of the ordered rendition.

This is the same as the rendition attribute in a cart update or order update request.

Can be used to match against renditions.href in an Asset representation.

 
orderItems.rendition.download Link (string)

Download URL of the ordered rendition or null.

If not null, then this rendition can be downloaded (usually in approved orders only).

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, null if it never 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 null.

This is equal to checkoutPageLocation in the request to submit an order. See also Using the Shopping Cart API.

 
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.

  • Was this article helpful?