PlaceOrder

Description

This method is used to place an order. We will sent again the complete order given from the last CalculateOrder result including billing and shipping address information.

SOAP API:

Action

http://shoxl.com/ShoxlService/PlaceOrder

Please note: this is not a working url, but a combination of namespace and method. Do not expect the url to return a result.

Style

Document

Input (Literal)

The input of this method is the document element tns:PlaceOrder having the structure defined by the following table.

Element

Type

Occurs

Description

Sequence

1..1

request

tns:PlaceOrderRequest

0..1

Complex Type: tns:PlaceOrderRequest

The PlaceOrderRequest contains all the information to place an order into the ERP system.

Component

Type

Occurs

Description

Sequence

1..1

AccountNumber

s:string

1..1

This is the (project) account number of the customer.

Order

tns:Order

1..1

The Order, the ComplexType Order contains all the order details. For the complete description check the Order section in the documentation.

Complex Type: tns:Order

The Order contains all the information to place an order in the ERP system but also to show on the website when we are showing order history.

Component

Type

Occurs

Description

Sequence

1..1

BillingAddressLine1

s:string

0..1

Street and housenumber of the billing address. Field is filled when BillingStreetAddressType is set to combined.

BillingStreet

s:string

0..1

Street of the billing address. Field is filled when BillingStreetAddressType is set to separated.

BillingHouseNumber

s:string

0..1

House number of the billing address. Field is filled when BillingStreetAddressType is set to separated.

BillingHouseNumberAddition

s:string

0..1

House number addition of the billing address. Field is filled when BillingStreetAddressType is set to separated.

BillingAddressLine2

s:string

0..1

Additional address line of the billing address

BillingStreetAddressType

s:int

1..1

StreetAddressType: 1 = combined, 2 = separated. Combined means that BillingAddressLine1 will be filled, Separated means that BillingStreet, BillingHouseNumber and BillingHouseNumberAddition will be filled.

BillingCity

s:string

0..1

The city of the billing address

BillingCountry

s:string

0..1

The country of the billing address

BillingName1

s:string

0..1

Name of the billing address (department)

BillingName2

s:string

0..1

Contains the company name

BillingPostalCode

s:string

0..1

The postalcode of the billing address

ExternalOrderNumber

s:string

0..1

This the Shoxl Shop unique order number

OrderDate

s:dateTime

0..1

The order date

OrderState

s:int

0..1

Orderstate: 1 = open, 2 = closed. State should be derived form orderlinestates: 1 means 1 or more lines have state open or backorder, 2 means all lines have status shipped or cancelled.

OrderLines

tns:ArrayOfOrderLine

0..1

A list of OrderLines. For the complete description check the ComplexType OrderLine section in the documentation.

PaymentMethodCode

s:int

0..1

The used payment method code, 1 = on account, 2 = PSP, 4 = zero order.

PaymentReference

s:string

0..1

When using a Payment Service Provider (PSP) a reference is given from the PSP system (not yet implemented)

Reference

s:string

0..1

This is the customers reference for an order.

ShipmentMethodCode

s:int

1..1

A Shipment Method Code: 0 = pickup by customer, 1 = default delivery

ShippingAddressLine1

s:string

0..1

Street and housenumber of the shipping address. Field is filled when ShippingStreetAddressType is set to combined.

ShippingStreet

s:string

0..1

Street of the shipping address. Field is filled when ShippingStreetAddressType is set to separated.

ShippingHouseNumber

s:string

0..1

House number of the shipping address. Field is filled when ShippingStreetAddressType is set to separated.

ShippingHouseNumberAddition

s:string

0..1

House number addition of the shipping address. Field is filled when ShippingStreetAddressType is set to separated.

ShippingAddressLine2

s:string

0..1

Additional address line of the shipping address

ShippingStreetAddressType

s:int

1..1

StreetAddressType: 1 = combined, 2 = separated. Combined means that ShippingAddressLine1 will be filled, Separated means that ShippingStreet, ShippingHouseNumber and ShippingHouseNumberAddition will be filled.

ShippingCity

s:string

0..1

The city of the shipping address

ShippingCountry

s:string

0..1

The country of the shipping address

ShippingName1

s:string

0..1

Name of the shipping address (department)

ShippingName2

s:string

0..1

Contains the company name

