You are on page 1of 56

Yahoo!MerchantSolutionsCheckoutAPIs PartA:GettingStartedGuide Lastupdated:03/30/2009 1.Overview. 1.1CheckoutAPIs 1.1.1CheckoutBasket... 1.1.2CheckoutBasketQuery. 1.1.3CheckoutBasketAction. 2.Security 2.1DataSecurityPrerequisites 2.2Authentication 3.ImplementationSteps. 3.1MerchantSteps.. 3.2PartnerSteps.. 4.TestingEnvironment...

ment... 5.ContactInformation. 6.Glossary... 7.OtherResources.

TableofContents

2 2 2 2 3 4 4 4 5 5 8 9 9 9 10

ThisdocumentprovidesYahoo!Storemerchantsandpartnerswithhighlevelgetting startedinformationforimplementingandusingCheckoutAPIs.IncludedbelowareAPI resourceoverviews,securityinformation,merchantandpartnerimplementationsteps, contactinformation,aglossary,andalistofadditionalresourcesyoumaywishtoconsult. ThefirstphaseofCheckoutAPIsallowsmerchantsandpartnerstoprocessofflineorders (suchasorderstakenbyphone),bymakingwebservicecalls.UsingthissetofAPIs, merchantsandauthenticatedpartnersmaycreate,update,andquerycheckoutbaskets,as wellasperformanumberofcheckoutactions.Sections1.1.1,1.1.2,and1.1.3describethese operationsinmoredetail,whilePartBofthisdocumentprovidesAPIreferencematerial, includingsampleXMLrequestsandresponses. 1.1CheckoutAPIs CheckoutAPIsfollowgeneralREST(RepresentationalStateTransfer)style,butusePOST methods.AllCheckoutAPIsoperateinnonbulkmode,andcurrentlyincludethefollowing threehighlevelresourcesuponwhichoperationsmaybeperformed:CheckoutBasket, CheckoutBasketQuery,andCheckoutBasketAction. Forallowedverbs,URLs,sampleXMLrequestsandresponses,HTTPerrorcodes,and applicationerrorcodes,pleaseseeCheckoutAPIsPartB:ReferenceManual. 1.1.1CheckoutBasket OperationsperformedontheCheckoutBasketresourceenablenewcheckoutbasketstobe created,andexistingcheckoutbasketstobeupdated.Whencreatingandupdatinga checkoutbasket,youmayincludeshipmentandbillinginformation,iteminformation, buyercomments,theoptiontopurchaseorredeemgiftcertificates,usecoupons,andto haveanitemgiftwrapped.Youmayalsochoosetodefineandincludecustomdataina checkoutbasket. AuniquebasketIDwillbereturnedfollowingabasketscreation.UsingthisID,youmay laterupdatethebasketinformation. 1.1.2CheckoutBasketQuery OnceabaskethasbeencreatedanditsbasketIDobtained,operationsmaybeperformed ontheCheckoutBasketQueryresourcetoquerybasketinformation.Informationthatmay bequeriedincludesshipmentandbillinginformation,shoppingcartinformation,order totals,couponinformation(ifacouponhasbeenused),giftwrapinformation,gift certificateandgiftcertificaterecipientinformation(ifagiftcertificatehasbeenused,orifa giftcertificatehasbeenpurchased),andanycustomdatawhichhasbeendefined.

1.Overview

1.1.3CheckoutBasketAction OnceabaskethasbeencreatedanditsbasketIDobtained,operationsmaybeperformed ontheCheckoutBasketActionresource,includingaddingandremovingitemsfromthe checkoutbasket,specifyingquantitiesanditemoptions,andplacingorders.

2.Security

2.1DataSecurityPrerequisites Yahoo!iscommittedtothesecurityofstoredata.Toensuredatasecurity,allwebservice callsaretobemadeoveranHTTPSconnectionsecuredby128bitSSLv3,oraTLS connection.PleasenotethatSSLv2isnotsupportedorallowed. 2.2Authentication AccesstoCheckoutAPIsmustberestrictedtoauthenticatedandauthorizedpartnersonly. Eachtimeapartnermakesacall,theymustberecognizedashavingvalidaccesstodoso. AllWebserviceAPIsthataccessastoresdatarequireacontracttokentobeincluded. ContracttokenswillbegeneratedbyYahoo!andsenttopartnersbyemailaftermerchants grantaccesstoCheckoutAPIs.Thesetokenswillexpireannually.Partnersareencouraged tosetupemailaliasesdedicatedtohandlingAPIcommunicationandadministrative processes.Shouldacontracttokenbecomecompromised,thetokenmaybemadeinvalid, andareplacementtokenrequested.Althoughcontracttokensmaybereplaced,itisthe responsibilityofthepartnertoprotectthesetokensfrombeingexposedtooutsideparties.

3.ImplementationSteps

3.1MerchantSteps StepOne:Requirements InordertouseCheckoutAPIs,merchantsmusthaveaYahoo!MerchantSolutionsaccount, useCheckoutManager,beabletoacceptpayments,beopenforbusiness,andhaveReal TimeLinksenabledinStoreManager. StepTwo:GrantingPartnerAccess PartnersareresponsibleforprovidingmerchantswiththeirpartneraccountID.Oncea merchanthasreceivedapartnersaccountID,theymayusetheAPISettingsTooltogrant thepartnerCheckoutAPIaccess.Amerchantmustgrantthisaccessforeachstorethey wishapartnertohaveCheckoutAPIaccesspermissionsfor. Tograntpartneraccess: 1. InStoreManager,accesstheRealTimeLinksarea(Figure1).Note:RealTimeLinks isonlyavailabletoMerchantSolutionsStandard,Professional,andYahoo!Store merchants.IfRealTimeLinkshasnotbeenenabledforyourstore,itmaybe enableduponrequest.

2. IntheRealTimeLinksarea,choosetheAPISettingslink(Figure2). 5

Figure1.RealTimeLinksinStoreManager.

Figure2.TheAPISettingslink. 3. UsingtheAPISettingstool,clicktheAddNewPartnerbutton(Figure3).

4. EnteraPartnerIDcodewhenprompted(Figure4).

Figure3.TheAddNewPartnerbuttonintheAPISettingstool.

Figure4.EnteraPartnerIDcode. 5. SelectCheckoutAPIfromthelistofAPIs,thenclicktheUpdatebutton(Figure5).

Figure5.SelectCheckoutAPIfromthelistofAPIstograntpartneraccess.

6. VerifyaccesssettingsinthePartnerAccesstable(Figure6).

Figure6.PartnerAPIaccesstable. 2.2PartnerSteps StepOne:Requirements PartnersmusthaveaPartnerAccountID.Forthecurrentrelease,partnerswhowillbe integratingtheCheckoutAPIshavealreadybeengrantedaPartnerAccountID.ThisID mustbeprovidedbythepartnerinallemailcommunicationsregardingWebServices. StepTwo:ProvideMerchantswithPartnerAccountID PartnersmustprovidetheirPartnerAccountIDtomerchantswhosestorestheyrequest CheckoutAPIsaccessfor.OnceamerchanthasgrantedapartnerCheckoutAPIsaccess,a contracttokenwillbegeneratedbyYahoo!andsenttothepartnerattheirregisteredemail address. StepThree:MakeWebServiceCalls Allwebservicecallsmustincludethevalidcontracttokeninthesecurityheader: <SecurityHeader> <PartnerStoreContractToken>PartnerContractToken</PartnerStoreContractToken> </SecurityHeader>

ForinformationaboutwebservicerequestsandXMLsamples,pleaseseeCheckoutAPIs PartB:ReferenceManual.

3.TestingEnvironment

PartnersmustcreateaYahoo!storetobeusedasatestenvironmentforCheckoutAPIs. PartnerswhohavepreviouslycreatedteststoresfortestingAPIsmayusethesestoresto testCheckoutAPIs.

4.ContactInformation
Partnersmayemailsbsstorepartner@yahooinc.com.Allcommunicationshouldinclude thepartnersaccountIDandcompanyname.

5.Glossary

