rejectOrder

post

/ccagent/v1/orders/reject

Reject Order. Approver rejects 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
  • application/json
Header Parameters
X-CCOrganization
Type: string
the organization Id in which order should be created
X-CCSite
Type: string
the site Id in which order should be created
Body Parameter
Root Schema : rejectOrder_request

Response

Supported Media Types
  • application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : rejectOrder_response
Nested Schema : approvalSystemMessages
Type: array
An array of approval messages when order going in pending approval state
Nested Schema : approverMessages
Type: array
An array of approval messages when approver approving order
Nested Schema : approvers
Type: array
List of approvers of the organization.
Nested Schema : billingAddress
Type: object
The billing address details.
Nested Schema : discountInfo
Type: object
The discount information.
Nested Schema : dynamicProperties
Type: array
Read-only list of dynamic properties for the order along with meta-data.
Nested Schema : giftWithPurchaseInfo
Type: array
The gift information.
Nested Schema : giftWithPurchaseOrderMarkers
Type: array
gift with purchase order marker information
Nested Schema : payments
Type: array
Payment details for the order, including additional properties specific to the payment type.
Nested Schema : priceInfo
Type: object
The price information.
Nested Schema : priceListGroup
Type: object
The price list group object.
Nested Schema : quoteInfo
Type: object
the quote information of the order
Nested Schema : recurringChargePriceInfo
Type: object
Recurring charge price information.
Nested Schema : scheduledOrder
Type: array
schedule order information
Nested Schema : shippingAddress
Type: object
The shipping address details.
Nested Schema : shippingGroups
Type: array
The shipping groups for the order.
Nested Schema : shippingMethod
Type: object
The shipping method details for the order.
Nested Schema : shoppingCart/order
Type: object
The shopping-cart or order contents of the current order.
Nested Schema : trackingInfo
Type: array
Tracking Information for the Order.
Nested Schema : items
Type: object
Nested Schema : claimedCouponMultiPromotions
Type: object
The coupons that were claimed
Nested Schema : orderCouponsMap
Type: array
The list of all the coupons with the order.
Nested Schema : orderImplicitDiscountList
Type: array
The implicit order discounts with the order.
Nested Schema : unclaimedCouponMultiPromotions
Type: object
The coupons that were not claimed
Nested Schema : unclaimedCouponsMap
Type: object
The unclaimed coupons with the order.
Nested Schema : coupon code
Type: array
Coupon Code, corresponding to which promotions were applied
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : coupon code
Type: array
Coupon Code, corresponding to which some promotions were not applied
Nested Schema : items
Type: object
Nested Schema : coupon code
Type: array
Coupon Code, corresponding to which some promotions were not applied
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : errorInfo
Type: array
the array of errors, if any
Nested Schema : notes
Type: array
the notes (history) for the order
Nested Schema : items
Type: object
Nested Schema : frequencyAmountTotals
Type: array
The total for each recurring charge frequency
Nested Schema : frequencyTaxTotals
Type: array
The tax for each recurring charge frequency
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : clonedOrders
Type: array
list of orders that is created using this as template.
Nested Schema : executionStatusList
Type: array
list of orders with status that are placed with this schedule.
Nested Schema : lastError
Type: object
last error of this scheduled order.
Nested Schema : schedule
Type: object
schedule details for the schedule.
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : errorMessages
Type: array
The error messages list.
Nested Schema : errorMessages
Type: array
An array of error messages
Nested Schema : daysInMonth
Type: array
mention which days of Month schedule should run. values can be 1 to 31.
Nested Schema : daysOfWeek
Type: array
mention which days of week schedule should run. values can be 1 to 7.
Nested Schema : monthsInYear
Type: array
The months in year of the Scheduled order. Values can be 0 to 11.
Nested Schema : weeksInMonth
Type: array
The weeks in month of the Scheduled order.Values can be 1 to 5
Nested Schema : items
Type: object
Nested Schema : discountInfo
Type: object
The shipping group price information.
Nested Schema : items
Type: array
The array of products in the shipping group.
Nested Schema : priceInfo
Type: object
The shipping group price information.
Nested Schema : recurringChargePriceInfo
Type: object
Recurring charge price information.
Nested Schema : shippingAddress
Type: object
The shipping address details.
Nested Schema : shippingMethod
Type: object
The shipping method details.
Nested Schema : taxPriceInfo
Type: object
The shipping tax price info details.
Nested Schema : discountDescList
Type: array
The list of all the order discounts.
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : detailedItemPriceInfo
Type: object
Detailed Item Price Information.
Nested Schema : detailedRecurringChargeInfo
Type: object
Detailed Item Price Information.
Nested Schema : dynamicProperties
Type: array
Array of custom properties at order line item level.
Nested Schema : variant
Type: array
List of variants for the product.
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : frequencyAmountTotals
Type: array
The total for each recurring charge frequency
Nested Schema : frequencyTaxTotals
Type: array
The tax for each recurring charge frequency
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : items
Type: array
The array of products in the shopping cart.
Nested Schema : items
Type: object
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 child item array if it is a configurable product in itself.
Nested Schema : detailedRecurringChargeInfo
Type: object
Detailed Item Price Information.
Nested Schema : discountInfo
Type: array
The discount information.
Nested Schema : dynamicProperties
Type: array
Array of custom properties at order line item level.
Nested Schema : giftWithPurchaseCommerceItemMarkers
Type: array
The array of giftWithPurchaseCommerceItemMarkers.
Nested Schema : variant
Type: array
List of variants for the product.
Nested Schema : items
Type: object
Nested Schema : detailedRecurringChargeInfo
Type: object
Detailed Item Price Information.
Nested Schema : externalData
Type: array
External data to be associated with a commerce item, provided by a configurator system.
Nested Schema : items
Type: object
Nested Schema : values
Type: object
The array of values associated with an externalData item.
Nested Schema : items
Type: object
Nested Schema : giftWithPurchaseDiscountInfo
Type: array
The gift information.
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Example 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"
    },
    "totalCommerceItemCount":1,
    "id":"o40411",
    "state":"FAILED_APPROVAL",
    "quoteInfo":null,
    "taxCalculated":true,
    "commerceItems":[
        {
            "serviceAccountId":"serviceAcc-123",
            "deactivationDate":"2018-06-27T12:59:59Z",
            "quantity":1,
            "productId":"prod10015",
            "returnedQuantity":0,
            "externalId":null,
            "externalData":[
            ],
            "billingAccountId":"billingAcc-123",
            "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
            },
            "customerAccountId":"customerAcc-123",
            "catalogId":null,
            "assetId":"asset10001",
            "lineAttributes":[
            ],
            "catalogKey":null,
            "productDisplayName":"Playstation 3",
            "externalPriceDetails":null,
            "actionCode":"Add",
            "id":"ci4000413",
            "activationDate":"2017-06-27T15:30:00Z",
            "serviceId":"service-123"
        }
    ],
    "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",
                    "amount":0,
                    "quantity":1,
                    "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",
    "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,
    "paymentGroupCount":1,
    "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|
