POST api/UpdateOnHoldOrder_V1

Update OnHold Orders

Request Information

URI Parameters

None.

Body Parameters

Update Order Request

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

(Mandatory) Webservice Key provided by 2ship support

string

None.

OrderNumber

(Optional) Mandatory if FindBy = ByOrderNumber

string

None.

ShipmentId

(Optional) Mandatory if FindBy = ByShipmentId

integer

None.

FindBy

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

WS_Repository.Models.Requests.Hold.FindOrderType

None.

DataToBeUpdated

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

WS_Repository.Models.Requests.Hold.UpdateOrderInfo

None.

Request Formats

application/json, text/json

Sample:
{
  "WS_Key": "sample string 1",
  "OrderNumber": "sample string 2",
  "ShipmentId": 3,
  "FindBy": 0,
  "DataToBeUpdated": {
    "UpdateCarrierAndService": true,
    "CarrierAndServiceInfo": {
      "CarrierId": 1,
      "ServiceCode": "sample string 2"
    },
    "UpdateShipToLockerOrLocation": true,
    "ShipToLocationLockerInfo": {
      "Id": "sample string 1",
      "Postal": "sample string 2",
      "City": "sample string 3",
      "State": "sample string 4",
      "Country": "sample string 5",
      "Address1": "sample string 6",
      "Address2": "sample string 7",
      "Address3": "sample string 8",
      "Name": "sample string 9",
      "LocationType": 0,
      "LocationTypeDescription": "sample string 10"
    }
  }
}

application/xml, text/xml

Sample:
<UpdateOrderRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Requests.Hold">
  <DataToBeUpdated>
    <CarrierAndServiceInfo>
      <CarrierId>1</CarrierId>
      <ServiceCode>sample string 2</ServiceCode>
    </CarrierAndServiceInfo>
    <ShipToLocationLockerInfo xmlns:d3p1="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Common">
      <d3p1:Address1>sample string 6</d3p1:Address1>
      <d3p1:Address2>sample string 7</d3p1:Address2>
      <d3p1:Address3>sample string 8</d3p1:Address3>
      <d3p1:City>sample string 3</d3p1:City>
      <d3p1:Country>sample string 5</d3p1:Country>
      <d3p1:Id>sample string 1</d3p1:Id>
      <d3p1:LocationType>Unknown</d3p1:LocationType>
      <d3p1:LocationTypeDescription>sample string 10</d3p1:LocationTypeDescription>
      <d3p1:Name>sample string 9</d3p1:Name>
      <d3p1:Postal>sample string 2</d3p1:Postal>
      <d3p1:State>sample string 4</d3p1:State>
    </ShipToLocationLockerInfo>
    <UpdateCarrierAndService>true</UpdateCarrierAndService>
    <UpdateShipToLockerOrLocation>true</UpdateShipToLockerOrLocation>
  </DataToBeUpdated>
  <FindBy>ByShipmentId</FindBy>
  <OrderNumber>sample string 2</OrderNumber>
  <ShipmentId>3</ShipmentId>
  <WS_Key>sample string 1</WS_Key>
</UpdateOrderRequest>

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.UpdateOrderRequest'.

Response Information

Resource Description

Update Order Response

WS_Repository.Models.Responses.Hold.UpdateOrderResponse
NameDescriptionTypeAdditional information
Success

specify if the order was updated or not

boolean

None.

GlobalError

Glabal message

string

None.

UpdateOrderDetails

update operations details

Collection of WS_Repository.Models.Responses.Hold.UpdateOrderDetail

None.

Response Formats

application/json, text/json

Sample:
{
  "Success": true,
  "GlobalError": "sample string 2",
  "UpdateOrderDetails": [
    {
      "Operation": "sample string 1",
      "Success": true,
      "Error": "sample string 3"
    },
    {
      "Operation": "sample string 1",
      "Success": true,
      "Error": "sample string 3"
    }
  ]
}

application/xml, text/xml

Sample:
<UpdateOrderResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Responses.Hold">
  <GlobalError>sample string 2</GlobalError>
  <Success>true</Success>
  <UpdateOrderDetails>
    <UpdateOrderDetail>
      <Error>sample string 3</Error>
      <Operation>sample string 1</Operation>
      <Success>true</Success>
    </UpdateOrderDetail>
    <UpdateOrderDetail>
      <Error>sample string 3</Error>
      <Operation>sample string 1</Operation>
      <Success>true</Success>
    </UpdateOrderDetail>
  </UpdateOrderDetails>
</UpdateOrderResponse>