CheckoutManager:TheversionofcheckoutcurrentlysupportedforYahoo!Merchant SolutionsandYahoo!Storemerchants. ContractToken:Acontracttokenisgeneratedandsenttoapartneronceamerchanthas grantedthepartneraccesstoAPIsfortheirstore.Thesetokensmustbeusedinallweb servicecallsmadeforthestore. PartnerAccountID:APartnerAccountIDisaunique,identifyingcodethatapartnermust providetoamerchant,inorderforthemerchanttoprovisionthepartnerwithstoreAPI access.IfapartnerdoesnotalreadyhaveaPartnerAccountID,theymustrequestone. RealTimeLinks:TheRealTimeLinksfeaturecanbeenableduponrequestforMerchant SolutionsStandard,Professional,andYahoo!Storemerchants.Thisfeatureisnotavailable withMerchantSolutionsStarterplans.RealTimeLinksmustbeenabledforamerchantto provisionapartnerwithstoreAPIaccess. REST:RepresentationalStateTransfer(REST).RESToperatesonresourceoriented services.CheckoutAPIsfollowgeneralRESTstyle,butusePOSTmethods. SSL:SSL,orSecureSocketsLayer,isaprotocolusedfortransmittingprivatedata,which encryptsthedatasent.CheckoutAPIssupport128bitSSLv3.

6.OtherResources
APIs REST

CheckoutAPIsPartB:ReferenceManual Yahoo!DeveloperNetwork Yahoo!MerchantSolutionsIntegrations

RepresentationalStateTransferintheWikipedia

10

Yahoo!MerchantSolutionsCheckoutAPIs,PhaseI PartB:CheckoutAPIsReferenceManual Lastupdated:02/28/2011


TableofContents 1.Introduction 1.1CommonElements. 1.1.1RequestXMLstructure..... 1.1.2Errors... 1.2Inscriptions. 1.3SpecialCharacters... 2.CheckoutAPIs 2.1CheckoutBasket... 2.1.1CreateCheckoutBasket.. 2.1.1.1ErrorCodes. 2.1.2UpdateCheckoutBasket 2.1.2.1ErrorCodes. 2.2CheckoutBasketQuery.. 2.2.1GetCheckoutBasketQuery 2.2.1.1ErrorCodes.. 2.3CheckoutBasketAction.. 2.3.1AddItemsandRemoveItems... 2.3.1.1ErrorCodes.. 2.3.2PlaceOrder.. 2.3.2.1ErrorCodes.. 3.WarningandInformationCodes. 3.1WarningCodes... 3.2InformationCodes 4.Country,State,andProvinceCodes 4.1CountryCodes 4.2U.S.StateCodes.. 4.3CanadaProvinceCodes.

2 2 2 2 3 3 4 4 4 13 14 19 20 20 25 26 26 30 31 36 38 38 38 39 39 44 46

1.Introduction

ThisdocumentisintendedasareferenceguidetooutlinedetailsofthefirstphaseofCheckoutAPIs. Documentationforeachresourceincludestheresource'sallowedverbs,URLsandmethods, requestandresponsefields,sampleXML,anderrorcodes. ForadditionalinformationaboutYahoo!MerchantSolutionsCheckoutAPIs,pleaseseePartAof thisdocument,CheckoutAPIs:GettingStarted.Thissectionincludesoverviews,security information,merchantandpartnergettingstartedinformation,andfurtherresourcesyoumay wishtoconsult.

1.1CommonElements

Thissectionmakesnoteofelementscommontoeachresource.Forresourcespecificallowedverbs, URLsandmethods,requestandresponseXMLsamples,anderrors,pleaseseesections2.1 CheckoutBasket,2.2CheckoutBasketQuery,and2.3CheckoutBasketAction.

1.1.1RequestXMLstructure
RequestXMLforeachresourcehasthefollowingcommonstructure,wheretheResourceList elementenclosestheresourcebeingoperatedupon.Get,update,orcreateverbsmaybeused, dependingontheoperationbeingperformed.

<ystorewsRequest> <Version>1.0</Version> <StoreID></StoreID> <SecurityHeader> <PartnerStoreContractToken>String</PartnerStoreContractToken> </SecurityHeader> <Verb>create</Verb> <ResourceList> </ResourceList> </ystorewsRequest>

1.1.2Errors
GlobalHTTPerrors: ThefollowinglistofHTTPerrorcodesarereturnedbyallAPIs: HTTP_OK HTTP_BAD_REQUEST HTTP_NOT_FOUND HTTP_INTERNAL_SERVER_ERROR HTTP_CREATED HTTP_SERVICE_UNAVAILABLE HTTP_GATEWAY_TIME_OUT

Applicationerrorcodes: TheerrorcodesandmessageslistedbelowaregenericerrorsthatmaybereturnedbyallAPIs. Errorsspecifictoindividualresourcesareprovidedintheresourcedocumentation. Error code Description 10001 Inappropriate verb supplied for this request. 10005 Store ID not found. 10006 Store temporarily unavailable. Please try again later. 10009 Authorization required. 10010 Access denied. 10011 The HTTP method you have attempted is not allowed. 10400 Mandatory tag <tagname> is missing in request. 10402 $$tagname$$ needs to be specified in correct format. 10500 An internal error has occurred. 10501 <Filter> tag is missing from your request. 10502 <Include> tag is empty. 10503 <BasketID> tag is missing from your request. 10504 An invalid BasketID has been supplied in your request. 10601 The verb $$verb$$ is not allowed for the resource $$resource$$.

1.2Inscriptions
Whenaninscriptionisofferedwithastoreitemandselectedbythebuyer,theinscriptiondata mustbepassedtotheAPIasanitemoption.Inscriptioninformationshouldbeinputasfollows: Inscription<DisplayName> Whenpassinginscriptioninformation,<DisplayName>mustbereplacedwiththenameassigned totheitemsinscriptionoption. TolearnmoreaboutaddinginscriptionsasorderoptionsusingStoreEditororCatalogManager, pleaseseeouronlinehelppage.

1.3SpecialCharacters

Includingtheregisteredtrademarksymbol()inXMLrequestswillcausetherequesttofail.This charactershouldberemovedfromanyvaluesincludedintherequest.Forexample,shipping methodssuchasUPSNextDayAirEarlyAMorUPS2ndDayAirshouldbeinputwithout theregisteredtrademarksymbol(UPSNextDayAirEarlyAM,UPS2ndDayAir).

2.CheckoutAPIs

CheckoutAPIsoperateinnonbulkmode,usingthefollowingresourcesandverbs: Resource name Allowed verb(s) CheckoutBasket create, update CheckoutBasketQuery get CheckoutBasketAction update

2.1CheckoutBasket

OperationsperformedontheCheckoutBasketresourceenableacheckoutbaskettobecreated (CreateCheckoutBasket)andupdated(UpdateCheckoutBasket).Whenacheckoutbasketiscreated, aBasketIDwillbereturnedintheXMLresponse.ThisBasketIDmustbespecifiedwhenmaking update,query,additem,removeitem,andplaceorderrequests. Notesaboutcustomfields: AuniquefieldIDmustbeusedforeachcustomfieldyoucreate,evenifthedisplaynameisthesame fortwocustomfields.ThefieldIDmustbepassedtotheCheckoutAPI,andnotthedisplayname. Wheninputtingthecustomfieldname,includeonlythefieldID.YourstoreIDwillautomaticallybe appendedtothefieldID. Whenacustomfieldisacheckbox,useonandoffvaluestospecifychecked(on)orunchecked (off).Thevaluesreturnedintheresponsewillbeyes(foron)andno(foroff).

RESTbasedURL:https://<storeid>.checkout.store.yahooapis.com/V1/CheckoutBasket/ Method:POST

2.1.1CreateCheckoutBasket

Requestfields:
Request Field CheckoutBasket/ShoppingCart CheckoutBasket/ShipmentInfo CheckoutBasket/BillingInfo CheckoutBasket/ GiftCertRecipientInfo Type ShoppingCartType ShipmentInfoType BillingInfo GiftCertRecipientInfoType Cardinality Required 1 Optional Optional Optional Valid Values N/A N/A N/A N/A Description Shopping cart Buyers shipment information Buyers billing information Required only for gift certificate purchases. This specifies the gift certificate recipient information. Specifies gift wrap information, if the gift wrap option has been selected by the buyer. Specifies custom field

CheckoutBasket/GiftWrap

GiftWrap

Optional

N/A

