POST api/PurchaseCart

Processes and bills a Tessitura cart.

Request Information

URI Parameters

None.

Body Parameters

PurchaseCartRequest
NameDescriptionTypeAdditional information
SessionKey

An authenticated Tessitura session key.

string

Required

CheckoutAsGuest

If true a new account will be created. The email address with be post-pended with a random suffix.

boolean

Required

FirstName

string

Required

LastName

string

Required

Address1

string

Required

Address2

string
City

string

Required

StateId

Two letter state value from CountriesStates method

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

PurchaseCartResult object

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": "FeCMzWWNr7IXqQXGvqMbTTl8CpBLxYQiqDoPCe7wnVvs+Uc/fudnrryiCUN0RDvQl0JqGsuIFx26SKXCyxuPIf7feGSi8zZXaZ/putkJ3f0=",
    "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": "6pPiexYKQC9P4VRcsH1Vn+g3di72cQwVR/d8ZBSM3eOkoyR8v8arJ7VSo3Gfpkdcc1XDdkMof9yyUtpZMNZ5QEns4Z3oeZCtOWXfpoBzFdg=",
    "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>