createOrder

post

/ccagent/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:
{
    "op":"createOrder",
    "profileId":"se-570032",
    "shippingMethod":{
        "value":"standardShippingMethod"
    },
    "shoppingCart":{
        "coupons":[
            {
                "code":"SAVE5PERCENTON100",
                "level":"order",
                "description":"Order Discount - SAVE5%ON100 - Coupon",
                "id":"explicitOrderDiscount5on100",
                "status":"unclaimed"
            }
        ],
        "items":[
            {
                "deactivationDate":"2018-06-27T12:59:59Z",
                "billingProfileId":"billingProfile-123",
                "billingAccountId":"billingAcc-123",
                "childItems":[
                    {
                        "deactivationDate":"2018-06-27T12:59:59Z",
                        "addOnItem":false,
                        "displayName":"Laptop Parts 1",
                        "externalData":[
                        ],
                        "billingProfileId":"billingProfile-123",
                        "billingAccountId":"billingAcc-123",
                        "childItems":[
                            {
                                "serviceAccountId":"serviceAcc-123",
                                "deactivationDate":"2018-06-27T12:59:59Z",
                                "quantity":"1",
                                "productId":"prod40001",
                                "displayName":"Laptop Parts 1",
                                "externalData":[
                                ],
                                "parentAssetKey":null,
                                "billingProfileId":"billingProfile-123",
                                "currentPrice":0,
                                "billingAccountId":"billingAcc-123",
                                "rootAssetKey":null,
                                "transactionDate":"2018-06-27T12:59:59Z",
                                "catRefId":"sku40009",
                                "assetKey":null,
                                "priceListGroupId":"defaultPriceGroup",
                                "customerAccountId":"customerAcc-123",
                                "assetId":"asset10001",
                                "invalid":false,
                                "stockStatus":true,
                                "actionCode":"Add",
                                "activationDate":"2017-06-27T15:30:00Z",
                                "serviceId":"service-123",
                                "asset":false
                            }
                        ],
                        "assetKey":null,
                        "commerceItemId":"ci19000424",
                        "assetId":"asset10001",
                        "stockStatus":true,
                        "actionCode":"Add",
                        "serviceId":"service-123",
                        "serviceAccountId":"serviceAcc-123",
                        "quantity":"1",
                        "productId":"prod40001",
                        "parentAssetKey":null,
                        "currentPrice":0,
                        "rootAssetKey":null,
                        "transactionDate":"2018-06-27T12:59:59Z",
                        "catRefId":"sku40001",
                        "priceListGroupId":"defaultPriceGroup",
                        "customerAccountId":"customerAcc-123",
                        "invalid":false,
                        "activationDate":"2017-06-27T15:30:00Z",
                        "asset":false
                    },
                    {
                        "commerceItemId":"ci19000424",
                        "configurationOptionId":"confO_12",
                        "addOnItem":true,
                        "quantity":1,
                        "productId":"prod12344",
                        "displayName":"Gift Wrap",
                        "shopperInput":{
                            "color":"neon",
                            "message":"Happy Birthday My Friend",
                            "font":"courier"
                        },
                        "configurablePropertyId":"conf022",
                        "catRefId":"sku12344"
                    }
                ],
                "configuratorId":"12343455",
                "assetKey":null,
                "externalPrice":"722.0",
                "assetId":"asset10001",
                "stockStatus":true,
                "onSale":true,
                "actionCode":"Add",
                "serviceId":"service-123",
                "serviceAccountId":"serviceAcc-123",
                "quantity":1,
                "productId":"Product_18Cyii",
                "externalRecurringCharge":20,
                "currentPrice":0,
                "parentAssetKey":null,
                "rootAssetKey":null,
                "externalPriceQuantity":-1,
                "externalRecurringChargeFrequency":"Monthly",
                "transactionDate":"2018-06-27T12:59:59Z",
                "catRefId":"Sku_18Dxy",
                "externalRecurringChargeDuration":"12",
                "customerAccountId":"customerAcc-123",
                "activationDate":"2017-06-27T15:30:00Z",
                "asset":false
            }
        ]
    },
    "shippingAddress":{
        "lastName":"Spencers",
        "country":"US",
        "address3":"",
        "address2":"",
        "city":"Montgomery",
        "prefix":"",
        "address1":"600 Dexter Avenue",
        "postalCode":"36130",
        "jobTitle":"",
        "companyName":"",
        "county":"",
        "suffix":"",
        "DEFAULT_POSTAL_CODE_PATTERN":"^[0-9a-zA-Z]{1,}([ -][0-9a-zA-Z]{1,})?$",
        "selectedCountry":"US",
        "firstName":"Mark",
        "phoneNumber":"973-974-1234",
        "faxNumber":"",
        "middleName":"",
        "state":"AL",
        "email":"",
        "selectedState":"AL",
        "state_ISOCode":"US-AL"
    },
    "requestChannel":"agent",
    "dynamicPropertyShippingInstructions":"Test Instructions"
}
Nested Schema : billingAddress
Type: object
Billing address for the order
Show Source
Nested Schema : orders
Type: array
Orders to be resubmitted. Related Endpoint operations - resendOrdersForFulfillment
Show Source
Nested Schema : payments
Type: object
List of payments
Show Source
Nested Schema : recurringChargePriceInfo
Type: object
Detailed information of the recurring charges at the shipping groups level
Show Source
Nested Schema : schedule
Type: object
The details of the schedule order. Related Endpoint operations - createOrder, createNewCart
Show Source
Nested Schema : shippingAddress
Type: object
Shipping address. Related Endpoint operations - createOrder, createNewCart, priceOrder, submitOrder, preAuthorizeOrder
Show Source
Nested Schema : shippingGroups
Type: array
Shipping Groups. Related Endpoint operations - createOrder, createNewCart, priceOrder, submitOrder
Show Source
Nested Schema : shippingMethod
Type: object
shipping method. Related Endpoint operations - createOrder, createNewCart, priceOrder, submitOrder, preAuthorizeOrder
Show Source
Nested Schema : shoppingCart
Type: object
Shopping cart information. Related Endpoint operations - createOrder, createNewCart, priceOrder, submitOrder, preAuthorizeOrder
Show Source
Nested Schema : customProperties
Type: object
Additional Properties Allowed
Show Source
Custom object with dynamic properties. This will be passed to the webhook request
Show Source
Nested Schema : subTotalByFrequency
Type: array
subtotal of the item by frequency
Show Source
Nested Schema : taxByFrequency
Type: array
tax by frequency
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : schedule
Type: object
The schedule of the scheduled order
Show Source
Nested Schema : daysInMonth
Type: array
Days in a month this scheduled order has to be placed
Show Source
Nested Schema : daysOfWeek
Type: array
Days in a week this scheduled order has to be placed
Show Source
Nested Schema : monthsInYear
Type: array
Months in a year this scheduled order has to be placed
Show Source
Nested Schema : weeksInMonth
Type: array
Weeks in a month this scheduled order has to be placed
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: array
Items in the cart.
Show Source
Nested Schema : recurringChargePriceInfo
Type: object
Detailed information of the recurring charges at the shipping groups level
Show Source
Nested Schema : shippingAddress
Type: object
Shipping address.
Show Source
Nested Schema : shippingMethod
Type: object
shipping method
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : detailedRecurringChargeInfo
Type: array
recurring charge information
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : subTotalByFrequency
Type: array
subtotal of the item by frequency
Show Source
Nested Schema : taxByFrequency
Type: array
tax by frequency
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : store
Type: object
Information about the Store that the items are being picked up from (if shipping group type is inStorePickupShippingGroup)
Show Source
Nested Schema : coupons
Type: array
The array of coupons applied to the order.
Show Source
Nested Schema : items
Type: array
Items in the cart.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : childItems
Type: array
Child items of the commerce item
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 : childItems
Type: array
Child items of the commerce item
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 : externalData
Type: array
External data to be associated with a commerce item, provided by a configurator system.
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 : values
Type: object
The array of values associated with an externalData item.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : detailedRecurringChargeInfo
Type: array
recurring charge information
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 : billingMethod
Type: object
Billing method information of the order. Related Endpoint operation - submitOrder.
Show Source
Nested Schema : discountInfo
Type: object
Discount information. Related Endpoint operation - createOrder, createNewCart, priceOrder, submitOrder, preAuthorizeOrder.
Show Source
Nested Schema : dynamicProperties
Type: array
Read-only list of dynamic properties for the order along with meta-data. Related Endpoint operation - createOrder, createNewCart, priceOrder, submitOrder.
Show Source
Nested Schema : giftWithPurchaseInfo
Type: array
Gift Selection Information. Related Endpoint operation - createOrder, createNewCart, priceOrder, submitOrder.
Show Source
Nested Schema : giftWithPurchaseOrderMarkers
Type: array
Gift With Purchase order markers information. Related Endpoint operation - createOrder, createNewCart, priceOrder, submitOrder.
Show Source
Nested Schema : notSubmittedOrders
Type: array
Orders not submitted for fulfillment. Related Endpoint operations - resendOrdersForFulfillment
Show Source
Nested Schema : orderComments
Type: array
The list of all logged comments for the order.
Show Source
Nested Schema : paymentGroup
Type: object
Payment Group for the order. Related Endpoint operation - submitOrder.
Show Source
Nested Schema : paymentGroups
Type: array
List of payment Groups for the order. Related Endpoint operations - submitOrder
Show Source
Nested Schema : priceInfo
Type: object
Price information. Related Endpoint operation - createOrder, createNewCart, priceOrder, submitOrder, preAuthorizeOrder.
Show Source