CheckoutBasket/CustomData

CustomData

Optional

N/A

CheckoutBasket/BuyerEmail CheckoutBasket/Coupon

string CouponInfoType

Optional Optional

Valid email address Valid coupon number

values, if applicable. Buyers email address Used to specify a coupon code, if a coupon is to be applied to the order. Only one coupon may be applied per order. Used to specify a gift certificate code, if a gift certificate is to be applied to the order. Multiple gift certificates may be applied per order. Used to include and store buyer comments, if applicable.

CheckoutBasket/GiftCertificates

GiftCertInfoType

Optional

Valid list of gift certificates

CheckoutBasket/BuyerComments

string

Optional

text

ShoppingCart:
Request Field Item Type CheckoutItem Cardinality Required. 1 or more. Valid Values N/A Description Contains information about items added to the shopping cart.

CheckoutItem:
Request Field Item/ID Item/Quantity Item/OptionList Type string integer OptionListType Cardinality 1 required required Optional Valid Values Valid item ID Numerical value List of valid options Description Valid item ID Quantity of item ordered Required only for monogram, inscription or items with options Type of item Unit price of item Total of unit price multiplied by quantity ordered Item weight Indicates if item is subject to taxation Item code Item name Items page URL Items thumbnail image URL Required and valid only for soft goods. Item description

Item/Type Item/UnitPrice Item/TotalCost

string double double

Optional Optional Optional

goods, softgoods, giftcertificate Numerical value Numerical value

Item/Weight Item/Taxable Item/Code Item/Name Item/PageURL Item/ThumbnailURL Item/DownloadURL Item/Description

double Boolean integer string string string string string

Optional Optional Optional Optional Optional Optional Optional Optional

Numerical value true, false Item code N/A N/A N/A N/A N/A

OptionList:
Request Field Option/Name OptionValue Type String String Cardinality Required Required Valid Values Valid option name Valid option value Description Option name Option value

ShipmentInfoType:
Request Field ShipMethod Address Type string AddressInfoType Cardinality 1. Required Optional Valid Values Valid shipping method Valid address Description Shipping method used to ship the order Contains recipients address information (see AddressInfoType)

AddressInfoType:
Request Field GeneralInfo/Name GeneralInfo/PhoneNumber GeneralInfo/Company GeneralInfo/Email AddressInfo/Address1 AddressInfo/Address2 Type string string string string string string Cardinality 1. Required Optional Optional Optional Required Optional Valid Values N/A N/A N/A N/A N/A N/A Description Recipients name Recipients phone number Recipients company name, if applicable Recipients email address Recipients street address Recipients street address, line 2, if applicable Recipients city, corresponding to recipients street address Recipients state, corresponding to recipients street address Recipients country, corresponding to recipients street address Recipients ZIP code, corresponding to recipients street address

AddressInfo/City

string

Required

N/A

AddressInfo/State

string

Required

For US and Canada addresses, use 2 letter state or province codes Use 2 letter country codes

AddressInfo/Country

string

Required

AddressInfo/Zip

string

Required

N/A

BillingInfoType:
Request Field Address Type AddressInfoType Cardinality Optional Valid Values Valid address Description Not required if SameAsShipmentAddress is set as true. Indicates if the order billing address is the same as the shipping address. Indicates the payment method used, and includes payment information.

SameAsShipmentAddress

Booelan

Required

True, false

PaymentInfo

PaymentType

Required . 1

CreditCard, Custom

CreditCard:
Request Field CardNumber CardType Type string String Cardinality Required. 1 Required .1 Valid Values Numerical value Visa, MasterCard, American Express, Discover, Other Two-digit numerical value (mm) Four-digit numerical value (yyyy) Numerical value Description Credit card number the order should be billed to. Credit card type.

ExpiryMonth

string

Required. 1

Credit card expiry month

ExpiryYear

string

Required. 1

Credit card expiry year

CVV2

string

Required. 1

Card Verification Value

Custom:
Request Field CustomData/Name CustomData/Value Type string string Cardinality Required Required Valid Values N/A N/A Description Custom field name Custom field value

GiftCertRecipientInfoType:
Request Field RecipientName RecipientEmail Message Type string string string Cardinality Required .1 Required .1 Optional Valid Values N/A N/A N/A Description Name of gift certificate recipient Email address of gift certificate recipient Message to be included, as specified by buyer

GiftWrapInfoType:
Request Field Selected Type Boolean Cardinality Required Valid Values true, false Description Specifies whether the buyer has selected gift wrap option for the checkout. Optional message to be included.

Message

String

Required

GiftCertInfoType:
Request Field GiftCertCode Type string Cardinality Required. 1 or more Valid Values Valid gift certificate code Description Gift certificate redemption code

ResponseFields:

Response Field CheckoutBasket/BasketID CheckoutBasket/OrderTotals Type string OrderTotalsTypes Cardinality 1 1 Description Unique identifier for the currently created basket. Information about the current basket order.

OrderTotalsType:

Response Field ItemListTotal/Item/ID ItemListTotal/Item/Quantity ItemListTotal/Item/OptionList ItemListTotal/Item/UnitPrice ItemListTotal/Item/TotalCost ItemListTotal /ItemsCostl ShippingCost Tax GiftCertificateDiscount Type string integer options double double double double double double Cardinality 1 1 0..n 1 1 1 1 1 1 Description Item ID Quantity of item ordered Item options, if applicable Unit price for item Total of unit price multiplied by quantity ordered Total cost of all items. Shipping cost Tax Gift certificate amount applied, if applicable. This discount is the total discount for all gift certificates applied. Coupon discount applied, if applicable Cost for gift wrap option, if gift wrap is selected Total cost of order

CouponDiscount GiftWrapCost Total

double double double

1 1 1

<ystorewsRequest> <Version>1.0</Version> <StoreID></StoreID> <SecurityHeader> <PartnerStoreContractToken>String</PartnerStoreContractToken> </SecurityHeader> <Verb>create</Verb> <ResourceList> <CheckoutBasket> <ShoppingCart> <Item> <ID></ID> <Quantity></Quantity> <OptionList> <Option> <Name></Name> <Value></Value> </Option> <Option> <Name></Name> <Value></Value> </Option> </OptionList> </Item> <Item> <ID></ID> <Quantity></Quantity> <OptionList> <Option> <Name></Name> <Value></Value> </Option> <Option> <Name></Name> <Value></Value> </Option> </OptionList> </Item> </ShoppingCart> <ShipmentInfo> <Address> <GeneralInfo> <Name></Name> <PhoneNumber></PhoneNumber> <Company></Company> <Email></Email> </GeneralInfo> <AddressInfo> <Address1></Address1> <Address2></Address2> <City></City> <Country></Country> <State></State> <Zip></Zip> </AddressInfo> </Address> <ShipMethod></ShipMethod> </ShipmentInfo>

XMLrequestsample:

<BillingInfo> <Address> <GeneralInfo> <Name></Name> <PhoneNumber></PhoneNumber> <Company></Company> <Email></Email> </GeneralInfo> <AddressInfo> <Address1></Address1> <Address2></Address2> <City></City> <Country></Country> <State></State> <Zip></Zip> </AddressInfo> </Address> <SameAsShipmentAddress>true</SameAsShipmentAddress> <PaymentInfo> <CreditCard> <CardNumber></CardNumber> <CardType>Visa</CardType> <ExpiryMonth></ExpiryMonth> <ExpiryYear></ExpiryYear> <CVV2></CVV2> </CreditCard> </PaymentInfo> </BillingInfo> <GiftCertRecipientInfo> <RecipientEmail></RecipientEmail> <RecipientName></RecipientName> <Message></Message> </GiftCertRecipientInfo> <BuyerEmail></BuyerEmail> <BuyerComments></BuyerComments> <Coupon> <CouponCode></CouponCode> </Coupon> <GiftWrap> <Message></Message> <Selected>true</Selected> </GiftWrap> <GiftCertificates> <GiftCertCode></GiftCertCode> <GiftCertCode></GiftCertCode> </GiftCertificates> <CustomData> <Name></Name> <Value></Value> </CustomData> <CustomData> <Name></Name> <Value></Value> </CustomData> </CheckoutBasket> </ResourceList> </ystorewsRequest>

10

