createOrder

post

/ccappagent/v1/orders

Create Order. It can createOrder/priceOrder/preAuthorizeOrder/submitOrder/resendOrdersForFulfillment order for a customer based on operations. Operations can be any of createOrder, createNewCart, priceOrder, preAuthorizeOrder, submitOrder. Dynamic Properties of order can be added in the the request using the key value pair structure ("dynamicPropertyKey":"dynamicPropertyValue"). These property values can take the types of boolean, date, float, string, timestamp, enumerated, big string. Storefront also has an endopint with same id ('createOrder'), but the behaviour is different. For more informaiton refer Storefront API. This takes additonal header paramater x-ccsite to create the order in specific site. If the header information is not provided order is created on default site. Optionally takes X-CCOrganization header which is a JSON field with organization ID as value. If this header is not provided, then the endPoint will consider first active organization as the current organization for a B2B user.

Request

Supported Media Types
Header Parameters
Body ()
Root Schema : createOrder_request
Type: object
Show Source
Example:
{
    "isAnonymousCheckout":true,
    "appliedPromotions":[
        "explicitItemFreeDiscount"
    ],
    "shippingMethod":{
        "value":"ground"
    },
    "payments":[
        {
            "paymentGroupId":"",
            "amount":100,
            "customProperties":{
                "EMIS":"12",
                "MontlyCharge":"$100"
            },
            "giftCardNumber":"6035710988880101071",
            "giftCardPin":"123",
            "type":"physicalGiftCard"
        },
        {
            "PONumber":"123456",
            "type":"invoice"
        },
        {
            "cardCVV":"123",
            "customProperties":{
                "EMIS":"12",
                "MontlyCharge":"$100"
            },
            "nameOnCard":"test",
            "cardTypeName":"Visa",
            "cardType":"visa",
            "endMonth":"02",
            "type":"card",
            "endYear":2018,
            "cardNumber":"4055011111111111"
        }
    ],
    "shoppingCart":{
        "coupons":[
            {
                "code":"FREETATTOO",
                "level":"item",
                "description":"Explicit Item Discount - FREETATTOO",
                "id":"explicitItemFreeDiscount",
                "totalAdjustment":"-21.99",
                "status":"claimed"
            }
        ],
        "items":[
            {
                "deactivationDate":"2018-06-27T12:59:59Z",
                "externalData":[
                ],
                "billingProfileId":"billingProfile-123",
                "billingAccountId":"billingAcc-123",
                "childItems":[
                    {
                        "configurationOptionId":"configOptIDC1P11536825979556",
                        "addOnItem":true,
                        "quantity":5,
                        "priceListGroupId":"price_list_group_1536825979556",
                        "productId":"child1P1Prod1536825979556",
                        "childItems":[
                        ],
                        "configurablePropertyId":"configPropIDC1P11536825979556",
                        "shopperInput":{
                            "fontSIID1536825979556":"Times New Roman",
                            "shrtTxtSIID1536825979556":"This is the P1parent1Prod1536825979556"
                        },
                        "catRefId":"child1P1Sku1536825979556"
                    }
                ],
                "assetKey":"12345",
                "externalPrice":255.1,
                "actionCode":"Add",
                "serviceId":"service-123",
                "serviceAccountId":"serviceAcc-123",
                "quantity":1,
                "dynamicPropertyMode":"pickup",
                "productId":"xprod2105",
                "externalRecurringCharge":10,
                "parentAssetKey":null,
                "rootAssetKey":null,
                "externalPriceQuantity":1,
                "externalRecurringChargeFrequency":"Monthly",
                "transactionDate":"2018-06-27T12:59:59Z",
                "catRefId":"xsku2105",
                "externalRecurringChargeDuration":"12",
                "customerAccountId":"customerAcc-123",
                "detailedRecurringChargeInfo":[
                    {
                        "discounted":false,
                        "amount":10,
                        "quantity":1,
                        "tax":0,
                        "orderDiscountShare":0,
                        "detailedUnitPrice":10,
                        "currencyCode":"USD"
                    }
                ],
                "shopperInput":{
                    "color":"neon",
                    "initials":"M.C.K",
                    "font":"courier"
                },
                "activationDate":"2017-06-27T15:30:00Z",
                "asset":false,
                "recurringCharge":10
            }
        ],
        "orderTotal":255.1
    },
    "placeAsyncOrder":false,
    "shippingAddress":{
        "lastName":"Test",
        "country":"United States",
        "address3":"",
        "address2":"Line 2",
        "city":"Montgomery",
        "prefix":"",
        "address1":"Line 1",
        "postalCode":"36123",
        "jobTitle":"",
        "companyName":"",
        "county":"",
        "suffix":"",
        "selectedCountry":"US",
        "firstName":"Steve",
        "phoneNumber":"45454545",
        "faxNumber":"",
        "alias":"",
        "middleName":"",
        "state":"Alabama",
        "email":"steve.test@example.com",
        "selectedState":"AL",
        "state_ISOCode":"US-AL"
    },
    "billingAddress":{
        "lastName":"Test",
        "country":"United States",
        "address3":"",
        "address2":"Line 2",
        "city":"Montgomery",
        "prefix":"",
        "address1":"Line 1",
        "postalCode":"36123",
        "jobTitle":"",
        "companyName":"",
        "county":"",
        "suffix":"",
        "selectedCountry":"US",
        "firstName":"Steve",
        "phoneNumber":"45454545",
        "faxNumber":"",
        "alias":"",
        "middleName":"",
        "state":"Alabama",
        "selectedState":"AL",
        "state_ISOCode":"US-AL"
    },
    "cartName":"Test Name",
    "dynamicPropertyShippingInstructions":"Test Instructions"
}
Nested Schema : appliedPromotions
Type: array
The array of applied promotions
Show Source
Nested Schema : billingAddress
Type: object
The billing address details.
Show Source
Nested Schema : payments
Type: array
Payment details for the order.
Show Source
Nested Schema : schedule
Type: object
Details of the schedule order to be created
Show Source
Nested Schema : shippingAddress
Type: object
The shipping address details.
Show Source
Nested Schema : shippingGroups
Type: array
The shipping groups for the order.
Show Source
Nested Schema : shippingMethod
Type: object
The shipping method details for the order.
Show Source
Nested Schema : shoppingCart
Type: object
The shopping cart contents of the current order.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : customProperties
Type: object
Custom object with dynamic properties. This will be passed to the webhook request
Nested Schema : schedule
Type: object
schedule details for the schedule.
Show Source
Nested Schema : daysOfWeek
Type: array
mention which days of week schedule should run. values can be 1 to 7.
Show Source
Nested Schema : monthsInYear
Type: array
The months in year of the Scheduled order. Values can be 0 to 11.
Show Source
Nested Schema : weeksInMonth
Type: array
The weeks in month of the Scheduled order.Values can be 1 to 5
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: array
The array of products in the shipping group.
Show Source
Nested Schema : recurringChargePriceInfo
Type: object
Recurring charge price information.
Show Source
Nested Schema : shippingAddress
Type: object
The shipping address details.
Show Source
Nested Schema : shippingMethod
Type: object
The shipping method details for the order.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : detailedRecurringChargeInfo
Type: object
Detailed Item Price Information.
Show Source
Nested Schema : frequencyAmountTotals
Type: array
The total for each recurring charge frequency
Show Source
Nested Schema : frequencyTaxTotals
Type: array
The tax for each recurring charge frequency
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : coupons
Type: array
The array of coupons applied to the order.
Show Source
Nested Schema : items
Type: array
The array of products in the shopping cart.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : childItems
Type: array
The array of child items in the item, if the item is a configurable item. A child item can itself contain a child item array if it is a configurable product in itself.
Show Source
Nested Schema : detailedRecurringChargeInfo
Type: object
Detailed Item Price Information.
Show Source
Nested Schema : externalData
Type: array
External data to be associated with a commerce item, provided by a configurator system.
Show Source
Nested Schema : giftWithPurchaseSelections
Type: array
The array of gift with purchase selections to be made.
Show Source
Nested Schema : shopperInput
Type: object
Additional Properties Allowed
Show Source
Map of shopper input keys to values
Nested Schema : items
Type: object
Show Source
Nested Schema : detailedRecurringChargeInfo
Type: object
Detailed Item Price Information.
Show Source
Nested Schema : externalData
Type: array
External data to be associated with a commerce item, provided by a configurator system.
Show Source
Nested Schema : shopperInput
Type: object
Additional Properties Allowed
Show Source
Map of shopper input keys to values
Nested Schema : items
Type: object
Show Source
Nested Schema : values
Type: object
The array of values associated with an externalData item.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : values
Type: object
The array of values associated with an externalData item.
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : createOrder_response
Type: object
Show Source
Nested Schema : approvalSystemMessages
Type: array
An array of approval messages when order going in pending approval state
Show Source
Nested Schema : billingAddress
Type: object
The billing address details.
Show Source
Nested Schema : discountInfo
Type: object
The discount information.
Show Source
Nested Schema : dynamicProperties
Type: array
Read-only list of dynamic properties for the order along with meta-data.
Show Source
Nested Schema : giftWithPurchaseInfo
Type: array
The gift information.
Show Source
Nested Schema : giftWithPurchaseOrderMarkers
Type: array
gift with purchase order marker information
Show Source
Nested Schema : payments
Type: array
Payment details for the order, including additional properties specific to the payment type.
Show Source
Nested Schema : priceInfo
Type: object
The price information.
Show Source
Nested Schema : priceListGroup
Type: object
The price list group object.
Show Source
Nested Schema : pricingMessages
Type: object
The Pricing messages information.
Show Source
Nested Schema : quoteInfo
Type: object
the quote information of the order
Show Source
Nested Schema : recurringChargePriceInfo
Type: object
Recurring charge price information.
Show Source
Nested Schema : scheduledOrder:
Type: object
the schedule information of order
Show Source
Nested Schema : shippingAddress
Type: object
The shipping address details.
Show Source
Nested Schema : shippingGroups
Type: array
The shipping groups for the order.
Show Source
Nested Schema : shippingMethod
Type: object
The shipping method details for the order.
Show Source
Nested Schema : shoppingCart
Type: object
The shopping cart contents of the current order.
Show Source
Nested Schema : trackingInfo
Type: array
Tracking Information for the Order.
Show Source
Nested Schema : orderDiscountDescList
Type: array
The list of all the order discounts.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : orderTotalBySite
Type: object
The map containing order totals by site for all sites in a given order.
Nested Schema : giftWithPurchaseMessages
Type: array
The gift with purchase messages information.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : params
Type: array
The list of all message parameters.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : errorInfo
Type: array
the array of errors, if any
Show Source
Nested Schema : notes
Type: array
the notes (history) for the order
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : frequencyAmountTotals
Type: array
The total for each recurring charge frequency
Show Source
Nested Schema : frequencyTaxTotals
Type: array
The tax for each recurring charge frequency
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : clonedOrders
Type: array
Array of order ids created from scheduled order.
Show Source
Nested Schema : executionStatusList
Type: array
list of orders with status that are placed with this schedule.
Show Source
Nested Schema : lastError
Type: object
last error of this scheduled order.
Show Source
Nested Schema : schedule
Type: object
The schedule of the Scheduled order.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : errorMessages
Type: array
The error messages list.
Show Source
Nested Schema : errorMessages
Type: array
An array of error messages
Show Source
Nested Schema : daysInMonth
Type: array
The selected dates in a month in year for the Scheduled order.
Show Source
Nested Schema : daysOfWeek
Type: array
The days of week of the Scheduled order.
Show Source
Nested Schema : monthsInYear
Type: array
The months in year of the Scheduled order.
Show Source
Nested Schema : weeksInMonth
Type: array
The weeks in month of the Scheduled order.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : discountInfo
Type: object
The shipping group price information.
Show Source
Nested Schema : items
Type: array
The array of products in the shipping group.
Show Source
Nested Schema : priceInfo
Type: object
The shipping group price information.
Show Source
Nested Schema : recurringChargePriceInfo
Type: object
Recurring charge price information.
Show Source
Nested Schema : shippingAddress
Type: object
The shipping address details.
Show Source
Nested Schema : shippingMethod
Type: object
The shipping method details.
Show Source
Nested Schema : store
Type: object
Information about the Store from which items are being picked up from (if shipping group type is inStorePickupShippingGroup)
Show Source
Nested Schema : taxPriceInfo
Type: object
The shipping tax price info details.
Show Source
Nested Schema : trackingInfo
Type: array
Tracking Information for the Order.
Show Source
Nested Schema : discountDescList
Type: array
The list of all the order discounts.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : detailedItemPriceInfo
Type: array
Detailed Item Price Information.
Show Source
Nested Schema : detailedRecurringChargeInfo
Type: object
Detailed Item Price Information.
Show Source
Nested Schema : dynamicProperties
Type: array
Array of custom properties at order line item level.
Show Source
Nested Schema : externalData
Type: array
External data to be associated with a commerce item, provided by a configurator system.
Show Source
Nested Schema : skuProperties
Type: array
Sku properties Information
Show Source
Nested Schema : variant
Type: array
List of variants for the product.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : values
Type: object
The array of values associated with an externalData item.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : frequencyAmountTotals
Type: array
The total for each recurring charge frequency
Show Source
Nested Schema : frequencyTaxTotals
Type: array
The tax for each recurring charge frequency
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: array
The array of products in the shopping cart.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : childItems
Type: array
The array of child items in the item, if the item is a configurable item. A child item can itself contain a child item array if it is a configurable product in itself.
Show Source
Nested Schema : detailedRecurringChargeInfo
Type: object
Detailed Item Price Information.
Show Source
Nested Schema : discountInfo
Type: array
The discount information.
Show Source
Nested Schema : dynamicProperties
Type: array
Array of custom properties at order line item level.
Show Source
Nested Schema : externalData
Type: array
External data to be associated with a commerce item, provided by a configurator system.
Show Source
Nested Schema : itemDiscountInfos
Type: array
Array of promotions received by this item.
Show Source
Nested Schema : orderDiscountInfos
Type: array
Array of order promotions received by this item.
Show Source
Nested Schema : shopperInput
Type: object
Additional Properties Allowed
Show Source
Map of shopper input keys to values
Nested Schema : skuProperties
Type: array
Sku properties Information
Show Source
Nested Schema : variant
Type: array
List of variants for the product.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : detailedRecurringChargeInfo
Type: object
Detailed Item Price Information.
Show Source
Nested Schema : externalData
Type: array
External data to be associated with a commerce item, provided by a configurator system.
Show Source
Nested Schema : shopperInput
Type: object
Additional Properties Allowed
Show Source
Map of shopper input keys to values
Nested Schema : items
Type: object
Show Source
Nested Schema : values
Type: object
The array of values associated with an externalData item.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : giftWithPurchaseDiscountInfo
Type: array
The gift information.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : values
Type: object
The array of values associated with an externalData item.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : couponCodes
Type: array
One or more coupon codes used to grant the item promotion providing the discount.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : couponCodes
Type: array
The array of coupon codes used to grant promotion providing the discount.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Example Response (application/json)
{
    "taxPriceInfo":{
        "cityTax":0,
        "amount":4,
        "valueAddedTax":0,
        "countyTax":2,
        "isTaxIncluded":false,
        "miscTax":0,
        "districtTax":0,
        "stateTax":2,
        "countryTax":0
    },
    "orderId":"o10415",
    "creationSiteId":"siteUS",
    "dynamicProperties":[
        {
            "id":"dynamicPropertyShippingInstructions",
            "value":"Test Instructions"
        }
    ],
    "isItemPriceOverrideAllowed":true,
    "cartName":"o10415",
    "priceInfo":{
        "amount":9.99,
        "total":38.5,
        "shipping":25,
        "orderTotalBySite":{
            "siteUS":38.5
        },
        "tax":3.51,
        "subTotal":9.99,
        "currencyCode":"USD"
    },
    "discountInfo":{
        "unclaimedCouponMultiPromotions":{
        },
        "orderCouponsMap":{
        },
        "orderDiscount":0,
        "shippingDiscount":0,
        "orderImplicitDiscountList":[
        ],
        "unclaimedCouponsMap":{
        },
        "claimedCouponMultiPromotions":{
        }
    },
    "recurringChargePriceInfo":{
        "amount":20,
        "total":20,
        "shipping":0,
        "subTotalByFrequency":[
            {
                "amount":20,
                "frequency":"Monthly"
            }
        ],
        "taxByFrequency":[
        ],
        "tax":0,
        "subTotal":20,
        "currencyCode":"USD",
        "totalWithoutTax":20
    },
    "pricingMessages":{
        "promotionUpsellMessages":[
            {
                "text":"Spend $20 more get free shipping!",
                "tags":[
                    "CART_UPSELL"
                ]
            },
            {
                "text":"You have qualified for a free Sports DVD!",
                "tags":[
                    "BANNER_UPSELL",
                    "CART_UPSELL"
                ]
            }
        ]
    },
    "shoppingCart":{
        "numberOfItems":1,
        "items":[
            {
                "unitPrice":9.99,
                "quantity":1,
                "productId":"Product_18Cyii",
                "priceOverridenBy":"",
                "externalRecurringCharge":20,
                "giftWithPurchaseCommerceItemMarkers":[
                ],
                "preOrderQuantity":0,
                "externalRecurringChargeFrequency":"Monthly",
                "childItems":[
                    {
                        "commerceItemId":"ci19000424",
                        "configurationOptionId":"co40001",
                        "addOnItem":true,
                        "quantity":1,
                        "route":"/intel-pentium-dual-core/product/prod40001",
                        "productId":"prod40001",
                        "displayName":"Intel Pentium Dual Core",
                        "selectedOptions":[
                        ],
                        "siteId":"siteUS",
                        "configurablePropertyId":"cp40001",
                        "catRefId":"sku40001"
                    },
                    {
                        "commerceItemId":"ci19000426",
                        "addOnItem":false,
                        "quantity":1,
                        "route":"/8-gb-kingston-sodimm-ddr3-1600mhz/product/prod40007",
                        "productId":"prod40007",
                        "displayName":"8 GB Kingston Sodimm DDR3 1600MHz",
                        "selectedOptions":[
                        ],
                        "siteId":"siteUS",
                        "catRefId":"sku40007"
                    },
                    {
                        "commerceItemId":"ci19000425",
                        "configurationOptionId":"confO_12",
                        "addOnItem":true,
                        "quantity":1,
                        "productId":"prod12344",
                        "displayName":"Gift Wrap",
                        "siteId":"siteUS",
                        "shopperInput":{
                            "color":"neon",
                            "message":"Happy Birthday My Friend",
                            "font":"courier"
                        },
                        "configurablePropertyId":"conf022",
                        "catRefId":"sku12344"
                    }
                ],
                "externalRecurringChargeDuration":"12",
                "catRefId":"Sku_18Dxy",
                "configuratorId":"36379716",
                "overriddenPrice":"",
                "commerceItemId":"ci1000785",
                "discountInfo":[
                ],
                "price":9.99,
                "isPriceOverridden":false,
                "onSale":true,
                "siteId":"siteUS",
                "detailedRecurringChargeInfo":[
                    {
                        "discounted":false,
                        "secondaryCurrencyTaxAmount":0,
                        "amount":20,
                        "quantity":1,
                        "tax":0,
                        "orderDiscountShare":0,
                        "detailedUnitPrice":20,
                        "currencyCode":"USD"
                    }
                ],
                "backOrderQuantity":0,
                "locationInventoryInfoMap":{
                },
                "priceOverrideReason":{
                }
            }
        ]
    },
    "giftWithPurchaseInfo":[
    ],
    "siteId":"siteUS",
    "links":[
        {
            "method":"POST",
            "rel":"self",
            "href":"/ccagentui/v1/orders"
        }
    ],
    "giftWithPurchaseOrderMarkers":[
    ]
}

