POST api/order/Order/ReturnOrder?fromOrderId={fromOrderId}

Allows for the creation of a new return order for the given order identifier.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
fromOrderId

The order that is desired to create a return order from.

integer

Required

Body Parameters

CreateReturnOrderViewModel
NameDescriptionTypeAdditional information
OrderDate

Order Date of the return order.

date

None.

ReasonCodeTypeID

Reason code type identifier. This must be associated to a reason code type that is within the "Orders > Returns" reason area.

integer

None.

Explanation

Explanation of reason of return order.

string

None.

ShippingChargeType

When Original is used it will generated an return order with shipping charges found in the given order. When PercentageOfOriginal is used then you need to provide the percentage of the shipping to be returned at ShippingChargeValue field. Use a value from 0 to 100. When SpecificValue is used you need to provide the specific value of the shipping being returned at ShippingChargeValue field. When AutomaticallyRecalculate is used ShippingChargeValue is ignored.

ShippingAndHandlingChargeType

None.

HandlingChargeType

When Original is used it will generated an return order with handling charges found in the given order. When PercentageOfOriginal is used then you need to provide the percentage of the handling fee to be returned at HandlingChargeValue field. Use a value from 0 to 100. When SpecificValue is used you need to provide the specific value of the handling fee being returned at HandlingChargeValue field. When AutomaticallyRecalculate is used HandlingChargeValue is ignored.

ShippingAndHandlingChargeType

None.

ShippingChargeValue

Value to be used based on value at ShippingChargeType field. Default is 0.

decimal number

None.

ShippingTaxValue

Value to be used based on value at ShippingChargeType field. Default is 0.

decimal number

None.

HandlingChargeValue

Value to be used based on value at HandlingChargeType field. Default is 0.

decimal number

None.

HandlingTaxValue

Value to be used based on value at HandlingChargeType field. Default is 0.

decimal number

None.

ReturnItemList

The list of products from the order that need to be returned. Optional. If this is not set it will generate a return order with all the items of the original order.

Collection of ReturnItemViewModel

None.

Request Formats

application/xml, text/xml

Sample:
<CreateReturnOrderViewModel>
  <OrderDate>01/09/2025 01:28:01</OrderDate>
  <ReasonCodeTypeID>2</ReasonCodeTypeID>
  <Explanation>sample string 3</Explanation>
  <ShippingChargeType>Original</ShippingChargeType>
  <HandlingChargeType>Original</HandlingChargeType>
  <ShippingChargeValue>4</ShippingChargeValue>
  <ShippingTaxValue>5</ShippingTaxValue>
  <HandlingChargeValue>6</HandlingChargeValue>
  <HandlingTaxValue>7</HandlingTaxValue>
  <ReturnItemList>
    <ReturnItemViewModel>
      <Quantity>1</Quantity>
      <OrderDetailID>1</OrderDetailID>
      <ProductID>sample string 2</ProductID>
      <PriceTaxFields>
        <Price>1</Price>
        <TaxableAmount>2</TaxableAmount>
        <Tax>1</Tax>
      </PriceTaxFields>
      <VolumeFields>
        <Volume>1</Volume>
        <Volume2>2</Volume2>
        <Volume3>3</Volume3>
        <Volume4>4</Volume4>
      </VolumeFields>
      <OtherPriceFields>
        <OtherPrice>1</OtherPrice>
        <OtherPrice2>2</OtherPrice2>
        <OtherPrice3>3</OtherPrice3>
        <OtherPrice4>4</OtherPrice4>
      </OtherPriceFields>
    </ReturnItemViewModel>
    <ReturnItemViewModel>
      <Quantity>1</Quantity>
      <OrderDetailID>1</OrderDetailID>
      <ProductID>sample string 2</ProductID>
      <PriceTaxFields>
        <Price>1</Price>
        <TaxableAmount>2</TaxableAmount>
        <Tax>1</Tax>
      </PriceTaxFields>
      <VolumeFields>
        <Volume>1</Volume>
        <Volume2>2</Volume2>
        <Volume3>3</Volume3>
        <Volume4>4</Volume4>
      </VolumeFields>
      <OtherPriceFields>
        <OtherPrice>1</OtherPrice>
        <OtherPrice2>2</OtherPrice2>
        <OtherPrice3>3</OtherPrice3>
        <OtherPrice4>4</OtherPrice4>
      </OtherPriceFields>
    </ReturnItemViewModel>
  </ReturnItemList>
</CreateReturnOrderViewModel>

application/json, text/json

Sample:
{
  "OrderDate": "2025-01-09T01:28:01.5479403-05:00",
  "ReasonCodeTypeID": 2,
  "Explanation": "sample string 3",
  "ShippingChargeType": 0,
  "HandlingChargeType": 0,
  "ShippingChargeValue": 4.0,
  "ShippingTaxValue": 5.0,
  "HandlingChargeValue": 6.0,
  "HandlingTaxValue": 7.0,
  "ReturnItemList": [
    {
      "Quantity": 1,
      "OrderDetailID": 1,
      "ProductID": "sample string 2",
      "PriceTaxFields": {
        "Price": 1.0,
        "TaxableAmount": 2.0,
        "Tax": 1.0
      },
      "VolumeFields": {
        "Volume": 1.0,
        "Volume2": 2.0,
        "Volume3": 3.0,
        "Volume4": 4.0
      },
      "OtherPriceFields": {
        "OtherPrice": 1.0,
        "OtherPrice2": 2.0,
        "OtherPrice3": 3.0,
        "OtherPrice4": 4.0
      }
    },
    {
      "Quantity": 1,
      "OrderDetailID": 1,
      "ProductID": "sample string 2",
      "PriceTaxFields": {
        "Price": 1.0,
        "TaxableAmount": 2.0,
        "Tax": 1.0
      },
      "VolumeFields": {
        "Volume": 1.0,
        "Volume2": 2.0,
        "Volume3": 3.0,
        "Volume4": 4.0
      },
      "OtherPriceFields": {
        "OtherPrice": 1.0,
        "OtherPrice2": 2.0,
        "OtherPrice3": 3.0,
        "OtherPrice4": 4.0
      }
    }
  ]
}

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'FormUrlEncodedFormatter' to write type 'CreateReturnOrderViewModel'.

Response Information

Resource Description

ApiResultOfOrderSummaryViewModel
NameDescriptionTypeAdditional information
Result

OrderSummaryViewModel

None.

IsSuccessful

boolean

None.

MessageTranslationKey

string

None.

Message

string

None.

Messages

Collection of ApiResultMessage

None.

Response Formats

application/xml, text/xml, application/json, text/json

Sample:

Sample not available.