<ystorewsResponse> <Version>1.0</Version> <RequestID>TestRequestID</RequestID> <ResponseResourceList> <CheckoutBasket> <BasketID>TestBasketID</BasketID> <OrderTotals> <ItemListTotal> <Item> <ID>Item1</ID> <Quantity>3</Quantity> <OptionList> <Option> <Name>Size</Name> <Value>Small</Value> </Option> </OptionList> <UnitPrice>45</UnitPrice> <TotalCost>135</TotalCost> </Item> <ItemsCost>135</ItemsCost> </ItemListTotal> <ShippingCost>20</ShippingCost> <Tax>10</Tax> <GiftWrapCost>5</GiftWrapCost> <Total>170</Total> <CouponDiscount>10</CouponDiscount> <GiftCertificateDiscount>90</GiftCertificateDiscount> </OrderTotals> </CheckoutBasket> </ResponseResourceList> <ErrorMessages> <Error> <Code></Code> <Message></Message> </Error> <Error> <Code></Code> <Message></Message> </Error> </ErrorMessages> <WarningMessages> <Warning> <Code></Code> <Message></Message> </Warning> <Warning> <Code></Code> <Message></Message> </Warning> </WarningMessages> <InfoMessages> <Info> <Code></Code> <Message></Message> </Info> <Info> <Code></Code>

XMLresponsesample:

11

<Message></Message> </Info> </InfoMessages> <ProcessingStatus>ProcessingstatusOK</ProcessingStatus> <ContractExpiresInSecs>40000</ContractExpiresInSecs> </ystorewsResponse>

12

2.1.1.1ErrorCodes
Error code 10602 10603 10606 20201 20203 20204 20400 20401 20402 20407 20408 20409 20410 20411 20906 20701 20702 20703 20704 20705 20706 20707 20801 20808 20809 20810 20812 20814 20815 20816 20817 20818 Description Billing <Address> tag required when <SameAsShipmentAddress> is false Gift wrap <Message> tag required, when <Selected> is true Monogram cannot be more than 3 letters. The custom field $$field$$ does not exist on your store. The value for $$field$$ must have at least $$num$$ characters. The value for $$field$$ can have at most $$num characters. The checkout basket cannot be created as it does not contain any items. $$itemid$$ could not be added. Item failed to validate against catalog. Order-any is not allowed. Gift certificate sales are not allowed for $$storeid$$. Invalid gift certificate format [$$giftcert$$], please enter @ followed by 18 alpha-numeric characters. Ex:- @1234567890ABCDEFGH $$itemname$$ is not orderable. Item option key[$$key$$] and value[$$value$$] are not allowed for $$itemname$$. Failed to put $$item into the basket. The coupon database could not be accessed. Please contact the store owner. Sorry, the coupon code $$COUPON_CODE$$ is invalid. Please enter a different coupon code. There was an error opening the coupon database. Please contact the store owner. The coupon $$CODE$$ only applies to certain items. None of them are in your shopping cart. The coupon code $$CODE$$ does not apply to any item currently in your shopping cart. A minimum purchase of $$AMOUNT$$ is required to use coupon code $$CODE$$. The coupon code $$CODE$$ has expired and cannot be applied to items in your shopping cart. The country code you entered is invalid. Please enter a valid, 2-character country code. The shipping method you specified is not available to your address. Unable to calculate tax and shipping charge. $$country is an invalid ship to country. Missing ship to state for the ship to country $$country. Parse url returned false because of an invalid TaxShip URL: $$Parse_URL$$. Unable to calculate tax and shipping charge. Capacity limit fetching $$remaining_text$$. $$Tax-Ship_formula_error_messages$$ The state code $$State$$ is invalid for the country code $$Country$$.

13

2.1.2UpdateCheckoutBasket

Requestfields:
Request Field CheckoutBasket/BasketID Type string Cardinality Required 1 Valid Values BasketID returned by create request N/A N/A N/A Description BasketID for basket being updated Buyers shipment information. Buyers billing information. Required only for gift certificate purchases. This specifies the gift certificate recipient information. Specifies gift wrap information, if the gift wrap option has been selected by the buyer. Custom field values, if applicable Buyers email address Used to specify a coupon code, if a coupon is to be applied to the order. Only one coupon may be applied per order.

CheckoutBasket/ShipmentInfo CheckoutBasket/BillingInfo CheckoutBasket/ GiftCertRecipientInfo

ShipmentInfoType BillingInfo GiftCertRecipientInfoType

Optional Optional Optional

CheckoutBasket/GiftWrap

GiftWrap

Optional

true, false

CheckoutBasket/CustomData CheckoutBasket/BuyerEmail CheckoutBasket/Coupon

CustomData string CouponInfoType

Optional Optional Optional

N/A Valid email address Valid coupon number

ResponseFields:

Response Field CheckoutBasket/BasketID CheckoutBasket/OrderTotals Type string OrderTotalsTypes Cardinality 1 1 Description Unique identifier for the currently created basket. Information about the current basket order.

OrderTotalsType:

Response Field ItemListTotal/Item/ID ItemListTotal/Item/Quantity ItemListTotal/Item/OptionList ItemListTotal/Item/UnitPrice ItemListTotal/Item/TotalCost ItemsCost ShippingCost Tax GiftCertificateDiscount CouponDiscount GiftWrapCost Total Type string integer options double double double double double double double double double Cardinality 1 1 0..n 1 1 1 1 1 1 1 1 1 Description Item ID Quantity of item ordered Item options, if applicable Unit price for item Total of unit price multiplied by quantity ordered Total cost of all items. Shipping cost Tax Total of all gift certificate discounts applied to the order, if applicable. Coupon discount applied, if applicable Cost for gift wrap option, if gift wrap is selected Total cost of order

14

SampleXMLrequest:
<ystorewsRequest> <Version>1.0</Version> <StoreID></StoreID> <SecurityHeader> <PartnerStoreContractToken>String</PartnerStoreContractToken> </SecurityHeader> <Verb>update</Verb> <ResourceList> <CheckoutBasket> <BasketID></BasketID> <ShipmentInfo> <Address> <GeneralInfo> <Name></Name> <PhoneNumber></PhoneNumber> <Company></Company> <Email></Email> </GeneralInfo> <AddressInfo> <Address1></Address1> <Address2></Address2> <City></City> <Country></Country> <State></State> <Zip></Zip> </AddressInfo> </Address> <ShipMethod></ShipMethod> </ShipmentInfo> <BillingInfo> <Address> <GeneralInfo> <Name></Name> <PhoneNumber></PhoneNumber> <Company></Company> <Email></Email> </GeneralInfo> <AddressInfo> <Address1></Address1> <Address2></Address2> <City></City> <Country></Country> <State></State> <Zip></Zip> </AddressInfo> </Address> <SameAsShipmentAddress>true</SameAsShipmentAddress> <PaymentInfo> <CreditCard> <CardNumber></CardNumber> <CardType>Visa</CardType> <ExpiryMonth></ExpiryMonth> <ExpiryYear></ExpiryYear> <CVV2></CVV2> </CreditCard> </PaymentInfo> </BillingInfo> <GiftCertRecipientInfo>

15

<RecipientEmail></RecipientEmail> <RecipientName></RecipientName> <Message></Message> </GiftCertRecipientInfo> <BuyerEmail></BuyerEmail> <BuyerComments></BuyerComments> <Coupon> <CouponCode></CouponCode> </Coupon> <GiftWrap> <Message></Message> <Selected>true</Selected> </GiftWrap> <GiftCertificates> <GiftCertCode></GiftCertCode> <GiftCertCode></GiftCertCode> </GiftCertificates> <CustomData> <Name></Name> <Value></Value> </CustomData> <CustomData> <Name></Name> <Value></Value> </CustomData> </CheckoutBasket> </ResourceList> </ystorewsRequest>

16