Body
Root Schema : errorModel
Type: object
Nested Schema : errors
Type: array
An optional list of errors if multiple errors were encountered
Nested Schema : items
Type: object

Examples

Sample Request:

{
  "approverMessage": "Rejecting order",
  "orderId": "o40411"
}

Sample Response Payload returned by endpoint:

{
  "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"
  },
  "totalCommerceItemCount": 1,
  "id": "o40411",
  "state": "FAILED_APPROVAL",
  "quoteInfo": null,
  "taxCalculated": true,
  "commerceItems": [{
    "serviceAccountId": "serviceAcc-123",
    "deactivationDate": "2018-06-27T12:59:59Z",
    "quantity": 1,
    "productId": "prod10015",
    "returnedQuantity": 0,
    "externalId": null,
    "externalData": [],
    "billingAccountId": "billingAcc-123",
    "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
    },
    "customerAccountId": "customerAcc-123",
    "catalogId": null,
    "assetId": "asset10001",
    "lineAttributes": [],
    "catalogKey": null,
    "productDisplayName": "Playstation 3",
    "externalPriceDetails": null,
    "actionCode": "Add",
    "id": "ci4000413",
    "activationDate": "2017-06-27T15:30:00Z",
    "serviceId": "service-123"
  }],
  "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",
      "amount": 0,
      "quantity": 1,
      "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",
  "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,
  "paymentGroupCount": 1,
  "profileId": "bb-110023",
  "siteId": "siteUS",
  "activeQuoteOrderId": null
}