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

BillingExternalId

s:string

0..1

The external Id 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

ShippingExternalId

s:string

0..1

The external Id 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

Changes in ShoxlRestApiSwagger_v8

  • The vatCode field on OrderLine is replaced by a new taxPercentage field

Request body:

PlaceOrderRequest{

parameter

type

accountNumber

string required

order

Order

required

}

Order{

parametertypeDescription

billingAddressLine1

string nullable: true

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

billingStreet

string nullable: true

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

billingHouseNumber

string nullable: true

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

billingHouseNumberAddition

string nullable: true

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

billingAddressLine2

string nullable: true

Additional address line of the billing address

billingStreetAddressType

integer($int32)

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

billingCity

string nullable: true

The city of the billing address

billingCountry

string nullable: true

The country of the billing address

billingName1

string nullable: true

Name of the billing address (department)

billingName2

string nullable: true

Contains the company name

billingPostalCode

string nullable: true

The postalcode of the billing address

externalOrderNumber

string nullable: true

This the Shoxl Shop unique order number

orderDate

string($date-time)

nullable: true

The order date

orderLines

[OrderLine]

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

orderState

integer($int32) nullable: true

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.

orderedBy

string nullable: true

The Email address of the customer who ordered.

paymentMethodCode

integer($int32)

nullable: true

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

paymentReference

string nullable: true

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

preferredDeliveryDate

string($date-time)

nullable: true

reference

string nullable: true

This is the customers reference for an order.

shipmentMethodCode

integer($int32)

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

shippingAddressLine1

string nullable: true

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

shippingStreet

string nullable: true

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

shippingHouseNumber

string nullable: true

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

shippingHouseNumberAddition

string nullable: true

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

shippingAddressLine2

string nullable: true

Additional address line of the shipping address

shippingStreetAddressType

integer($int32)

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

shippingCity

string nullable: true

The city of the shipping address

shippingCountry

string nullable: true

The country of the shipping address

shippingName1

string nullable: true

Name of the shipping address (department)

shippingName2

string nullable: true

Contains the company name

shippingPostalCode

string nullable: true

The postalcode of the shipping address

shippingTransportInstruction

string nullable: true

Transport and delivery instruction for the shipping address

totalPriceExclVat

number($double)

The total price of the order excluding VAT

totalPriceInclVat

number($double)

The total price of the order including VAT

totalVat

number($double)

The total amount of VAT

}

OrderLine{

ParameterTypeDescription

baseUnit

string nullable: true

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

carrier

string nullable: true

The description of the Carrier who ships the order

discountAmountExclVat

number($double)

nullable: true

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

string nullable: true

A description of the discount from the ERP.

discountPercentage

number($double)

nullable: true

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

grossPriceExclVat

number($double)

The gross price excluding vat

isExternal

boolean

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.

nettoPriceExclVat

number($double)

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

nettoPriceInclVat

number($double)

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

orderLineStatus

integer($int32)

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

priceUnit

number($double)

The quantity on which price is based

productDescription

string nullable: true

The default description of the product

productNumber

string nullable: true

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

number($double)

The number of items ordered

remainingQuantity

number($double)

The number of items not yet shipped.

subTotalPriceExclVat

number($double)

Sub Total of the order line excluding Vat

subTotalPriceInclVat

number($double)

Sub Total of the order line including Vat

taxPercentage

number($double) nullable: true

The tax percentage of the product

trackAndTraceReference

string nullable: true

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

type

integer($int32)

Type of the OrderLine:

0 = None,

1 = Product,

2 = Shipping,

3 = Payment,

4 = Other,

5 = Discount,

6 = DisposalFee

customOrderFields

dictionary(string,string) nullable:true

}

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",
    "billingExternalId" : string,
    "externalOrderNumber": "string",
    "orderDate": "2021-07-21",
    "orderLines": [
      {
        "baseUnit": "string",
        "carrier": "string",
        "customOrderFields": {
          "additionalProp1": "string",
          "additionalProp2": "string",
          "additionalProp3": "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,
        "taxPercentage": 0,
        "trackAndTraceReference": "string"
      }
    ],
    "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",
    "shippingExternalId": "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