<ystorewsResponse> <Version>1.0</Version> <RequestID>TestRequestID</RequestID> <ResponseResourceList> <CheckoutBasket> <BasketID>TestBasketID</BasketID> <OrderTotals> <ItemListTotal> <Item> <ID>Item1</ID> <Quantity>3</Quantity> <OptionList> <Option> <Name>Size</Name> <Value>Small</Value> </Option> </OptionList> <UnitPrice>45</UnitPrice> <TotalCost>135</TotalCost> </Item> <ItemsCost>135</ItemsCost> </ItemListTotal> <ShippingCost>20</ShippingCost> <Tax>10</Tax> <GiftWrapCost>5</GiftWrapCost> <Total>170</Total> <CouponDiscount>10</CouponDiscount> <GiftCertificateDiscount>90</GiftCertificateDiscount> </OrderTotals> </CheckoutBasket> </ResponseResourceList> <ErrorMessages> <Error> <Code></Code> <Message></Message> </Error> <Error> <Code></Code> <Message></Message> </Error> </ErrorMessages> <WarningMessages> <Warning> <Code></Code> <Message></Message> </Warning> <Warning> <Code></Code> <Message></Message> </Warning> </WarningMessages> <InfoMessages> <Info> <Code></Code> <Message></Message> </Info> <Info> <Code></Code>

SampleXMLresponse:

17

<Message></Message> </Info> </InfoMessages> <ProcessingStatus>ProcessingstatusOK</ProcessingStatus> <ContractExpiresInSecs>40000</ContractExpiresInSecs> </ystorewsResponse>

18

2.1.2.1ErrorCodes
Error code 10602 10603 10606 20101 20201 20203 20204 20409 20601 20602 20701 20702 20703 20704 20705 20706 20707 20801 20808 20809 20810 20812 20814 20815 20816 20817 20818 Description Billing <Address> tag required when <SameAsShipmentAddress> is false Gift wrap <Message> tag required, when <Selected> is true Monogram cannot be more than 3 letters. The checkout basket you've specified has expired. Please create a new checkout basket. The custom field $$field$$ does not exist on your store. The value for $$field$$ must have at least $$num$$ characters. The value for $$field$$ can have at most $$num characters. Invalid gift certificate format [$$giftcert$$], please enter @ followed by 18 alpha-numeric characters. Ex:- @1234567890ABCDEFGH Sorry, the gift certificate code $$CODE$$ is invalid. Please enter a different gift certificate code. The gift certificate code $$CODE$$ has already been redeemed. Please enter a different gift certificate code. The coupon database could not be accessed. Please contact the store owner. Sorry, the coupon code $$COUPON_CODE$$ is invalid. Please enter a different coupon code. There was an error opening the coupon database. Please contact the store owner. The coupon $$CODE$$ only applies to certain items. None of them are in your shopping cart. The coupon code $$CODE$$ does not apply to any item currently in your shopping cart. A minimum purchase of $$AMOUNT$$ is required to use coupon code $$CODE$$. The coupon code $$CODE$$ has expired and cannot be applied to items in your shopping cart. The country code you entered is invalid. Please enter a valid, 2-character country code. The shipping method you specified is not available to your address. Unable to calculate tax and shipping charge. $$country is an invalid ship to country. Missing ship to state for the ship to country $$country. parse_url returned false because of an invalid TaxShip URL: $$Parse_URL$$. Unable to calculate tax and shipping charge. Capacity limit fetching $$remaining_text$$. $$Tax-Ship_formula_error_messages$$ The state code $$State$$ is invalid for the country code $$Country$$.

19

2.2CheckoutBasketQuery

TheCheckoutBasketQueryresourceallowscontentsandinformationbelongingtoaspecific checkoutbaskettobefilteredandqueried(GetCheckoutBasketQuery). RESTbasedURL:https://<storeid>.checkout.store.yahooapis.com/V1/CheckoutBasketQuery/ Method:POST

2.2.1GetCheckoutBasketQuery Requestfields:
Type string

Request Field CheckoutBasketQuery/F ilter/Include

Cardinality Required . One or more

CheckoutBasketQuery/ QueryParams/BasketID

string

Required

Valid Values all, shipmentinfo, billinginfo, buyeremail, shoppingcart, ordertotals, customdata, couponinfo, giftwrapinfo, giftcertinfo, giftcertrecipientinfo BasketID returned by create request

Description The specific field that should be retrieved from the basket.

BasketID for basket being queried.

Responsefields: Responsefieldswillberesponsesreturnedforthesamefieldsqueried. SampleXMLrequest:


<?xmlversion="1.0"?> <ystorewsRequest> <Version>1.0</Version> <StoreID></StoreID> <SecurityHeader> <PartnerStoreContractToken></PartnerStoreContractToken> </SecurityHeader> <Verb>get</Verb> <ResourceList> <CheckoutBasketQuery> <Filter> <Include></Include> <Include></Include> </Filter> <QueryParams> <BasketID></BasketID> </QueryParams> </CheckoutBasketQuery> </ResourceList> </ystorewsRequest>

20

SampleXMLresponse:

<ystorewsResponse> <Version>1.0</Version> <RequestID>TestRequestID</RequestID> <ResponseResourceList> <CheckoutBasket> <BasketID>TestBasketID</BasketID> <OrderTotals> <ItemListTotal> <Item> <ID>Item1</ID> <Quantity>3</Quantity> <OptionList> <Option> <Name>Size</Name> <Value>Small</Value> </Option> </OptionList> <UnitPrice>45</UnitPrice> <TotalCost>135</TotalCost> </Item> <ItemsCost>135</ItemsCost> </ItemListTotal> <ShippingCost>20</ShippingCost> <Tax>10</Tax> <GiftWrapCost>5</GiftWrapCost> <Total>170</Total> <CouponDiscount>10</CouponDiscount> <GiftCertificateDiscount>90</GiftCertificateDiscount> </OrderTotals> <ShoppingCart> <Item> <ID>String</ID> <Quantity>9</Quantity> <OptionList> <Option> <Name></Name> <Value></Value> </Option> <Option> <Name></Name> <Value></Value> </Option> </OptionList> <Type>goods</Type> <UnitPrice></UnitPrice> <TotalCost></TotalCost> <Weight></Weight> <Taxable>true</Taxable> <Code></Code> <Name></Name> <Description></Description> <PageURL>http://STOREID.YAHOO.COM/ITEM.HTML</PageURL>

21

<ThumbnailURL>http://XXXXXXX.XX/X/X</ThumbnailURL> <DownloadURL>http://XXXXXX</DownloadURL> </Item> <Item> <ID>String</ID> <Quantity>9</Quantity> <Type>goods</Type> <UnitPrice></UnitPrice> <TotalCost></TotalCost> <Weight></Weight> <Taxable>true</Taxable> <Code></Code> <Name></Name> <Description></Description> <PageURL>http://STOREID.YAHOO.COM/ITEM.HTML</PageURL> <ThumbnailURL>http://XXXXXXX.XX/X/X</ThumbnailURL> <DownloadURL>http://XXXXXX</DownloadURL> </Item> </ShoppingCart> <ShipmentInfo> <Address> <GeneralInfo> <Name></Name> <PhoneNumber></PhoneNumber> <Company></Company> <Email></Email> </GeneralInfo> <AddressInfo> <Address1></Address1> <Address2></Address2> <City></City> <Country>US</Country> <State>OH</State> <Zip>45242</Zip> </AddressInfo> </Address> <ShipMethod></ShipMethod> </ShipmentInfo> <BillingInfo> <Address> <GeneralInfo> <Name></Name> <PhoneNumber></PhoneNumber> <Company></Company> <Email></Email> </GeneralInfo> <AddressInfo> <Address1></Address1> <Address2></Address2> <City></City> <Country>US</Country> <State>OH</State> <Zip>45242</Zip> </AddressInfo> </Address>

22

<SameAsShipmentAddress>false</SameAsShipmentAddress> <PaymentInfo> <CreditCard> <CardNumber>000000000000000</CardNumber> <CardType>Visa</CardType> <ExpiryMonth>9</ExpiryMonth> <ExpiryYear>2010</ExpiryYear> <CVV2>600</CVV2> </CreditCard> </PaymentInfo> </BillingInfo> <GiftCertRecipientInfo> <RecipientEmail></RecipientEmail> <RecipientName>^A$</RecipientName> <Message></Message> </GiftCertRecipientInfo> <BuyerEmail></BuyerEmail> <OrderTotals> <ItemListTotal> <Item> <ID>String</ID> <Quantity>12</Quantity> <OptionList> <Option> <Name>size</Name> <Value>small</Value> </Option> <Option> <Name>^A$</Name> <Value>String</Value> </Option> </OptionList> <UnitPrice>2.0</UnitPrice> <TotalCost>24</TotalCost> <Weight>2.3</Weight> </Item> <Item> <ID>String</ID> <Quantity>^0$</Quantity> <OptionList> <Option> <Name>^A$</Name> <Value>String</Value> </Option> <Option> <Name>^A$</Name> <Value>String</Value> </Option> </OptionList> <UnitPrice>^0$</UnitPrice> <TotalCost>^0$</TotalCost> </Item> <ItemsCost>^0$</ItemsCost> </ItemListTotal> <ShippingCost>^0$</ShippingCost>

