Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

NeedInfo

NeedInfo

Needinfos identify a condition that must be satisfied before a transaction can complete. For example, if your billing address, shipping address, payment method, or shipping option wasn't specified for an order, the order will contain a Needinfo that stops the order from being POSTed to a purchase. Needinfos link to a selector where the customer can select the missing condition. In this order example, the order's Needinfos link to a selector where you can select the billing address, shipping address, payment method, or shipping option. Once the customer satisfies the Needinfo condition, the Needinfo disappears and the client can continue with the transaction, which in this order example means the client can POST the order to a purchase.

Needinfo Example

The following Needinfo example shows a Needinfo on a purchase form. This Needinfo stops the form from being posted by removing the action link on the form. This Needinfo links to an outstanding condition, in this case a shipping option, that must be satisfied before the Needinfo will disappear.

{
    "self": {
        "type": "application/vnd.elasticpath.purchase",
        "uri": "/commerce-legacy/purchases/orders/<scope>/<orderid>/form",
        "href": "http://www.onlinestore.com/purchases/orders/<scope>/<orderid>/form",
        "max-age": 0
  },
    "links": [
    {
        "type": "application/vnd.elasticpath.info",
        "rel": "needinfo",
        "href": "http://www.onlinestore.com/deliverymethods/orders/<scope>/<orderid>/deliveries/<deliveryid>",
        "uri": "/commerce-legacy/deliverymethods/orders/<scope>/<orderid>/deliveries/<deliveryid>"
    }
  ]
}