ShippingPostalCode

s:string

0..1

The postalcode of the shipping address

ShippingTransportInstruction

s:string

0..1

Transport and delivery instruction for the shipping address

TotalPriceExclVat

s:decimal

1..1

The total price of the order excluding VAT

TotalPriceInclVat

s:decimal

1..1

The total price of the order including VAT

TotalVat

s:decimal

1..1

The total amount of VAT

Component

Type

Occurs

Description

OrderedBy

s:string

0..1

The Email address of the customer who ordered.

Complex Type: tns:ArrayOfOrderLine

Component

Type

Occurs

Description

Sequence

1..1

OrderLine

tns:OrderLine

0..*

Complex Type: tns:OrderLine

A order line contains all the information of an ordered product. In case of order history it can also contain a order line status code and track and trace information.

Component

Type

Occurs

Description

Sequence

1..1

Carrier

s:string

0..1

The description of the Carrier who ships the order

DiscountAmountExclVat

s:decimal

0..1

This field can be used to give the calculated Discount Amount using a discount percentage. Or just give a discount amount when no discount percentage is used for the calculation.

DiscountDescription

s:string

0..1

A description of the discount from the ERP.

DiscountPercentage

s:decimal

0..1

A percentage of the give discount on the default netto price excluding VAT. When this field is set, the field DiscountAmountExclVat is required.

IsExternal

s:Boolean

1..1

If the order line is added by the ERP system (for example when its an extra fee or shipping costs), this field must be set true. If Shoxl Shop adds an order line this field is set false.

GrossPriceExclVat

s:decimal

1..1

The gross price excluding vat

NettoPriceExclVat

s:decimal

1..1

The netto price excluding vat, this can be a customer-specific or even project-specific price.

OrderLineStatus

s:int

0..1

The status of the order line, 0 = open, 1 = backorder, 2 = shipped, 3 = cancelled

ProductDescription

s:string

1..1

The default description of the product

ProductNumber

s:string

0..1

The product number for the requested product details, this can be a customer-specific product number. If IsExternal=false, the ordernumber must be filled.

Quantity

s:int

1..1

The number of items ordered

RemainingQuantity

s:int

1..1

The number of items not yet shipped.

SubTotalPriceExclVat

s:decimal

1..1

Sub Total of the order line excluding Vat

TrackAndTraceReference

s:string

0..1

If available, a track and trace reference of the carrier. This can be an unique code or a uri.

VatCode

s:int

1..1

The VAT Code of the product, 1 = HIGH (21%), 2 = LOW (9%), 3 = ZERO (0%). This

VAT code must be set by the ERP taking into account that this VAT code can be overruled by the customer settings, for example foreign customers use ZERO as a VAT code, in this case the ERP will return 3 to Shoxl Shop.

NettoPriceInclVat

s:decimal

1..1

The netto price including vat, this can be a customer-specific or even project-specific price.

SubTotalPriceInclVat

s:decimal

1..1

Sub Total of the order line including Vat

BaseUnit

s:string

0..1

The base unit of the product, eg pce or meter.

PriceUnit

s:decimal

0..1

The quantity on which price is based

Output (Literal)

The output of this method is the document element tns:PlaceOrderResponse having the structure defined by the following table.

Element

Type

Occurs

Description

Sequence

1..1

PlaceOrderResult

tns:PlaceOrderResult

0..1

Complex Type: tns:PlaceOrderResult

The PlaceOrderResult contains the confirmation that an order was placed succesful in the ERP system.

Component

Type

Occurs

Description

Sequence

1..1

ErrorCode

s:string

0..1

An error code returned by the ERP system

ErrorDescription

s:string

0..1

The error description related to the error code returned by the ERP system

OrderNumber

s:string

0..1

The ordernumber created by the ERP system

OrderSuccessful

s:boolean

1..1

Set true if the order was set succesful. Otherwise set false but also set an ErrorCode and Description.

REST API:

URL: /Shoxl/v1/PlaceOrder Method: POST

Request body:

PlaceOrderRequest{

parameter

type

accountNumber

string required

order

Order

required

}