23

<Tax>^0$</Tax> <GiftWrapCost>^0$</GiftWrapCost> <CouponDiscount>^0$</CouponDiscount> <GiftCertificateDiscount>^0$</GiftCertificateDiscount> <Total>^0$</Total> </OrderTotals> <BuyerComments></BuyerComments> </CheckoutBasket> </ResponseResourceList>


<ErrorMessages> <Error> <Code></Code> <Message></Message> </Error> <Error> <Code></Code> <Message></Message> </Error> </ErrorMessages> <WarningMessages> <Warning> <Code></Code> <Message></Message> </Warning> <Warning> <Code></Code> <Message></Message> </Warning> </WarningMessages> <InfoMessages> <Info> <Code></Code> <Message></Message> </Info> <Info> <Code></Code> <Message></Message> </Info> </InfoMessages>

<ProcessingStatus>ProcessingstatusOK</ProcessingStatus> <ContractExpiresInSecs>40000</ContractExpiresInSecs> </ystorewsResponse>

24

2.2.1.1ErrorCodes
Error code

20101

Description The checkout basket you've specified has expired. Please create a new checkout basket.

25

2.3CheckoutBasketAction

OperationsperformedontheCheckoutBasketActionresourceenableitemstobeaddedto andremovedfromabasket(AddItemsandRemoveItems),andfororderstobeplaced (PlaceOrder).


RESTbasedURL:https://<storeid>.checkout.store.yahooapis.com/V1/CheckoutBasketAction/ Method:POST

2.3.1AddItemsandRemoveItems
AddItems TheAddItemsoperationwillalwaysworkintheappendmode.TheinputforAddItemsisalistof items,andeachitemmustcontainanitemquantity.Newitemsintheinputlistwillbeaddedtothe shoppingcart.Forexistingitemsintheinputlist,theitemquantitywillbeincrementedinthe shoppingcart. RemoveItems TheRemoveItemsoperationenablesitemstoberemovedfromtheshoppingcart.Theinputfor RemoveItemsisthesameastheinputforAddItems.Itemsremovedfromtheshoppingcartare basedontheitemandquantityspecified.

Requestfields:
Request Field AddItems/Items Type CheckoutItemType Cardinality Required. 1 or more. Required .1 Valid Values Description Contains information about items added to the shopping cart. BasketID of the basket to add items to Contains information about items removed from the shopping cart. BasketID of the basket to remove items from

AddItems/ActionParams/BasketID

string

BasketID returned by the create request

RemoveItems/Items

CheckoutItemType

Required. 1 or more. Required. 1 BasketID returned by the create request

RemoveItems/ActionParams/ BasketID

string

Responsefields:

Response Field CheckoutBasket/BasketID CheckoutBasket/OrderTotals Type string OrderTotalsTypes Cardinality 1 1 Description Unique identifier for the currently created basket. Information about the current basket order.

OrderTotalsType:

Response Field ItemListTotal/Item/ID ItemListTotal/Item/Quantity ItemListTotal/Item/OptionList ItemListTotal/Item/UnitPrice ItemListTotal/Item/TotalCost Type string integer options double double Cardinality 1 1 0..n 1 1 Description Item ID Quantity of item ordered Item options, if applicable Unit price for item Total of unit price multiplied by quantity ordered

26

ItemListTotal /ItemsCostl ShippingCost Tax GiftCertificateDiscount CouponDiscount GiftWrapCost Total

double double double double double double double

1 1 1 1 1 1 1

Total cost of all items. Shipping cost Tax Gift certificate amount applied, if applicable Coupon discount applied, if applicable Cost for gift wrap option, if gift wrap is selected Total cost of order

SampleXMLrequest: 1)AddItems
<ystorewsRequest> <Version>1.0</Version> <StoreID></StoreID> <SecurityHeader> <PartnerStoreContractToken>TestPartnerToken</PartnerStoreContractToken> </SecurityHeader> <Verb>update</Verb> <ResourceList> <CheckoutBasketAction> <AddItems> <ActionParams> <BasketID></BasketID> </ActionParams> <Item> <ID></ID> <Quantity></Quantity> <OptionList> <Option> <Name></Name> <Value></Value> </Option> <Option> <Name></Name> <Value></Value> </Option> </OptionList> </Item> <Item> <ID></ID> <Quantity></Quantity> <OptionList> <Option> <Name></Name> <Value></Value> </Option> </OptionList> </Item> </AddItems> </CheckoutBasketAction> </ResourceList> </ystorewsRequest>

27

2)RemoveItems

<ystorewsRequest> <Version>1.0</Version> <StoreID></StoreID> <SecurityHeader> <PartnerStoreContractToken>TestPartnerToken</PartnerStoreContractToken> </SecurityHeader> <Verb>update</Verb> <ResourceList> <CheckoutBasketAction> <RemoveItems> <ActionParams> <BasketID></BasketID> </ActionParams> <Item> <ID></ID> <Quantity></Quantity> <OptionList> <Option> <Name></Name> <Value></Value> </Option> <Option> <Name></Name> <Value></Value> </Option> </OptionList> </Item> <Item> <ID></ID> <Quantity></Quantity> <OptionList> <Option> <Name></Name> <Value></Value> </Option> </OptionList> </Item> </RemoveItems> </CheckoutBasketAction> </ResourceList> </ystorewsRequest>

28

SampleXMLresponse:

<ystorewsResponse> <Version>1.0</Version> <RequestID>TestRequestID</RequestID> <ResponseResourceList> <CheckoutBasket> <BasketID>TestBasketID</BasketID> <OrderTotals> <ItemListTotal> <Item> <ID>Item1</ID> <Quantity>3</Quantity> <OptionList> <Option> <Name>Size</Name> <Value>Small</Value> </Option> </OptionList> <UnitPrice>45</UnitPrice> <TotalCost>135</TotalCost> </Item> <ItemsCost>135</ItemsCost> </ItemListTotal> <ShippingCost>20</ShippingCost> <Tax>10</Tax> <GiftWrapCost>5</GiftWrapCost> <Total>170</Total> <CouponDiscount>10</CouponDiscount> <GiftCertificateDiscount>90</GiftCertificateDiscount> </OrderTotals> </CheckoutBasket> </ResponseResourceList> <ErrorMessages>
<Error> <Code></Code> <Message></Message> </Error> <Error> <Code></Code> <Message></Message> </Error> </ErrorMessages> <WarningMessages> <Warning> <Code></Code> <Message></Message> </Warning> <Warning> <Code></Code> <Message></Message> </Warning> </WarningMessages> <InfoMessages> <Info> <Code></Code> <Message></Message>

29

<ProcessingStatus>ProcessingstatusOK</ProcessingStatus> <ContractExpiresInSecs>40000</ContractExpiresInSecs> </ystorewsResponse>

</Info> <Info> <Code></Code> <Message></Message> </Info> </InfoMessages>

2.3.1.1ErrorCodes
Error code AddItems 10604 10607 10608 20101 20401 20402 20407 20408 20410 20411 RemoveItems 10604 10605 20101 20403 Description Action tag missing for <CheckoutBasketAction>. <RemoveItems> tag is not allowed with <AddItems>. <PlaceOrder> tag is not allowed with <AddItems>. The checkout basket you've specified has expired. Please create a new checkout basket. The item <ItemID> could not be added as the options are invalid. Item failed to validate against catalog. Order-any is not allowed. Gift certificate sales are not allowed for $$storeid$$. $$itemname$$ is not orderable. Item option key[$$key$$] and value[$$value$$] are not allowed for $$itemname$$. Action tag missing for <CheckoutBasketAction>. <PlaceOrder> tag is not allowed with <RemoveItems>. The checkout basket you've specified has expired. Please create a new checkout basket. $$itemid$$ could not be removed. The quantity specified to be removed exceeds the item quantity in the shopping cart.

