POST api/AutoShip/CreditCardProfile

This API method will allow you to create or update the Credit Card details associated with an AutoShip profile. If one does not exist, it will be added. If one does exist, it will be overwritten with the details provided. The CardNumber field can accept non-standard values, as you may be required to store a Token in this place when utilizing a Tokenized Credit Card processor. In this situation it is recommended to store the Token in both the CardNumber and Token fields.

Request Information

URI Parameters

None.

Body Parameters

AutoShipCreditCardProfileViewModel
NameDescriptionTypeAdditional information
AutoShipScheduleID

integer

None.

SubjectID

integer

None.

SubjectTypeID

integer

None.

NameOnCard

string

None.

CardNumber

string

None.

ExpDate

string

None.

Street1

string

None.

Street2

string

None.

City

string

None.

State

string

None.

PostalCode

string

None.

Country

string

None.

Last4

string

None.

CardTypeID

integer

None.

TransactionID

string

None.

Token

string

None.

CCAccountID

integer

None.

Request Formats

application/xml, text/xml

Sample:
<AutoShipCreditCardProfileViewModel>
  <AutoShipScheduleID>1</AutoShipScheduleID>
  <SubjectID>2</SubjectID>
  <SubjectTypeID>3</SubjectTypeID>
  <NameOnCard>sample string 4</NameOnCard>
  <CardNumber>sample string 5</CardNumber>
  <ExpDate>sample string 6</ExpDate>
  <Street1>sample string 7</Street1>
  <Street2>sample string 8</Street2>
  <City>sample string 9</City>
  <State>sample string 10</State>
  <PostalCode>sample string 11</PostalCode>
  <Country>sample string 12</Country>
  <Last4>sample string 13</Last4>
  <CardTypeID>14</CardTypeID>
  <TransactionID>sample string 15</TransactionID>
  <Token>sample string 16</Token>
  <CCAccountID>1</CCAccountID>
</AutoShipCreditCardProfileViewModel>

application/json, text/json

Sample:
{
  "AutoShipScheduleID": 1,
  "SubjectID": 2,
  "SubjectTypeID": 3,
  "NameOnCard": "sample string 4",
  "CardNumber": "sample string 5",
  "ExpDate": "sample string 6",
  "Street1": "sample string 7",
  "Street2": "sample string 8",
  "City": "sample string 9",
  "State": "sample string 10",
  "PostalCode": "sample string 11",
  "Country": "sample string 12",
  "Last4": "sample string 13",
  "CardTypeID": 14,
  "TransactionID": "sample string 15",
  "Token": "sample string 16",
  "CCAccountID": 1
}

application/x-www-form-urlencoded

Sample:

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

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/xml, text/xml, application/json, text/json

Sample:

Sample not available.