Document Properties
Kbid2605F1
Last Modified23-Jun-2020
Added to KB09-Dec-2014
Public AccessEveryone
StatusOnline
Doc TypeReferences
Product
  • ICM 7.6
  • ICM 7.7

REST API - Adobe Create new order

URI

/orders

Http Method

POST

Short Description

Creates/submits an order

Query Parameters

none

Example Requests

/orders

HTTP Status Codes

200 OK
400 Bad Request

       Possible values for header value "error-key":

    • basket.not_found.error
    • basket.id_required.error
    • shopping_cart.create_order.error
    • shopping_cart.giftcard.error
    • shopping_cart.inventory.error
    • shopping_cart.not_covered.error
    • shopping_cart.payment_redirect.error
    • shopping_cart.tax.calculation.error
    • shopping_cart.terms_and_conditions.error

403 Forbidden
404 Not found
406 Not Acceptable

Description

The request creates / submits a new order based an the basket given by basket ID.

Cartridge

adobe_app_sf_rest

Application

B2C Web Shop, SMB Web Shop

Product Version

7.5.1

Product To Version


Status

final


JSON

Request Data Format

application/json

Request related java object

com.intershop.adobe.application.storefront.rest.capi.resource.order.AdobeOrderListResource
com.intershop.sellside.rest.common.capi.resourceobject.OrderDescriptionRO

Request Example

Simple Order Creation

{
    "basketID": "mwnAqMgoQWUAAAE8irJXwIE5", 
    "acceptTermsAndConditions": "true"
}

Advanced Order Creation with further parameters

If Payment method is Credit Credit and a Credit Card Security Code has to be used this code has to be added here:

{
    "basketID": "BUcKAB1773oAAAFG1fwnP90u",
    "acceptTermsAndConditions": "true",
    "paymentInformations" : {        
        "parameters":
        [
                {
                    "key":"simpleCC",
                    "property":"123"
                }
        ]
    }
}

Response Data Format

application/json

Response related java object

com.intershop.adobe.application.storefront.rest.capi.resource.order.AdobeOrderListResource
com.intershop.sellside.rest.common.capi.resourceobject.order.OrderRO

Response Example

Successful Order Creation

{
   "name": "order",
   "type": "Order",
   "id": "QJEKDABnJIkAAAFJAlo4SJ8S",
   "status": "NEW",
   "creationDate": 1415713020534,
   "documentNo": "00000252",
   "invoiceToAddress":{...},
   "shippingBuckets":[...],
   "totals":{...},
   "salesTaxTotalsByTaxRate":[...],
   "shippingTaxTotalsByTaxRate":[...],
   "payments":[...],
   "externalOrderReferenceID": "",
   "purchaseCurrency": "USD"
}


Create Order failed due to an not-existing basket

  • Returned Status Code: 404 Not Found
  • Example Reason: wrong Basket ID or Order already created by this Basket ID
Bad Request (No basket found for the given ID.)


Create Order failed due to an existing but invalid basket

  • Returned Status Code: 406 Not Acceptable
  • example: missing invoice address
{
    "type": "OrderValidation",
    "errorMessage": "The basket contains invalid invoice address.",
    "validOrder": false,
    "basketLink":
    {
        "type": "Link",
        "uri": "PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/baskets/EaYKAM6kcBYAAAFG2us4qPtK",
        "title": "BasketLink"
    }
}

XML

XML Request Data Format

text/xml

XML Request Java Objects

com.intershop.adobe.application.storefront.rest.capi.resource.order.AdobeOrderListResource
com.intershop.sellside.rest.common.capi.resourceobject.OrderDescriptionRO

XML Request Example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OrderDescription>
	<acceptTermsAndConditions>true</acceptTermsAndConditions>
	<basketID>mwnAqMgoQWUAAAE8irJXwIE5</basketID>
</OrderDescription>
  

If the payment method is Credit Credit and a credit card security code has to be used this code has to be added here:

tbd

XML Response Data Format

text/xml

XML Response Java Objects

com.intershop.adobe.application.storefront.rest.capi.resource.order.AdobeOrderListResource
com.intershop.sellside.rest.common.capi.resourceobject.order.OrderRO 

XML Response Example

Successful Order

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Order name="order" type="Order">
  <id>QJEKDABnJIkAAAFJAlo4SJ8S</id>
  <status>NEW</status>
  <creationDate>2014-06-03T13:36:14.340+02:00</creationDate>
  <documentNo>00000252</documentNo>
  <shippingBuckets>...</shippingBuckets>
  <totals name="orderTotals" type="OrderTotals">...</totals>
  <salesTaxTotalsByTaxRate>...</salesTaxTotalsByTaxRate>
  <shippingTaxTotalsByTaxRate>...</shippingTaxTotalsByTaxRate>
  <payments>...</payments>
  <externalOrderReferenceID></externalOrderReferenceID>
  <purchaseCurrency>USD</purchaseCurrency>
</Order>

Create Order failed due to an not-existing basket

  • Returned Status Code: 404 Not Found
  • Example Reason: wrong Basket ID or Order already created by this Basket ID
Bad Request (No basket found for the given ID.)

Create Order failed due to an existing but invalid basket

  • Returned Status Code: 406 Not Acceptable
  • example: missing invoice address
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OrderValidation type="OrderValidation">
  <basketLink type="Link">
    <title>BasketLink</title>
    <uri>PrimeTech-PrimeTechSpecials-Site/b2c-web-shop/baskets/EaYKAM6kcBYAAAFG2us4qPtK</uri>
  </basketLink>
  <errorMessage>The basket contains invalid invoice address.</errorMessage>
  <validOrder>false</validOrder>
</OrderValidation>

Reference - Intershop Commerce Pro for Adobe REST API

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Support Tickets