pixi Developer & Integration Documentation

pixiMergeOrders

Description

Merge customer orders


Request Parameters

#

Name

Type

Required

Example

Description

1

TargetOrderNr

integer

1

123456

Target Order number

2

SourceOrderNr

integer

1

123456

Source Order number

3

Employee

string

0

abcdef

User who does the merge

4

ResultMessage

string

0

abcdef

Result Message - output


Request body

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dem="https://api.pixi.eu/soap/demosandbox/">
   <soapenv:Header/>
   <soapenv:Body>
      <dem:pixiMergeOrders>
         <dem:TargetOrderNr>123456</dem:TargetOrderNr>
         <dem:SourceOrderNr>123456</dem:SourceOrderNr>
         <dem:Employee>abcdef</dem:Employee>
         <dem:ResultMessage>abcdef</dem:ResultMessage>
      </dem:pixiMergeOrders>
   </soapenv:Body>
</soapenv:Envelope>


Response


Body 1: Result set

#

Name

Type

Description

1

ResultMessage

string

See pixiCanMergeOrders for the list of possible outputs. If pixiCanMergeOrders returns a positive answer, but the operation still fails, the result is: 500 Unexpected error. Note: order-type and currency mismatches are returned as SOAP errors ("Different order types can not be merged." / "Orders with different currency can not be merged."), not as ResultMessage values.


Additional Notes

Preconditions (validated before the merge):

  • Source and target orders must have the same order type (B2B/B2C); otherwise the SOAP error "Different order types can not be merged." is returned.

  • Source and target orders must have the same currency; otherwise the SOAP error "Orders with different currency can not be merged." is returned.

  • The merge must additionally pass pixiCanMergeOrders validation (see that call for the full list of result messages).

Behavior:

  • All order lines and bundle order lines from the source order are moved to the target order, with the VAT/tax rate recalculated for the target order's shipping context.

  • The target order's shipping cost is set to the higher (MAX) of the two orders' shipping cost.

  • The highest shipping cost from the merged orders are applied.

  • The source order's discount is reset to 0.

  • Order-line updates are stamped with the employee as "<Employee> (API)", or just "API" when Employee is not supplied.