returnRequestValidationForNonPCITargets

post

/ccadmin/v1/webhook/returnRequestValidationForNonPCITargets

This webhook is called to validate the return request. The webhook will be called whenever the system needs to determine that the exchange/return is valid. The payload does not include payment details.

Request

Supported Media Types
Body ()
This webhook is triggered to external systems wherever we need to test whether an order is valid for return. The payload does not include payment details.
Root Schema : returnRequestValidationForNonPCITargets_request
Type: object
This webhook is triggered to external systems wherever we need to test whether an order is valid for return. The payload does not include payment details.
Show Source
Example:
{
    "context":"Initiate_Return",
    "returnRequests":[
        {
            "returnItemList":[
                {
                    "quantityToReturn":0,
                    "commerceItemId":"ci3000416",
                    "quantityAvailable":20,
                    "quantityShipped":20,
                    "productId":"Product_27Fxyzii",
                    "nonreturnable":true,
                    "returnReason":null,
                    "shippingGroupId":"sg40414",
                    "catalogRefId":"Sku_27Gxyzii",
                    "nonReturnableReason":"This is a non-returnable item."
                },
                {
                    "quantityToReturn":0,
                    "commerceItemId":"ci3000417",
                    "quantityAvailable":15,
                    "quantityShipped":20,
                    "productId":"Product_36Exy",
                    "nonreturnable":false,
                    "returnReason":null,
                    "shippingGroupId":"sg40414",
                    "catalogRefId":"Sku_36Fxy",
                    "nonReturnableReason":null
                }
            ],
            "order":{
                "approverIds":[
                ],
                "gwp":false,
                "secondaryCurrencyCode":null,
                "lastModifiedTime":1.513930292E12,
                "priceGroupId":"defaultPriceGroup",
                "creationTime":1.50390023E12,
                "sourceSystem":"Cloud Commerce",
                "gwpMarkers":[
                ],
                "salesChannel":"default",
                "submittedDate":"2017-08-28T06:03:51.000Z",
                "locale":"en",
                "paymentGroups":[
                    {
                        "PONumber":"857",
                        "amountAuthorized":1052.56,
                        "amount":1052.56,
                        "paymentMethod":"invoiceRequest",
                        "billingAddress":{
                            "lastName":"Anderson",
                            "country":"US",
                            "firstName":"Kim",
                            "phoneNumber":"212-555-1977",
                            "address2":null,
                            "city":"Syracuse",
                            "address1":"21 Cedar Ave",
                            "postalCode":"13202",
                            "state":"NY",
                            "email":"kim@example.com"
                        },
                        "state":10,
                        "id":"pg30416",
                        "currencyCode":"USD"
                    }
                ],
                "configuratorId":null,
                "organizationId":null,
                "relationships":[
                    {
                        "paymentGroupId":"pg30416",
                        "amount":1052.56,
                        "relationshipType":"ORDERAMOUNTREMAINING",
                        "id":"r40399"
                    }
                ],
                "priceInfo":{
                    "amount":939.6,
                    "total":1052.56,
                    "shipping":35,
                    "discountAmount":0,
                    "tax":77.96,
                    "rawSubtotal":939.6,
                    "currencyCode":"USD"
                },
                "catalogId":null,
                "exchangeRate":null,
                "totalCommerceItemCount":35,
                "id":"o30411",
                "state":"NO_PENDING_ACTION",
                "externalContext":false,
                "quoteInfo":null,
                "taxCalculated":true,
                "commerceItems":[
                    {
                        "priceInfo":{
                            "amount":499.8,
                            "currencyCode":"USD"
                        },
                        "quantity":20,
                        "productId":"Product_27Fxyzii",
                        "productDisplayName":"Sky Blue",
                        "id":"ci3000416",
                        "catalogRefId":"Sku_27Gxyzii"
                    },
                    {
                        "priceInfo":{
                            "amount":439.8,
                            "currencyCode":"USD"
                        },
                        "quantity":15,
                        "productId":"Product_36Exy",
                        "productDisplayName":"The Girl with the Dragon Tattoo",
                        "id":"ci3000417",
                        "catalogRefId":"Sku_36Fxy"
                    }
                ],
                "taxPriceInfo":{
                    "secondaryCurrencyTaxAmount":0,
                    "cityTax":0,
                    "valueAddedTax":0,
                    "amount":77.96,
                    "countyTax":38.98,
                    "isTaxIncluded":false,
                    "miscTax":0,
                    "districtTax":0,
                    "stateTax":38.98,
                    "miscTaxInfo":{
                    },
                    "currencyCode":"USD",
                    "countryTax":0
                },
                "freezeDate":null,
                "shippingGroups":[
                    {
                        "lastName":"Anderson",
                        "shippingMethod":"inStorePickupShippingGroup",
                        "description":"sg40492",
                        "submittedDate":null,
                        "firstName":"Kim",
                        "priceInfo":{
                            "secondaryCurrencyTaxAmount":0.68,
                            "discounted":false,
                            "shippingTax":1.7,
                            "secondaryCurrencyShippingAmount":8.4,
                            "amount":21,
                            "rawShipping":11,
                            "amountIsFinal":false,
                            "currencyCode":"L10174"
                        },
                        "phoneNumber":"212-555-1977",
                        "shipOnDate":null,
                        "actualShipDate":null,
                        "specialInstructions":{
                        },
                        "commerceItemRelationships":[
                            {
                                "availablePickupDate":"2018-05-19T13:00:00.000Z",
                                "commerceItemId":"ci3000500",
                                "inventoryLocationId":"SiteUS-GlenAllen186",
                                "amount":0,
                                "quantity":1,
                                "relationshipType":"SHIPPINGQUANTITY",
                                "returnedQuantity":0,
                                "preferredPickupDate":"2018-05-19T13:00:00.000Z",
                                "range":{
                                    "lowBound":0,
                                    "highBound":0,
                                    "size":1
                                },
                                "commerceItemExternalId":null,
                                "state":"INITIAL",
                                "id":"r40526"
                            }
                        ],
                        "state":"INITIAL",
                        "id":"sg40492",
                        "stateDetail":null,
                        "trackingNumber":null,
                        "email":"kim@example.com",
                        "handlingInstructions":[
                        ],
                        "shippingGroupClassType":"inStorePickupShippingGroup"
                    }
                ],
                "taxExempt":false,
                "profile":{
                    "lastName":"Anderson",
                    "firstName":"Kim",
                    "loyaltyPrograms":[
                    ],
                    "shippingAddress":{
                        "country":"US",
                        "phoneNumber":"212-555-1977",
                        "address3":null,
                        "address2":null,
                        "city":"Syracuse",
                        "address1":"21 Cedar Ave",
                        "postalCode":"13202",
                        "county":null,
                        "state":"NY"
                    },
                    "middleName":null,
                    "parentOrganization":null,
                    "email":"kim@example.com"
                },
                "approverMessages":[
                ],
                "paymentInitiatedEmailSent":false,
                "shippingGroupCount":1,
                "taxExemptionCode":null,
                "paymentGroupCount":1,
                "site":{
                    "productionURL":null,
                    "name":"Commerce Cloud Site",
                    "id":"siteUS"
                },
                "recurringChargePriceInfo":null,
                "profileId":"se-570031",
                "organization":null,
                "siteId":"siteUS",
                "activeQuoteOrderId":null
            }
        }
    ]
}
Nested Schema : agentProfile
Type: object
Show Source
Nested Schema : returnRequests
Type: array
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : order
Type: object
Show Source
Nested Schema : returnItemList
Type: array
Show Source
Nested Schema : discountInfo
Type: object
The discount information.
Show Source
Nested Schema : dynamicProperties
Type: array
the value of the dynamic Properties
Show Source
Nested Schema : giftWithPurchaseInfo
Type: array
Show Source
Nested Schema : giftWithPurchaseOrderMarkers
Type: array
Show Source
Nested Schema : paymentGroups
Type: array
Show Source
Nested Schema : priceInfo
Type: object
Show Source
Nested Schema : pricingMessages
Type: object
Nested Schema : profile
Type: object
Basic profile information.
Show Source
Nested Schema : recurringChargePriceInfo
Type: object
Recurring charge price information.
Show Source
Nested Schema : relationships
Type: array
Show Source
Nested Schema : shippingAddress
Type: object
Default shipping address of the profile
Show Source
Nested Schema : shippingGroups
Type: array
Shipping groups represent shipments and include commerceItemRelationships that represent which commerce items in what quantity are included in the shipment. Shipping groups in a request are matched to existing shipping groups by id, followed by description, followed by (for hardgoodShippingGroups) shippingMethod + address. Depending on the shippingMethod i.e. hardgoodShippingGroups, inStorePickupShippingGroup different proporties will be defined with shippingGroups.
Show Source
Nested Schema : shoppingCart
Type: object
Show Source
Nested Schema : site
Type: object
Site information
Show Source
Nested Schema : taxPriceInfo
Type: object
Show Source
Nested Schema : orderCouponsMap
Type: array
The list of all the coupons with the order.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Show Source
Nested Schema : items
Type: object
Nested Schema : items
Type: object
Show Source
Nested Schema : billingAddress
Type: object
Show Source
Nested Schema : loyaltyPrograms
Type: array
Loyalty Programs Information
Show Source
Nested Schema : parentOrganization
Type: object
Parent Organization.
Show Source
Nested Schema : shippingAddress
Type: object
Default shipping address
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: object
Show Source
Nested Schema : commerceItemRelationships
Type: array
The commerce item relationships are instances of ShippingGroupCommerceItemRelationship that represent how many of which commerce items are included in the order. Please see caution in description of update order. Existing commerce items relationships are matched to input data by id, followed by commerceItemId, followed by commerceItemExternalId.
Show Source
Nested Schema : handlingInstructions
Type: array
Handling instructions. Currently read-only.
Show Source
Nested Schema : priceInfo
Type: object
The pricing details about this shipping group.
Show Source
Nested Schema : recurringChargePriceInfo
Type: object
Recurring charge price information.
Show Source
Nested Schema : shippingAddress
Type: object
The shipping address for this shipping group.
Show Source
Nested Schema : specialInstructions
Type: array
Special instructions for the shipping group. Keys and values are strings.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : externalData
Type: array
External data to be associated with a commerce item, provided by a third party system.
Show Source
Nested Schema : range
Type: object
The range covered by these commerce items
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : values
Type: object
The map values associated with an externalData item.
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
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : detailedItemPriceInfo
Type: array
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
List of dynamic properties at line item level.
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 : items
Type: object
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 : returnRequestValidationForNonPCITargets_response
Type: object
Response contains returnability and quantity available to return in external system
Show Source
Example:
{
    "context":"Initiate_Return",
    "returnRequests":[
        {
            "returnLabel":"a5445afg5",
            "orderId":"o30411",
            "nonreturnable":false,
            "rma":"12345",
            "additionalProperties":{
                "name2":"value2",
                "name1":"value1"
            },
            "returnItemList":[
                {
                    "commerceItemId":"ci3000416",
                    "quantityAvailable":1,
                    "productId":"Product_27Fxyzii",
                    "nonreturnable":true,
                    "shippingGroupId":"sg40414",
                    "additionalProperties":{
                        "name2":"value2",
                        "name1":"value1"
                    },
                    "nonReturnableReason":"This is a returnable item"
                },
                {
                    "commerceItemId":"ci3000417",
                    "quantityAvailable":1,
                    "productId":"Product_36Exy",
                    "nonreturnable":false,
                    "shippingGroupId":"sg40414",
                    "additionalProperties":{
                        "name2":"value2",
                        "name1":"value1"
                    },
                    "nonReturnableReason":"This is a returnable item"
                }
            ],
            "trackingNumber":"1234567890",
            "nonReturnableReason":"Order exceeded no of days"
        }
    ]
}
Nested Schema : returnRequests
Type: array
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : additionalProperties
Type: object
Additional key value pairs if any
Nested Schema : returnItemList
Type: array
Show Source
Nested Schema : items
Type: object
Show Source
Back to Top