30

2.3.2PlaceOrder RequestFields:
Request Field PlaceOrder/ActionParams/BasketID PlaceOrder/BuyerIPAddress PlaceOrder/SendOrderEmail Type string string Boolean Cardinality Required .1 Optional Optional Valid Values BasketID returned by create request. IP address true, false Description BasketID of the basket for which the order should be placed Buyers IP address, for tracking purposes Order confirmation email setting. When set to true, an order confirmation email is sent to the buyer. When set to false, an order confirmation email is not sent to the buyer.

ResponseFields:
Response Field Order/OrderID Order/CreationTime Order/ShipmentInfo Order/BillingInfo Order/BuyerEmail Order/ShoppingCart Order/OrderTotals Order/BuyerComments ShoppingCartType OrderTotalsType string Type string string ShipmentInfoType BillingInfoType Description OrderID. Time of order creation Recipients shipment information Buyers billing information Buyers email address Shopping cart information Order totals Buyer comments

31

SampleXMLrequest:

<ystorewsRequest> <Version>1.0</Version> <StoreID>dolly</StoreID> <SecurityHeader> <PartnerStoreContractToken></PartnerStoreContractToken> </SecurityHeader> <Verb>update</Verb> <ResourceList> <CheckoutBasketAction> <PlaceOrder> <ActionParams> <BasketID></BasketID> </ActionParams> <BuyerIPAddress></BuyerIPAddress> <SendOrderEmail></SendOrderEmail> </PlaceOrder> </CheckoutBasketAction> </ResourceList> </ystorewsRequest>

32

SampleXMLresponse:

<ystorewsResponse> <Version>1.0</Version> <RequestID>TestRequestID</RequestID> <ResponseResourceList> <Order> <OrderID>Acme596</OrderID> <CreationTime>12/10/2008</CreationTime> <ShipmentInfo> <Address> <GeneralInfo> <Name>John</Name> <PhoneNumber>5554443332221</PhoneNumber> <Company>MyCompany</Company> <Email>john@mycompany.com</Email> </GeneralInfo> <AddressInfo> <Address1/> <Address2/> <City>Sunnyvale</City> <Country>US</Country> <State>CA</State> <Zip/> </AddressInfo> </Address> <ShipMethod>UPSExpress</ShipMethod> <Shipper>ups</Shipper> </ShipmentInfo> <BillingInfo> <Address> <GeneralInfo> <Name>John</Name> <PhoneNumber>5554443332221</PhoneNumber> <Company>MyCompany</Company> <Email>john@mycompany.com</Email> </GeneralInfo> <AddressInfo> <Address1/> <Address2/> <City>Sunnyvale</City> <Country>US</Country> <State>CA</State> <Zip/> </AddressInfo> </Address> <PaymentInfo> <CreditCard> <CardNumber>xxxxxxxx1111</CardNumber> <ExpiryMonth>12</ExpiryMonth> <ExpiryYear>2012</ExpiryYear> </CreditCard> </PaymentInfo> </BillingInfo> <BuyerEmail>john@mycompany.com</BuyerEmail> <ItemList> <Item> <ID>Item1</ID> <Quantity>2</Quantity> <OptionList>

33

<Option> <Name>Size</Name> <Value>Small</Value> </Option> </OptionList> <Type>goods</Type> <UnitPrice>45</UnitPrice> <TotalCost>90</TotalCost> <Weight>2</Weight> <Taxable>true</Taxable> <Code>Code1</Code> <Name>BlueHills</Name> <Description>SampleItem1</Description> <PageURL>http://mystore.com/item1.html</PageURL> <ThumbnailURL>http://mystore.com/img/item.gif</ThumbnailURL> </Item> <Item> <ID>Item2</ID> <Quantity>3</Quantity> <UnitPrice>50</UnitPrice> <Type>softgoods</Type> <TotalCost>150</TotalCost> <Taxable>true</Taxable> <Code>Code2</Code> <Name>BlueHills</Name> <Description>SampleItem2</Description> <PageURL>http://mystore.com/item2.html</PageURL> <ThumbnailURL>http://mystore.com/img/item2.gif</ThumbnailURL> <DownloadURL>http://lib.store.yahoo.net/storeid/item2.zip</DownloadURL> </Item> </ItemList> <BuyerComments>firstorder</BuyerComments> <OrderTotals> <ItemListTotal> <Item> <ID>Item1</ID> <Quantity>2</Quantity> <OptionList> <Option> <Name>Size</Name> <Value>Small</Value> </Option> </OptionList> <UnitPrice>45</UnitPrice> <TotalCost>90</TotalCost> </Item> <Item> <ID>Item2</ID> <Quantity>3</Quantity> <UnitPrice>50</UnitPrice> <TotalCost>150</TotalCost> </Item> <ItemsCost>240</ItemsCost> </ItemListTotal> <ShippingCost>20</ShippingCost> <Tax>10</Tax> <GiftWrapCost>5</GiftWrapCost> <CouponDiscount>20</CouponDiscount> <Total>245</Total> </OrderTotals> </Order>

34

</ResponseResourceList> <ProcessingStatus>ProcessingstatusOK</ProcessingStatus> <ContractExpiresInSecs>40000</ContractExpiresInSecs> </ystorewsResponse>

35

2.3.2.1ErrorCodes
Error code 10604 20101 20404 20405 20501 20502 20503 20504 20505 20506 20507 20508 20509 20510 20511 20512 20513 20514 20515 20819 20901 20902 20903 20904 20905 20906 20907 Description Action tag missing for <CheckoutBasketAction>. The checkout basket you've specified has expired. Please create a new checkout basket.. $$itemname$$ is no longer available for purchase. Your shopping cart is empty. Insufficient payment provided for this order. Please provide the Card Verification Value (CVV). An invalid Card Verification Value has been entered. The credit card number field is empty. Please enter a valid credit card number in this field. The credit card number entered does not match the selected credit card type. Please specify a valid credit card expiration date. Please specify a credit card expiration date, or set both year and month to none for cards that do not expire. The store does not accept $$CARDTYPE$$. Please use a different credit card type or payment method. Credit card information has not been entered. The credit card authorization network could not be contacted. Please try again later. Error in contacting the credit card authorization network. Please provide Card Verification Value (CVV). Credit card number is invalid. Your credit card expiration date has already passed. $$FDMS specific error messages$$. You do not seem to have supplied the $$shipping_or_billing$$ $$field_name$$. You have not reached the minimum order value. You have exceeded the maximum order value. Please note that there a change to the calculated shipping cost has occurred. Please note that a change to the calculated tax has occurred. The shopping cart's allowed maximum value has been exceeded. Failed to put $$item into the basket. Note: Your order is pending review. You will not be able to download items until your order is reviewed and approved. Please contact us if you have any questions. Insufficient payment provided for this order. This order is pending review. The coupon database could not be accessed. Please contact the store owner. Sorry, the coupon code $$COUPON_CODE$$ is invalid. Please enter a different coupon code. There was an error opening the coupon database. Please contact the store owner. The coupon $$CODE$$ only applies to certain items. None of them are in

20908 20909 20701 20702 20703 20704

36

20705 20706 20707 20801 20802 20803 20804 20805 20806 20807 20812 20814 20815 20816 20817 20818

your shopping cart. The coupon code $$CODE$$ does not apply to any item currently in your shopping cart. A minimum purchase of $$AMOUNT$$ is required to use coupon code $$CODE$$. The coupon code $$CODE$$ has expired and cannot be applied to items in your shopping cart. The phone number you entered is invalid. Please enter a phone number containing 7 to 12 digits. The country code you entered is invalid. Please enter a valid, 2-character country code. Please enter a valid email address for the gift certificate recipient. The system is momentarily busy. Your order status will be mailed to you. Please enter the required billing information. Please enter a valid email address. No shipping method selected. Please select a shipping method to complete your order (required). Missing ship to state for the ship to country $$country. parse_url returned false because of an invalid TaxShip URL: $$Parse_URL$$. Unable to calculate tax and shipping charge. Capacity limit fetching $$remaining_text$$. $$Tax-Ship_formula_error_messages$$ The state code $$State$$ is invalid for the country code $$Country$$.