Order{

parameter

type

billingAddressLine1

string nullable: true

billingStreet

string nullable: true

billingHouseNumber

string nullable: true

billingHouseNumberAddition

string nullable: true

billingAddressLine2

string nullable: true

billingStreetAddressType

integer($int32)

billingCity

string nullable: true

billingCountry

string nullable: true

billingName1

string nullable: true

billingName2

string nullable: true

billingPostalCode

string nullable: true

externalOrderNumber

string nullable: true

orderDate

string($date-time)

nullable: true

orderLines

[OrderLine]

orderState

integer($int32) nullable: true

orderedBy

string nullable: true

paymentMethodCode

integer($int32)

nullable: true

paymentReference

string nullable: true

preferredDeliveryDate

string($date-time)

nullable: true

reference

string nullable: true

shipmentMethodCode

integer($int32)

shippingAddressLine1

string nullable: true

shippingStreet

string nullable: true

shippingHouseNumber

string nullable: true

shippingHouseNumberAddition

string nullable: true

shippingAddressLine2

string nullable: true

shippingStreetAddressType

integer($int32)

shippingCity

string nullable: true

shippingCountry

string nullable: true

shippingName1

string nullable: true

shippingName2

string nullable: true

shippingPostalCode

string nullable: true

shippingTransportInstruction

string nullable: true

totalPriceExclVat

number($double)

totalPriceInclVat

number($double)

totalVat

number($double)

}

OrderLine{

parameter

type

baseUnit

string nullable: true

carrier

string nullable: true

discountAmountExclVat

number($double)

nullable: true

discountDescription

string nullable: true

discountPercentage

number($double)

nullable: true

grossPriceExclVat

number($double)

isExternal

boolean

nettoPriceExclVat

number($double)

nettoPriceInclVat

number($double)

orderLineStatus

integer($int32)

priceUnit

number($double)

productDescription

string nullable: true

productNumber

string nullable: true

quantity

number($double)

remainingQuantity

number($double)

subTotalPriceExclVat

number($double)

subTotalPriceInclVat

number($double)

trackAndTraceReference

string nullable: true

vatCode

integer($int32)

}

Example:

{
  "accountNumber": "string",
  "order": {
    "billingAddressLine1": "string",
    "billingStreet": "string",
    "billingHouseNumber": "string",
    "billingHouseNumberAddition": "string",
    "billingAddressLine2": "string",
    "billingStreetAddressType": 0,
    "billingCity": "string",
    "billingCountry": "string",
    "billingName1": "string",
    "billingName2": "string",
    "billingPostalCode": "string",
    "externalOrderNumber": "string",
    "orderDate": "2021-07-21",
    "orderLines": [
      {
        "baseUnit": "string",
        "carrier": "string",
        "discountAmountExclVat": 0,
        "discountDescription": "string",
        "discountPercentage": 0,
        "grossPriceExclVat": 0,
        "isExternal": true,
        "nettoPriceExclVat": 0,
        "nettoPriceInclVat": 0,
        "orderLineStatus": 0,
        "priceUnit": 0,
        "productDescription": "string",
        "productNumber": "string",
        "quantity": 0,
        "remainingQuantity": 0,
        "subTotalPriceExclVat": 0,
        "subTotalPriceInclVat": 0,
        "trackAndTraceReference": "string",
        "vatCode": 0
      }
    ],
    "orderState": 0,
    "orderedBy": "string",
    "paymentMethodCode": 0,
    "paymentReference": "string",
    "preferredDeliveryDate": "2021-11-10"
    "reference": "string",
    "shipmentMethodCode": 0,
    "shippingAddressLine1": "string",
    "shippingStreet": "string",
    "shippingHouseNumber": "string",
    "shippingHouseNumberAddition": "string",
    "shippingAddressLine2": "string",
    "shippingStreetAddressType": 0,
    "shippingCity": "string",
    "shippingCountry": "string",
    "shippingName1": "string",
    "shippingName2": "string",
    "shippingPostalCode": "string",
    "shippingTransportInstruction": "string",
    "totalPriceExclVat": 0,
    "totalPriceInclVat": 0,
    "totalVat": 0
  }
}

Response body:

PlaceOrderResult{

parameter

type

errorCode

string nullable: true

errorDescription

string nullable: true

orderSuccessful

boolean

orderNumber

string nullable: true

}

Example:

{
  "errorCode": "string",
  "errorDescription": "string",
  "orderSuccessful": true,
  "orderNumber": "string"
}

Last updated