POST api/PurchaseCart

Request Information

URI Parameters

None.

Body Parameters

PurchaseCartRequest
NameDescriptionTypeAdditional information
SessionKey

string

Required

CheckoutAsGuest

boolean

Required

FirstName

string

Required

LastName

string

Required

Address1

string

Required

Address2

string
City

string

Required

StateId

string

Required

CountryId

integer

Required

PostalCode

string

Required

Email

string

Required

Phone

string

Required

Request Formats

application/json, text/json

Sample:
{
  "SessionKey": "sample string 1",
  "CheckoutAsGuest": true,
  "FirstName": "sample string 3",
  "LastName": "sample string 4",
  "Address1": "sample string 5",
  "Address2": "sample string 6",
  "City": "sample string 7",
  "StateId": "sample string 8",
  "CountryId": 9,
  "PostalCode": "sample string 10",
  "Email": "sample string 11",
  "Phone": "sample string 12"
}

application/xml, text/xml

Sample:
<PurchaseCartRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Order">
  <Address1>sample string 5</Address1>
  <Address2>sample string 6</Address2>
  <CheckoutAsGuest>true</CheckoutAsGuest>
  <City>sample string 7</City>
  <CountryId>9</CountryId>
  <Email>sample string 11</Email>
  <FirstName>sample string 3</FirstName>
  <LastName>sample string 4</LastName>
  <Phone>sample string 12</Phone>
  <PostalCode>sample string 10</PostalCode>
  <SessionKey>sample string 1</SessionKey>
  <StateId>sample string 8</StateId>
</PurchaseCartRequest>

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 'PurchaseCartRequest'.

Response Information

Resource Description

ApiSuccessOfPurchaseCartResult
NameDescriptionTypeAdditional information
Success

boolean
Data

PurchaseCartResult

Response Formats

application/json

Sample:
{
  "Success": true,
  "Data": {
    "NewAccountCreated": true,
    "PurchaseCompleted": true,
    "OrderEmailSent": true,
    "OrderNumber": 4,
    "PrimaryAddressError": true,
    "NewSessionKey": "DY0mL5p+R8GTCJuRkp5eKLRFfiDH6lmGiSqXkT/CLGnVqjZjR6RjuHet4Clzt7T1iAtJY1c/4CyLD9eSswzndQuc2p/OyjuaMRARMPvPPSM=",
    "Error": [
      "sample string 1",
      "sample string 2"
    ],
    "Status": "sample string 7",
    "Message": "sample string 8"
  }
}

text/json

Sample:
{
  "Success": true,
  "Data": {
    "NewAccountCreated": true,
    "PurchaseCompleted": true,
    "OrderEmailSent": true,
    "OrderNumber": 4,
    "PrimaryAddressError": true,
    "NewSessionKey": "i2Lsd/vDqETrP+RELoVbaz2tRr3XcTvpOWaoWuKGn7ky38bQK4IKFpw/MrPxM+MJu2miBJZZhXjlEHQ55UecEdQZCpPaO/chu9Mw9QqWEs0=",
    "Error": [
      "sample string 1",
      "sample string 2"
    ],
    "Status": "sample string 7",
    "Message": "sample string 8"
  }
}

application/xml, text/xml

Sample:
<ApiSuccessOfPurchaseCartResultlnV6n2FW xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Api">
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/SFMOMA.Data.Entities.Order">
    <d2p1:Error xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>sample string 1</d3p1:string>
      <d3p1:string>sample string 2</d3p1:string>
    </d2p1:Error>
    <d2p1:Message>sample string 8</d2p1:Message>
    <d2p1:NewSessionKey>sample string 6</d2p1:NewSessionKey>
    <d2p1:OrderEmailSent>true</d2p1:OrderEmailSent>
    <d2p1:OrderNumber>4</d2p1:OrderNumber>
    <d2p1:PrimaryAddressError>true</d2p1:PrimaryAddressError>
    <d2p1:PurchaseCompleted>true</d2p1:PurchaseCompleted>
    <d2p1:Status>sample string 7</d2p1:Status>
    <d2p1:NewAccountCreated>true</d2p1:NewAccountCreated>
  </Data>
</ApiSuccessOfPurchaseCartResultlnV6n2FW>