37

3.WarningandInformationCodes
3.1WarningCodes
Warning code 30001 30002 30003 30004 30005 30006 30007 30008 30009 30010 30011

30012 30013

Description The minimum quantity for $$itemname$$ is $$minquantity$$. The quantity for $$itemname$$ has been adjusted to meet the minimum quantity required. Please review your order. The price for $$itemname$$ has been updated to reflect the current price. Please review your order. "Warning("$$status$$ "): Failed to get available inventory level for item $$itemid$$. Unable to determine quantity for $$itemname$$ at this time. The quantity you've requested for $$itemname$$ is not available at this time. Failed to fetch order $$orderid$$ orderd failed to talk to CC server or store is prevented from taking orders. Warning(ok): Failed to place order. Shopper information exceeds the maximum amount of data allowed. You will be checked out with previously entered information. Shopping cart limit exceeded. Items added after the limit was exceeded have been removed. Please check out now and return to purchase the remaining items. Place order failed for store $$storeId$$ Error message: $$errmsg$$. $$Tax-Ship_formula_warning_messages$$

3.2InformationCodes
Warning code 40001 40002 40003 40004 40005 40006 40007 40008 40009 40010 Description Note: Gift certificate $$CODE$$ has an unused credit of $$AMOUNT$$. This credit may be applied to future orders. Coupon ($$CODE$$) cannot be applied until a shipping method has been selected. $$SELECTED_SHIP_METHOD$$ is not a valid shipping method for the coupon $$CODE$$. Please select a valid shipping method. Coupon offer $$CODE$$ ($$AMOUNT$$ savings) has been applied. Coupon offer $$CODE$$ (free shipping) has been applied. This order has an unused credit of $$AMOUNT$$, which cannot be applied to future orders. Gift certificate redeemed ($$GC_CODE$$:$$AMOUNT$$). Gift certificate code $$GC_CODE$$ cannot be redeemed. Shipping charges may be added to your order. For terms, see the $$store_info_page_link$$ page. Tax may be added to your order. For terms, see the $$store_info_page_link$$ page.

38

4.Country,State,andProvinceCodes
4.1CountryCodes
Code AF AL DZ AS AD AO AI AQ AG AR AM AW AU AT AZ BS BH BD BB BY BE BZ BJ BM BT BO BA BW BV BR IO BN BG BF BI KH CM CA CV KY CF TD CL CN

Country Afghanistan Albania Algeria AmericanSamoa Andorra Angola Anguilla Antarctica AntiguaandBarbuda Argentina Armenia Aruba Australia Austria Azerbaijan Bahamas Bahrain Bangladesh Barbados Belarus Belgium Belize Benin Bermuda Bhutan Bolivia BosniaandHerzegowina Botswana BouvetIsland Brazil BritishIndianOceanTerritory BruneiDarussalam Bulgaria BurkinaFaso Burundi Cambodia Cameroon Canada CapeVerde CaymanIslands CentralAfricanRepublic Chad Chile China

39

CX CC CO KM CG CK CR CI HR CU CY CZ DK DJ DM DO TP EC EG SV GQ ER EE ET FK FO FJ FI FR FX GF PF TF GA GM GE DE GH GI GR GL GD GP GU GT GN GW GY HT HM

ChristmasIsland Cocos(Keeling)Islands Colombia Comoros Congo CookIslands CostaRica CoteD'ivoire Croatia(Hrvatska) Cuba Cyprus CzechRepublic Denmark Djibouti Dominica DominicanRepublic EastTimor Ecuador Egypt ElSalvador EquatorialGuinea Eritrea Estonia Ethiopia FalklandIslands(Malvinas) FaroeIslands Fiji Finland France France,Metropolitan FrenchGuiana FrenchPolynesia FrenchSouthernTerritories Gabon Gambia Georgia Germany Ghana Gibraltar Greece Greenland Grenada Guadeloupe Guam Guatemala Guinea Guineabissau Guyana Haiti HeardandMcDonaldIslands

40

HN HK HU IS IN ID IR IQ IE IL IT JM JP JO KZ KE KI KP KR KW KG LA LV LB LS LR LY LI LT LU MO MK MG MW MY MV ML MT MH MQ MR MU YT MX FM MD MC MN MS MA

Honduras HongKong Hungary Iceland India Indonesia Iran(IslamicRepublicof) Iraq Ireland Israel Italy Jamaica Japan Jordan Kazakhstan Kenya Kiribati Korea,DemocraticPeople'sRepublicof Korea,Republicof Kuwait Kyrgyzstan LaoPeople'sDemocraticRepublic Latvia Lebanon Lesotho Liberia LibyanArabJamahiriya Liechtenstein Lithuania Luxembourg Macau Macedonia Madagascar Malawi Malaysia Maldives Mali Malta MarshallIslands Martinique Mauritania Mauritius Mayotte Mexico Micronesia,FederatedStatesof Moldova,Republicof Monaco Mongolia Montserrat Morocco

41

MZ MM NA NR NP NL AN NC NZ NI NE NG NU NF MP NO OC OM PK PW PA PG PY PE PH PN PL PT PR QA RE RO RU RW KN LC VC WS SM ST SA SN CS SC SL SG SK SI SB SO

Mozambique Myanmar Namibia Nauru Nepal Netherlands NetherlandsAntilles NewCaledonia NewZealand Nicaragua Niger Nigeria Niue NorfolkIsland NorthernMarianaIslands Norway Oceana Oman Pakistan Palau Panama PapuaNewGuinea Paraguay Peru Philippines Pitcairn Poland Portugal PuertoRico Qatar Reunion Romania RussianFederation Rwanda SaintKittsandNevis SaintLucia SaintVincentandTheGrenadines Samoa SanMarino SaoTomeandPrincipe SaudiArabia Senegal SerbiaandMontenegro Seychelles SierraLeone Singapore Slovakia(SlovakRepublic) Slovenia SolomonIslands Somalia

42

ZA ES LK SH PM SD SR SJ SZ SE CH SY TW TJ TZ TH TG TK TO TT TN TR TM TC TV UG UA AE UK US UM UY UZ VU VA VE VN VG VI WF EH YE YU ZR ZM ZW

SouthAfrica Spain SriLanka St.Helena St.PierreandMiquelon Sudan Suriname SvalbardandJanMayenIslands Swaziland Sweden Switzerland SyrianArabRepublic Taiwan Tajikistan Tanzania,UnitedRepublicof Thailand Togo Tokelau Tonga TrinidadandTobago Tunisia Turkey Turkmenistan TurksandCaicosIslands Tuvalu Uganda Ukraine UnitedArabEmirates UnitedKingdom UnitedStates USMinorOutlyingIslands Uruguay Uzbekistan Vanuatu VaticanCity Venezuela VietNam VirginIslands(British) VirginIslands(U.S.) WallisandFutunaIslands WesternSahara Yemen Yugoslavia Zaire Zambia Zimbabwe

43

4.2U.S.StateCodes
Code AL AK AS AZ AR CA CZ CO CT DE DC FL GA GU HI ID IL IN IA KS KY LA ME MP MD MA MI MN MS MO MT NE NV NH NJ NM NY NC ND OH OK OR PA PR RI SC SD State Alabama Alaska AmericanSamoa Arizona Arkansas California CanalZone Colorado Connecticut Delaware DistrictofColumbia Florida Georgia Guam Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine MarianaIslands Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Nebraska Nevada NewHampshire NewJersey NewMexico NewYork NorthCarolina NorthDakota Ohio Oklahoma Oregon Pennsylvania PuertoRico RhodeIsland SouthCarolina SouthDakota

44

TN TX UT VT VI VA WA WV WI WY AP AE AA FP

Tennessee Texas Utah Vermont VirginIslands Virginia Washington WestVirginia Wisconsin Wyoming APO APO APO FPO

45

4.3CanadaProvinceCodes
Code AB BC MB NB NF NL NT NS NU ON PE QC SK YK Province Alberta BritishColumbia Manitoba NewBrunswick Newfoundland NewfoundlandandLabrador NorthwestTerritories NovaScotia Nunavut Ontario PrinceEdwardIsland Quebec Saskatchewan Yukon

46

You might also like