Default Response

The error response. In case of any failure in external tax or external shipping webhooks, the errors returned in the webhook response payload get added to the errors property in this endpoint???s error response. The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud: |Error Code|Description| |------------------|------------------| |40001|Please check the shipping address and try again.| |200124|Internal error occurred.| |28155|{0} cannot be purchased directly and is only available as part of a customizable product, please remove this item from your cart in order to proceed| |1002020|The user does not have permission to place an order.| |100094|Organization passed in the header is currently inactive| |100098|Current operation is being performed in an organization context and the shopper profile is not associated to any organization| |28107|Specified order does not exist| |28129|Product/sku {0} not found| |22001|An internal error occurred while processing input request.| |22002|No profile found with profile id {0}| |28326|Code not currently active./ Code not found. / Code expired.| |28088|Please check the selected shipping method before placing your order. The previously selected shipping method is no longer available.| |28086|No shipping data specified| |30015|SiteId passed in x-ccsite header is currently inactive| |28087|No shipping method specified| |30014|SiteId passed in x-ccsite header is invalid or the site was deleted| |28103|Quantity cannot exceed order limit| |28301|Order submission failed| |28104|Quantity cannot exceed stock limit (inventory check)| |28102|Product/sku {0} not found| |28300|Internal error while creating the order| |28080|Empty shopping cart data| |28081|No items found in cart data| |100101|The shopper profile does not belong to organization passed in the header| |100102|Organization passed in the header is invalid or does not exist| |100103|The order or return request does not belong to the organization passed in the header| |28084|No quantity specified on item| |28085|Invalid quantity {0} specified on item| |28082|No product id specified on item| |28083|No catalog reference id specified on item| |28105|Order submission failed| |28111|Your order has not been placed due to a payment error, and you have not been charged. Please try again| |28410|The structure of add-ons defined for the order is invalid| |28329|One of the dynamic properties is not writable by the Agent user| |51006|The location used does not support pickup in store|
Body ()
Root Schema : errorModel
Type: object
Show Source
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top