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 : approvers
Type: array
List of approvers of the organization.
Show Source
Nested Schema : discountInfo
Type: object
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
Gift Selection Information
Show Source
Nested Schema : giftWithPurchaseOrderMarkers
Type: array
Gift With Purchase order markers information
Show Source
Nested Schema : markers
Type: array
Order markers
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.
Show Source
Nested Schema : priceInfo
Type: object
The price information.
Show Source
  • The total order amount.
  • The currency code.
  • An order can be paid in points and monetary currency. This field represent order value which will be paid in points. It includes items amount, item discount, order discount. Prerequisites for the value in this Attribute: 1. PriceList configured for the site is in custom currency. 2. payTaxInSecondaryCurrency and payShippingInSecondaryCurrency flags are enabled.
  • This field represents the shipping amount, shipping discount and shipping surcharge in monetary Currency. Prerequisites for the value in this Attribute: 1. PriceList configured for the site is in custom currency. 2. payTaxInSecondaryCurrency and payShippingInSecondaryCurrency flags are enabled.
  • The shipping surcharges added at item level in monetary currency.
  • "This field represents the total tax(Item Tax and Shipping Tax) of the order in Monetary Currency. Prerequisites for the value in this Attribute: Prerequisites for the value in this Attribute: 1. PriceList configured for the site is in custom currency. 2. payTaxInSecondaryCurrency and payShippingInSecondaryCurrency flags are enabled. 3. If the tax is included in the price of the item, then this value represents only shipping tax in monetary currency.
  • An order can be paid in points and monetary currency. This field represent order value which will be paid in monetary currency. It includes shipping charges, shipping surcharges, shipping discount and total tax in monetary currency. Prerequisites for the value in this Attribute: 1. PriceList configured for the site is in custom currency. 2. payTaxInSecondaryCurrency and payShippingInSecondaryCurrency flags are enabled. 3. If the tax is included in the price of the item, then this value represents only shipping tax in monetary currency.
  • The total shipping cost.
  • Extra handling costs for shipping the products.
  • Sub-total.
  • The total tax amount.
  • Total excluding shipping and tax in monetary currency
  • The order total.
Nested Schema : priceListGroup
Type: object
PriceList group of the order.
Show Source
Nested Schema : pricingMessages
Type: object
The Pricing messages information.
Show Source
Nested Schema : profile
Type: object
Profile Information for the order.
Show Source
Nested Schema : returnRequests
Type: array
The list of the requests raised for the order.
Show Source
Nested Schema : shippingAddress
Type: object
Shipping address.
Show Source
Nested Schema : shippingGroups
Type: array
Shipping Group Information
Show Source
Nested Schema : shippingMethod
Type: object
Shipping method information.
Show Source
Nested Schema : shoppingCart
Type: object
Shopping cart information.
Show Source
Nested Schema : submissionErrorCodes
Type: array
Set of error codes recorded during each unsuccessful retry of queued orders.
Show Source
Nested Schema : submissionErrorMessages
Type: array
List of failure reasons recorded during each unsuccessful retry of queued orders.
Show Source
Nested Schema : submissionProgress
Type: array
Checkpoints crossed successfully during each unsuccessful retry of queued orders.
Show Source
Nested Schema : taxPriceInfo
Type: object
The tax pricing details 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: object
The coupons that were claimed.
Show Source
Nested Schema : orderImplicitDiscountList
Type: array
List of discounts.
Show Source
Nested Schema : unclaimedCouponMultiPromotions
Type: object
The coupons that were not claimed
Show Source
Nested Schema : unclaimedCouponsMap
Type: array
Map of unclaimed coupons.
Show Source
Nested Schema : couponCode
Type: array
Coupon Code, corresponding to which promotions were applied
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : couponCode
Type: object
Coupon Code.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : couponCode
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 : couponInfo
Type: array
The coupon Info.
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
  • The quantity of free sku for this gift selection that has already been auto added to the order.
  • Flag to indicate whether free gifts should be auto removed if the promotion no longer qualifies.
  • Gift hash code to track which gift selection in the promotion this is. It allows the commerce item marker to link to this one.
  • The amount of automatic free quantity that failed to be added to the cart due to some pricing error, e.g. invalid site..
  • String identifying the free gift, usually the repository id of the gift type.
  • The type of gift like sku, product, category, skuContentGroup or productContentGroup.
  • atg.gwp.
  • The total quantity of sku for this gift selection.
  • The amount of free quantity that has since been manually removed by a Shopper.
  • The repository id of the gwp order marker.
  • The quantity of free sku for this gift selection that has already been selected by the Shopper and added to the order.
  • The quantity of free sku for this gift selection that has already been targeted and made free by the calculator in the order.
  • The GWP promotion id.
Nested Schema : items
Type: object
Show Source
  • Order marker key. In a marketing campaign marker, key signifies that it is a campaign marker and it also identifies the external marketing system that is the source of the campaign, e.g., campaign_eloqua
  • Order marker value. In a marketing campaign marker, value holds the marketing system's unique campaign ID.
Nested Schema : items
Type: object
Show Source
Nested Schema : billingAddress
Type: object
Billing address for the order.
Show Source
Nested Schema : currency
Type: object
Currency of the PriceList group.
Show Source
Nested Schema : GiftWithPurchaseMessages
Type: array
The GWP 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 : organization
Type: object
The Organization associated with the B2B customer profile.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: array
Items in the cart.
Show Source
Nested Schema : shippingAddress
Type: object
shipping address for the order.
Show Source
Nested Schema : shippingMethod
Type: object
Shipping method information.
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 : trackingInfo
Type: array
Tracking Information for the Order.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : skuProperties
Type: array
Sku properties Information
Show Source
Nested Schema : variant
Type: array
Product Variant 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 : items
Type: array
Items in the cart.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : childItems
Type: array
Child items of the commerce item
Show Source
Nested Schema : discountInfo
Type: object
Discount information.
Show Source
Nested Schema : giftWithPurchaseCommerceItemMarkers
Type: array
The array of giftWithPurchaseCommerceItemMarkers.
Show Source
Nested Schema : imageInfo
Type: object
Shipping method information.
Show Source
Nested Schema : priceOverrideReason
Type: object
Price override reason map.
Show Source
Nested Schema : skuProperties
Type: array
Sku properties Information
Show Source
Nested Schema : variant
Type: array
Product Variant Information.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : childItems
Type: array
Child items of the commerce item
Show Source
Nested Schema : selectedOptions
Type: array
Child Product Variant Information.
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 : selectedOptions
Type: array
Child Product Variant Information.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : orderCouponsMap
Type: object
The coupons that were claimed.
Show Source
Nested Schema : orderImplicitDiscountList
Type: array
List of discounts.
Show Source
Nested Schema : unclaimedCouponsMap
Type: array
Map of unclaimed coupons.
Show Source
Nested Schema : couponCode
Type: object
Coupon Code.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : couponInfo
Type: array
The coupon Info.
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
Example Response (application/json)
{
    "gwp":false,
    "lastModifiedTime":"1488091242000",
    "priceGroupId":"defaultPriceGroup",
    "creationTime":"1488090529000",
    "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":{
            },
            "locationId":"SiteUS-GlenAllen187",
            "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",
    "markers":[
    ],
    "activeQuoteOrderId":null
}

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| |------------------|------------------| |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