POST api/AggregateOrders_V1

Aggregate mmultiple orders based on aggregation rules

Request Information

URI Parameters

None.

Body Parameters

The request is presented below!

WS_Repository.Models.Requests.OrderAggregation.AggregationRequest
NameDescriptionTypeAdditional information
WS_Key

(Mandatory) Webservice Key provided by 2ship support

string

None.

Filter

(Optional) Filter the orders that you wanat to be aggregated

WS_Repository.Models.Requests.OrderAggregation.OrdersFilter

None.

RunRateAfterAggregationIsDone

(Optional) Run Rate After Aggregation Is Done (will rate the aggregated groups to apply the cheepest service for each)

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "WS_Key": "sample string 1",
  "Filter": {
    "LocationId": 1,
    "ProjectId": "sample string 2"
  },
  "RunRateAfterAggregationIsDone": true
}

application/xml, text/xml

Sample:
<AggregationRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Requests.OrderAggregation">
  <Filter>
    <LocationId>1</LocationId>
    <ProjectId>sample string 2</ProjectId>
  </Filter>
  <RunRateAfterAggregationIsDone>true</RunRateAfterAggregationIsDone>
  <WS_Key>sample string 1</WS_Key>
</AggregationRequest>

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.OrderAggregation.AggregationRequest'.

Response Information

Resource Description

WS_Repository.Models.Responses.OrderAggregation.AggregationResponse
NameDescriptionTypeAdditional information
Status

The Status of the aggregation Process

WS_Repository.Models.Responses.OrderAggregation.AggregationStatus

None.

Message

The Message when tha status is Failed

string

None.

TaskGuid

The Task Id of the Rate Aggregation Status (Used when you want to call the aggregation rate Progress status)

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Status": 0,
  "Message": "sample string 1",
  "TaskGuid": "sample string 2"
}

application/xml, text/xml

Sample:
<AggregationResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Responses.OrderAggregation">
  <Message>sample string 1</Message>
  <Status>Succeeded</Status>
  <TaskGuid>sample string 2</TaskGuid>
</AggregationResponse>