approveOrder

post

/ccagent/v1/orders/approve

Approve Order. Approver approves an order. 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 : approveOrder_request
Type: object
Show Source
Example:
{
    "approverMessage":"Approving order",
    "orderId":"o40411"
}
Back to Top

Response

Supported Media Types

200 Response

Following model is returned when operation succeeds.
Body ()
Root Schema : approveOrder_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 : approverMessages
Type: array
An array of approval messages when approver approving order
Show Source
Nested Schema : approvers
Type: array
List of approvers of the organization.
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 : 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: array
schedule order information
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/order
Type: object
The shopping-cart or order contents of the current order.
Show Source
Nested Schema : trackingInfo
Type: array
Tracking Information for the Order.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : claimedCouponMultiPromotions
Type: object
The coupons that were claimed
Show Source
Nested Schema : orderCouponsMap
Type: array
The list of all the coupons with the order.
Show Source
Nested Schema : orderImplicitDiscountList
Type: array
The implicit order discounts with the order.
Show Source
Nested Schema : unclaimedCouponMultiPromotions
Type: object
The coupons that were not claimed
Show Source
Nested Schema : unclaimedCouponsMap
Type: object
The unclaimed coupons with the order.
Show Source
Nested Schema : coupon code
Type: array
Coupon Code, corresponding to which promotions were applied
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 : coupon code
Type: array
Coupon Code, corresponding to which some promotions were not applied
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : coupon code
Type: array
Coupon Code, corresponding to which some promotions were not applied
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 : 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 : items
Type: object
Show Source
Nested Schema : clonedOrders
Type: array
list of orders that is created using this as template.
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
schedule details for the schedule.
Show Source
Nested Schema : items
Type: object
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
mention which days of Month schedule should run. values can be 1 to 31.
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 : 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 : 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: object
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 : 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 : values
Type: object
The array of values associated with an externalData item.
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: 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 : giftWithPurchaseCommerceItemMarkers
Type: array
The array of giftWithPurchaseCommerceItemMarkers.
Show Source
Nested Schema : shopperInput
Type: object
Additional Properties Allowed
Show Source
Map of shopper input keys to values
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 : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Example Response (application/json)
{
    "gwp":false,
    "lastModifiedTime":1.488091242E12,
    "priceGroupId":"defaultPriceGroup",
    "creationTime":1.488090529E12,
    "gwpMarkers":[
    ],
    "salesChannel":"contactCenter",
    "submittedDate":null,
    "locale":"en",
    "paymentGroups":[
        {
            "expirationYear":null,
            "amountAuthorized":0,
            "amount":309.92,
            "gatewayName":null,
            "expirationMonth":null,
            "submittedDate":null,
            "authorizationStatus":[
            ],
            "token":null,
            "paymentGroupClassType":"tokenizedCreditCard",
            "creditCardNumber":null,
            "paymentMethod":"tokenizedCreditCard",
            "state":"INITIAL",
            "id":"pg40411",
            "billingAddress":{
                "lastName":null,
                "country":null,
                "address3":null,
                "address2":null,
                "city":null,
                "prefix":null,
                "address1":null,
                "postalCode":null,
                "companyName":null,
                "jobTitle":null,
                "county":null,
                "suffix":null,
                "ownerId":null,
                "selectedCountry":null,
                "firstName":null,
                "phoneNumber":null,
                "faxNumber":null,
                "middleName":null,
                "state":null,
                "email":null,
                "selectedState":null,
                "state_ISOCode":null
            },
            "debitStatus":[
            ],
            "currencyCode":"USD"
        }
    ],
    "configuratorId":null,
    "organizationId":"or-100002",
    "relationships":[
        {
            "paymentGroupId":"pg40411",
            "amount":309.92,
            "relationshipType":"ORDERAMOUNTREMAINING",
            "id":"r50389"
        }
    ],
    "priceInfo":{
        "discounted":false,
        "amount":249.99,
        "total":309.92,
        "shipping":35,
        "manualAdjustmentTotal":0,
        "amountIsFinal":false,
        "discountAmount":0,
        "tax":24.93,
        "rawSubtotal":249.99,
        "currencyCode":"USD"
    },
    "submissionProgress":[
    ],
    "totalCommerceItemCount":1,
    "id":"o40411",
    "state":"PENDING_PAYMENT",
    "quoteInfo":null,
    "taxCalculated":true,
    "commerceItems":[
        {
            "quantity":1,
            "productId":"prod10015",
            "returnedQuantity":0,
            "externalId":null,
            "originalCommerceItemId":null,
            "catalogRefId":"sku10032",
            "priceInfo":{
                "discounted":true,
                "amount":249.99,
                "rawTotalPrice":299.99,
                "salePrice":0,
                "priceListId":"listPrices",
                "quantityDiscounted":1,
                "amountIsFinal":false,
                "onSale":false,
                "shippingSurcharge":0,
                "discountable":true,
                "currentPriceDetailsSorted":[
                    {
                        "discounted":true,
                        "amount":249.99,
                        "quantity":1,
                        "amountIsFinal":false,
                        "range":{
                            "lowBound":0,
                            "highBound":0,
                            "size":1
                        },
                        "tax":21.86,
                        "orderDiscountShare":0,
                        "detailedUnitPrice":249.99,
                        "currencyCode":"USD"
                    }
                ],
                "currencyCode":"USD",
                "listPrice":299.99
            },
            "catalogId":null,
            "lineAttributes":[
            ],
            "catalogKey":null,
            "productDisplayName":"Playstation 3",
            "externalPriceDetails":null,
            "siteId":"siteUS",
            "id":"ci4000413"
        }
    ],
    "taxPriceInfo":{
        "discounted":false,
        "valueAddedTax":0,
        "amount":24.93,
        "countyTax":0.71,
        "isTaxIncluded":false,
        "miscTax":6.41,
        "districtTax":0,
        "stateTax":17.1,
        "miscTaxInfo":{
            "Special":6.41
        },
        "countryTax":0,
        "cityTax":0.71,
        "amountIsFinal":false,
        "currencyCode":"USD"
    },
    "freezeDate":"2017-02-26T06:40:42.000Z",
    "shippingGroups":[
        {
            "shippingMethod":"standardShippingMethod",
            "description":"sg50411",
            "submittedDate":null,
            "priceInfo":{
                "discounted":false,
                "shippingTax":3.07,
                "amount":35,
                "rawShipping":35,
                "amountIsFinal":false,
                "currencyCode":"USD"
            },
            "shipOnDate":null,
            "actualShipDate":null,
            "specialInstructions":{
            },
            "shippingAddress":{
                "lastName":"Blooming",
                "country":"US",
                "address3":null,
                "address2":"Santa Clara County",
                "city":"San Jose",
                "prefix":null,
                "address1":"7 W Jackson Blvd",
                "postalCode":"95111",
                "companyName":"US Motor Works, Inc.",
                "jobTitle":null,
                "county":null,
                "suffix":null,
                "ownerId":null,
                "selectedCountry":"US",
                "firstName":"Ron",
                "phoneNumber":"408-752-3500",
                "faxNumber":null,
                "middleName":null,
                "state":"CA",
                "email":"ron@example.com",
                "selectedState":"NY",
                "state_ISOCode":"US-NY"
            },
            "commerceItemRelationships":[
                {
                    "commerceItemId":"ci4000413",
                    "inventoryLocationId":null,
                    "amount":0,
                    "quantity":1,
                    "pointOfNoRevision":false,
                    "relationshipType":"SHIPPINGQUANTITY",
                    "returnedQuantity":0,
                    "range":{
                        "lowBound":0,
                        "highBound":0,
                        "size":1
                    },
                    "commerceItemExternalId":null,
                    "state":"INITIAL",
                    "id":"r50387"
                }
            ],
            "state":"INITIAL",
            "id":"sg50411",
            "stateDetail":null,
            "trackingNumber":null,
            "handlingInstructions":[
            ],
            "shippingGroupClassType":"hardgoodShippingGroup"
        }
    ],
    "taxExempt":false,
    "lastModifiedDate":"2017-02-26T06:40:42.000Z",
    "creationSiteId":"siteUS",
    "approvalSystemMessages":[
        "Order is pending approval because total is greater than the approved order limit."
    ],
    "profile":{
        "lastName":"Blooming",
        "firstName":"Ron",
        "shippingAddress":null,
        "middleName":null,
        "parentOrganization":{
            "name":"US Motor Works, Inc.",
            "id":"or-100002"
        },
        "email":"ron@example.com"
    },
    "shippingGroupCount":1,
    "orderAction":"order",
    "paymentGroupCount":1,
    "submissionErrorCodes":[
    ],
    "submissionErrorMessages":[
    ],
    "profileId":"bb-110023",
    "siteId":"siteUS",
    "activeQuoteOrderId":null
}

Default Response

The 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| |------------------|------------------| |100094|Organization passed in the header is currently inactive| |100095|The order or return request does not belong to the current organization of the shopper profile| |100096|The organization associated to the order or return request was deleted / does not exist| |100097|The organization associated to the order or return request is currently inactive| |100098|Current operation is being performed in an organization context and the shopper profile is not associated to any organization| |100099|Current operation is being performed in an organization context and the order or return request does not belong to any organization| |100101|The shopper profile does not belong to organization passed in the header| |28390|The following item(s) are no longer for sale [ItemName]. Order cannot be approved.|
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