POST api/DeleteOnHoldOrder_V1

Delete OnHold Orders

Request Information

URI Parameters

None.

Body Parameters

Delete Order Request

WS_Repository.Models.Requests.Hold.DeleteOrderRequest
NameDescriptionTypeAdditional information
WS_Key

(Mandatory) Webservice Key provided by 2ship support

string

None.

OrderNumber

(Optional) Mandatory if DeleteType = ByOrderNumber

string

None.

ShipmentId

(Optional) Mandatory if DeleteType = ByShipmentId

integer

None.

DateStart

get by date - DateStart

date

None.

DateEnd

get by date - DateEnd

date

None.

DeleteType

(Mandatory) this element is desired to know how to lookup the onhold order that you wish to delete

WS_Repository.Models.Requests.Hold.DeleteOrderType

None.

Request Formats

application/json, text/json

Sample:
{
  "WS_Key": "sample string 1",
  "OrderNumber": "sample string 2",
  "ShipmentId": 3,
  "DateStart": "2020-07-05T12:40:17.1404525Z",
  "DateEnd": "2020-07-05T12:40:17.1404525Z",
  "DeleteType": 0
}

application/xml, text/xml

Sample:
<DeleteOrderRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Requests.Hold">
  <DateEnd>2020-07-05T12:40:17.1404525Z</DateEnd>
  <DateStart>2020-07-05T12:40:17.1404525Z</DateStart>
  <DeleteType>ByShipmentId</DeleteType>
  <OrderNumber>sample string 2</OrderNumber>
  <ShipmentId>3</ShipmentId>
  <WS_Key>sample string 1</WS_Key>
</DeleteOrderRequest>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'System.Web.Http.ModelBinding.JQueryMvcFormUrlEncodedFormatter' to write type 'WS_Repository.Models.Requests.Hold.DeleteOrderRequest'.

Response Information

Resource Description

Delete Order Response

WS_Repository.Models.Responses.Hold.DeleteOrderResponse
NameDescriptionTypeAdditional information
DeletedOrders

Array deleted Orders

Collection of WS_Repository.Models.Responses.Hold.DeleteOrderInfo

None.

Response Formats

application/json, text/json

Sample:
{
  "DeletedOrders": [
    {
      "ShipmentId": 1,
      "OrderNumber": "sample string 2"
    },
    {
      "ShipmentId": 1,
      "OrderNumber": "sample string 2"
    }
  ]
}

application/xml, text/xml

Sample:
<DeleteOrderResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Responses.Hold">
  <DeletedOrders>
    <DeleteOrderInfo>
      <OrderNumber>sample string 2</OrderNumber>
      <ShipmentId>1</ShipmentId>
    </DeleteOrderInfo>
    <DeleteOrderInfo>
      <OrderNumber>sample string 2</OrderNumber>
      <ShipmentId>1</ShipmentId>
    </DeleteOrderInfo>
  </DeletedOrders>
</DeleteOrderResponse>