Purchase a basket

Purchase a basket

Request
query Parameters
basketId
required
integer <int32>

The internal id of the current basket.

ipAddress
required
string

The user's ipAddress.

userAgent
required
string

The user agent of the user's browser.

pricelistSeed
string

A comma separated list of internal pricelist ids to use, if any. PriceLists supplied must be valid, either from the application's public priceList or any customer or company priceLists or any valid client priceLists. For clients configured to use priceListSeed exclusively in the API only the supplied priceLists will be used. If this is not configured, the supplied priceLists will be appended to the valid priceLists. If none is supplied, the default value for the application will be used in combination with any customer or company priceLists. This applies to both configurations.

cultureCode
string

Specifies in which language to display culture specific information. If none is supplied, value is resolved from Application.

Responses
200

Success

400

Bad Request

Key: BasketItemNotBuyable. Gets raised when the basket item is not buyable or when it is inactive.

Key: BasketItemQuantityLessThanZero. Gets raised when the basket item quantity is less than zero.

Key: BuyerMissing. Gets raised when the buyer is missing.

Key: CannotCreatOrderOnBasket. Gets raised if the basket is not buyable and not already paid for.

Key: DeliveryAddressMissing. Gets raised when the delivery address does not exist.

Key: DiscountCodeAlreadyUsed. Gets raised when the discount code is already used.

Key: InvalidCompanyOnBasket. Gets raised when the basket has an invalid company. The customer does not exist in this company.

Key: InvoiceAddressMissing. Gets raised when the invoice address does not exist.

Key: NoDeliveryMethodSelected. Gets raised when there are no delivery method selected.

Key: NoPaymentMethodSelected. Gets raised when there are no payment method selected.

Key: PaymentFailed. Gets raised when the payment fails.

Key: PromotionInvalid. Gets raised when the promotion is invalid.

Key: QuotationMissing. Gets raised when the basket is missing.

500

Internal Server Error

post/ShoppingService.svc/rest/Purchase
Response samples
{
  • "Status": "string",
  • "StatusDescription": "string",
  • "BasketId": 0,
  • "OrderNo": "string",
  • "PaymentCode": "string",
  • "PaymentReference": "string",
  • "HostedPaymentPage": "string",
  • "RedirectUrl": "string",
  • "RedirectParameters": [
    ],
  • "IsSyncronous": true,
  • "PaymentServiceId": 0
}