POST api/ecommerce/checkout

Request Information

URI Parameters

None.

Body Parameters

ShoppingCart
NameDescriptionTypeAdditional information
CustomerId

string

None.

BranchId

string

None.

Items

Collection of CartItem

None.

TotalAmount

decimal number

None.

PaymentToken

string

None.

Note

string

None.

ShippingAddress

ShippingInfo

None.

Request Formats

application/json, text/json

Sample:
{
  "CustomerId": "sample string 1",
  "BranchId": "sample string 2",
  "Items": [
    {
      "ArticleId": 1,
      "ArticleType": 0,
      "UM": "sample string 2",
      "Quantity": 3,
      "Price": 4.0,
      "PriceTotal": 5.0,
      "IvaId": 6
    },
    {
      "ArticleId": 1,
      "ArticleType": 0,
      "UM": "sample string 2",
      "Quantity": 3,
      "Price": 4.0,
      "PriceTotal": 5.0,
      "IvaId": 6
    }
  ],
  "TotalAmount": 3.0,
  "PaymentToken": "sample string 4",
  "Note": "sample string 5",
  "ShippingAddress": {
    "Name": "sample string 1",
    "Surname": "sample string 2",
    "Address": "sample string 3",
    "StreetNumbers": "sample string 4",
    "City": "sample string 5",
    "State": "sample string 6",
    "ZIP": "sample string 7",
    "Country": "sample string 8",
    "Email": "sample string 9",
    "PhoneNumber": "sample string 10"
  }
}

application/xml, text/xml

Sample:
<ShoppingCart xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DataModel.ECommerce">
  <BranchId>sample string 2</BranchId>
  <CustomerId>sample string 1</CustomerId>
  <Items>
    <CartItem>
      <ArticleId>1</ArticleId>
      <ArticleType>Nessuno</ArticleType>
      <IvaId>6</IvaId>
      <Price>4</Price>
      <PriceTotal>5</PriceTotal>
      <Quantity>3</Quantity>
      <UM>sample string 2</UM>
    </CartItem>
    <CartItem>
      <ArticleId>1</ArticleId>
      <ArticleType>Nessuno</ArticleType>
      <IvaId>6</IvaId>
      <Price>4</Price>
      <PriceTotal>5</PriceTotal>
      <Quantity>3</Quantity>
      <UM>sample string 2</UM>
    </CartItem>
  </Items>
  <Note>sample string 5</Note>
  <PaymentToken>sample string 4</PaymentToken>
  <ShippingAddress>
    <Address>sample string 3</Address>
    <City>sample string 5</City>
    <Country>sample string 8</Country>
    <Email>sample string 9</Email>
    <Name>sample string 1</Name>
    <PhoneNumber>sample string 10</PhoneNumber>
    <State>sample string 6</State>
    <StreetNumbers>sample string 4</StreetNumbers>
    <Surname>sample string 2</Surname>
    <ZIP>sample string 7</ZIP>
  </ShippingAddress>
  <TotalAmount>3</TotalAmount>
</ShoppingCart>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'ShoppingCart'.

Response Information

Resource Description

string

Response Formats

application/json, text/json

Sample:
"sample string 1"

application/xml, text/xml

Sample:
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">sample string 1</string>