API Technical Reference

24
3dCart Shopping Cart Software V3.X Store Web Services 3dCart Store Web Service v.1.0 www.3dcart.com Introduction The Store Web Service gives merchants access to 3dCart Stores information. With the Store Web Service APIs, you can build applications to perform tasks such as listing or update orders, customers, and products.

Transcript of API Technical Reference

Page 1: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom

Introduction The Store Web Service gives merchants access to 3dCart Stores information With the Store Web Service APIs you can build applications to perform tasks such as listing or update orders customers and products

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom

Table of Contents

TABLE OF CONTENTS 2 GETTING STARTED 3 WEB SERVICES METHODS 4

1 CUSTOMER RELATED METHODS 4 11 GETCUSTOMER 4 12 GETCUSTOMERCOUNT 5 13 EDITCUSTOMER 6

2 ORDER RELATED METHODS 9 21 GETORDER 9 22 GETORDERCOUNT 11 23 GETORDERSTATUS 12 24 UPDATEORDERSTATUS 13 25 UPDATEORDERSHIPMENT 14

3 PRODUCT RELATED METHODS 16 31 GETPRODUCT 16 32 GETPRODUCTCOUNT 19 33 GETPRODUCTINVENTORY 20 34 UPDATEPRODUCTINVENTORY 20

WORKING WITH THE CALLBACKURL PARAMETER 22 WEB SERVICES ERRORS 23 END - YOUrsquoVE REACHED THE END OF THIS GUIDE 24

CONTACTING 3DCART 24

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 324

Getting Started In order to use the Store Web Services you first need to configure the API Settings in the Online Store Manager (Settings -gt General -gt API Settings) Settings

o Enable API EnableDisable the use of the API

o API User Key Auto-generated 32 character string required to authenticate the APIs requests

o Admin User Identity used by the web services to make the requests

o IP Address You can restrict access to the API to one or more IP If none is entered the API will accept requests from any IP

The Store Web Services can be accessed in the following URL httpapi3dcartcomcartasmx

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 424

Web Services Methods

1 Customer Related Methods

11 getCustomer

Description Get customer information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

customersFilter String Comma delimited string with zero or more search parameters Allowed parameters firstname lastname email countrycode statecode city phone

ie firstname=Johnemail=johnemailcom countrycode=USstatecode=FLcity=Margate

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetCustomer xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt ltcustomersFiltergtfirstname=JohnltcustomersFiltergt

ltcallBackURLgtltcallBackURLgt ltgetCustomergt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltCustomersRequestResponse xmlns=gt ltCustomergt ltCustomerIDgt29ltCustomerIDgt ltUserID gt ltPasswordgt123456ltPasswordgt ltBillingAddressgt ltFirstNamegtJohnltFirstNamegt ltLastNamegtBrownltLastNamegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 524

ltAddressgt111 BRANCH MORR DRltAddressgt ltAddress2 gt ltCitygtMargateltCitygt ltStateCodegtFLltStateCodegt ltZipCodegt33063ltZipCodegt ltCountryCodegtUSltCountryCodegt ltCompany gt ltPhonegt1234567897ltPhonegt ltEmailgtjohnemailcomltEmailgt ltBillingAddressgt ltShippingAddressgt ltFirstNamegtJohnltFirstNamegt ltLastNamegtBrownltLastNamegt ltAddressgt111 BRANCH MORR DR ltAddressgt ltAddress2 gt ltCitygtMargateltCitygt ltStateCodegtFLltStateCodegt ltZipCodegt33063ltZipCodegt ltCountryCodegtUSltCountryCodegt ltCompany gt ltPhonegt12345678945ltPhonegt ltShippingAddressgt ltComments gt ltLastLoginDategt2172007ltLastLoginDategt ltWebSite gt ltDiscountGroup gt ltCustOther1 gt ltAccountNumbergt1333ltAccountNumbergt ltMailListgt1ltMailListgt ltCustomerTypegt0ltCustomerTypegt ltLastUpdategt2172007ltLastUpdategt ltCustEnabledgt1ltCustEnabledgt ltAditionalFieldsgt ltAdditionalField1 gt ltAdditionalField2 gt ltAdditionalField3 gt ltAdditionalField4 gt ltAditionalFieldsgt ltCustomergt ltCustomersRequestResponsegt

12 getCustomerCount

Description Get total customers

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 624

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetCustomerCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt lt getCustomerCount gt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltCustomerCountResponse xmlns=gt ltCustomerCountgt15473ltCustomerCountgt ltCustomerCountResponsegt

13 editCustomer

Description Edit a customer record

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

customerData String Name-value pair containing all customerrsquos information

This string must be in the following format name_of_the_field1===value_of_the_field1||| name_of_the_field2===value_of_the_field2|||

name_of_the_field3===value_of_the_field3hellip

Field and value separated by ===

Each pair separated by |||

See customerData specification bellow for a complete reference of the fields

action String Indicates if the customer should be inserted updated or deleted

This string must be one of the following insert update or delete

If action is delete just contactid or alt_contactid is required on the customerData field

callBackURL String URL where the XML response will be posted

Required parameters

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 724

customerData specification

Name Type (length) Description

contactid Numeric Customer id - identifies the customer Required when alt_contactid is blank

alt_contactid String (50) Alternative customer id - identifies the customer If has value contactId will be ignored

billing_firstname String (50) Billing first name Required when action = insert

billing_lastname String (50) Billing last name Required when action = insert

billing_address String (255) Billing address 1

billing_address2 String (50) Billing address 2

billing_city String (100) Billing city

billing_state String (100) Billing state (2 digits for US states)

billing_zip String (20) Billing zip code

billing_country String (2) Billing country (ISO Country Code)

billing_company String (255) Billing company

billing_phone String (50) Billing phone

email String (100) Email Required when action = insert

shipping_firstname String (50) Shipping first name

shipping_lastname String (50) Shipping last name

shipping_address String (255) Shipping address 1

shipping_address2 String (50) Shipping address 2

shipping_city String (100) Shipping city

shipping_state String (100) Shipping state (2 digits for US states)

shipping_zip String (20) Shipping zip code

shipping_country String (2) Shipping country (ISO Country Code)

shipping_company String (255) Shipping company

shipping_phone String (50) Shipping phone

comments String (255) Comments

website String (200) Website

pass String (20) Password Required when action = insert

discount Numeric Customer group id (0 for none) Default = 0

accountno String (50) Tax id

maillist Numeric Indicates if the customer is subscribed on the mailing list Must be 0 or 1 Default = 0

custenabled Numeric Indicates if the customer is enabled Must be 0 or 1 Default = 0

additional_field1 String (250) Additional field 1

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 824

additional_field2 String (250) Additional field 2

additional_field3 String (150) Additional field 3

Please note every field passed on customerData will be updated

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt lteditCustomer xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcom ltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltcustomerDatagtcontactid===123|||billing_firstname===JohnltcustomerDatagt ltactiongtupdateltactiongt

ltcallBackURLgtltcallBackURLgt lteditCustomergt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltEditCustomerResponse xmlns=gt ltresultgtOKlt result gt ltcontactidgt123ltcontactidgt ltalt_contactidgtltalt_contactidgt ltEditCustomerResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 924

2 Order Related Methods

21 getOrder

Description Get order information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

startFrom Boolean If startFrom is true and invoiceNum is specified the web service will return orders gt= invoiceNum

If startFrom is false and invoiceNum is specified the web service will return just the specified order

invoiceNum String Search for specific invoice number

status String Search orders by status

dateFrom Date Search orders that were placed after specified date Must be in mmddyyyy format

dateTo Date Search orders that were placed before specified date Must be in mmddyyyy format

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrder xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt ltstartFromgtfalseltstartFromgt

ltinvoiceNumgtltinvoiceNumgt ltstatusgtltstatusgt ltdateFromgt08012008ltdateFromgt

ltdateTogtltdateTogt ltcallBackURLgtltcallBackURLgt ltgetOrdergt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetOrdersResponse xmlns=gt ltOrdergt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1024

ltOrderIDgt35446ltOrderIDgt ltInvoiceNumbergtAB-1426ltInvoiceNumbergt ltCustomerIDgt15427ltCustomerIDgt ltDategt842008ltDategt ltTotalgt1590ltTotalgt ltTaxgt9000ltTaxgt ltTax2gt000ltTax2gt ltTax3gt000ltTax3gt ltShippinggt0ltShippinggt ltBillingAddressgt ltFirstNamegtSamltFirstNamegt ltLastNamegtJonesltLastNamegt ltEmailgtsamemailcomltEmailgt ltAddressgt1234 Holmberg RdltAddressgt ltAddress2 gt ltCitygtParklandltCitygt ltZipCodegt33067ltZipCodegt ltStateCodegtFLltStateCodegt ltCountryCodegtUSltCountryCodegt ltPhonegt1112223344ltPhonegt ltCompany gt ltBillingAddressgt ltCommentsgt ltOrderComment gt ltOrderInternalCommentgtltOrderInternalCommentgt ltOrderExternalComment gt ltCommentsgt ltPaymentMethodgtOnline Credit CardltPaymentMethodgt ltTimegt61222 PMltTimegt ltTransactiongt ltCVV2gt123ltCVV2gt ltResponseTextgtltResponseTextgt

ltAVSgtAVS ResultltAVSgt ltTransactionIdgt123456ltTransactionIdgt ltApprovalCodegt123456ltApprovalCodegt ltTransactionTypegtAuthorizeltTransactionTypegt ltAmountgt100000ltAmountgt ltTransactiongt

ltDiscountgt000ltDiscountgt ltPromotions gt ltGiftCertificatePurchased gt ltGiftCertificateUsed gt ltOrderStatusgtNewltOrderStatusgt ltReferergthttpwwwgooglecomltReferergt ltSalesPerson gt ltIPgt111222333444ltIPgt ltDateStartedgt842008 55418 PMltDateStartedgt ltUserID gt ltLastUpdategt842008ltLastUpdategt ltWeightgt000ltWeightgt ltAffiliateInformationgt ltAffiliateIDgt0ltAffiliateIDgt ltAffiliateCommissiongt0ltAffiliateCommissiongt ltAffiliateApproved gt ltAffiliateApprovedreason gt ltAffiliateInformationgt ltShippingInformationgt ltShipmentgt ltShipmentIDgt1ltShipmentIDgt ltShipmentDate gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1124

ltShippinggt0ltShippinggt ltMethodgtFree ShippingltMethodgt ltFirstNamegtSamltFirstNamegt ltLastNamegtJonesltLastNamegt ltCompany gt ltAddressgt1234 Holmberg RdltAddressgt ltAddress2 gt ltCitygtParklandltCitygt ltZipCodegt33067ltZipCodegt ltStateCodegtFLltStateCodegt ltCountryCodegtUSltCountryCodegt ltPhonegt1112223344ltPhonegt ltWeightgt000ltWeightgt ltStatusgtNewltStatusgt ltInternalCommentgtltInternalCommentgt ltTrackingCode gt ltShipmentgt ltOrderItemsgt ltItemgt ltShipmentIDgt1ltShipmentIDgt ltProductIDgt100514ltProductIDgt ltProductNamegtThis is the product name ndash Free ProductltProductNamegt ltQuantitygt1ltQuantitygt ltUnitPricegt000ltUnitPricegt ltUnitCostgt000ltUnitCostgt ltOptionPricegt000ltOptionPricegt ltWeightgt000ltWeightgt ltWarehouseIDgt0ltWarehouseIDgt ltDateAdded gt ltPageAdded gt ltItemgt ltItemgt ltShipmentIDgt1ltShipmentIDgt ltProductIDgtabc3ltProductIDgt ltProductNamegtProduct NameltProductNamegt ltQuantitygt1ltQuantitygt ltUnitPricegt150000ltUnitPricegt ltUnitCostgt700ltUnitCostgt ltOptionPricegt000ltOptionPricegt ltWeightgt3200ltWeightgt ltWarehouseIDgt2ltWarehouseIDgt ltDateAddedgt842008 55643 PMltDateAddedgt ltPageAddedgtProduct-Name_p_1234-3214htmlltPageAddedgt ltItemgt ltOrderItemsgt ltShippingInformationgt ltOrdergt ltGetOrdersResponsegt

22 getOrderCount

Description Get total orders

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1224

requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

startFrom Boolean If startFrom is true and invoiceNum is specified the web service will count orders gt= invoiceNum

If startFrom is false and invoiceNum is specified the web service will count just the specified order

If invoiceNum is not specified this parameter will be ignored

invoiceNum String Search for specific invoice number

status String Search orders by status

dateFrom Date Search orders that were placed after specified date Must be in mmddyyyy format

dateTo Date Search orders that were placed before specified date Must be in mmddyyyy format

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltstartFromgtfalseltstartFromgt

ltinvoiceNumgtltinvoiceNumgt ltstatusgtNewltstatusgt ltdateFromgt08012008ltdateFromgt ltdateTogt08312008ltdateTogt

ltcallBackURLgtltcallBackURLgt ltgetOrderCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrdersCountResponse xmlns=gt ltQuantitygt474ltQuantitygt ltOrdersCountResponsegt

23 getOrderStatus

Description Get the status of a specific order

Parameters

Name Type Description

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1324

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Search for specific invoice number

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt

ltcallBackURLgtltcallBackURLgt ltgetOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltStatusIdgt1ltStatusIdgt ltStatusTextgtNewltStatusTextgt ltOrderStatusResponsegt

24 updateOrderStatus

Description Update the status of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

newStatus String New status for the specified order

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1424

ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt ltnewStatusgtNewltnewStatusgt

ltcallBackURLgtltcallBackURLgt ltupdateOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltNewStatusgtnewltNewStatusgt ltUpdateOrderStatusResponsegt

25 updateOrderShipment

Description Update the tracking number and the shipping date of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

shipmentID Numeric Identifies the shipment id for multiple shipment orders This ID can be found on the response of the getOrder method

This field is required for multiple shipment orders

tracking String Tracking code of the specified ordershipment

shipmentDate Date Shipping date of the specified ordershipment

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderShipment xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1524

ltinvoiceNumgt1476ltinvoiceNumgt

ltshipmentIDgtltshipmentIDgt lttrackinggt1234567890lttrackinggt ltshipmentDategt01202009ltshipmentDategt

ltcallBackURLgtltcallBackURLgt ltupdateOrderShipmentgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderShipmentResponse xmlns=gt ltresultgtOKltresultgt ltUpdateOrderShipmentResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1624

3 Product Related Methods

31 getProduct

Description Get product information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProduct xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt

ltproductIdgtltproductIdgt ltcallBackURLgtltcallBackURLgt ltgetProductgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductDetailsResponse xmlns=gt ltProductgt ltProductIDgtprod123ltProductIDgt ltProductNamegtTest ProductltProductNamegt ltCategoriesgt ltCategorygt ltCategoryIDgt27704ltCategoryIDgt ltCategoryNamegtPackagingltCategoryNamegt ltCategorygt ltCategorygt ltCategoryIDgt25848ltCategoryIDgt ltCategoryNamegtTest SubltCategoryNamegt ltCategorygt ltCategoriesgt ltMfgidgt1221ltMfgidgt ltManufacturergtManufacturer AltManufacturergt ltDistributorgt3dcartltDistributorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1724

ltCostgt15400ltCostgt ltPricegt26100ltPricegt ltRetailPricegt462ltRetailPricegt ltSalePricegt000ltSalePricegt ltOnSalegt0ltOnSalegt ltStockgt10ltStockgt ltStockAlertgt0ltStockAlertgt ltWeightgt100ltWeightgt ltWidthgt000ltWidthgt ltHeightgt000ltHeightgt ltDepthgt000ltDepthgt ltMinimumOrdergt1ltMinimumOrdergt ltMaximumOrdergt0ltMaximumOrdergt ltDateCreatedgt912008ltDateCreatedgt ltDescriptiongtTest product descriptionltDescriptiongt ltExtendedDescriptiongtProduct descriptionltExtendedDescriptiongt ltKeywordsgtkeyword test product buy storeltKeywordsgt ltRelatedProducts gt ltShipCostgt000ltShipCostgt ltTitlegtProduct titlehellipltTitlegt ltMetaTags gt ltDisplayText gt ltHomeSpecialgt0ltHomeSpecialgt ltCategorySpecialgt0ltCategorySpecialgt ltHidegt0ltHidegt ltFreeShippinggt0ltFreeShippinggt ltNonTaxgt0ltNonTaxgt ltNotForsalegt0ltNotForsalegt ltGiftCertificategt0ltGiftCertificategt ltUserIdgtJohn AdminltUserIdgt ltLastUpdategt812008ltLastUpdategt ltExtraFieldsgt ltExtraField1 gt ltExtraField2 gt ltExtraField3 gt ltExtraField4 gt ltExtraField5 gt ltExtraField6 gt ltExtraField7 gt ltExtraField8 gt ltExtraField9 gt ltExtraField10 gt ltExtraFieldsgt ltUseCatoptionsgt0ltUseCatoptionsgt ltQuantityOptions gt ltPriceLevelgt ltPrice_1gt0ltPrice_1gt ltPrice_2gt0ltPrice_2gt ltPrice_3gt0ltPrice_3gt ltPrice_4gt0ltPrice_4gt ltPrice_5gt0ltPrice_5gt ltPrice_6gt0ltPrice_6gt ltPrice_7gt0ltPrice_7gt ltPrice_8gt0ltPrice_8gt ltPrice_9gt0ltPrice_9gt ltPrice_10gt0ltPrice_10gt ltPriceLevelgt ltMinOrdergt0ltMinOrdergt ltListingDisplayTypegt-1ltListingDisplayTypegt ltShowOutStockgt-1ltShowOutStockgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1824

ltPricingGroupOptgt0ltPricingGroupOptgt ltQuantityDiscountOptgt0ltQuantityDiscountOptgt ltLoginLevelgt-1ltLoginLevelgt ltRedirectTo gt ltAccessGroup gt ltSelfShipgt0ltSelfShipgt ltTaxCode gt lteProductgt lteProductPassword gt lteProductRandomgt0lteProductRandomgt lteProductExpiregt0lteProductExpiregt lteProductPath gt lteProductSerialgt0lteProductSerialgt lteProductInstructions gt lteProductReuseSerialgt0lteProductReuseSerialgt lteProductgt ltNonSearchablegt0ltNonSearchablegt ltInstockMessage gt ltOutOfStockMessage gt ltBackOrderMessage gt ltRewardsgt ltRewardPointsgt0ltRewardPointsgt ltRewardDisablegt0ltRewardDisablegt ltRewardRedeemgt2610ltRewardRedeemgt ltRewardsgt ltFileNamegtltFileNamegt ltImagesgt ltImagegt ltUrlgtassetsimagesprodtestjpgltUrlgt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltThumbnailgtassetsimagesthumb_prodtestjpgltThumbnailgt ltImagesgt ltOptionsgt ltOptiongt ltIdgt11ltIdgt ltOptionTypegtSizeltOptionTypegt ltValuesgt ltValuegt ltIDgt28ltIDgt ltNamegtSmallltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuegt ltIDgt29ltIDgt ltNamegtLargeltNamegt ltOptionPricegt000ltOptionPricegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1924

ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptiongt ltIdgt12ltIdgt ltOptionTypegtColorltOptionTypegt ltValuesgt ltValuegt ltIDgt30ltIDgt ltNamegtBlueltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptionsgt ltProductgt ltGetProductDetailsResponsegt

32 getProductCount

Description Get total products

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt ltgetProductCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductCountResponse xmlns=gt ltProductQuantitygt6041ltProductQuantitygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2024

ltGetProductCountResponsegt

33 getProductInventory

Description Get the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgtprod123ltproductIdgt

ltcallBackURLgtltcallBackURLgt ltgetProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltInventorygt10ltInventorygt ltGetInventoryResponsegt

34 updateProductInventory

Description Update the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2124

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

quantity Number Stock quantity for the specified product

replaceStock Boolean Indicates if the stock should be replaced or incremented by the new quantity

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgt prod123ltproductIdgt ltquantitygt50ltquantitygt ltreplaceStockgttrueltreplaceStockgt

ltcallBackURLgtltcallBackURLgt ltupdateProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltNewInventorygt50ltNewInventorygt ltUpdateInventoryResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2224

Working with the callBackURL parameter The callBackURL parameter can be provided to any method of the 3dcart web service and must have a valid URL format followed by the page that will handle the post

ie httpwww3dcartcom3dcartapiposthandlerasp

When this parameter is provided the web service will post the result xml to the specified page and return the following result to the requester

ltxml version=10 encoding=utf-8 gt ltResponse xmlns=gt ltDescriptiongtXML Posted to

httpwww3dcartcom3dcartapiposthandleraspltDescriptiongt

ltResponsegt

The entire XML will be posted to the specified page which has to be prepared to handle the information

Here is a sample code of a page that handles the post and save the XML into a file

ltlanguage=vbscriptgt lt 3DCart Shopping Cart System - Version 30 3dCart Store Web Service - Version 10 Sample script to handle the xml response from the web service using the callbackURL parameter gt lt Dim strXml objXmlDoc Receives the xml strXml = requestForm Loads the XML into a xmlDoc object Set objXmlDoc = serverCreateObject(MicrosoftXMLDOM) objXmlDocpreserveWhiteSpace = true objXmlDocloadxml(strXml) Once the XML is loaded you can do anything with the information In this sample script the XML is being saved into the textxml file objXmlDocsave(serverMapPath(testxml)) Set objXmlDoc = nothing gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 2: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom

Table of Contents

TABLE OF CONTENTS 2 GETTING STARTED 3 WEB SERVICES METHODS 4

1 CUSTOMER RELATED METHODS 4 11 GETCUSTOMER 4 12 GETCUSTOMERCOUNT 5 13 EDITCUSTOMER 6

2 ORDER RELATED METHODS 9 21 GETORDER 9 22 GETORDERCOUNT 11 23 GETORDERSTATUS 12 24 UPDATEORDERSTATUS 13 25 UPDATEORDERSHIPMENT 14

3 PRODUCT RELATED METHODS 16 31 GETPRODUCT 16 32 GETPRODUCTCOUNT 19 33 GETPRODUCTINVENTORY 20 34 UPDATEPRODUCTINVENTORY 20

WORKING WITH THE CALLBACKURL PARAMETER 22 WEB SERVICES ERRORS 23 END - YOUrsquoVE REACHED THE END OF THIS GUIDE 24

CONTACTING 3DCART 24

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 324

Getting Started In order to use the Store Web Services you first need to configure the API Settings in the Online Store Manager (Settings -gt General -gt API Settings) Settings

o Enable API EnableDisable the use of the API

o API User Key Auto-generated 32 character string required to authenticate the APIs requests

o Admin User Identity used by the web services to make the requests

o IP Address You can restrict access to the API to one or more IP If none is entered the API will accept requests from any IP

The Store Web Services can be accessed in the following URL httpapi3dcartcomcartasmx

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 424

Web Services Methods

1 Customer Related Methods

11 getCustomer

Description Get customer information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

customersFilter String Comma delimited string with zero or more search parameters Allowed parameters firstname lastname email countrycode statecode city phone

ie firstname=Johnemail=johnemailcom countrycode=USstatecode=FLcity=Margate

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetCustomer xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt ltcustomersFiltergtfirstname=JohnltcustomersFiltergt

ltcallBackURLgtltcallBackURLgt ltgetCustomergt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltCustomersRequestResponse xmlns=gt ltCustomergt ltCustomerIDgt29ltCustomerIDgt ltUserID gt ltPasswordgt123456ltPasswordgt ltBillingAddressgt ltFirstNamegtJohnltFirstNamegt ltLastNamegtBrownltLastNamegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 524

ltAddressgt111 BRANCH MORR DRltAddressgt ltAddress2 gt ltCitygtMargateltCitygt ltStateCodegtFLltStateCodegt ltZipCodegt33063ltZipCodegt ltCountryCodegtUSltCountryCodegt ltCompany gt ltPhonegt1234567897ltPhonegt ltEmailgtjohnemailcomltEmailgt ltBillingAddressgt ltShippingAddressgt ltFirstNamegtJohnltFirstNamegt ltLastNamegtBrownltLastNamegt ltAddressgt111 BRANCH MORR DR ltAddressgt ltAddress2 gt ltCitygtMargateltCitygt ltStateCodegtFLltStateCodegt ltZipCodegt33063ltZipCodegt ltCountryCodegtUSltCountryCodegt ltCompany gt ltPhonegt12345678945ltPhonegt ltShippingAddressgt ltComments gt ltLastLoginDategt2172007ltLastLoginDategt ltWebSite gt ltDiscountGroup gt ltCustOther1 gt ltAccountNumbergt1333ltAccountNumbergt ltMailListgt1ltMailListgt ltCustomerTypegt0ltCustomerTypegt ltLastUpdategt2172007ltLastUpdategt ltCustEnabledgt1ltCustEnabledgt ltAditionalFieldsgt ltAdditionalField1 gt ltAdditionalField2 gt ltAdditionalField3 gt ltAdditionalField4 gt ltAditionalFieldsgt ltCustomergt ltCustomersRequestResponsegt

12 getCustomerCount

Description Get total customers

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 624

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetCustomerCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt lt getCustomerCount gt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltCustomerCountResponse xmlns=gt ltCustomerCountgt15473ltCustomerCountgt ltCustomerCountResponsegt

13 editCustomer

Description Edit a customer record

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

customerData String Name-value pair containing all customerrsquos information

This string must be in the following format name_of_the_field1===value_of_the_field1||| name_of_the_field2===value_of_the_field2|||

name_of_the_field3===value_of_the_field3hellip

Field and value separated by ===

Each pair separated by |||

See customerData specification bellow for a complete reference of the fields

action String Indicates if the customer should be inserted updated or deleted

This string must be one of the following insert update or delete

If action is delete just contactid or alt_contactid is required on the customerData field

callBackURL String URL where the XML response will be posted

Required parameters

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 724

customerData specification

Name Type (length) Description

contactid Numeric Customer id - identifies the customer Required when alt_contactid is blank

alt_contactid String (50) Alternative customer id - identifies the customer If has value contactId will be ignored

billing_firstname String (50) Billing first name Required when action = insert

billing_lastname String (50) Billing last name Required when action = insert

billing_address String (255) Billing address 1

billing_address2 String (50) Billing address 2

billing_city String (100) Billing city

billing_state String (100) Billing state (2 digits for US states)

billing_zip String (20) Billing zip code

billing_country String (2) Billing country (ISO Country Code)

billing_company String (255) Billing company

billing_phone String (50) Billing phone

email String (100) Email Required when action = insert

shipping_firstname String (50) Shipping first name

shipping_lastname String (50) Shipping last name

shipping_address String (255) Shipping address 1

shipping_address2 String (50) Shipping address 2

shipping_city String (100) Shipping city

shipping_state String (100) Shipping state (2 digits for US states)

shipping_zip String (20) Shipping zip code

shipping_country String (2) Shipping country (ISO Country Code)

shipping_company String (255) Shipping company

shipping_phone String (50) Shipping phone

comments String (255) Comments

website String (200) Website

pass String (20) Password Required when action = insert

discount Numeric Customer group id (0 for none) Default = 0

accountno String (50) Tax id

maillist Numeric Indicates if the customer is subscribed on the mailing list Must be 0 or 1 Default = 0

custenabled Numeric Indicates if the customer is enabled Must be 0 or 1 Default = 0

additional_field1 String (250) Additional field 1

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 824

additional_field2 String (250) Additional field 2

additional_field3 String (150) Additional field 3

Please note every field passed on customerData will be updated

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt lteditCustomer xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcom ltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltcustomerDatagtcontactid===123|||billing_firstname===JohnltcustomerDatagt ltactiongtupdateltactiongt

ltcallBackURLgtltcallBackURLgt lteditCustomergt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltEditCustomerResponse xmlns=gt ltresultgtOKlt result gt ltcontactidgt123ltcontactidgt ltalt_contactidgtltalt_contactidgt ltEditCustomerResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 924

2 Order Related Methods

21 getOrder

Description Get order information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

startFrom Boolean If startFrom is true and invoiceNum is specified the web service will return orders gt= invoiceNum

If startFrom is false and invoiceNum is specified the web service will return just the specified order

invoiceNum String Search for specific invoice number

status String Search orders by status

dateFrom Date Search orders that were placed after specified date Must be in mmddyyyy format

dateTo Date Search orders that were placed before specified date Must be in mmddyyyy format

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrder xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt ltstartFromgtfalseltstartFromgt

ltinvoiceNumgtltinvoiceNumgt ltstatusgtltstatusgt ltdateFromgt08012008ltdateFromgt

ltdateTogtltdateTogt ltcallBackURLgtltcallBackURLgt ltgetOrdergt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetOrdersResponse xmlns=gt ltOrdergt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1024

ltOrderIDgt35446ltOrderIDgt ltInvoiceNumbergtAB-1426ltInvoiceNumbergt ltCustomerIDgt15427ltCustomerIDgt ltDategt842008ltDategt ltTotalgt1590ltTotalgt ltTaxgt9000ltTaxgt ltTax2gt000ltTax2gt ltTax3gt000ltTax3gt ltShippinggt0ltShippinggt ltBillingAddressgt ltFirstNamegtSamltFirstNamegt ltLastNamegtJonesltLastNamegt ltEmailgtsamemailcomltEmailgt ltAddressgt1234 Holmberg RdltAddressgt ltAddress2 gt ltCitygtParklandltCitygt ltZipCodegt33067ltZipCodegt ltStateCodegtFLltStateCodegt ltCountryCodegtUSltCountryCodegt ltPhonegt1112223344ltPhonegt ltCompany gt ltBillingAddressgt ltCommentsgt ltOrderComment gt ltOrderInternalCommentgtltOrderInternalCommentgt ltOrderExternalComment gt ltCommentsgt ltPaymentMethodgtOnline Credit CardltPaymentMethodgt ltTimegt61222 PMltTimegt ltTransactiongt ltCVV2gt123ltCVV2gt ltResponseTextgtltResponseTextgt

ltAVSgtAVS ResultltAVSgt ltTransactionIdgt123456ltTransactionIdgt ltApprovalCodegt123456ltApprovalCodegt ltTransactionTypegtAuthorizeltTransactionTypegt ltAmountgt100000ltAmountgt ltTransactiongt

ltDiscountgt000ltDiscountgt ltPromotions gt ltGiftCertificatePurchased gt ltGiftCertificateUsed gt ltOrderStatusgtNewltOrderStatusgt ltReferergthttpwwwgooglecomltReferergt ltSalesPerson gt ltIPgt111222333444ltIPgt ltDateStartedgt842008 55418 PMltDateStartedgt ltUserID gt ltLastUpdategt842008ltLastUpdategt ltWeightgt000ltWeightgt ltAffiliateInformationgt ltAffiliateIDgt0ltAffiliateIDgt ltAffiliateCommissiongt0ltAffiliateCommissiongt ltAffiliateApproved gt ltAffiliateApprovedreason gt ltAffiliateInformationgt ltShippingInformationgt ltShipmentgt ltShipmentIDgt1ltShipmentIDgt ltShipmentDate gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1124

ltShippinggt0ltShippinggt ltMethodgtFree ShippingltMethodgt ltFirstNamegtSamltFirstNamegt ltLastNamegtJonesltLastNamegt ltCompany gt ltAddressgt1234 Holmberg RdltAddressgt ltAddress2 gt ltCitygtParklandltCitygt ltZipCodegt33067ltZipCodegt ltStateCodegtFLltStateCodegt ltCountryCodegtUSltCountryCodegt ltPhonegt1112223344ltPhonegt ltWeightgt000ltWeightgt ltStatusgtNewltStatusgt ltInternalCommentgtltInternalCommentgt ltTrackingCode gt ltShipmentgt ltOrderItemsgt ltItemgt ltShipmentIDgt1ltShipmentIDgt ltProductIDgt100514ltProductIDgt ltProductNamegtThis is the product name ndash Free ProductltProductNamegt ltQuantitygt1ltQuantitygt ltUnitPricegt000ltUnitPricegt ltUnitCostgt000ltUnitCostgt ltOptionPricegt000ltOptionPricegt ltWeightgt000ltWeightgt ltWarehouseIDgt0ltWarehouseIDgt ltDateAdded gt ltPageAdded gt ltItemgt ltItemgt ltShipmentIDgt1ltShipmentIDgt ltProductIDgtabc3ltProductIDgt ltProductNamegtProduct NameltProductNamegt ltQuantitygt1ltQuantitygt ltUnitPricegt150000ltUnitPricegt ltUnitCostgt700ltUnitCostgt ltOptionPricegt000ltOptionPricegt ltWeightgt3200ltWeightgt ltWarehouseIDgt2ltWarehouseIDgt ltDateAddedgt842008 55643 PMltDateAddedgt ltPageAddedgtProduct-Name_p_1234-3214htmlltPageAddedgt ltItemgt ltOrderItemsgt ltShippingInformationgt ltOrdergt ltGetOrdersResponsegt

22 getOrderCount

Description Get total orders

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1224

requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

startFrom Boolean If startFrom is true and invoiceNum is specified the web service will count orders gt= invoiceNum

If startFrom is false and invoiceNum is specified the web service will count just the specified order

If invoiceNum is not specified this parameter will be ignored

invoiceNum String Search for specific invoice number

status String Search orders by status

dateFrom Date Search orders that were placed after specified date Must be in mmddyyyy format

dateTo Date Search orders that were placed before specified date Must be in mmddyyyy format

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltstartFromgtfalseltstartFromgt

ltinvoiceNumgtltinvoiceNumgt ltstatusgtNewltstatusgt ltdateFromgt08012008ltdateFromgt ltdateTogt08312008ltdateTogt

ltcallBackURLgtltcallBackURLgt ltgetOrderCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrdersCountResponse xmlns=gt ltQuantitygt474ltQuantitygt ltOrdersCountResponsegt

23 getOrderStatus

Description Get the status of a specific order

Parameters

Name Type Description

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1324

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Search for specific invoice number

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt

ltcallBackURLgtltcallBackURLgt ltgetOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltStatusIdgt1ltStatusIdgt ltStatusTextgtNewltStatusTextgt ltOrderStatusResponsegt

24 updateOrderStatus

Description Update the status of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

newStatus String New status for the specified order

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1424

ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt ltnewStatusgtNewltnewStatusgt

ltcallBackURLgtltcallBackURLgt ltupdateOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltNewStatusgtnewltNewStatusgt ltUpdateOrderStatusResponsegt

25 updateOrderShipment

Description Update the tracking number and the shipping date of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

shipmentID Numeric Identifies the shipment id for multiple shipment orders This ID can be found on the response of the getOrder method

This field is required for multiple shipment orders

tracking String Tracking code of the specified ordershipment

shipmentDate Date Shipping date of the specified ordershipment

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderShipment xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1524

ltinvoiceNumgt1476ltinvoiceNumgt

ltshipmentIDgtltshipmentIDgt lttrackinggt1234567890lttrackinggt ltshipmentDategt01202009ltshipmentDategt

ltcallBackURLgtltcallBackURLgt ltupdateOrderShipmentgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderShipmentResponse xmlns=gt ltresultgtOKltresultgt ltUpdateOrderShipmentResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1624

3 Product Related Methods

31 getProduct

Description Get product information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProduct xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt

ltproductIdgtltproductIdgt ltcallBackURLgtltcallBackURLgt ltgetProductgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductDetailsResponse xmlns=gt ltProductgt ltProductIDgtprod123ltProductIDgt ltProductNamegtTest ProductltProductNamegt ltCategoriesgt ltCategorygt ltCategoryIDgt27704ltCategoryIDgt ltCategoryNamegtPackagingltCategoryNamegt ltCategorygt ltCategorygt ltCategoryIDgt25848ltCategoryIDgt ltCategoryNamegtTest SubltCategoryNamegt ltCategorygt ltCategoriesgt ltMfgidgt1221ltMfgidgt ltManufacturergtManufacturer AltManufacturergt ltDistributorgt3dcartltDistributorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1724

ltCostgt15400ltCostgt ltPricegt26100ltPricegt ltRetailPricegt462ltRetailPricegt ltSalePricegt000ltSalePricegt ltOnSalegt0ltOnSalegt ltStockgt10ltStockgt ltStockAlertgt0ltStockAlertgt ltWeightgt100ltWeightgt ltWidthgt000ltWidthgt ltHeightgt000ltHeightgt ltDepthgt000ltDepthgt ltMinimumOrdergt1ltMinimumOrdergt ltMaximumOrdergt0ltMaximumOrdergt ltDateCreatedgt912008ltDateCreatedgt ltDescriptiongtTest product descriptionltDescriptiongt ltExtendedDescriptiongtProduct descriptionltExtendedDescriptiongt ltKeywordsgtkeyword test product buy storeltKeywordsgt ltRelatedProducts gt ltShipCostgt000ltShipCostgt ltTitlegtProduct titlehellipltTitlegt ltMetaTags gt ltDisplayText gt ltHomeSpecialgt0ltHomeSpecialgt ltCategorySpecialgt0ltCategorySpecialgt ltHidegt0ltHidegt ltFreeShippinggt0ltFreeShippinggt ltNonTaxgt0ltNonTaxgt ltNotForsalegt0ltNotForsalegt ltGiftCertificategt0ltGiftCertificategt ltUserIdgtJohn AdminltUserIdgt ltLastUpdategt812008ltLastUpdategt ltExtraFieldsgt ltExtraField1 gt ltExtraField2 gt ltExtraField3 gt ltExtraField4 gt ltExtraField5 gt ltExtraField6 gt ltExtraField7 gt ltExtraField8 gt ltExtraField9 gt ltExtraField10 gt ltExtraFieldsgt ltUseCatoptionsgt0ltUseCatoptionsgt ltQuantityOptions gt ltPriceLevelgt ltPrice_1gt0ltPrice_1gt ltPrice_2gt0ltPrice_2gt ltPrice_3gt0ltPrice_3gt ltPrice_4gt0ltPrice_4gt ltPrice_5gt0ltPrice_5gt ltPrice_6gt0ltPrice_6gt ltPrice_7gt0ltPrice_7gt ltPrice_8gt0ltPrice_8gt ltPrice_9gt0ltPrice_9gt ltPrice_10gt0ltPrice_10gt ltPriceLevelgt ltMinOrdergt0ltMinOrdergt ltListingDisplayTypegt-1ltListingDisplayTypegt ltShowOutStockgt-1ltShowOutStockgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1824

ltPricingGroupOptgt0ltPricingGroupOptgt ltQuantityDiscountOptgt0ltQuantityDiscountOptgt ltLoginLevelgt-1ltLoginLevelgt ltRedirectTo gt ltAccessGroup gt ltSelfShipgt0ltSelfShipgt ltTaxCode gt lteProductgt lteProductPassword gt lteProductRandomgt0lteProductRandomgt lteProductExpiregt0lteProductExpiregt lteProductPath gt lteProductSerialgt0lteProductSerialgt lteProductInstructions gt lteProductReuseSerialgt0lteProductReuseSerialgt lteProductgt ltNonSearchablegt0ltNonSearchablegt ltInstockMessage gt ltOutOfStockMessage gt ltBackOrderMessage gt ltRewardsgt ltRewardPointsgt0ltRewardPointsgt ltRewardDisablegt0ltRewardDisablegt ltRewardRedeemgt2610ltRewardRedeemgt ltRewardsgt ltFileNamegtltFileNamegt ltImagesgt ltImagegt ltUrlgtassetsimagesprodtestjpgltUrlgt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltThumbnailgtassetsimagesthumb_prodtestjpgltThumbnailgt ltImagesgt ltOptionsgt ltOptiongt ltIdgt11ltIdgt ltOptionTypegtSizeltOptionTypegt ltValuesgt ltValuegt ltIDgt28ltIDgt ltNamegtSmallltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuegt ltIDgt29ltIDgt ltNamegtLargeltNamegt ltOptionPricegt000ltOptionPricegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1924

ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptiongt ltIdgt12ltIdgt ltOptionTypegtColorltOptionTypegt ltValuesgt ltValuegt ltIDgt30ltIDgt ltNamegtBlueltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptionsgt ltProductgt ltGetProductDetailsResponsegt

32 getProductCount

Description Get total products

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt ltgetProductCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductCountResponse xmlns=gt ltProductQuantitygt6041ltProductQuantitygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2024

ltGetProductCountResponsegt

33 getProductInventory

Description Get the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgtprod123ltproductIdgt

ltcallBackURLgtltcallBackURLgt ltgetProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltInventorygt10ltInventorygt ltGetInventoryResponsegt

34 updateProductInventory

Description Update the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2124

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

quantity Number Stock quantity for the specified product

replaceStock Boolean Indicates if the stock should be replaced or incremented by the new quantity

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgt prod123ltproductIdgt ltquantitygt50ltquantitygt ltreplaceStockgttrueltreplaceStockgt

ltcallBackURLgtltcallBackURLgt ltupdateProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltNewInventorygt50ltNewInventorygt ltUpdateInventoryResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2224

Working with the callBackURL parameter The callBackURL parameter can be provided to any method of the 3dcart web service and must have a valid URL format followed by the page that will handle the post

ie httpwww3dcartcom3dcartapiposthandlerasp

When this parameter is provided the web service will post the result xml to the specified page and return the following result to the requester

ltxml version=10 encoding=utf-8 gt ltResponse xmlns=gt ltDescriptiongtXML Posted to

httpwww3dcartcom3dcartapiposthandleraspltDescriptiongt

ltResponsegt

The entire XML will be posted to the specified page which has to be prepared to handle the information

Here is a sample code of a page that handles the post and save the XML into a file

ltlanguage=vbscriptgt lt 3DCart Shopping Cart System - Version 30 3dCart Store Web Service - Version 10 Sample script to handle the xml response from the web service using the callbackURL parameter gt lt Dim strXml objXmlDoc Receives the xml strXml = requestForm Loads the XML into a xmlDoc object Set objXmlDoc = serverCreateObject(MicrosoftXMLDOM) objXmlDocpreserveWhiteSpace = true objXmlDocloadxml(strXml) Once the XML is loaded you can do anything with the information In this sample script the XML is being saved into the textxml file objXmlDocsave(serverMapPath(testxml)) Set objXmlDoc = nothing gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 3: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 324

Getting Started In order to use the Store Web Services you first need to configure the API Settings in the Online Store Manager (Settings -gt General -gt API Settings) Settings

o Enable API EnableDisable the use of the API

o API User Key Auto-generated 32 character string required to authenticate the APIs requests

o Admin User Identity used by the web services to make the requests

o IP Address You can restrict access to the API to one or more IP If none is entered the API will accept requests from any IP

The Store Web Services can be accessed in the following URL httpapi3dcartcomcartasmx

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 424

Web Services Methods

1 Customer Related Methods

11 getCustomer

Description Get customer information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

customersFilter String Comma delimited string with zero or more search parameters Allowed parameters firstname lastname email countrycode statecode city phone

ie firstname=Johnemail=johnemailcom countrycode=USstatecode=FLcity=Margate

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetCustomer xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt ltcustomersFiltergtfirstname=JohnltcustomersFiltergt

ltcallBackURLgtltcallBackURLgt ltgetCustomergt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltCustomersRequestResponse xmlns=gt ltCustomergt ltCustomerIDgt29ltCustomerIDgt ltUserID gt ltPasswordgt123456ltPasswordgt ltBillingAddressgt ltFirstNamegtJohnltFirstNamegt ltLastNamegtBrownltLastNamegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 524

ltAddressgt111 BRANCH MORR DRltAddressgt ltAddress2 gt ltCitygtMargateltCitygt ltStateCodegtFLltStateCodegt ltZipCodegt33063ltZipCodegt ltCountryCodegtUSltCountryCodegt ltCompany gt ltPhonegt1234567897ltPhonegt ltEmailgtjohnemailcomltEmailgt ltBillingAddressgt ltShippingAddressgt ltFirstNamegtJohnltFirstNamegt ltLastNamegtBrownltLastNamegt ltAddressgt111 BRANCH MORR DR ltAddressgt ltAddress2 gt ltCitygtMargateltCitygt ltStateCodegtFLltStateCodegt ltZipCodegt33063ltZipCodegt ltCountryCodegtUSltCountryCodegt ltCompany gt ltPhonegt12345678945ltPhonegt ltShippingAddressgt ltComments gt ltLastLoginDategt2172007ltLastLoginDategt ltWebSite gt ltDiscountGroup gt ltCustOther1 gt ltAccountNumbergt1333ltAccountNumbergt ltMailListgt1ltMailListgt ltCustomerTypegt0ltCustomerTypegt ltLastUpdategt2172007ltLastUpdategt ltCustEnabledgt1ltCustEnabledgt ltAditionalFieldsgt ltAdditionalField1 gt ltAdditionalField2 gt ltAdditionalField3 gt ltAdditionalField4 gt ltAditionalFieldsgt ltCustomergt ltCustomersRequestResponsegt

12 getCustomerCount

Description Get total customers

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 624

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetCustomerCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt lt getCustomerCount gt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltCustomerCountResponse xmlns=gt ltCustomerCountgt15473ltCustomerCountgt ltCustomerCountResponsegt

13 editCustomer

Description Edit a customer record

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

customerData String Name-value pair containing all customerrsquos information

This string must be in the following format name_of_the_field1===value_of_the_field1||| name_of_the_field2===value_of_the_field2|||

name_of_the_field3===value_of_the_field3hellip

Field and value separated by ===

Each pair separated by |||

See customerData specification bellow for a complete reference of the fields

action String Indicates if the customer should be inserted updated or deleted

This string must be one of the following insert update or delete

If action is delete just contactid or alt_contactid is required on the customerData field

callBackURL String URL where the XML response will be posted

Required parameters

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 724

customerData specification

Name Type (length) Description

contactid Numeric Customer id - identifies the customer Required when alt_contactid is blank

alt_contactid String (50) Alternative customer id - identifies the customer If has value contactId will be ignored

billing_firstname String (50) Billing first name Required when action = insert

billing_lastname String (50) Billing last name Required when action = insert

billing_address String (255) Billing address 1

billing_address2 String (50) Billing address 2

billing_city String (100) Billing city

billing_state String (100) Billing state (2 digits for US states)

billing_zip String (20) Billing zip code

billing_country String (2) Billing country (ISO Country Code)

billing_company String (255) Billing company

billing_phone String (50) Billing phone

email String (100) Email Required when action = insert

shipping_firstname String (50) Shipping first name

shipping_lastname String (50) Shipping last name

shipping_address String (255) Shipping address 1

shipping_address2 String (50) Shipping address 2

shipping_city String (100) Shipping city

shipping_state String (100) Shipping state (2 digits for US states)

shipping_zip String (20) Shipping zip code

shipping_country String (2) Shipping country (ISO Country Code)

shipping_company String (255) Shipping company

shipping_phone String (50) Shipping phone

comments String (255) Comments

website String (200) Website

pass String (20) Password Required when action = insert

discount Numeric Customer group id (0 for none) Default = 0

accountno String (50) Tax id

maillist Numeric Indicates if the customer is subscribed on the mailing list Must be 0 or 1 Default = 0

custenabled Numeric Indicates if the customer is enabled Must be 0 or 1 Default = 0

additional_field1 String (250) Additional field 1

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 824

additional_field2 String (250) Additional field 2

additional_field3 String (150) Additional field 3

Please note every field passed on customerData will be updated

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt lteditCustomer xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcom ltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltcustomerDatagtcontactid===123|||billing_firstname===JohnltcustomerDatagt ltactiongtupdateltactiongt

ltcallBackURLgtltcallBackURLgt lteditCustomergt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltEditCustomerResponse xmlns=gt ltresultgtOKlt result gt ltcontactidgt123ltcontactidgt ltalt_contactidgtltalt_contactidgt ltEditCustomerResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 924

2 Order Related Methods

21 getOrder

Description Get order information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

startFrom Boolean If startFrom is true and invoiceNum is specified the web service will return orders gt= invoiceNum

If startFrom is false and invoiceNum is specified the web service will return just the specified order

invoiceNum String Search for specific invoice number

status String Search orders by status

dateFrom Date Search orders that were placed after specified date Must be in mmddyyyy format

dateTo Date Search orders that were placed before specified date Must be in mmddyyyy format

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrder xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt ltstartFromgtfalseltstartFromgt

ltinvoiceNumgtltinvoiceNumgt ltstatusgtltstatusgt ltdateFromgt08012008ltdateFromgt

ltdateTogtltdateTogt ltcallBackURLgtltcallBackURLgt ltgetOrdergt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetOrdersResponse xmlns=gt ltOrdergt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1024

ltOrderIDgt35446ltOrderIDgt ltInvoiceNumbergtAB-1426ltInvoiceNumbergt ltCustomerIDgt15427ltCustomerIDgt ltDategt842008ltDategt ltTotalgt1590ltTotalgt ltTaxgt9000ltTaxgt ltTax2gt000ltTax2gt ltTax3gt000ltTax3gt ltShippinggt0ltShippinggt ltBillingAddressgt ltFirstNamegtSamltFirstNamegt ltLastNamegtJonesltLastNamegt ltEmailgtsamemailcomltEmailgt ltAddressgt1234 Holmberg RdltAddressgt ltAddress2 gt ltCitygtParklandltCitygt ltZipCodegt33067ltZipCodegt ltStateCodegtFLltStateCodegt ltCountryCodegtUSltCountryCodegt ltPhonegt1112223344ltPhonegt ltCompany gt ltBillingAddressgt ltCommentsgt ltOrderComment gt ltOrderInternalCommentgtltOrderInternalCommentgt ltOrderExternalComment gt ltCommentsgt ltPaymentMethodgtOnline Credit CardltPaymentMethodgt ltTimegt61222 PMltTimegt ltTransactiongt ltCVV2gt123ltCVV2gt ltResponseTextgtltResponseTextgt

ltAVSgtAVS ResultltAVSgt ltTransactionIdgt123456ltTransactionIdgt ltApprovalCodegt123456ltApprovalCodegt ltTransactionTypegtAuthorizeltTransactionTypegt ltAmountgt100000ltAmountgt ltTransactiongt

ltDiscountgt000ltDiscountgt ltPromotions gt ltGiftCertificatePurchased gt ltGiftCertificateUsed gt ltOrderStatusgtNewltOrderStatusgt ltReferergthttpwwwgooglecomltReferergt ltSalesPerson gt ltIPgt111222333444ltIPgt ltDateStartedgt842008 55418 PMltDateStartedgt ltUserID gt ltLastUpdategt842008ltLastUpdategt ltWeightgt000ltWeightgt ltAffiliateInformationgt ltAffiliateIDgt0ltAffiliateIDgt ltAffiliateCommissiongt0ltAffiliateCommissiongt ltAffiliateApproved gt ltAffiliateApprovedreason gt ltAffiliateInformationgt ltShippingInformationgt ltShipmentgt ltShipmentIDgt1ltShipmentIDgt ltShipmentDate gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1124

ltShippinggt0ltShippinggt ltMethodgtFree ShippingltMethodgt ltFirstNamegtSamltFirstNamegt ltLastNamegtJonesltLastNamegt ltCompany gt ltAddressgt1234 Holmberg RdltAddressgt ltAddress2 gt ltCitygtParklandltCitygt ltZipCodegt33067ltZipCodegt ltStateCodegtFLltStateCodegt ltCountryCodegtUSltCountryCodegt ltPhonegt1112223344ltPhonegt ltWeightgt000ltWeightgt ltStatusgtNewltStatusgt ltInternalCommentgtltInternalCommentgt ltTrackingCode gt ltShipmentgt ltOrderItemsgt ltItemgt ltShipmentIDgt1ltShipmentIDgt ltProductIDgt100514ltProductIDgt ltProductNamegtThis is the product name ndash Free ProductltProductNamegt ltQuantitygt1ltQuantitygt ltUnitPricegt000ltUnitPricegt ltUnitCostgt000ltUnitCostgt ltOptionPricegt000ltOptionPricegt ltWeightgt000ltWeightgt ltWarehouseIDgt0ltWarehouseIDgt ltDateAdded gt ltPageAdded gt ltItemgt ltItemgt ltShipmentIDgt1ltShipmentIDgt ltProductIDgtabc3ltProductIDgt ltProductNamegtProduct NameltProductNamegt ltQuantitygt1ltQuantitygt ltUnitPricegt150000ltUnitPricegt ltUnitCostgt700ltUnitCostgt ltOptionPricegt000ltOptionPricegt ltWeightgt3200ltWeightgt ltWarehouseIDgt2ltWarehouseIDgt ltDateAddedgt842008 55643 PMltDateAddedgt ltPageAddedgtProduct-Name_p_1234-3214htmlltPageAddedgt ltItemgt ltOrderItemsgt ltShippingInformationgt ltOrdergt ltGetOrdersResponsegt

22 getOrderCount

Description Get total orders

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1224

requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

startFrom Boolean If startFrom is true and invoiceNum is specified the web service will count orders gt= invoiceNum

If startFrom is false and invoiceNum is specified the web service will count just the specified order

If invoiceNum is not specified this parameter will be ignored

invoiceNum String Search for specific invoice number

status String Search orders by status

dateFrom Date Search orders that were placed after specified date Must be in mmddyyyy format

dateTo Date Search orders that were placed before specified date Must be in mmddyyyy format

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltstartFromgtfalseltstartFromgt

ltinvoiceNumgtltinvoiceNumgt ltstatusgtNewltstatusgt ltdateFromgt08012008ltdateFromgt ltdateTogt08312008ltdateTogt

ltcallBackURLgtltcallBackURLgt ltgetOrderCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrdersCountResponse xmlns=gt ltQuantitygt474ltQuantitygt ltOrdersCountResponsegt

23 getOrderStatus

Description Get the status of a specific order

Parameters

Name Type Description

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1324

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Search for specific invoice number

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt

ltcallBackURLgtltcallBackURLgt ltgetOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltStatusIdgt1ltStatusIdgt ltStatusTextgtNewltStatusTextgt ltOrderStatusResponsegt

24 updateOrderStatus

Description Update the status of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

newStatus String New status for the specified order

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1424

ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt ltnewStatusgtNewltnewStatusgt

ltcallBackURLgtltcallBackURLgt ltupdateOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltNewStatusgtnewltNewStatusgt ltUpdateOrderStatusResponsegt

25 updateOrderShipment

Description Update the tracking number and the shipping date of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

shipmentID Numeric Identifies the shipment id for multiple shipment orders This ID can be found on the response of the getOrder method

This field is required for multiple shipment orders

tracking String Tracking code of the specified ordershipment

shipmentDate Date Shipping date of the specified ordershipment

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderShipment xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1524

ltinvoiceNumgt1476ltinvoiceNumgt

ltshipmentIDgtltshipmentIDgt lttrackinggt1234567890lttrackinggt ltshipmentDategt01202009ltshipmentDategt

ltcallBackURLgtltcallBackURLgt ltupdateOrderShipmentgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderShipmentResponse xmlns=gt ltresultgtOKltresultgt ltUpdateOrderShipmentResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1624

3 Product Related Methods

31 getProduct

Description Get product information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProduct xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt

ltproductIdgtltproductIdgt ltcallBackURLgtltcallBackURLgt ltgetProductgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductDetailsResponse xmlns=gt ltProductgt ltProductIDgtprod123ltProductIDgt ltProductNamegtTest ProductltProductNamegt ltCategoriesgt ltCategorygt ltCategoryIDgt27704ltCategoryIDgt ltCategoryNamegtPackagingltCategoryNamegt ltCategorygt ltCategorygt ltCategoryIDgt25848ltCategoryIDgt ltCategoryNamegtTest SubltCategoryNamegt ltCategorygt ltCategoriesgt ltMfgidgt1221ltMfgidgt ltManufacturergtManufacturer AltManufacturergt ltDistributorgt3dcartltDistributorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1724

ltCostgt15400ltCostgt ltPricegt26100ltPricegt ltRetailPricegt462ltRetailPricegt ltSalePricegt000ltSalePricegt ltOnSalegt0ltOnSalegt ltStockgt10ltStockgt ltStockAlertgt0ltStockAlertgt ltWeightgt100ltWeightgt ltWidthgt000ltWidthgt ltHeightgt000ltHeightgt ltDepthgt000ltDepthgt ltMinimumOrdergt1ltMinimumOrdergt ltMaximumOrdergt0ltMaximumOrdergt ltDateCreatedgt912008ltDateCreatedgt ltDescriptiongtTest product descriptionltDescriptiongt ltExtendedDescriptiongtProduct descriptionltExtendedDescriptiongt ltKeywordsgtkeyword test product buy storeltKeywordsgt ltRelatedProducts gt ltShipCostgt000ltShipCostgt ltTitlegtProduct titlehellipltTitlegt ltMetaTags gt ltDisplayText gt ltHomeSpecialgt0ltHomeSpecialgt ltCategorySpecialgt0ltCategorySpecialgt ltHidegt0ltHidegt ltFreeShippinggt0ltFreeShippinggt ltNonTaxgt0ltNonTaxgt ltNotForsalegt0ltNotForsalegt ltGiftCertificategt0ltGiftCertificategt ltUserIdgtJohn AdminltUserIdgt ltLastUpdategt812008ltLastUpdategt ltExtraFieldsgt ltExtraField1 gt ltExtraField2 gt ltExtraField3 gt ltExtraField4 gt ltExtraField5 gt ltExtraField6 gt ltExtraField7 gt ltExtraField8 gt ltExtraField9 gt ltExtraField10 gt ltExtraFieldsgt ltUseCatoptionsgt0ltUseCatoptionsgt ltQuantityOptions gt ltPriceLevelgt ltPrice_1gt0ltPrice_1gt ltPrice_2gt0ltPrice_2gt ltPrice_3gt0ltPrice_3gt ltPrice_4gt0ltPrice_4gt ltPrice_5gt0ltPrice_5gt ltPrice_6gt0ltPrice_6gt ltPrice_7gt0ltPrice_7gt ltPrice_8gt0ltPrice_8gt ltPrice_9gt0ltPrice_9gt ltPrice_10gt0ltPrice_10gt ltPriceLevelgt ltMinOrdergt0ltMinOrdergt ltListingDisplayTypegt-1ltListingDisplayTypegt ltShowOutStockgt-1ltShowOutStockgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1824

ltPricingGroupOptgt0ltPricingGroupOptgt ltQuantityDiscountOptgt0ltQuantityDiscountOptgt ltLoginLevelgt-1ltLoginLevelgt ltRedirectTo gt ltAccessGroup gt ltSelfShipgt0ltSelfShipgt ltTaxCode gt lteProductgt lteProductPassword gt lteProductRandomgt0lteProductRandomgt lteProductExpiregt0lteProductExpiregt lteProductPath gt lteProductSerialgt0lteProductSerialgt lteProductInstructions gt lteProductReuseSerialgt0lteProductReuseSerialgt lteProductgt ltNonSearchablegt0ltNonSearchablegt ltInstockMessage gt ltOutOfStockMessage gt ltBackOrderMessage gt ltRewardsgt ltRewardPointsgt0ltRewardPointsgt ltRewardDisablegt0ltRewardDisablegt ltRewardRedeemgt2610ltRewardRedeemgt ltRewardsgt ltFileNamegtltFileNamegt ltImagesgt ltImagegt ltUrlgtassetsimagesprodtestjpgltUrlgt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltThumbnailgtassetsimagesthumb_prodtestjpgltThumbnailgt ltImagesgt ltOptionsgt ltOptiongt ltIdgt11ltIdgt ltOptionTypegtSizeltOptionTypegt ltValuesgt ltValuegt ltIDgt28ltIDgt ltNamegtSmallltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuegt ltIDgt29ltIDgt ltNamegtLargeltNamegt ltOptionPricegt000ltOptionPricegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1924

ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptiongt ltIdgt12ltIdgt ltOptionTypegtColorltOptionTypegt ltValuesgt ltValuegt ltIDgt30ltIDgt ltNamegtBlueltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptionsgt ltProductgt ltGetProductDetailsResponsegt

32 getProductCount

Description Get total products

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt ltgetProductCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductCountResponse xmlns=gt ltProductQuantitygt6041ltProductQuantitygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2024

ltGetProductCountResponsegt

33 getProductInventory

Description Get the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgtprod123ltproductIdgt

ltcallBackURLgtltcallBackURLgt ltgetProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltInventorygt10ltInventorygt ltGetInventoryResponsegt

34 updateProductInventory

Description Update the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2124

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

quantity Number Stock quantity for the specified product

replaceStock Boolean Indicates if the stock should be replaced or incremented by the new quantity

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgt prod123ltproductIdgt ltquantitygt50ltquantitygt ltreplaceStockgttrueltreplaceStockgt

ltcallBackURLgtltcallBackURLgt ltupdateProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltNewInventorygt50ltNewInventorygt ltUpdateInventoryResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2224

Working with the callBackURL parameter The callBackURL parameter can be provided to any method of the 3dcart web service and must have a valid URL format followed by the page that will handle the post

ie httpwww3dcartcom3dcartapiposthandlerasp

When this parameter is provided the web service will post the result xml to the specified page and return the following result to the requester

ltxml version=10 encoding=utf-8 gt ltResponse xmlns=gt ltDescriptiongtXML Posted to

httpwww3dcartcom3dcartapiposthandleraspltDescriptiongt

ltResponsegt

The entire XML will be posted to the specified page which has to be prepared to handle the information

Here is a sample code of a page that handles the post and save the XML into a file

ltlanguage=vbscriptgt lt 3DCart Shopping Cart System - Version 30 3dCart Store Web Service - Version 10 Sample script to handle the xml response from the web service using the callbackURL parameter gt lt Dim strXml objXmlDoc Receives the xml strXml = requestForm Loads the XML into a xmlDoc object Set objXmlDoc = serverCreateObject(MicrosoftXMLDOM) objXmlDocpreserveWhiteSpace = true objXmlDocloadxml(strXml) Once the XML is loaded you can do anything with the information In this sample script the XML is being saved into the textxml file objXmlDocsave(serverMapPath(testxml)) Set objXmlDoc = nothing gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 4: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 424

Web Services Methods

1 Customer Related Methods

11 getCustomer

Description Get customer information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

customersFilter String Comma delimited string with zero or more search parameters Allowed parameters firstname lastname email countrycode statecode city phone

ie firstname=Johnemail=johnemailcom countrycode=USstatecode=FLcity=Margate

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetCustomer xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt ltcustomersFiltergtfirstname=JohnltcustomersFiltergt

ltcallBackURLgtltcallBackURLgt ltgetCustomergt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltCustomersRequestResponse xmlns=gt ltCustomergt ltCustomerIDgt29ltCustomerIDgt ltUserID gt ltPasswordgt123456ltPasswordgt ltBillingAddressgt ltFirstNamegtJohnltFirstNamegt ltLastNamegtBrownltLastNamegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 524

ltAddressgt111 BRANCH MORR DRltAddressgt ltAddress2 gt ltCitygtMargateltCitygt ltStateCodegtFLltStateCodegt ltZipCodegt33063ltZipCodegt ltCountryCodegtUSltCountryCodegt ltCompany gt ltPhonegt1234567897ltPhonegt ltEmailgtjohnemailcomltEmailgt ltBillingAddressgt ltShippingAddressgt ltFirstNamegtJohnltFirstNamegt ltLastNamegtBrownltLastNamegt ltAddressgt111 BRANCH MORR DR ltAddressgt ltAddress2 gt ltCitygtMargateltCitygt ltStateCodegtFLltStateCodegt ltZipCodegt33063ltZipCodegt ltCountryCodegtUSltCountryCodegt ltCompany gt ltPhonegt12345678945ltPhonegt ltShippingAddressgt ltComments gt ltLastLoginDategt2172007ltLastLoginDategt ltWebSite gt ltDiscountGroup gt ltCustOther1 gt ltAccountNumbergt1333ltAccountNumbergt ltMailListgt1ltMailListgt ltCustomerTypegt0ltCustomerTypegt ltLastUpdategt2172007ltLastUpdategt ltCustEnabledgt1ltCustEnabledgt ltAditionalFieldsgt ltAdditionalField1 gt ltAdditionalField2 gt ltAdditionalField3 gt ltAdditionalField4 gt ltAditionalFieldsgt ltCustomergt ltCustomersRequestResponsegt

12 getCustomerCount

Description Get total customers

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 624

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetCustomerCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt lt getCustomerCount gt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltCustomerCountResponse xmlns=gt ltCustomerCountgt15473ltCustomerCountgt ltCustomerCountResponsegt

13 editCustomer

Description Edit a customer record

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

customerData String Name-value pair containing all customerrsquos information

This string must be in the following format name_of_the_field1===value_of_the_field1||| name_of_the_field2===value_of_the_field2|||

name_of_the_field3===value_of_the_field3hellip

Field and value separated by ===

Each pair separated by |||

See customerData specification bellow for a complete reference of the fields

action String Indicates if the customer should be inserted updated or deleted

This string must be one of the following insert update or delete

If action is delete just contactid or alt_contactid is required on the customerData field

callBackURL String URL where the XML response will be posted

Required parameters

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 724

customerData specification

Name Type (length) Description

contactid Numeric Customer id - identifies the customer Required when alt_contactid is blank

alt_contactid String (50) Alternative customer id - identifies the customer If has value contactId will be ignored

billing_firstname String (50) Billing first name Required when action = insert

billing_lastname String (50) Billing last name Required when action = insert

billing_address String (255) Billing address 1

billing_address2 String (50) Billing address 2

billing_city String (100) Billing city

billing_state String (100) Billing state (2 digits for US states)

billing_zip String (20) Billing zip code

billing_country String (2) Billing country (ISO Country Code)

billing_company String (255) Billing company

billing_phone String (50) Billing phone

email String (100) Email Required when action = insert

shipping_firstname String (50) Shipping first name

shipping_lastname String (50) Shipping last name

shipping_address String (255) Shipping address 1

shipping_address2 String (50) Shipping address 2

shipping_city String (100) Shipping city

shipping_state String (100) Shipping state (2 digits for US states)

shipping_zip String (20) Shipping zip code

shipping_country String (2) Shipping country (ISO Country Code)

shipping_company String (255) Shipping company

shipping_phone String (50) Shipping phone

comments String (255) Comments

website String (200) Website

pass String (20) Password Required when action = insert

discount Numeric Customer group id (0 for none) Default = 0

accountno String (50) Tax id

maillist Numeric Indicates if the customer is subscribed on the mailing list Must be 0 or 1 Default = 0

custenabled Numeric Indicates if the customer is enabled Must be 0 or 1 Default = 0

additional_field1 String (250) Additional field 1

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 824

additional_field2 String (250) Additional field 2

additional_field3 String (150) Additional field 3

Please note every field passed on customerData will be updated

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt lteditCustomer xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcom ltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltcustomerDatagtcontactid===123|||billing_firstname===JohnltcustomerDatagt ltactiongtupdateltactiongt

ltcallBackURLgtltcallBackURLgt lteditCustomergt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltEditCustomerResponse xmlns=gt ltresultgtOKlt result gt ltcontactidgt123ltcontactidgt ltalt_contactidgtltalt_contactidgt ltEditCustomerResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 924

2 Order Related Methods

21 getOrder

Description Get order information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

startFrom Boolean If startFrom is true and invoiceNum is specified the web service will return orders gt= invoiceNum

If startFrom is false and invoiceNum is specified the web service will return just the specified order

invoiceNum String Search for specific invoice number

status String Search orders by status

dateFrom Date Search orders that were placed after specified date Must be in mmddyyyy format

dateTo Date Search orders that were placed before specified date Must be in mmddyyyy format

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrder xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt ltstartFromgtfalseltstartFromgt

ltinvoiceNumgtltinvoiceNumgt ltstatusgtltstatusgt ltdateFromgt08012008ltdateFromgt

ltdateTogtltdateTogt ltcallBackURLgtltcallBackURLgt ltgetOrdergt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetOrdersResponse xmlns=gt ltOrdergt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1024

ltOrderIDgt35446ltOrderIDgt ltInvoiceNumbergtAB-1426ltInvoiceNumbergt ltCustomerIDgt15427ltCustomerIDgt ltDategt842008ltDategt ltTotalgt1590ltTotalgt ltTaxgt9000ltTaxgt ltTax2gt000ltTax2gt ltTax3gt000ltTax3gt ltShippinggt0ltShippinggt ltBillingAddressgt ltFirstNamegtSamltFirstNamegt ltLastNamegtJonesltLastNamegt ltEmailgtsamemailcomltEmailgt ltAddressgt1234 Holmberg RdltAddressgt ltAddress2 gt ltCitygtParklandltCitygt ltZipCodegt33067ltZipCodegt ltStateCodegtFLltStateCodegt ltCountryCodegtUSltCountryCodegt ltPhonegt1112223344ltPhonegt ltCompany gt ltBillingAddressgt ltCommentsgt ltOrderComment gt ltOrderInternalCommentgtltOrderInternalCommentgt ltOrderExternalComment gt ltCommentsgt ltPaymentMethodgtOnline Credit CardltPaymentMethodgt ltTimegt61222 PMltTimegt ltTransactiongt ltCVV2gt123ltCVV2gt ltResponseTextgtltResponseTextgt

ltAVSgtAVS ResultltAVSgt ltTransactionIdgt123456ltTransactionIdgt ltApprovalCodegt123456ltApprovalCodegt ltTransactionTypegtAuthorizeltTransactionTypegt ltAmountgt100000ltAmountgt ltTransactiongt

ltDiscountgt000ltDiscountgt ltPromotions gt ltGiftCertificatePurchased gt ltGiftCertificateUsed gt ltOrderStatusgtNewltOrderStatusgt ltReferergthttpwwwgooglecomltReferergt ltSalesPerson gt ltIPgt111222333444ltIPgt ltDateStartedgt842008 55418 PMltDateStartedgt ltUserID gt ltLastUpdategt842008ltLastUpdategt ltWeightgt000ltWeightgt ltAffiliateInformationgt ltAffiliateIDgt0ltAffiliateIDgt ltAffiliateCommissiongt0ltAffiliateCommissiongt ltAffiliateApproved gt ltAffiliateApprovedreason gt ltAffiliateInformationgt ltShippingInformationgt ltShipmentgt ltShipmentIDgt1ltShipmentIDgt ltShipmentDate gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1124

ltShippinggt0ltShippinggt ltMethodgtFree ShippingltMethodgt ltFirstNamegtSamltFirstNamegt ltLastNamegtJonesltLastNamegt ltCompany gt ltAddressgt1234 Holmberg RdltAddressgt ltAddress2 gt ltCitygtParklandltCitygt ltZipCodegt33067ltZipCodegt ltStateCodegtFLltStateCodegt ltCountryCodegtUSltCountryCodegt ltPhonegt1112223344ltPhonegt ltWeightgt000ltWeightgt ltStatusgtNewltStatusgt ltInternalCommentgtltInternalCommentgt ltTrackingCode gt ltShipmentgt ltOrderItemsgt ltItemgt ltShipmentIDgt1ltShipmentIDgt ltProductIDgt100514ltProductIDgt ltProductNamegtThis is the product name ndash Free ProductltProductNamegt ltQuantitygt1ltQuantitygt ltUnitPricegt000ltUnitPricegt ltUnitCostgt000ltUnitCostgt ltOptionPricegt000ltOptionPricegt ltWeightgt000ltWeightgt ltWarehouseIDgt0ltWarehouseIDgt ltDateAdded gt ltPageAdded gt ltItemgt ltItemgt ltShipmentIDgt1ltShipmentIDgt ltProductIDgtabc3ltProductIDgt ltProductNamegtProduct NameltProductNamegt ltQuantitygt1ltQuantitygt ltUnitPricegt150000ltUnitPricegt ltUnitCostgt700ltUnitCostgt ltOptionPricegt000ltOptionPricegt ltWeightgt3200ltWeightgt ltWarehouseIDgt2ltWarehouseIDgt ltDateAddedgt842008 55643 PMltDateAddedgt ltPageAddedgtProduct-Name_p_1234-3214htmlltPageAddedgt ltItemgt ltOrderItemsgt ltShippingInformationgt ltOrdergt ltGetOrdersResponsegt

22 getOrderCount

Description Get total orders

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1224

requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

startFrom Boolean If startFrom is true and invoiceNum is specified the web service will count orders gt= invoiceNum

If startFrom is false and invoiceNum is specified the web service will count just the specified order

If invoiceNum is not specified this parameter will be ignored

invoiceNum String Search for specific invoice number

status String Search orders by status

dateFrom Date Search orders that were placed after specified date Must be in mmddyyyy format

dateTo Date Search orders that were placed before specified date Must be in mmddyyyy format

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltstartFromgtfalseltstartFromgt

ltinvoiceNumgtltinvoiceNumgt ltstatusgtNewltstatusgt ltdateFromgt08012008ltdateFromgt ltdateTogt08312008ltdateTogt

ltcallBackURLgtltcallBackURLgt ltgetOrderCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrdersCountResponse xmlns=gt ltQuantitygt474ltQuantitygt ltOrdersCountResponsegt

23 getOrderStatus

Description Get the status of a specific order

Parameters

Name Type Description

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1324

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Search for specific invoice number

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt

ltcallBackURLgtltcallBackURLgt ltgetOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltStatusIdgt1ltStatusIdgt ltStatusTextgtNewltStatusTextgt ltOrderStatusResponsegt

24 updateOrderStatus

Description Update the status of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

newStatus String New status for the specified order

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1424

ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt ltnewStatusgtNewltnewStatusgt

ltcallBackURLgtltcallBackURLgt ltupdateOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltNewStatusgtnewltNewStatusgt ltUpdateOrderStatusResponsegt

25 updateOrderShipment

Description Update the tracking number and the shipping date of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

shipmentID Numeric Identifies the shipment id for multiple shipment orders This ID can be found on the response of the getOrder method

This field is required for multiple shipment orders

tracking String Tracking code of the specified ordershipment

shipmentDate Date Shipping date of the specified ordershipment

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderShipment xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1524

ltinvoiceNumgt1476ltinvoiceNumgt

ltshipmentIDgtltshipmentIDgt lttrackinggt1234567890lttrackinggt ltshipmentDategt01202009ltshipmentDategt

ltcallBackURLgtltcallBackURLgt ltupdateOrderShipmentgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderShipmentResponse xmlns=gt ltresultgtOKltresultgt ltUpdateOrderShipmentResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1624

3 Product Related Methods

31 getProduct

Description Get product information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProduct xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt

ltproductIdgtltproductIdgt ltcallBackURLgtltcallBackURLgt ltgetProductgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductDetailsResponse xmlns=gt ltProductgt ltProductIDgtprod123ltProductIDgt ltProductNamegtTest ProductltProductNamegt ltCategoriesgt ltCategorygt ltCategoryIDgt27704ltCategoryIDgt ltCategoryNamegtPackagingltCategoryNamegt ltCategorygt ltCategorygt ltCategoryIDgt25848ltCategoryIDgt ltCategoryNamegtTest SubltCategoryNamegt ltCategorygt ltCategoriesgt ltMfgidgt1221ltMfgidgt ltManufacturergtManufacturer AltManufacturergt ltDistributorgt3dcartltDistributorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1724

ltCostgt15400ltCostgt ltPricegt26100ltPricegt ltRetailPricegt462ltRetailPricegt ltSalePricegt000ltSalePricegt ltOnSalegt0ltOnSalegt ltStockgt10ltStockgt ltStockAlertgt0ltStockAlertgt ltWeightgt100ltWeightgt ltWidthgt000ltWidthgt ltHeightgt000ltHeightgt ltDepthgt000ltDepthgt ltMinimumOrdergt1ltMinimumOrdergt ltMaximumOrdergt0ltMaximumOrdergt ltDateCreatedgt912008ltDateCreatedgt ltDescriptiongtTest product descriptionltDescriptiongt ltExtendedDescriptiongtProduct descriptionltExtendedDescriptiongt ltKeywordsgtkeyword test product buy storeltKeywordsgt ltRelatedProducts gt ltShipCostgt000ltShipCostgt ltTitlegtProduct titlehellipltTitlegt ltMetaTags gt ltDisplayText gt ltHomeSpecialgt0ltHomeSpecialgt ltCategorySpecialgt0ltCategorySpecialgt ltHidegt0ltHidegt ltFreeShippinggt0ltFreeShippinggt ltNonTaxgt0ltNonTaxgt ltNotForsalegt0ltNotForsalegt ltGiftCertificategt0ltGiftCertificategt ltUserIdgtJohn AdminltUserIdgt ltLastUpdategt812008ltLastUpdategt ltExtraFieldsgt ltExtraField1 gt ltExtraField2 gt ltExtraField3 gt ltExtraField4 gt ltExtraField5 gt ltExtraField6 gt ltExtraField7 gt ltExtraField8 gt ltExtraField9 gt ltExtraField10 gt ltExtraFieldsgt ltUseCatoptionsgt0ltUseCatoptionsgt ltQuantityOptions gt ltPriceLevelgt ltPrice_1gt0ltPrice_1gt ltPrice_2gt0ltPrice_2gt ltPrice_3gt0ltPrice_3gt ltPrice_4gt0ltPrice_4gt ltPrice_5gt0ltPrice_5gt ltPrice_6gt0ltPrice_6gt ltPrice_7gt0ltPrice_7gt ltPrice_8gt0ltPrice_8gt ltPrice_9gt0ltPrice_9gt ltPrice_10gt0ltPrice_10gt ltPriceLevelgt ltMinOrdergt0ltMinOrdergt ltListingDisplayTypegt-1ltListingDisplayTypegt ltShowOutStockgt-1ltShowOutStockgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1824

ltPricingGroupOptgt0ltPricingGroupOptgt ltQuantityDiscountOptgt0ltQuantityDiscountOptgt ltLoginLevelgt-1ltLoginLevelgt ltRedirectTo gt ltAccessGroup gt ltSelfShipgt0ltSelfShipgt ltTaxCode gt lteProductgt lteProductPassword gt lteProductRandomgt0lteProductRandomgt lteProductExpiregt0lteProductExpiregt lteProductPath gt lteProductSerialgt0lteProductSerialgt lteProductInstructions gt lteProductReuseSerialgt0lteProductReuseSerialgt lteProductgt ltNonSearchablegt0ltNonSearchablegt ltInstockMessage gt ltOutOfStockMessage gt ltBackOrderMessage gt ltRewardsgt ltRewardPointsgt0ltRewardPointsgt ltRewardDisablegt0ltRewardDisablegt ltRewardRedeemgt2610ltRewardRedeemgt ltRewardsgt ltFileNamegtltFileNamegt ltImagesgt ltImagegt ltUrlgtassetsimagesprodtestjpgltUrlgt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltThumbnailgtassetsimagesthumb_prodtestjpgltThumbnailgt ltImagesgt ltOptionsgt ltOptiongt ltIdgt11ltIdgt ltOptionTypegtSizeltOptionTypegt ltValuesgt ltValuegt ltIDgt28ltIDgt ltNamegtSmallltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuegt ltIDgt29ltIDgt ltNamegtLargeltNamegt ltOptionPricegt000ltOptionPricegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1924

ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptiongt ltIdgt12ltIdgt ltOptionTypegtColorltOptionTypegt ltValuesgt ltValuegt ltIDgt30ltIDgt ltNamegtBlueltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptionsgt ltProductgt ltGetProductDetailsResponsegt

32 getProductCount

Description Get total products

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt ltgetProductCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductCountResponse xmlns=gt ltProductQuantitygt6041ltProductQuantitygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2024

ltGetProductCountResponsegt

33 getProductInventory

Description Get the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgtprod123ltproductIdgt

ltcallBackURLgtltcallBackURLgt ltgetProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltInventorygt10ltInventorygt ltGetInventoryResponsegt

34 updateProductInventory

Description Update the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2124

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

quantity Number Stock quantity for the specified product

replaceStock Boolean Indicates if the stock should be replaced or incremented by the new quantity

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgt prod123ltproductIdgt ltquantitygt50ltquantitygt ltreplaceStockgttrueltreplaceStockgt

ltcallBackURLgtltcallBackURLgt ltupdateProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltNewInventorygt50ltNewInventorygt ltUpdateInventoryResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2224

Working with the callBackURL parameter The callBackURL parameter can be provided to any method of the 3dcart web service and must have a valid URL format followed by the page that will handle the post

ie httpwww3dcartcom3dcartapiposthandlerasp

When this parameter is provided the web service will post the result xml to the specified page and return the following result to the requester

ltxml version=10 encoding=utf-8 gt ltResponse xmlns=gt ltDescriptiongtXML Posted to

httpwww3dcartcom3dcartapiposthandleraspltDescriptiongt

ltResponsegt

The entire XML will be posted to the specified page which has to be prepared to handle the information

Here is a sample code of a page that handles the post and save the XML into a file

ltlanguage=vbscriptgt lt 3DCart Shopping Cart System - Version 30 3dCart Store Web Service - Version 10 Sample script to handle the xml response from the web service using the callbackURL parameter gt lt Dim strXml objXmlDoc Receives the xml strXml = requestForm Loads the XML into a xmlDoc object Set objXmlDoc = serverCreateObject(MicrosoftXMLDOM) objXmlDocpreserveWhiteSpace = true objXmlDocloadxml(strXml) Once the XML is loaded you can do anything with the information In this sample script the XML is being saved into the textxml file objXmlDocsave(serverMapPath(testxml)) Set objXmlDoc = nothing gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 5: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 524

ltAddressgt111 BRANCH MORR DRltAddressgt ltAddress2 gt ltCitygtMargateltCitygt ltStateCodegtFLltStateCodegt ltZipCodegt33063ltZipCodegt ltCountryCodegtUSltCountryCodegt ltCompany gt ltPhonegt1234567897ltPhonegt ltEmailgtjohnemailcomltEmailgt ltBillingAddressgt ltShippingAddressgt ltFirstNamegtJohnltFirstNamegt ltLastNamegtBrownltLastNamegt ltAddressgt111 BRANCH MORR DR ltAddressgt ltAddress2 gt ltCitygtMargateltCitygt ltStateCodegtFLltStateCodegt ltZipCodegt33063ltZipCodegt ltCountryCodegtUSltCountryCodegt ltCompany gt ltPhonegt12345678945ltPhonegt ltShippingAddressgt ltComments gt ltLastLoginDategt2172007ltLastLoginDategt ltWebSite gt ltDiscountGroup gt ltCustOther1 gt ltAccountNumbergt1333ltAccountNumbergt ltMailListgt1ltMailListgt ltCustomerTypegt0ltCustomerTypegt ltLastUpdategt2172007ltLastUpdategt ltCustEnabledgt1ltCustEnabledgt ltAditionalFieldsgt ltAdditionalField1 gt ltAdditionalField2 gt ltAdditionalField3 gt ltAdditionalField4 gt ltAditionalFieldsgt ltCustomergt ltCustomersRequestResponsegt

12 getCustomerCount

Description Get total customers

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 624

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetCustomerCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt lt getCustomerCount gt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltCustomerCountResponse xmlns=gt ltCustomerCountgt15473ltCustomerCountgt ltCustomerCountResponsegt

13 editCustomer

Description Edit a customer record

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

customerData String Name-value pair containing all customerrsquos information

This string must be in the following format name_of_the_field1===value_of_the_field1||| name_of_the_field2===value_of_the_field2|||

name_of_the_field3===value_of_the_field3hellip

Field and value separated by ===

Each pair separated by |||

See customerData specification bellow for a complete reference of the fields

action String Indicates if the customer should be inserted updated or deleted

This string must be one of the following insert update or delete

If action is delete just contactid or alt_contactid is required on the customerData field

callBackURL String URL where the XML response will be posted

Required parameters

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 724

customerData specification

Name Type (length) Description

contactid Numeric Customer id - identifies the customer Required when alt_contactid is blank

alt_contactid String (50) Alternative customer id - identifies the customer If has value contactId will be ignored

billing_firstname String (50) Billing first name Required when action = insert

billing_lastname String (50) Billing last name Required when action = insert

billing_address String (255) Billing address 1

billing_address2 String (50) Billing address 2

billing_city String (100) Billing city

billing_state String (100) Billing state (2 digits for US states)

billing_zip String (20) Billing zip code

billing_country String (2) Billing country (ISO Country Code)

billing_company String (255) Billing company

billing_phone String (50) Billing phone

email String (100) Email Required when action = insert

shipping_firstname String (50) Shipping first name

shipping_lastname String (50) Shipping last name

shipping_address String (255) Shipping address 1

shipping_address2 String (50) Shipping address 2

shipping_city String (100) Shipping city

shipping_state String (100) Shipping state (2 digits for US states)

shipping_zip String (20) Shipping zip code

shipping_country String (2) Shipping country (ISO Country Code)

shipping_company String (255) Shipping company

shipping_phone String (50) Shipping phone

comments String (255) Comments

website String (200) Website

pass String (20) Password Required when action = insert

discount Numeric Customer group id (0 for none) Default = 0

accountno String (50) Tax id

maillist Numeric Indicates if the customer is subscribed on the mailing list Must be 0 or 1 Default = 0

custenabled Numeric Indicates if the customer is enabled Must be 0 or 1 Default = 0

additional_field1 String (250) Additional field 1

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 824

additional_field2 String (250) Additional field 2

additional_field3 String (150) Additional field 3

Please note every field passed on customerData will be updated

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt lteditCustomer xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcom ltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltcustomerDatagtcontactid===123|||billing_firstname===JohnltcustomerDatagt ltactiongtupdateltactiongt

ltcallBackURLgtltcallBackURLgt lteditCustomergt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltEditCustomerResponse xmlns=gt ltresultgtOKlt result gt ltcontactidgt123ltcontactidgt ltalt_contactidgtltalt_contactidgt ltEditCustomerResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 924

2 Order Related Methods

21 getOrder

Description Get order information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

startFrom Boolean If startFrom is true and invoiceNum is specified the web service will return orders gt= invoiceNum

If startFrom is false and invoiceNum is specified the web service will return just the specified order

invoiceNum String Search for specific invoice number

status String Search orders by status

dateFrom Date Search orders that were placed after specified date Must be in mmddyyyy format

dateTo Date Search orders that were placed before specified date Must be in mmddyyyy format

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrder xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt ltstartFromgtfalseltstartFromgt

ltinvoiceNumgtltinvoiceNumgt ltstatusgtltstatusgt ltdateFromgt08012008ltdateFromgt

ltdateTogtltdateTogt ltcallBackURLgtltcallBackURLgt ltgetOrdergt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetOrdersResponse xmlns=gt ltOrdergt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1024

ltOrderIDgt35446ltOrderIDgt ltInvoiceNumbergtAB-1426ltInvoiceNumbergt ltCustomerIDgt15427ltCustomerIDgt ltDategt842008ltDategt ltTotalgt1590ltTotalgt ltTaxgt9000ltTaxgt ltTax2gt000ltTax2gt ltTax3gt000ltTax3gt ltShippinggt0ltShippinggt ltBillingAddressgt ltFirstNamegtSamltFirstNamegt ltLastNamegtJonesltLastNamegt ltEmailgtsamemailcomltEmailgt ltAddressgt1234 Holmberg RdltAddressgt ltAddress2 gt ltCitygtParklandltCitygt ltZipCodegt33067ltZipCodegt ltStateCodegtFLltStateCodegt ltCountryCodegtUSltCountryCodegt ltPhonegt1112223344ltPhonegt ltCompany gt ltBillingAddressgt ltCommentsgt ltOrderComment gt ltOrderInternalCommentgtltOrderInternalCommentgt ltOrderExternalComment gt ltCommentsgt ltPaymentMethodgtOnline Credit CardltPaymentMethodgt ltTimegt61222 PMltTimegt ltTransactiongt ltCVV2gt123ltCVV2gt ltResponseTextgtltResponseTextgt

ltAVSgtAVS ResultltAVSgt ltTransactionIdgt123456ltTransactionIdgt ltApprovalCodegt123456ltApprovalCodegt ltTransactionTypegtAuthorizeltTransactionTypegt ltAmountgt100000ltAmountgt ltTransactiongt

ltDiscountgt000ltDiscountgt ltPromotions gt ltGiftCertificatePurchased gt ltGiftCertificateUsed gt ltOrderStatusgtNewltOrderStatusgt ltReferergthttpwwwgooglecomltReferergt ltSalesPerson gt ltIPgt111222333444ltIPgt ltDateStartedgt842008 55418 PMltDateStartedgt ltUserID gt ltLastUpdategt842008ltLastUpdategt ltWeightgt000ltWeightgt ltAffiliateInformationgt ltAffiliateIDgt0ltAffiliateIDgt ltAffiliateCommissiongt0ltAffiliateCommissiongt ltAffiliateApproved gt ltAffiliateApprovedreason gt ltAffiliateInformationgt ltShippingInformationgt ltShipmentgt ltShipmentIDgt1ltShipmentIDgt ltShipmentDate gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1124

ltShippinggt0ltShippinggt ltMethodgtFree ShippingltMethodgt ltFirstNamegtSamltFirstNamegt ltLastNamegtJonesltLastNamegt ltCompany gt ltAddressgt1234 Holmberg RdltAddressgt ltAddress2 gt ltCitygtParklandltCitygt ltZipCodegt33067ltZipCodegt ltStateCodegtFLltStateCodegt ltCountryCodegtUSltCountryCodegt ltPhonegt1112223344ltPhonegt ltWeightgt000ltWeightgt ltStatusgtNewltStatusgt ltInternalCommentgtltInternalCommentgt ltTrackingCode gt ltShipmentgt ltOrderItemsgt ltItemgt ltShipmentIDgt1ltShipmentIDgt ltProductIDgt100514ltProductIDgt ltProductNamegtThis is the product name ndash Free ProductltProductNamegt ltQuantitygt1ltQuantitygt ltUnitPricegt000ltUnitPricegt ltUnitCostgt000ltUnitCostgt ltOptionPricegt000ltOptionPricegt ltWeightgt000ltWeightgt ltWarehouseIDgt0ltWarehouseIDgt ltDateAdded gt ltPageAdded gt ltItemgt ltItemgt ltShipmentIDgt1ltShipmentIDgt ltProductIDgtabc3ltProductIDgt ltProductNamegtProduct NameltProductNamegt ltQuantitygt1ltQuantitygt ltUnitPricegt150000ltUnitPricegt ltUnitCostgt700ltUnitCostgt ltOptionPricegt000ltOptionPricegt ltWeightgt3200ltWeightgt ltWarehouseIDgt2ltWarehouseIDgt ltDateAddedgt842008 55643 PMltDateAddedgt ltPageAddedgtProduct-Name_p_1234-3214htmlltPageAddedgt ltItemgt ltOrderItemsgt ltShippingInformationgt ltOrdergt ltGetOrdersResponsegt

22 getOrderCount

Description Get total orders

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1224

requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

startFrom Boolean If startFrom is true and invoiceNum is specified the web service will count orders gt= invoiceNum

If startFrom is false and invoiceNum is specified the web service will count just the specified order

If invoiceNum is not specified this parameter will be ignored

invoiceNum String Search for specific invoice number

status String Search orders by status

dateFrom Date Search orders that were placed after specified date Must be in mmddyyyy format

dateTo Date Search orders that were placed before specified date Must be in mmddyyyy format

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltstartFromgtfalseltstartFromgt

ltinvoiceNumgtltinvoiceNumgt ltstatusgtNewltstatusgt ltdateFromgt08012008ltdateFromgt ltdateTogt08312008ltdateTogt

ltcallBackURLgtltcallBackURLgt ltgetOrderCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrdersCountResponse xmlns=gt ltQuantitygt474ltQuantitygt ltOrdersCountResponsegt

23 getOrderStatus

Description Get the status of a specific order

Parameters

Name Type Description

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1324

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Search for specific invoice number

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt

ltcallBackURLgtltcallBackURLgt ltgetOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltStatusIdgt1ltStatusIdgt ltStatusTextgtNewltStatusTextgt ltOrderStatusResponsegt

24 updateOrderStatus

Description Update the status of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

newStatus String New status for the specified order

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1424

ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt ltnewStatusgtNewltnewStatusgt

ltcallBackURLgtltcallBackURLgt ltupdateOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltNewStatusgtnewltNewStatusgt ltUpdateOrderStatusResponsegt

25 updateOrderShipment

Description Update the tracking number and the shipping date of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

shipmentID Numeric Identifies the shipment id for multiple shipment orders This ID can be found on the response of the getOrder method

This field is required for multiple shipment orders

tracking String Tracking code of the specified ordershipment

shipmentDate Date Shipping date of the specified ordershipment

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderShipment xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1524

ltinvoiceNumgt1476ltinvoiceNumgt

ltshipmentIDgtltshipmentIDgt lttrackinggt1234567890lttrackinggt ltshipmentDategt01202009ltshipmentDategt

ltcallBackURLgtltcallBackURLgt ltupdateOrderShipmentgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderShipmentResponse xmlns=gt ltresultgtOKltresultgt ltUpdateOrderShipmentResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1624

3 Product Related Methods

31 getProduct

Description Get product information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProduct xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt

ltproductIdgtltproductIdgt ltcallBackURLgtltcallBackURLgt ltgetProductgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductDetailsResponse xmlns=gt ltProductgt ltProductIDgtprod123ltProductIDgt ltProductNamegtTest ProductltProductNamegt ltCategoriesgt ltCategorygt ltCategoryIDgt27704ltCategoryIDgt ltCategoryNamegtPackagingltCategoryNamegt ltCategorygt ltCategorygt ltCategoryIDgt25848ltCategoryIDgt ltCategoryNamegtTest SubltCategoryNamegt ltCategorygt ltCategoriesgt ltMfgidgt1221ltMfgidgt ltManufacturergtManufacturer AltManufacturergt ltDistributorgt3dcartltDistributorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1724

ltCostgt15400ltCostgt ltPricegt26100ltPricegt ltRetailPricegt462ltRetailPricegt ltSalePricegt000ltSalePricegt ltOnSalegt0ltOnSalegt ltStockgt10ltStockgt ltStockAlertgt0ltStockAlertgt ltWeightgt100ltWeightgt ltWidthgt000ltWidthgt ltHeightgt000ltHeightgt ltDepthgt000ltDepthgt ltMinimumOrdergt1ltMinimumOrdergt ltMaximumOrdergt0ltMaximumOrdergt ltDateCreatedgt912008ltDateCreatedgt ltDescriptiongtTest product descriptionltDescriptiongt ltExtendedDescriptiongtProduct descriptionltExtendedDescriptiongt ltKeywordsgtkeyword test product buy storeltKeywordsgt ltRelatedProducts gt ltShipCostgt000ltShipCostgt ltTitlegtProduct titlehellipltTitlegt ltMetaTags gt ltDisplayText gt ltHomeSpecialgt0ltHomeSpecialgt ltCategorySpecialgt0ltCategorySpecialgt ltHidegt0ltHidegt ltFreeShippinggt0ltFreeShippinggt ltNonTaxgt0ltNonTaxgt ltNotForsalegt0ltNotForsalegt ltGiftCertificategt0ltGiftCertificategt ltUserIdgtJohn AdminltUserIdgt ltLastUpdategt812008ltLastUpdategt ltExtraFieldsgt ltExtraField1 gt ltExtraField2 gt ltExtraField3 gt ltExtraField4 gt ltExtraField5 gt ltExtraField6 gt ltExtraField7 gt ltExtraField8 gt ltExtraField9 gt ltExtraField10 gt ltExtraFieldsgt ltUseCatoptionsgt0ltUseCatoptionsgt ltQuantityOptions gt ltPriceLevelgt ltPrice_1gt0ltPrice_1gt ltPrice_2gt0ltPrice_2gt ltPrice_3gt0ltPrice_3gt ltPrice_4gt0ltPrice_4gt ltPrice_5gt0ltPrice_5gt ltPrice_6gt0ltPrice_6gt ltPrice_7gt0ltPrice_7gt ltPrice_8gt0ltPrice_8gt ltPrice_9gt0ltPrice_9gt ltPrice_10gt0ltPrice_10gt ltPriceLevelgt ltMinOrdergt0ltMinOrdergt ltListingDisplayTypegt-1ltListingDisplayTypegt ltShowOutStockgt-1ltShowOutStockgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1824

ltPricingGroupOptgt0ltPricingGroupOptgt ltQuantityDiscountOptgt0ltQuantityDiscountOptgt ltLoginLevelgt-1ltLoginLevelgt ltRedirectTo gt ltAccessGroup gt ltSelfShipgt0ltSelfShipgt ltTaxCode gt lteProductgt lteProductPassword gt lteProductRandomgt0lteProductRandomgt lteProductExpiregt0lteProductExpiregt lteProductPath gt lteProductSerialgt0lteProductSerialgt lteProductInstructions gt lteProductReuseSerialgt0lteProductReuseSerialgt lteProductgt ltNonSearchablegt0ltNonSearchablegt ltInstockMessage gt ltOutOfStockMessage gt ltBackOrderMessage gt ltRewardsgt ltRewardPointsgt0ltRewardPointsgt ltRewardDisablegt0ltRewardDisablegt ltRewardRedeemgt2610ltRewardRedeemgt ltRewardsgt ltFileNamegtltFileNamegt ltImagesgt ltImagegt ltUrlgtassetsimagesprodtestjpgltUrlgt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltThumbnailgtassetsimagesthumb_prodtestjpgltThumbnailgt ltImagesgt ltOptionsgt ltOptiongt ltIdgt11ltIdgt ltOptionTypegtSizeltOptionTypegt ltValuesgt ltValuegt ltIDgt28ltIDgt ltNamegtSmallltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuegt ltIDgt29ltIDgt ltNamegtLargeltNamegt ltOptionPricegt000ltOptionPricegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1924

ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptiongt ltIdgt12ltIdgt ltOptionTypegtColorltOptionTypegt ltValuesgt ltValuegt ltIDgt30ltIDgt ltNamegtBlueltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptionsgt ltProductgt ltGetProductDetailsResponsegt

32 getProductCount

Description Get total products

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt ltgetProductCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductCountResponse xmlns=gt ltProductQuantitygt6041ltProductQuantitygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2024

ltGetProductCountResponsegt

33 getProductInventory

Description Get the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgtprod123ltproductIdgt

ltcallBackURLgtltcallBackURLgt ltgetProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltInventorygt10ltInventorygt ltGetInventoryResponsegt

34 updateProductInventory

Description Update the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2124

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

quantity Number Stock quantity for the specified product

replaceStock Boolean Indicates if the stock should be replaced or incremented by the new quantity

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgt prod123ltproductIdgt ltquantitygt50ltquantitygt ltreplaceStockgttrueltreplaceStockgt

ltcallBackURLgtltcallBackURLgt ltupdateProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltNewInventorygt50ltNewInventorygt ltUpdateInventoryResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2224

Working with the callBackURL parameter The callBackURL parameter can be provided to any method of the 3dcart web service and must have a valid URL format followed by the page that will handle the post

ie httpwww3dcartcom3dcartapiposthandlerasp

When this parameter is provided the web service will post the result xml to the specified page and return the following result to the requester

ltxml version=10 encoding=utf-8 gt ltResponse xmlns=gt ltDescriptiongtXML Posted to

httpwww3dcartcom3dcartapiposthandleraspltDescriptiongt

ltResponsegt

The entire XML will be posted to the specified page which has to be prepared to handle the information

Here is a sample code of a page that handles the post and save the XML into a file

ltlanguage=vbscriptgt lt 3DCart Shopping Cart System - Version 30 3dCart Store Web Service - Version 10 Sample script to handle the xml response from the web service using the callbackURL parameter gt lt Dim strXml objXmlDoc Receives the xml strXml = requestForm Loads the XML into a xmlDoc object Set objXmlDoc = serverCreateObject(MicrosoftXMLDOM) objXmlDocpreserveWhiteSpace = true objXmlDocloadxml(strXml) Once the XML is loaded you can do anything with the information In this sample script the XML is being saved into the textxml file objXmlDocsave(serverMapPath(testxml)) Set objXmlDoc = nothing gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 6: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 624

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetCustomerCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt lt getCustomerCount gt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltCustomerCountResponse xmlns=gt ltCustomerCountgt15473ltCustomerCountgt ltCustomerCountResponsegt

13 editCustomer

Description Edit a customer record

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

customerData String Name-value pair containing all customerrsquos information

This string must be in the following format name_of_the_field1===value_of_the_field1||| name_of_the_field2===value_of_the_field2|||

name_of_the_field3===value_of_the_field3hellip

Field and value separated by ===

Each pair separated by |||

See customerData specification bellow for a complete reference of the fields

action String Indicates if the customer should be inserted updated or deleted

This string must be one of the following insert update or delete

If action is delete just contactid or alt_contactid is required on the customerData field

callBackURL String URL where the XML response will be posted

Required parameters

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 724

customerData specification

Name Type (length) Description

contactid Numeric Customer id - identifies the customer Required when alt_contactid is blank

alt_contactid String (50) Alternative customer id - identifies the customer If has value contactId will be ignored

billing_firstname String (50) Billing first name Required when action = insert

billing_lastname String (50) Billing last name Required when action = insert

billing_address String (255) Billing address 1

billing_address2 String (50) Billing address 2

billing_city String (100) Billing city

billing_state String (100) Billing state (2 digits for US states)

billing_zip String (20) Billing zip code

billing_country String (2) Billing country (ISO Country Code)

billing_company String (255) Billing company

billing_phone String (50) Billing phone

email String (100) Email Required when action = insert

shipping_firstname String (50) Shipping first name

shipping_lastname String (50) Shipping last name

shipping_address String (255) Shipping address 1

shipping_address2 String (50) Shipping address 2

shipping_city String (100) Shipping city

shipping_state String (100) Shipping state (2 digits for US states)

shipping_zip String (20) Shipping zip code

shipping_country String (2) Shipping country (ISO Country Code)

shipping_company String (255) Shipping company

shipping_phone String (50) Shipping phone

comments String (255) Comments

website String (200) Website

pass String (20) Password Required when action = insert

discount Numeric Customer group id (0 for none) Default = 0

accountno String (50) Tax id

maillist Numeric Indicates if the customer is subscribed on the mailing list Must be 0 or 1 Default = 0

custenabled Numeric Indicates if the customer is enabled Must be 0 or 1 Default = 0

additional_field1 String (250) Additional field 1

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 824

additional_field2 String (250) Additional field 2

additional_field3 String (150) Additional field 3

Please note every field passed on customerData will be updated

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt lteditCustomer xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcom ltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltcustomerDatagtcontactid===123|||billing_firstname===JohnltcustomerDatagt ltactiongtupdateltactiongt

ltcallBackURLgtltcallBackURLgt lteditCustomergt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltEditCustomerResponse xmlns=gt ltresultgtOKlt result gt ltcontactidgt123ltcontactidgt ltalt_contactidgtltalt_contactidgt ltEditCustomerResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 924

2 Order Related Methods

21 getOrder

Description Get order information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

startFrom Boolean If startFrom is true and invoiceNum is specified the web service will return orders gt= invoiceNum

If startFrom is false and invoiceNum is specified the web service will return just the specified order

invoiceNum String Search for specific invoice number

status String Search orders by status

dateFrom Date Search orders that were placed after specified date Must be in mmddyyyy format

dateTo Date Search orders that were placed before specified date Must be in mmddyyyy format

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrder xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt ltstartFromgtfalseltstartFromgt

ltinvoiceNumgtltinvoiceNumgt ltstatusgtltstatusgt ltdateFromgt08012008ltdateFromgt

ltdateTogtltdateTogt ltcallBackURLgtltcallBackURLgt ltgetOrdergt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetOrdersResponse xmlns=gt ltOrdergt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1024

ltOrderIDgt35446ltOrderIDgt ltInvoiceNumbergtAB-1426ltInvoiceNumbergt ltCustomerIDgt15427ltCustomerIDgt ltDategt842008ltDategt ltTotalgt1590ltTotalgt ltTaxgt9000ltTaxgt ltTax2gt000ltTax2gt ltTax3gt000ltTax3gt ltShippinggt0ltShippinggt ltBillingAddressgt ltFirstNamegtSamltFirstNamegt ltLastNamegtJonesltLastNamegt ltEmailgtsamemailcomltEmailgt ltAddressgt1234 Holmberg RdltAddressgt ltAddress2 gt ltCitygtParklandltCitygt ltZipCodegt33067ltZipCodegt ltStateCodegtFLltStateCodegt ltCountryCodegtUSltCountryCodegt ltPhonegt1112223344ltPhonegt ltCompany gt ltBillingAddressgt ltCommentsgt ltOrderComment gt ltOrderInternalCommentgtltOrderInternalCommentgt ltOrderExternalComment gt ltCommentsgt ltPaymentMethodgtOnline Credit CardltPaymentMethodgt ltTimegt61222 PMltTimegt ltTransactiongt ltCVV2gt123ltCVV2gt ltResponseTextgtltResponseTextgt

ltAVSgtAVS ResultltAVSgt ltTransactionIdgt123456ltTransactionIdgt ltApprovalCodegt123456ltApprovalCodegt ltTransactionTypegtAuthorizeltTransactionTypegt ltAmountgt100000ltAmountgt ltTransactiongt

ltDiscountgt000ltDiscountgt ltPromotions gt ltGiftCertificatePurchased gt ltGiftCertificateUsed gt ltOrderStatusgtNewltOrderStatusgt ltReferergthttpwwwgooglecomltReferergt ltSalesPerson gt ltIPgt111222333444ltIPgt ltDateStartedgt842008 55418 PMltDateStartedgt ltUserID gt ltLastUpdategt842008ltLastUpdategt ltWeightgt000ltWeightgt ltAffiliateInformationgt ltAffiliateIDgt0ltAffiliateIDgt ltAffiliateCommissiongt0ltAffiliateCommissiongt ltAffiliateApproved gt ltAffiliateApprovedreason gt ltAffiliateInformationgt ltShippingInformationgt ltShipmentgt ltShipmentIDgt1ltShipmentIDgt ltShipmentDate gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1124

ltShippinggt0ltShippinggt ltMethodgtFree ShippingltMethodgt ltFirstNamegtSamltFirstNamegt ltLastNamegtJonesltLastNamegt ltCompany gt ltAddressgt1234 Holmberg RdltAddressgt ltAddress2 gt ltCitygtParklandltCitygt ltZipCodegt33067ltZipCodegt ltStateCodegtFLltStateCodegt ltCountryCodegtUSltCountryCodegt ltPhonegt1112223344ltPhonegt ltWeightgt000ltWeightgt ltStatusgtNewltStatusgt ltInternalCommentgtltInternalCommentgt ltTrackingCode gt ltShipmentgt ltOrderItemsgt ltItemgt ltShipmentIDgt1ltShipmentIDgt ltProductIDgt100514ltProductIDgt ltProductNamegtThis is the product name ndash Free ProductltProductNamegt ltQuantitygt1ltQuantitygt ltUnitPricegt000ltUnitPricegt ltUnitCostgt000ltUnitCostgt ltOptionPricegt000ltOptionPricegt ltWeightgt000ltWeightgt ltWarehouseIDgt0ltWarehouseIDgt ltDateAdded gt ltPageAdded gt ltItemgt ltItemgt ltShipmentIDgt1ltShipmentIDgt ltProductIDgtabc3ltProductIDgt ltProductNamegtProduct NameltProductNamegt ltQuantitygt1ltQuantitygt ltUnitPricegt150000ltUnitPricegt ltUnitCostgt700ltUnitCostgt ltOptionPricegt000ltOptionPricegt ltWeightgt3200ltWeightgt ltWarehouseIDgt2ltWarehouseIDgt ltDateAddedgt842008 55643 PMltDateAddedgt ltPageAddedgtProduct-Name_p_1234-3214htmlltPageAddedgt ltItemgt ltOrderItemsgt ltShippingInformationgt ltOrdergt ltGetOrdersResponsegt

22 getOrderCount

Description Get total orders

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1224

requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

startFrom Boolean If startFrom is true and invoiceNum is specified the web service will count orders gt= invoiceNum

If startFrom is false and invoiceNum is specified the web service will count just the specified order

If invoiceNum is not specified this parameter will be ignored

invoiceNum String Search for specific invoice number

status String Search orders by status

dateFrom Date Search orders that were placed after specified date Must be in mmddyyyy format

dateTo Date Search orders that were placed before specified date Must be in mmddyyyy format

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltstartFromgtfalseltstartFromgt

ltinvoiceNumgtltinvoiceNumgt ltstatusgtNewltstatusgt ltdateFromgt08012008ltdateFromgt ltdateTogt08312008ltdateTogt

ltcallBackURLgtltcallBackURLgt ltgetOrderCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrdersCountResponse xmlns=gt ltQuantitygt474ltQuantitygt ltOrdersCountResponsegt

23 getOrderStatus

Description Get the status of a specific order

Parameters

Name Type Description

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1324

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Search for specific invoice number

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt

ltcallBackURLgtltcallBackURLgt ltgetOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltStatusIdgt1ltStatusIdgt ltStatusTextgtNewltStatusTextgt ltOrderStatusResponsegt

24 updateOrderStatus

Description Update the status of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

newStatus String New status for the specified order

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1424

ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt ltnewStatusgtNewltnewStatusgt

ltcallBackURLgtltcallBackURLgt ltupdateOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltNewStatusgtnewltNewStatusgt ltUpdateOrderStatusResponsegt

25 updateOrderShipment

Description Update the tracking number and the shipping date of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

shipmentID Numeric Identifies the shipment id for multiple shipment orders This ID can be found on the response of the getOrder method

This field is required for multiple shipment orders

tracking String Tracking code of the specified ordershipment

shipmentDate Date Shipping date of the specified ordershipment

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderShipment xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1524

ltinvoiceNumgt1476ltinvoiceNumgt

ltshipmentIDgtltshipmentIDgt lttrackinggt1234567890lttrackinggt ltshipmentDategt01202009ltshipmentDategt

ltcallBackURLgtltcallBackURLgt ltupdateOrderShipmentgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderShipmentResponse xmlns=gt ltresultgtOKltresultgt ltUpdateOrderShipmentResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1624

3 Product Related Methods

31 getProduct

Description Get product information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProduct xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt

ltproductIdgtltproductIdgt ltcallBackURLgtltcallBackURLgt ltgetProductgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductDetailsResponse xmlns=gt ltProductgt ltProductIDgtprod123ltProductIDgt ltProductNamegtTest ProductltProductNamegt ltCategoriesgt ltCategorygt ltCategoryIDgt27704ltCategoryIDgt ltCategoryNamegtPackagingltCategoryNamegt ltCategorygt ltCategorygt ltCategoryIDgt25848ltCategoryIDgt ltCategoryNamegtTest SubltCategoryNamegt ltCategorygt ltCategoriesgt ltMfgidgt1221ltMfgidgt ltManufacturergtManufacturer AltManufacturergt ltDistributorgt3dcartltDistributorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1724

ltCostgt15400ltCostgt ltPricegt26100ltPricegt ltRetailPricegt462ltRetailPricegt ltSalePricegt000ltSalePricegt ltOnSalegt0ltOnSalegt ltStockgt10ltStockgt ltStockAlertgt0ltStockAlertgt ltWeightgt100ltWeightgt ltWidthgt000ltWidthgt ltHeightgt000ltHeightgt ltDepthgt000ltDepthgt ltMinimumOrdergt1ltMinimumOrdergt ltMaximumOrdergt0ltMaximumOrdergt ltDateCreatedgt912008ltDateCreatedgt ltDescriptiongtTest product descriptionltDescriptiongt ltExtendedDescriptiongtProduct descriptionltExtendedDescriptiongt ltKeywordsgtkeyword test product buy storeltKeywordsgt ltRelatedProducts gt ltShipCostgt000ltShipCostgt ltTitlegtProduct titlehellipltTitlegt ltMetaTags gt ltDisplayText gt ltHomeSpecialgt0ltHomeSpecialgt ltCategorySpecialgt0ltCategorySpecialgt ltHidegt0ltHidegt ltFreeShippinggt0ltFreeShippinggt ltNonTaxgt0ltNonTaxgt ltNotForsalegt0ltNotForsalegt ltGiftCertificategt0ltGiftCertificategt ltUserIdgtJohn AdminltUserIdgt ltLastUpdategt812008ltLastUpdategt ltExtraFieldsgt ltExtraField1 gt ltExtraField2 gt ltExtraField3 gt ltExtraField4 gt ltExtraField5 gt ltExtraField6 gt ltExtraField7 gt ltExtraField8 gt ltExtraField9 gt ltExtraField10 gt ltExtraFieldsgt ltUseCatoptionsgt0ltUseCatoptionsgt ltQuantityOptions gt ltPriceLevelgt ltPrice_1gt0ltPrice_1gt ltPrice_2gt0ltPrice_2gt ltPrice_3gt0ltPrice_3gt ltPrice_4gt0ltPrice_4gt ltPrice_5gt0ltPrice_5gt ltPrice_6gt0ltPrice_6gt ltPrice_7gt0ltPrice_7gt ltPrice_8gt0ltPrice_8gt ltPrice_9gt0ltPrice_9gt ltPrice_10gt0ltPrice_10gt ltPriceLevelgt ltMinOrdergt0ltMinOrdergt ltListingDisplayTypegt-1ltListingDisplayTypegt ltShowOutStockgt-1ltShowOutStockgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1824

ltPricingGroupOptgt0ltPricingGroupOptgt ltQuantityDiscountOptgt0ltQuantityDiscountOptgt ltLoginLevelgt-1ltLoginLevelgt ltRedirectTo gt ltAccessGroup gt ltSelfShipgt0ltSelfShipgt ltTaxCode gt lteProductgt lteProductPassword gt lteProductRandomgt0lteProductRandomgt lteProductExpiregt0lteProductExpiregt lteProductPath gt lteProductSerialgt0lteProductSerialgt lteProductInstructions gt lteProductReuseSerialgt0lteProductReuseSerialgt lteProductgt ltNonSearchablegt0ltNonSearchablegt ltInstockMessage gt ltOutOfStockMessage gt ltBackOrderMessage gt ltRewardsgt ltRewardPointsgt0ltRewardPointsgt ltRewardDisablegt0ltRewardDisablegt ltRewardRedeemgt2610ltRewardRedeemgt ltRewardsgt ltFileNamegtltFileNamegt ltImagesgt ltImagegt ltUrlgtassetsimagesprodtestjpgltUrlgt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltThumbnailgtassetsimagesthumb_prodtestjpgltThumbnailgt ltImagesgt ltOptionsgt ltOptiongt ltIdgt11ltIdgt ltOptionTypegtSizeltOptionTypegt ltValuesgt ltValuegt ltIDgt28ltIDgt ltNamegtSmallltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuegt ltIDgt29ltIDgt ltNamegtLargeltNamegt ltOptionPricegt000ltOptionPricegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1924

ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptiongt ltIdgt12ltIdgt ltOptionTypegtColorltOptionTypegt ltValuesgt ltValuegt ltIDgt30ltIDgt ltNamegtBlueltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptionsgt ltProductgt ltGetProductDetailsResponsegt

32 getProductCount

Description Get total products

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt ltgetProductCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductCountResponse xmlns=gt ltProductQuantitygt6041ltProductQuantitygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2024

ltGetProductCountResponsegt

33 getProductInventory

Description Get the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgtprod123ltproductIdgt

ltcallBackURLgtltcallBackURLgt ltgetProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltInventorygt10ltInventorygt ltGetInventoryResponsegt

34 updateProductInventory

Description Update the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2124

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

quantity Number Stock quantity for the specified product

replaceStock Boolean Indicates if the stock should be replaced or incremented by the new quantity

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgt prod123ltproductIdgt ltquantitygt50ltquantitygt ltreplaceStockgttrueltreplaceStockgt

ltcallBackURLgtltcallBackURLgt ltupdateProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltNewInventorygt50ltNewInventorygt ltUpdateInventoryResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2224

Working with the callBackURL parameter The callBackURL parameter can be provided to any method of the 3dcart web service and must have a valid URL format followed by the page that will handle the post

ie httpwww3dcartcom3dcartapiposthandlerasp

When this parameter is provided the web service will post the result xml to the specified page and return the following result to the requester

ltxml version=10 encoding=utf-8 gt ltResponse xmlns=gt ltDescriptiongtXML Posted to

httpwww3dcartcom3dcartapiposthandleraspltDescriptiongt

ltResponsegt

The entire XML will be posted to the specified page which has to be prepared to handle the information

Here is a sample code of a page that handles the post and save the XML into a file

ltlanguage=vbscriptgt lt 3DCart Shopping Cart System - Version 30 3dCart Store Web Service - Version 10 Sample script to handle the xml response from the web service using the callbackURL parameter gt lt Dim strXml objXmlDoc Receives the xml strXml = requestForm Loads the XML into a xmlDoc object Set objXmlDoc = serverCreateObject(MicrosoftXMLDOM) objXmlDocpreserveWhiteSpace = true objXmlDocloadxml(strXml) Once the XML is loaded you can do anything with the information In this sample script the XML is being saved into the textxml file objXmlDocsave(serverMapPath(testxml)) Set objXmlDoc = nothing gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 7: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 724

customerData specification

Name Type (length) Description

contactid Numeric Customer id - identifies the customer Required when alt_contactid is blank

alt_contactid String (50) Alternative customer id - identifies the customer If has value contactId will be ignored

billing_firstname String (50) Billing first name Required when action = insert

billing_lastname String (50) Billing last name Required when action = insert

billing_address String (255) Billing address 1

billing_address2 String (50) Billing address 2

billing_city String (100) Billing city

billing_state String (100) Billing state (2 digits for US states)

billing_zip String (20) Billing zip code

billing_country String (2) Billing country (ISO Country Code)

billing_company String (255) Billing company

billing_phone String (50) Billing phone

email String (100) Email Required when action = insert

shipping_firstname String (50) Shipping first name

shipping_lastname String (50) Shipping last name

shipping_address String (255) Shipping address 1

shipping_address2 String (50) Shipping address 2

shipping_city String (100) Shipping city

shipping_state String (100) Shipping state (2 digits for US states)

shipping_zip String (20) Shipping zip code

shipping_country String (2) Shipping country (ISO Country Code)

shipping_company String (255) Shipping company

shipping_phone String (50) Shipping phone

comments String (255) Comments

website String (200) Website

pass String (20) Password Required when action = insert

discount Numeric Customer group id (0 for none) Default = 0

accountno String (50) Tax id

maillist Numeric Indicates if the customer is subscribed on the mailing list Must be 0 or 1 Default = 0

custenabled Numeric Indicates if the customer is enabled Must be 0 or 1 Default = 0

additional_field1 String (250) Additional field 1

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 824

additional_field2 String (250) Additional field 2

additional_field3 String (150) Additional field 3

Please note every field passed on customerData will be updated

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt lteditCustomer xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcom ltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltcustomerDatagtcontactid===123|||billing_firstname===JohnltcustomerDatagt ltactiongtupdateltactiongt

ltcallBackURLgtltcallBackURLgt lteditCustomergt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltEditCustomerResponse xmlns=gt ltresultgtOKlt result gt ltcontactidgt123ltcontactidgt ltalt_contactidgtltalt_contactidgt ltEditCustomerResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 924

2 Order Related Methods

21 getOrder

Description Get order information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

startFrom Boolean If startFrom is true and invoiceNum is specified the web service will return orders gt= invoiceNum

If startFrom is false and invoiceNum is specified the web service will return just the specified order

invoiceNum String Search for specific invoice number

status String Search orders by status

dateFrom Date Search orders that were placed after specified date Must be in mmddyyyy format

dateTo Date Search orders that were placed before specified date Must be in mmddyyyy format

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrder xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt ltstartFromgtfalseltstartFromgt

ltinvoiceNumgtltinvoiceNumgt ltstatusgtltstatusgt ltdateFromgt08012008ltdateFromgt

ltdateTogtltdateTogt ltcallBackURLgtltcallBackURLgt ltgetOrdergt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetOrdersResponse xmlns=gt ltOrdergt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1024

ltOrderIDgt35446ltOrderIDgt ltInvoiceNumbergtAB-1426ltInvoiceNumbergt ltCustomerIDgt15427ltCustomerIDgt ltDategt842008ltDategt ltTotalgt1590ltTotalgt ltTaxgt9000ltTaxgt ltTax2gt000ltTax2gt ltTax3gt000ltTax3gt ltShippinggt0ltShippinggt ltBillingAddressgt ltFirstNamegtSamltFirstNamegt ltLastNamegtJonesltLastNamegt ltEmailgtsamemailcomltEmailgt ltAddressgt1234 Holmberg RdltAddressgt ltAddress2 gt ltCitygtParklandltCitygt ltZipCodegt33067ltZipCodegt ltStateCodegtFLltStateCodegt ltCountryCodegtUSltCountryCodegt ltPhonegt1112223344ltPhonegt ltCompany gt ltBillingAddressgt ltCommentsgt ltOrderComment gt ltOrderInternalCommentgtltOrderInternalCommentgt ltOrderExternalComment gt ltCommentsgt ltPaymentMethodgtOnline Credit CardltPaymentMethodgt ltTimegt61222 PMltTimegt ltTransactiongt ltCVV2gt123ltCVV2gt ltResponseTextgtltResponseTextgt

ltAVSgtAVS ResultltAVSgt ltTransactionIdgt123456ltTransactionIdgt ltApprovalCodegt123456ltApprovalCodegt ltTransactionTypegtAuthorizeltTransactionTypegt ltAmountgt100000ltAmountgt ltTransactiongt

ltDiscountgt000ltDiscountgt ltPromotions gt ltGiftCertificatePurchased gt ltGiftCertificateUsed gt ltOrderStatusgtNewltOrderStatusgt ltReferergthttpwwwgooglecomltReferergt ltSalesPerson gt ltIPgt111222333444ltIPgt ltDateStartedgt842008 55418 PMltDateStartedgt ltUserID gt ltLastUpdategt842008ltLastUpdategt ltWeightgt000ltWeightgt ltAffiliateInformationgt ltAffiliateIDgt0ltAffiliateIDgt ltAffiliateCommissiongt0ltAffiliateCommissiongt ltAffiliateApproved gt ltAffiliateApprovedreason gt ltAffiliateInformationgt ltShippingInformationgt ltShipmentgt ltShipmentIDgt1ltShipmentIDgt ltShipmentDate gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1124

ltShippinggt0ltShippinggt ltMethodgtFree ShippingltMethodgt ltFirstNamegtSamltFirstNamegt ltLastNamegtJonesltLastNamegt ltCompany gt ltAddressgt1234 Holmberg RdltAddressgt ltAddress2 gt ltCitygtParklandltCitygt ltZipCodegt33067ltZipCodegt ltStateCodegtFLltStateCodegt ltCountryCodegtUSltCountryCodegt ltPhonegt1112223344ltPhonegt ltWeightgt000ltWeightgt ltStatusgtNewltStatusgt ltInternalCommentgtltInternalCommentgt ltTrackingCode gt ltShipmentgt ltOrderItemsgt ltItemgt ltShipmentIDgt1ltShipmentIDgt ltProductIDgt100514ltProductIDgt ltProductNamegtThis is the product name ndash Free ProductltProductNamegt ltQuantitygt1ltQuantitygt ltUnitPricegt000ltUnitPricegt ltUnitCostgt000ltUnitCostgt ltOptionPricegt000ltOptionPricegt ltWeightgt000ltWeightgt ltWarehouseIDgt0ltWarehouseIDgt ltDateAdded gt ltPageAdded gt ltItemgt ltItemgt ltShipmentIDgt1ltShipmentIDgt ltProductIDgtabc3ltProductIDgt ltProductNamegtProduct NameltProductNamegt ltQuantitygt1ltQuantitygt ltUnitPricegt150000ltUnitPricegt ltUnitCostgt700ltUnitCostgt ltOptionPricegt000ltOptionPricegt ltWeightgt3200ltWeightgt ltWarehouseIDgt2ltWarehouseIDgt ltDateAddedgt842008 55643 PMltDateAddedgt ltPageAddedgtProduct-Name_p_1234-3214htmlltPageAddedgt ltItemgt ltOrderItemsgt ltShippingInformationgt ltOrdergt ltGetOrdersResponsegt

22 getOrderCount

Description Get total orders

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1224

requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

startFrom Boolean If startFrom is true and invoiceNum is specified the web service will count orders gt= invoiceNum

If startFrom is false and invoiceNum is specified the web service will count just the specified order

If invoiceNum is not specified this parameter will be ignored

invoiceNum String Search for specific invoice number

status String Search orders by status

dateFrom Date Search orders that were placed after specified date Must be in mmddyyyy format

dateTo Date Search orders that were placed before specified date Must be in mmddyyyy format

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltstartFromgtfalseltstartFromgt

ltinvoiceNumgtltinvoiceNumgt ltstatusgtNewltstatusgt ltdateFromgt08012008ltdateFromgt ltdateTogt08312008ltdateTogt

ltcallBackURLgtltcallBackURLgt ltgetOrderCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrdersCountResponse xmlns=gt ltQuantitygt474ltQuantitygt ltOrdersCountResponsegt

23 getOrderStatus

Description Get the status of a specific order

Parameters

Name Type Description

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1324

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Search for specific invoice number

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt

ltcallBackURLgtltcallBackURLgt ltgetOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltStatusIdgt1ltStatusIdgt ltStatusTextgtNewltStatusTextgt ltOrderStatusResponsegt

24 updateOrderStatus

Description Update the status of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

newStatus String New status for the specified order

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1424

ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt ltnewStatusgtNewltnewStatusgt

ltcallBackURLgtltcallBackURLgt ltupdateOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltNewStatusgtnewltNewStatusgt ltUpdateOrderStatusResponsegt

25 updateOrderShipment

Description Update the tracking number and the shipping date of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

shipmentID Numeric Identifies the shipment id for multiple shipment orders This ID can be found on the response of the getOrder method

This field is required for multiple shipment orders

tracking String Tracking code of the specified ordershipment

shipmentDate Date Shipping date of the specified ordershipment

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderShipment xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1524

ltinvoiceNumgt1476ltinvoiceNumgt

ltshipmentIDgtltshipmentIDgt lttrackinggt1234567890lttrackinggt ltshipmentDategt01202009ltshipmentDategt

ltcallBackURLgtltcallBackURLgt ltupdateOrderShipmentgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderShipmentResponse xmlns=gt ltresultgtOKltresultgt ltUpdateOrderShipmentResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1624

3 Product Related Methods

31 getProduct

Description Get product information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProduct xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt

ltproductIdgtltproductIdgt ltcallBackURLgtltcallBackURLgt ltgetProductgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductDetailsResponse xmlns=gt ltProductgt ltProductIDgtprod123ltProductIDgt ltProductNamegtTest ProductltProductNamegt ltCategoriesgt ltCategorygt ltCategoryIDgt27704ltCategoryIDgt ltCategoryNamegtPackagingltCategoryNamegt ltCategorygt ltCategorygt ltCategoryIDgt25848ltCategoryIDgt ltCategoryNamegtTest SubltCategoryNamegt ltCategorygt ltCategoriesgt ltMfgidgt1221ltMfgidgt ltManufacturergtManufacturer AltManufacturergt ltDistributorgt3dcartltDistributorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1724

ltCostgt15400ltCostgt ltPricegt26100ltPricegt ltRetailPricegt462ltRetailPricegt ltSalePricegt000ltSalePricegt ltOnSalegt0ltOnSalegt ltStockgt10ltStockgt ltStockAlertgt0ltStockAlertgt ltWeightgt100ltWeightgt ltWidthgt000ltWidthgt ltHeightgt000ltHeightgt ltDepthgt000ltDepthgt ltMinimumOrdergt1ltMinimumOrdergt ltMaximumOrdergt0ltMaximumOrdergt ltDateCreatedgt912008ltDateCreatedgt ltDescriptiongtTest product descriptionltDescriptiongt ltExtendedDescriptiongtProduct descriptionltExtendedDescriptiongt ltKeywordsgtkeyword test product buy storeltKeywordsgt ltRelatedProducts gt ltShipCostgt000ltShipCostgt ltTitlegtProduct titlehellipltTitlegt ltMetaTags gt ltDisplayText gt ltHomeSpecialgt0ltHomeSpecialgt ltCategorySpecialgt0ltCategorySpecialgt ltHidegt0ltHidegt ltFreeShippinggt0ltFreeShippinggt ltNonTaxgt0ltNonTaxgt ltNotForsalegt0ltNotForsalegt ltGiftCertificategt0ltGiftCertificategt ltUserIdgtJohn AdminltUserIdgt ltLastUpdategt812008ltLastUpdategt ltExtraFieldsgt ltExtraField1 gt ltExtraField2 gt ltExtraField3 gt ltExtraField4 gt ltExtraField5 gt ltExtraField6 gt ltExtraField7 gt ltExtraField8 gt ltExtraField9 gt ltExtraField10 gt ltExtraFieldsgt ltUseCatoptionsgt0ltUseCatoptionsgt ltQuantityOptions gt ltPriceLevelgt ltPrice_1gt0ltPrice_1gt ltPrice_2gt0ltPrice_2gt ltPrice_3gt0ltPrice_3gt ltPrice_4gt0ltPrice_4gt ltPrice_5gt0ltPrice_5gt ltPrice_6gt0ltPrice_6gt ltPrice_7gt0ltPrice_7gt ltPrice_8gt0ltPrice_8gt ltPrice_9gt0ltPrice_9gt ltPrice_10gt0ltPrice_10gt ltPriceLevelgt ltMinOrdergt0ltMinOrdergt ltListingDisplayTypegt-1ltListingDisplayTypegt ltShowOutStockgt-1ltShowOutStockgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1824

ltPricingGroupOptgt0ltPricingGroupOptgt ltQuantityDiscountOptgt0ltQuantityDiscountOptgt ltLoginLevelgt-1ltLoginLevelgt ltRedirectTo gt ltAccessGroup gt ltSelfShipgt0ltSelfShipgt ltTaxCode gt lteProductgt lteProductPassword gt lteProductRandomgt0lteProductRandomgt lteProductExpiregt0lteProductExpiregt lteProductPath gt lteProductSerialgt0lteProductSerialgt lteProductInstructions gt lteProductReuseSerialgt0lteProductReuseSerialgt lteProductgt ltNonSearchablegt0ltNonSearchablegt ltInstockMessage gt ltOutOfStockMessage gt ltBackOrderMessage gt ltRewardsgt ltRewardPointsgt0ltRewardPointsgt ltRewardDisablegt0ltRewardDisablegt ltRewardRedeemgt2610ltRewardRedeemgt ltRewardsgt ltFileNamegtltFileNamegt ltImagesgt ltImagegt ltUrlgtassetsimagesprodtestjpgltUrlgt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltThumbnailgtassetsimagesthumb_prodtestjpgltThumbnailgt ltImagesgt ltOptionsgt ltOptiongt ltIdgt11ltIdgt ltOptionTypegtSizeltOptionTypegt ltValuesgt ltValuegt ltIDgt28ltIDgt ltNamegtSmallltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuegt ltIDgt29ltIDgt ltNamegtLargeltNamegt ltOptionPricegt000ltOptionPricegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1924

ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptiongt ltIdgt12ltIdgt ltOptionTypegtColorltOptionTypegt ltValuesgt ltValuegt ltIDgt30ltIDgt ltNamegtBlueltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptionsgt ltProductgt ltGetProductDetailsResponsegt

32 getProductCount

Description Get total products

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt ltgetProductCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductCountResponse xmlns=gt ltProductQuantitygt6041ltProductQuantitygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2024

ltGetProductCountResponsegt

33 getProductInventory

Description Get the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgtprod123ltproductIdgt

ltcallBackURLgtltcallBackURLgt ltgetProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltInventorygt10ltInventorygt ltGetInventoryResponsegt

34 updateProductInventory

Description Update the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2124

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

quantity Number Stock quantity for the specified product

replaceStock Boolean Indicates if the stock should be replaced or incremented by the new quantity

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgt prod123ltproductIdgt ltquantitygt50ltquantitygt ltreplaceStockgttrueltreplaceStockgt

ltcallBackURLgtltcallBackURLgt ltupdateProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltNewInventorygt50ltNewInventorygt ltUpdateInventoryResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2224

Working with the callBackURL parameter The callBackURL parameter can be provided to any method of the 3dcart web service and must have a valid URL format followed by the page that will handle the post

ie httpwww3dcartcom3dcartapiposthandlerasp

When this parameter is provided the web service will post the result xml to the specified page and return the following result to the requester

ltxml version=10 encoding=utf-8 gt ltResponse xmlns=gt ltDescriptiongtXML Posted to

httpwww3dcartcom3dcartapiposthandleraspltDescriptiongt

ltResponsegt

The entire XML will be posted to the specified page which has to be prepared to handle the information

Here is a sample code of a page that handles the post and save the XML into a file

ltlanguage=vbscriptgt lt 3DCart Shopping Cart System - Version 30 3dCart Store Web Service - Version 10 Sample script to handle the xml response from the web service using the callbackURL parameter gt lt Dim strXml objXmlDoc Receives the xml strXml = requestForm Loads the XML into a xmlDoc object Set objXmlDoc = serverCreateObject(MicrosoftXMLDOM) objXmlDocpreserveWhiteSpace = true objXmlDocloadxml(strXml) Once the XML is loaded you can do anything with the information In this sample script the XML is being saved into the textxml file objXmlDocsave(serverMapPath(testxml)) Set objXmlDoc = nothing gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 8: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 824

additional_field2 String (250) Additional field 2

additional_field3 String (150) Additional field 3

Please note every field passed on customerData will be updated

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt lteditCustomer xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcom ltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltcustomerDatagtcontactid===123|||billing_firstname===JohnltcustomerDatagt ltactiongtupdateltactiongt

ltcallBackURLgtltcallBackURLgt lteditCustomergt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltEditCustomerResponse xmlns=gt ltresultgtOKlt result gt ltcontactidgt123ltcontactidgt ltalt_contactidgtltalt_contactidgt ltEditCustomerResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 924

2 Order Related Methods

21 getOrder

Description Get order information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

startFrom Boolean If startFrom is true and invoiceNum is specified the web service will return orders gt= invoiceNum

If startFrom is false and invoiceNum is specified the web service will return just the specified order

invoiceNum String Search for specific invoice number

status String Search orders by status

dateFrom Date Search orders that were placed after specified date Must be in mmddyyyy format

dateTo Date Search orders that were placed before specified date Must be in mmddyyyy format

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrder xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt ltstartFromgtfalseltstartFromgt

ltinvoiceNumgtltinvoiceNumgt ltstatusgtltstatusgt ltdateFromgt08012008ltdateFromgt

ltdateTogtltdateTogt ltcallBackURLgtltcallBackURLgt ltgetOrdergt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetOrdersResponse xmlns=gt ltOrdergt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1024

ltOrderIDgt35446ltOrderIDgt ltInvoiceNumbergtAB-1426ltInvoiceNumbergt ltCustomerIDgt15427ltCustomerIDgt ltDategt842008ltDategt ltTotalgt1590ltTotalgt ltTaxgt9000ltTaxgt ltTax2gt000ltTax2gt ltTax3gt000ltTax3gt ltShippinggt0ltShippinggt ltBillingAddressgt ltFirstNamegtSamltFirstNamegt ltLastNamegtJonesltLastNamegt ltEmailgtsamemailcomltEmailgt ltAddressgt1234 Holmberg RdltAddressgt ltAddress2 gt ltCitygtParklandltCitygt ltZipCodegt33067ltZipCodegt ltStateCodegtFLltStateCodegt ltCountryCodegtUSltCountryCodegt ltPhonegt1112223344ltPhonegt ltCompany gt ltBillingAddressgt ltCommentsgt ltOrderComment gt ltOrderInternalCommentgtltOrderInternalCommentgt ltOrderExternalComment gt ltCommentsgt ltPaymentMethodgtOnline Credit CardltPaymentMethodgt ltTimegt61222 PMltTimegt ltTransactiongt ltCVV2gt123ltCVV2gt ltResponseTextgtltResponseTextgt

ltAVSgtAVS ResultltAVSgt ltTransactionIdgt123456ltTransactionIdgt ltApprovalCodegt123456ltApprovalCodegt ltTransactionTypegtAuthorizeltTransactionTypegt ltAmountgt100000ltAmountgt ltTransactiongt

ltDiscountgt000ltDiscountgt ltPromotions gt ltGiftCertificatePurchased gt ltGiftCertificateUsed gt ltOrderStatusgtNewltOrderStatusgt ltReferergthttpwwwgooglecomltReferergt ltSalesPerson gt ltIPgt111222333444ltIPgt ltDateStartedgt842008 55418 PMltDateStartedgt ltUserID gt ltLastUpdategt842008ltLastUpdategt ltWeightgt000ltWeightgt ltAffiliateInformationgt ltAffiliateIDgt0ltAffiliateIDgt ltAffiliateCommissiongt0ltAffiliateCommissiongt ltAffiliateApproved gt ltAffiliateApprovedreason gt ltAffiliateInformationgt ltShippingInformationgt ltShipmentgt ltShipmentIDgt1ltShipmentIDgt ltShipmentDate gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1124

ltShippinggt0ltShippinggt ltMethodgtFree ShippingltMethodgt ltFirstNamegtSamltFirstNamegt ltLastNamegtJonesltLastNamegt ltCompany gt ltAddressgt1234 Holmberg RdltAddressgt ltAddress2 gt ltCitygtParklandltCitygt ltZipCodegt33067ltZipCodegt ltStateCodegtFLltStateCodegt ltCountryCodegtUSltCountryCodegt ltPhonegt1112223344ltPhonegt ltWeightgt000ltWeightgt ltStatusgtNewltStatusgt ltInternalCommentgtltInternalCommentgt ltTrackingCode gt ltShipmentgt ltOrderItemsgt ltItemgt ltShipmentIDgt1ltShipmentIDgt ltProductIDgt100514ltProductIDgt ltProductNamegtThis is the product name ndash Free ProductltProductNamegt ltQuantitygt1ltQuantitygt ltUnitPricegt000ltUnitPricegt ltUnitCostgt000ltUnitCostgt ltOptionPricegt000ltOptionPricegt ltWeightgt000ltWeightgt ltWarehouseIDgt0ltWarehouseIDgt ltDateAdded gt ltPageAdded gt ltItemgt ltItemgt ltShipmentIDgt1ltShipmentIDgt ltProductIDgtabc3ltProductIDgt ltProductNamegtProduct NameltProductNamegt ltQuantitygt1ltQuantitygt ltUnitPricegt150000ltUnitPricegt ltUnitCostgt700ltUnitCostgt ltOptionPricegt000ltOptionPricegt ltWeightgt3200ltWeightgt ltWarehouseIDgt2ltWarehouseIDgt ltDateAddedgt842008 55643 PMltDateAddedgt ltPageAddedgtProduct-Name_p_1234-3214htmlltPageAddedgt ltItemgt ltOrderItemsgt ltShippingInformationgt ltOrdergt ltGetOrdersResponsegt

22 getOrderCount

Description Get total orders

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1224

requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

startFrom Boolean If startFrom is true and invoiceNum is specified the web service will count orders gt= invoiceNum

If startFrom is false and invoiceNum is specified the web service will count just the specified order

If invoiceNum is not specified this parameter will be ignored

invoiceNum String Search for specific invoice number

status String Search orders by status

dateFrom Date Search orders that were placed after specified date Must be in mmddyyyy format

dateTo Date Search orders that were placed before specified date Must be in mmddyyyy format

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltstartFromgtfalseltstartFromgt

ltinvoiceNumgtltinvoiceNumgt ltstatusgtNewltstatusgt ltdateFromgt08012008ltdateFromgt ltdateTogt08312008ltdateTogt

ltcallBackURLgtltcallBackURLgt ltgetOrderCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrdersCountResponse xmlns=gt ltQuantitygt474ltQuantitygt ltOrdersCountResponsegt

23 getOrderStatus

Description Get the status of a specific order

Parameters

Name Type Description

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1324

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Search for specific invoice number

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt

ltcallBackURLgtltcallBackURLgt ltgetOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltStatusIdgt1ltStatusIdgt ltStatusTextgtNewltStatusTextgt ltOrderStatusResponsegt

24 updateOrderStatus

Description Update the status of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

newStatus String New status for the specified order

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1424

ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt ltnewStatusgtNewltnewStatusgt

ltcallBackURLgtltcallBackURLgt ltupdateOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltNewStatusgtnewltNewStatusgt ltUpdateOrderStatusResponsegt

25 updateOrderShipment

Description Update the tracking number and the shipping date of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

shipmentID Numeric Identifies the shipment id for multiple shipment orders This ID can be found on the response of the getOrder method

This field is required for multiple shipment orders

tracking String Tracking code of the specified ordershipment

shipmentDate Date Shipping date of the specified ordershipment

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderShipment xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1524

ltinvoiceNumgt1476ltinvoiceNumgt

ltshipmentIDgtltshipmentIDgt lttrackinggt1234567890lttrackinggt ltshipmentDategt01202009ltshipmentDategt

ltcallBackURLgtltcallBackURLgt ltupdateOrderShipmentgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderShipmentResponse xmlns=gt ltresultgtOKltresultgt ltUpdateOrderShipmentResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1624

3 Product Related Methods

31 getProduct

Description Get product information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProduct xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt

ltproductIdgtltproductIdgt ltcallBackURLgtltcallBackURLgt ltgetProductgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductDetailsResponse xmlns=gt ltProductgt ltProductIDgtprod123ltProductIDgt ltProductNamegtTest ProductltProductNamegt ltCategoriesgt ltCategorygt ltCategoryIDgt27704ltCategoryIDgt ltCategoryNamegtPackagingltCategoryNamegt ltCategorygt ltCategorygt ltCategoryIDgt25848ltCategoryIDgt ltCategoryNamegtTest SubltCategoryNamegt ltCategorygt ltCategoriesgt ltMfgidgt1221ltMfgidgt ltManufacturergtManufacturer AltManufacturergt ltDistributorgt3dcartltDistributorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1724

ltCostgt15400ltCostgt ltPricegt26100ltPricegt ltRetailPricegt462ltRetailPricegt ltSalePricegt000ltSalePricegt ltOnSalegt0ltOnSalegt ltStockgt10ltStockgt ltStockAlertgt0ltStockAlertgt ltWeightgt100ltWeightgt ltWidthgt000ltWidthgt ltHeightgt000ltHeightgt ltDepthgt000ltDepthgt ltMinimumOrdergt1ltMinimumOrdergt ltMaximumOrdergt0ltMaximumOrdergt ltDateCreatedgt912008ltDateCreatedgt ltDescriptiongtTest product descriptionltDescriptiongt ltExtendedDescriptiongtProduct descriptionltExtendedDescriptiongt ltKeywordsgtkeyword test product buy storeltKeywordsgt ltRelatedProducts gt ltShipCostgt000ltShipCostgt ltTitlegtProduct titlehellipltTitlegt ltMetaTags gt ltDisplayText gt ltHomeSpecialgt0ltHomeSpecialgt ltCategorySpecialgt0ltCategorySpecialgt ltHidegt0ltHidegt ltFreeShippinggt0ltFreeShippinggt ltNonTaxgt0ltNonTaxgt ltNotForsalegt0ltNotForsalegt ltGiftCertificategt0ltGiftCertificategt ltUserIdgtJohn AdminltUserIdgt ltLastUpdategt812008ltLastUpdategt ltExtraFieldsgt ltExtraField1 gt ltExtraField2 gt ltExtraField3 gt ltExtraField4 gt ltExtraField5 gt ltExtraField6 gt ltExtraField7 gt ltExtraField8 gt ltExtraField9 gt ltExtraField10 gt ltExtraFieldsgt ltUseCatoptionsgt0ltUseCatoptionsgt ltQuantityOptions gt ltPriceLevelgt ltPrice_1gt0ltPrice_1gt ltPrice_2gt0ltPrice_2gt ltPrice_3gt0ltPrice_3gt ltPrice_4gt0ltPrice_4gt ltPrice_5gt0ltPrice_5gt ltPrice_6gt0ltPrice_6gt ltPrice_7gt0ltPrice_7gt ltPrice_8gt0ltPrice_8gt ltPrice_9gt0ltPrice_9gt ltPrice_10gt0ltPrice_10gt ltPriceLevelgt ltMinOrdergt0ltMinOrdergt ltListingDisplayTypegt-1ltListingDisplayTypegt ltShowOutStockgt-1ltShowOutStockgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1824

ltPricingGroupOptgt0ltPricingGroupOptgt ltQuantityDiscountOptgt0ltQuantityDiscountOptgt ltLoginLevelgt-1ltLoginLevelgt ltRedirectTo gt ltAccessGroup gt ltSelfShipgt0ltSelfShipgt ltTaxCode gt lteProductgt lteProductPassword gt lteProductRandomgt0lteProductRandomgt lteProductExpiregt0lteProductExpiregt lteProductPath gt lteProductSerialgt0lteProductSerialgt lteProductInstructions gt lteProductReuseSerialgt0lteProductReuseSerialgt lteProductgt ltNonSearchablegt0ltNonSearchablegt ltInstockMessage gt ltOutOfStockMessage gt ltBackOrderMessage gt ltRewardsgt ltRewardPointsgt0ltRewardPointsgt ltRewardDisablegt0ltRewardDisablegt ltRewardRedeemgt2610ltRewardRedeemgt ltRewardsgt ltFileNamegtltFileNamegt ltImagesgt ltImagegt ltUrlgtassetsimagesprodtestjpgltUrlgt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltThumbnailgtassetsimagesthumb_prodtestjpgltThumbnailgt ltImagesgt ltOptionsgt ltOptiongt ltIdgt11ltIdgt ltOptionTypegtSizeltOptionTypegt ltValuesgt ltValuegt ltIDgt28ltIDgt ltNamegtSmallltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuegt ltIDgt29ltIDgt ltNamegtLargeltNamegt ltOptionPricegt000ltOptionPricegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1924

ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptiongt ltIdgt12ltIdgt ltOptionTypegtColorltOptionTypegt ltValuesgt ltValuegt ltIDgt30ltIDgt ltNamegtBlueltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptionsgt ltProductgt ltGetProductDetailsResponsegt

32 getProductCount

Description Get total products

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt ltgetProductCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductCountResponse xmlns=gt ltProductQuantitygt6041ltProductQuantitygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2024

ltGetProductCountResponsegt

33 getProductInventory

Description Get the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgtprod123ltproductIdgt

ltcallBackURLgtltcallBackURLgt ltgetProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltInventorygt10ltInventorygt ltGetInventoryResponsegt

34 updateProductInventory

Description Update the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2124

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

quantity Number Stock quantity for the specified product

replaceStock Boolean Indicates if the stock should be replaced or incremented by the new quantity

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgt prod123ltproductIdgt ltquantitygt50ltquantitygt ltreplaceStockgttrueltreplaceStockgt

ltcallBackURLgtltcallBackURLgt ltupdateProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltNewInventorygt50ltNewInventorygt ltUpdateInventoryResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2224

Working with the callBackURL parameter The callBackURL parameter can be provided to any method of the 3dcart web service and must have a valid URL format followed by the page that will handle the post

ie httpwww3dcartcom3dcartapiposthandlerasp

When this parameter is provided the web service will post the result xml to the specified page and return the following result to the requester

ltxml version=10 encoding=utf-8 gt ltResponse xmlns=gt ltDescriptiongtXML Posted to

httpwww3dcartcom3dcartapiposthandleraspltDescriptiongt

ltResponsegt

The entire XML will be posted to the specified page which has to be prepared to handle the information

Here is a sample code of a page that handles the post and save the XML into a file

ltlanguage=vbscriptgt lt 3DCart Shopping Cart System - Version 30 3dCart Store Web Service - Version 10 Sample script to handle the xml response from the web service using the callbackURL parameter gt lt Dim strXml objXmlDoc Receives the xml strXml = requestForm Loads the XML into a xmlDoc object Set objXmlDoc = serverCreateObject(MicrosoftXMLDOM) objXmlDocpreserveWhiteSpace = true objXmlDocloadxml(strXml) Once the XML is loaded you can do anything with the information In this sample script the XML is being saved into the textxml file objXmlDocsave(serverMapPath(testxml)) Set objXmlDoc = nothing gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 9: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 924

2 Order Related Methods

21 getOrder

Description Get order information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

startFrom Boolean If startFrom is true and invoiceNum is specified the web service will return orders gt= invoiceNum

If startFrom is false and invoiceNum is specified the web service will return just the specified order

invoiceNum String Search for specific invoice number

status String Search orders by status

dateFrom Date Search orders that were placed after specified date Must be in mmddyyyy format

dateTo Date Search orders that were placed before specified date Must be in mmddyyyy format

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrder xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt ltstartFromgtfalseltstartFromgt

ltinvoiceNumgtltinvoiceNumgt ltstatusgtltstatusgt ltdateFromgt08012008ltdateFromgt

ltdateTogtltdateTogt ltcallBackURLgtltcallBackURLgt ltgetOrdergt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetOrdersResponse xmlns=gt ltOrdergt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1024

ltOrderIDgt35446ltOrderIDgt ltInvoiceNumbergtAB-1426ltInvoiceNumbergt ltCustomerIDgt15427ltCustomerIDgt ltDategt842008ltDategt ltTotalgt1590ltTotalgt ltTaxgt9000ltTaxgt ltTax2gt000ltTax2gt ltTax3gt000ltTax3gt ltShippinggt0ltShippinggt ltBillingAddressgt ltFirstNamegtSamltFirstNamegt ltLastNamegtJonesltLastNamegt ltEmailgtsamemailcomltEmailgt ltAddressgt1234 Holmberg RdltAddressgt ltAddress2 gt ltCitygtParklandltCitygt ltZipCodegt33067ltZipCodegt ltStateCodegtFLltStateCodegt ltCountryCodegtUSltCountryCodegt ltPhonegt1112223344ltPhonegt ltCompany gt ltBillingAddressgt ltCommentsgt ltOrderComment gt ltOrderInternalCommentgtltOrderInternalCommentgt ltOrderExternalComment gt ltCommentsgt ltPaymentMethodgtOnline Credit CardltPaymentMethodgt ltTimegt61222 PMltTimegt ltTransactiongt ltCVV2gt123ltCVV2gt ltResponseTextgtltResponseTextgt

ltAVSgtAVS ResultltAVSgt ltTransactionIdgt123456ltTransactionIdgt ltApprovalCodegt123456ltApprovalCodegt ltTransactionTypegtAuthorizeltTransactionTypegt ltAmountgt100000ltAmountgt ltTransactiongt

ltDiscountgt000ltDiscountgt ltPromotions gt ltGiftCertificatePurchased gt ltGiftCertificateUsed gt ltOrderStatusgtNewltOrderStatusgt ltReferergthttpwwwgooglecomltReferergt ltSalesPerson gt ltIPgt111222333444ltIPgt ltDateStartedgt842008 55418 PMltDateStartedgt ltUserID gt ltLastUpdategt842008ltLastUpdategt ltWeightgt000ltWeightgt ltAffiliateInformationgt ltAffiliateIDgt0ltAffiliateIDgt ltAffiliateCommissiongt0ltAffiliateCommissiongt ltAffiliateApproved gt ltAffiliateApprovedreason gt ltAffiliateInformationgt ltShippingInformationgt ltShipmentgt ltShipmentIDgt1ltShipmentIDgt ltShipmentDate gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1124

ltShippinggt0ltShippinggt ltMethodgtFree ShippingltMethodgt ltFirstNamegtSamltFirstNamegt ltLastNamegtJonesltLastNamegt ltCompany gt ltAddressgt1234 Holmberg RdltAddressgt ltAddress2 gt ltCitygtParklandltCitygt ltZipCodegt33067ltZipCodegt ltStateCodegtFLltStateCodegt ltCountryCodegtUSltCountryCodegt ltPhonegt1112223344ltPhonegt ltWeightgt000ltWeightgt ltStatusgtNewltStatusgt ltInternalCommentgtltInternalCommentgt ltTrackingCode gt ltShipmentgt ltOrderItemsgt ltItemgt ltShipmentIDgt1ltShipmentIDgt ltProductIDgt100514ltProductIDgt ltProductNamegtThis is the product name ndash Free ProductltProductNamegt ltQuantitygt1ltQuantitygt ltUnitPricegt000ltUnitPricegt ltUnitCostgt000ltUnitCostgt ltOptionPricegt000ltOptionPricegt ltWeightgt000ltWeightgt ltWarehouseIDgt0ltWarehouseIDgt ltDateAdded gt ltPageAdded gt ltItemgt ltItemgt ltShipmentIDgt1ltShipmentIDgt ltProductIDgtabc3ltProductIDgt ltProductNamegtProduct NameltProductNamegt ltQuantitygt1ltQuantitygt ltUnitPricegt150000ltUnitPricegt ltUnitCostgt700ltUnitCostgt ltOptionPricegt000ltOptionPricegt ltWeightgt3200ltWeightgt ltWarehouseIDgt2ltWarehouseIDgt ltDateAddedgt842008 55643 PMltDateAddedgt ltPageAddedgtProduct-Name_p_1234-3214htmlltPageAddedgt ltItemgt ltOrderItemsgt ltShippingInformationgt ltOrdergt ltGetOrdersResponsegt

22 getOrderCount

Description Get total orders

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1224

requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

startFrom Boolean If startFrom is true and invoiceNum is specified the web service will count orders gt= invoiceNum

If startFrom is false and invoiceNum is specified the web service will count just the specified order

If invoiceNum is not specified this parameter will be ignored

invoiceNum String Search for specific invoice number

status String Search orders by status

dateFrom Date Search orders that were placed after specified date Must be in mmddyyyy format

dateTo Date Search orders that were placed before specified date Must be in mmddyyyy format

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltstartFromgtfalseltstartFromgt

ltinvoiceNumgtltinvoiceNumgt ltstatusgtNewltstatusgt ltdateFromgt08012008ltdateFromgt ltdateTogt08312008ltdateTogt

ltcallBackURLgtltcallBackURLgt ltgetOrderCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrdersCountResponse xmlns=gt ltQuantitygt474ltQuantitygt ltOrdersCountResponsegt

23 getOrderStatus

Description Get the status of a specific order

Parameters

Name Type Description

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1324

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Search for specific invoice number

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt

ltcallBackURLgtltcallBackURLgt ltgetOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltStatusIdgt1ltStatusIdgt ltStatusTextgtNewltStatusTextgt ltOrderStatusResponsegt

24 updateOrderStatus

Description Update the status of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

newStatus String New status for the specified order

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1424

ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt ltnewStatusgtNewltnewStatusgt

ltcallBackURLgtltcallBackURLgt ltupdateOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltNewStatusgtnewltNewStatusgt ltUpdateOrderStatusResponsegt

25 updateOrderShipment

Description Update the tracking number and the shipping date of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

shipmentID Numeric Identifies the shipment id for multiple shipment orders This ID can be found on the response of the getOrder method

This field is required for multiple shipment orders

tracking String Tracking code of the specified ordershipment

shipmentDate Date Shipping date of the specified ordershipment

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderShipment xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1524

ltinvoiceNumgt1476ltinvoiceNumgt

ltshipmentIDgtltshipmentIDgt lttrackinggt1234567890lttrackinggt ltshipmentDategt01202009ltshipmentDategt

ltcallBackURLgtltcallBackURLgt ltupdateOrderShipmentgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderShipmentResponse xmlns=gt ltresultgtOKltresultgt ltUpdateOrderShipmentResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1624

3 Product Related Methods

31 getProduct

Description Get product information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProduct xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt

ltproductIdgtltproductIdgt ltcallBackURLgtltcallBackURLgt ltgetProductgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductDetailsResponse xmlns=gt ltProductgt ltProductIDgtprod123ltProductIDgt ltProductNamegtTest ProductltProductNamegt ltCategoriesgt ltCategorygt ltCategoryIDgt27704ltCategoryIDgt ltCategoryNamegtPackagingltCategoryNamegt ltCategorygt ltCategorygt ltCategoryIDgt25848ltCategoryIDgt ltCategoryNamegtTest SubltCategoryNamegt ltCategorygt ltCategoriesgt ltMfgidgt1221ltMfgidgt ltManufacturergtManufacturer AltManufacturergt ltDistributorgt3dcartltDistributorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1724

ltCostgt15400ltCostgt ltPricegt26100ltPricegt ltRetailPricegt462ltRetailPricegt ltSalePricegt000ltSalePricegt ltOnSalegt0ltOnSalegt ltStockgt10ltStockgt ltStockAlertgt0ltStockAlertgt ltWeightgt100ltWeightgt ltWidthgt000ltWidthgt ltHeightgt000ltHeightgt ltDepthgt000ltDepthgt ltMinimumOrdergt1ltMinimumOrdergt ltMaximumOrdergt0ltMaximumOrdergt ltDateCreatedgt912008ltDateCreatedgt ltDescriptiongtTest product descriptionltDescriptiongt ltExtendedDescriptiongtProduct descriptionltExtendedDescriptiongt ltKeywordsgtkeyword test product buy storeltKeywordsgt ltRelatedProducts gt ltShipCostgt000ltShipCostgt ltTitlegtProduct titlehellipltTitlegt ltMetaTags gt ltDisplayText gt ltHomeSpecialgt0ltHomeSpecialgt ltCategorySpecialgt0ltCategorySpecialgt ltHidegt0ltHidegt ltFreeShippinggt0ltFreeShippinggt ltNonTaxgt0ltNonTaxgt ltNotForsalegt0ltNotForsalegt ltGiftCertificategt0ltGiftCertificategt ltUserIdgtJohn AdminltUserIdgt ltLastUpdategt812008ltLastUpdategt ltExtraFieldsgt ltExtraField1 gt ltExtraField2 gt ltExtraField3 gt ltExtraField4 gt ltExtraField5 gt ltExtraField6 gt ltExtraField7 gt ltExtraField8 gt ltExtraField9 gt ltExtraField10 gt ltExtraFieldsgt ltUseCatoptionsgt0ltUseCatoptionsgt ltQuantityOptions gt ltPriceLevelgt ltPrice_1gt0ltPrice_1gt ltPrice_2gt0ltPrice_2gt ltPrice_3gt0ltPrice_3gt ltPrice_4gt0ltPrice_4gt ltPrice_5gt0ltPrice_5gt ltPrice_6gt0ltPrice_6gt ltPrice_7gt0ltPrice_7gt ltPrice_8gt0ltPrice_8gt ltPrice_9gt0ltPrice_9gt ltPrice_10gt0ltPrice_10gt ltPriceLevelgt ltMinOrdergt0ltMinOrdergt ltListingDisplayTypegt-1ltListingDisplayTypegt ltShowOutStockgt-1ltShowOutStockgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1824

ltPricingGroupOptgt0ltPricingGroupOptgt ltQuantityDiscountOptgt0ltQuantityDiscountOptgt ltLoginLevelgt-1ltLoginLevelgt ltRedirectTo gt ltAccessGroup gt ltSelfShipgt0ltSelfShipgt ltTaxCode gt lteProductgt lteProductPassword gt lteProductRandomgt0lteProductRandomgt lteProductExpiregt0lteProductExpiregt lteProductPath gt lteProductSerialgt0lteProductSerialgt lteProductInstructions gt lteProductReuseSerialgt0lteProductReuseSerialgt lteProductgt ltNonSearchablegt0ltNonSearchablegt ltInstockMessage gt ltOutOfStockMessage gt ltBackOrderMessage gt ltRewardsgt ltRewardPointsgt0ltRewardPointsgt ltRewardDisablegt0ltRewardDisablegt ltRewardRedeemgt2610ltRewardRedeemgt ltRewardsgt ltFileNamegtltFileNamegt ltImagesgt ltImagegt ltUrlgtassetsimagesprodtestjpgltUrlgt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltThumbnailgtassetsimagesthumb_prodtestjpgltThumbnailgt ltImagesgt ltOptionsgt ltOptiongt ltIdgt11ltIdgt ltOptionTypegtSizeltOptionTypegt ltValuesgt ltValuegt ltIDgt28ltIDgt ltNamegtSmallltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuegt ltIDgt29ltIDgt ltNamegtLargeltNamegt ltOptionPricegt000ltOptionPricegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1924

ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptiongt ltIdgt12ltIdgt ltOptionTypegtColorltOptionTypegt ltValuesgt ltValuegt ltIDgt30ltIDgt ltNamegtBlueltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptionsgt ltProductgt ltGetProductDetailsResponsegt

32 getProductCount

Description Get total products

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt ltgetProductCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductCountResponse xmlns=gt ltProductQuantitygt6041ltProductQuantitygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2024

ltGetProductCountResponsegt

33 getProductInventory

Description Get the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgtprod123ltproductIdgt

ltcallBackURLgtltcallBackURLgt ltgetProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltInventorygt10ltInventorygt ltGetInventoryResponsegt

34 updateProductInventory

Description Update the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2124

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

quantity Number Stock quantity for the specified product

replaceStock Boolean Indicates if the stock should be replaced or incremented by the new quantity

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgt prod123ltproductIdgt ltquantitygt50ltquantitygt ltreplaceStockgttrueltreplaceStockgt

ltcallBackURLgtltcallBackURLgt ltupdateProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltNewInventorygt50ltNewInventorygt ltUpdateInventoryResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2224

Working with the callBackURL parameter The callBackURL parameter can be provided to any method of the 3dcart web service and must have a valid URL format followed by the page that will handle the post

ie httpwww3dcartcom3dcartapiposthandlerasp

When this parameter is provided the web service will post the result xml to the specified page and return the following result to the requester

ltxml version=10 encoding=utf-8 gt ltResponse xmlns=gt ltDescriptiongtXML Posted to

httpwww3dcartcom3dcartapiposthandleraspltDescriptiongt

ltResponsegt

The entire XML will be posted to the specified page which has to be prepared to handle the information

Here is a sample code of a page that handles the post and save the XML into a file

ltlanguage=vbscriptgt lt 3DCart Shopping Cart System - Version 30 3dCart Store Web Service - Version 10 Sample script to handle the xml response from the web service using the callbackURL parameter gt lt Dim strXml objXmlDoc Receives the xml strXml = requestForm Loads the XML into a xmlDoc object Set objXmlDoc = serverCreateObject(MicrosoftXMLDOM) objXmlDocpreserveWhiteSpace = true objXmlDocloadxml(strXml) Once the XML is loaded you can do anything with the information In this sample script the XML is being saved into the textxml file objXmlDocsave(serverMapPath(testxml)) Set objXmlDoc = nothing gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 10: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1024

ltOrderIDgt35446ltOrderIDgt ltInvoiceNumbergtAB-1426ltInvoiceNumbergt ltCustomerIDgt15427ltCustomerIDgt ltDategt842008ltDategt ltTotalgt1590ltTotalgt ltTaxgt9000ltTaxgt ltTax2gt000ltTax2gt ltTax3gt000ltTax3gt ltShippinggt0ltShippinggt ltBillingAddressgt ltFirstNamegtSamltFirstNamegt ltLastNamegtJonesltLastNamegt ltEmailgtsamemailcomltEmailgt ltAddressgt1234 Holmberg RdltAddressgt ltAddress2 gt ltCitygtParklandltCitygt ltZipCodegt33067ltZipCodegt ltStateCodegtFLltStateCodegt ltCountryCodegtUSltCountryCodegt ltPhonegt1112223344ltPhonegt ltCompany gt ltBillingAddressgt ltCommentsgt ltOrderComment gt ltOrderInternalCommentgtltOrderInternalCommentgt ltOrderExternalComment gt ltCommentsgt ltPaymentMethodgtOnline Credit CardltPaymentMethodgt ltTimegt61222 PMltTimegt ltTransactiongt ltCVV2gt123ltCVV2gt ltResponseTextgtltResponseTextgt

ltAVSgtAVS ResultltAVSgt ltTransactionIdgt123456ltTransactionIdgt ltApprovalCodegt123456ltApprovalCodegt ltTransactionTypegtAuthorizeltTransactionTypegt ltAmountgt100000ltAmountgt ltTransactiongt

ltDiscountgt000ltDiscountgt ltPromotions gt ltGiftCertificatePurchased gt ltGiftCertificateUsed gt ltOrderStatusgtNewltOrderStatusgt ltReferergthttpwwwgooglecomltReferergt ltSalesPerson gt ltIPgt111222333444ltIPgt ltDateStartedgt842008 55418 PMltDateStartedgt ltUserID gt ltLastUpdategt842008ltLastUpdategt ltWeightgt000ltWeightgt ltAffiliateInformationgt ltAffiliateIDgt0ltAffiliateIDgt ltAffiliateCommissiongt0ltAffiliateCommissiongt ltAffiliateApproved gt ltAffiliateApprovedreason gt ltAffiliateInformationgt ltShippingInformationgt ltShipmentgt ltShipmentIDgt1ltShipmentIDgt ltShipmentDate gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1124

ltShippinggt0ltShippinggt ltMethodgtFree ShippingltMethodgt ltFirstNamegtSamltFirstNamegt ltLastNamegtJonesltLastNamegt ltCompany gt ltAddressgt1234 Holmberg RdltAddressgt ltAddress2 gt ltCitygtParklandltCitygt ltZipCodegt33067ltZipCodegt ltStateCodegtFLltStateCodegt ltCountryCodegtUSltCountryCodegt ltPhonegt1112223344ltPhonegt ltWeightgt000ltWeightgt ltStatusgtNewltStatusgt ltInternalCommentgtltInternalCommentgt ltTrackingCode gt ltShipmentgt ltOrderItemsgt ltItemgt ltShipmentIDgt1ltShipmentIDgt ltProductIDgt100514ltProductIDgt ltProductNamegtThis is the product name ndash Free ProductltProductNamegt ltQuantitygt1ltQuantitygt ltUnitPricegt000ltUnitPricegt ltUnitCostgt000ltUnitCostgt ltOptionPricegt000ltOptionPricegt ltWeightgt000ltWeightgt ltWarehouseIDgt0ltWarehouseIDgt ltDateAdded gt ltPageAdded gt ltItemgt ltItemgt ltShipmentIDgt1ltShipmentIDgt ltProductIDgtabc3ltProductIDgt ltProductNamegtProduct NameltProductNamegt ltQuantitygt1ltQuantitygt ltUnitPricegt150000ltUnitPricegt ltUnitCostgt700ltUnitCostgt ltOptionPricegt000ltOptionPricegt ltWeightgt3200ltWeightgt ltWarehouseIDgt2ltWarehouseIDgt ltDateAddedgt842008 55643 PMltDateAddedgt ltPageAddedgtProduct-Name_p_1234-3214htmlltPageAddedgt ltItemgt ltOrderItemsgt ltShippingInformationgt ltOrdergt ltGetOrdersResponsegt

22 getOrderCount

Description Get total orders

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1224

requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

startFrom Boolean If startFrom is true and invoiceNum is specified the web service will count orders gt= invoiceNum

If startFrom is false and invoiceNum is specified the web service will count just the specified order

If invoiceNum is not specified this parameter will be ignored

invoiceNum String Search for specific invoice number

status String Search orders by status

dateFrom Date Search orders that were placed after specified date Must be in mmddyyyy format

dateTo Date Search orders that were placed before specified date Must be in mmddyyyy format

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltstartFromgtfalseltstartFromgt

ltinvoiceNumgtltinvoiceNumgt ltstatusgtNewltstatusgt ltdateFromgt08012008ltdateFromgt ltdateTogt08312008ltdateTogt

ltcallBackURLgtltcallBackURLgt ltgetOrderCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrdersCountResponse xmlns=gt ltQuantitygt474ltQuantitygt ltOrdersCountResponsegt

23 getOrderStatus

Description Get the status of a specific order

Parameters

Name Type Description

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1324

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Search for specific invoice number

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt

ltcallBackURLgtltcallBackURLgt ltgetOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltStatusIdgt1ltStatusIdgt ltStatusTextgtNewltStatusTextgt ltOrderStatusResponsegt

24 updateOrderStatus

Description Update the status of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

newStatus String New status for the specified order

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1424

ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt ltnewStatusgtNewltnewStatusgt

ltcallBackURLgtltcallBackURLgt ltupdateOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltNewStatusgtnewltNewStatusgt ltUpdateOrderStatusResponsegt

25 updateOrderShipment

Description Update the tracking number and the shipping date of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

shipmentID Numeric Identifies the shipment id for multiple shipment orders This ID can be found on the response of the getOrder method

This field is required for multiple shipment orders

tracking String Tracking code of the specified ordershipment

shipmentDate Date Shipping date of the specified ordershipment

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderShipment xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1524

ltinvoiceNumgt1476ltinvoiceNumgt

ltshipmentIDgtltshipmentIDgt lttrackinggt1234567890lttrackinggt ltshipmentDategt01202009ltshipmentDategt

ltcallBackURLgtltcallBackURLgt ltupdateOrderShipmentgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderShipmentResponse xmlns=gt ltresultgtOKltresultgt ltUpdateOrderShipmentResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1624

3 Product Related Methods

31 getProduct

Description Get product information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProduct xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt

ltproductIdgtltproductIdgt ltcallBackURLgtltcallBackURLgt ltgetProductgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductDetailsResponse xmlns=gt ltProductgt ltProductIDgtprod123ltProductIDgt ltProductNamegtTest ProductltProductNamegt ltCategoriesgt ltCategorygt ltCategoryIDgt27704ltCategoryIDgt ltCategoryNamegtPackagingltCategoryNamegt ltCategorygt ltCategorygt ltCategoryIDgt25848ltCategoryIDgt ltCategoryNamegtTest SubltCategoryNamegt ltCategorygt ltCategoriesgt ltMfgidgt1221ltMfgidgt ltManufacturergtManufacturer AltManufacturergt ltDistributorgt3dcartltDistributorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1724

ltCostgt15400ltCostgt ltPricegt26100ltPricegt ltRetailPricegt462ltRetailPricegt ltSalePricegt000ltSalePricegt ltOnSalegt0ltOnSalegt ltStockgt10ltStockgt ltStockAlertgt0ltStockAlertgt ltWeightgt100ltWeightgt ltWidthgt000ltWidthgt ltHeightgt000ltHeightgt ltDepthgt000ltDepthgt ltMinimumOrdergt1ltMinimumOrdergt ltMaximumOrdergt0ltMaximumOrdergt ltDateCreatedgt912008ltDateCreatedgt ltDescriptiongtTest product descriptionltDescriptiongt ltExtendedDescriptiongtProduct descriptionltExtendedDescriptiongt ltKeywordsgtkeyword test product buy storeltKeywordsgt ltRelatedProducts gt ltShipCostgt000ltShipCostgt ltTitlegtProduct titlehellipltTitlegt ltMetaTags gt ltDisplayText gt ltHomeSpecialgt0ltHomeSpecialgt ltCategorySpecialgt0ltCategorySpecialgt ltHidegt0ltHidegt ltFreeShippinggt0ltFreeShippinggt ltNonTaxgt0ltNonTaxgt ltNotForsalegt0ltNotForsalegt ltGiftCertificategt0ltGiftCertificategt ltUserIdgtJohn AdminltUserIdgt ltLastUpdategt812008ltLastUpdategt ltExtraFieldsgt ltExtraField1 gt ltExtraField2 gt ltExtraField3 gt ltExtraField4 gt ltExtraField5 gt ltExtraField6 gt ltExtraField7 gt ltExtraField8 gt ltExtraField9 gt ltExtraField10 gt ltExtraFieldsgt ltUseCatoptionsgt0ltUseCatoptionsgt ltQuantityOptions gt ltPriceLevelgt ltPrice_1gt0ltPrice_1gt ltPrice_2gt0ltPrice_2gt ltPrice_3gt0ltPrice_3gt ltPrice_4gt0ltPrice_4gt ltPrice_5gt0ltPrice_5gt ltPrice_6gt0ltPrice_6gt ltPrice_7gt0ltPrice_7gt ltPrice_8gt0ltPrice_8gt ltPrice_9gt0ltPrice_9gt ltPrice_10gt0ltPrice_10gt ltPriceLevelgt ltMinOrdergt0ltMinOrdergt ltListingDisplayTypegt-1ltListingDisplayTypegt ltShowOutStockgt-1ltShowOutStockgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1824

ltPricingGroupOptgt0ltPricingGroupOptgt ltQuantityDiscountOptgt0ltQuantityDiscountOptgt ltLoginLevelgt-1ltLoginLevelgt ltRedirectTo gt ltAccessGroup gt ltSelfShipgt0ltSelfShipgt ltTaxCode gt lteProductgt lteProductPassword gt lteProductRandomgt0lteProductRandomgt lteProductExpiregt0lteProductExpiregt lteProductPath gt lteProductSerialgt0lteProductSerialgt lteProductInstructions gt lteProductReuseSerialgt0lteProductReuseSerialgt lteProductgt ltNonSearchablegt0ltNonSearchablegt ltInstockMessage gt ltOutOfStockMessage gt ltBackOrderMessage gt ltRewardsgt ltRewardPointsgt0ltRewardPointsgt ltRewardDisablegt0ltRewardDisablegt ltRewardRedeemgt2610ltRewardRedeemgt ltRewardsgt ltFileNamegtltFileNamegt ltImagesgt ltImagegt ltUrlgtassetsimagesprodtestjpgltUrlgt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltThumbnailgtassetsimagesthumb_prodtestjpgltThumbnailgt ltImagesgt ltOptionsgt ltOptiongt ltIdgt11ltIdgt ltOptionTypegtSizeltOptionTypegt ltValuesgt ltValuegt ltIDgt28ltIDgt ltNamegtSmallltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuegt ltIDgt29ltIDgt ltNamegtLargeltNamegt ltOptionPricegt000ltOptionPricegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1924

ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptiongt ltIdgt12ltIdgt ltOptionTypegtColorltOptionTypegt ltValuesgt ltValuegt ltIDgt30ltIDgt ltNamegtBlueltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptionsgt ltProductgt ltGetProductDetailsResponsegt

32 getProductCount

Description Get total products

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt ltgetProductCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductCountResponse xmlns=gt ltProductQuantitygt6041ltProductQuantitygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2024

ltGetProductCountResponsegt

33 getProductInventory

Description Get the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgtprod123ltproductIdgt

ltcallBackURLgtltcallBackURLgt ltgetProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltInventorygt10ltInventorygt ltGetInventoryResponsegt

34 updateProductInventory

Description Update the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2124

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

quantity Number Stock quantity for the specified product

replaceStock Boolean Indicates if the stock should be replaced or incremented by the new quantity

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgt prod123ltproductIdgt ltquantitygt50ltquantitygt ltreplaceStockgttrueltreplaceStockgt

ltcallBackURLgtltcallBackURLgt ltupdateProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltNewInventorygt50ltNewInventorygt ltUpdateInventoryResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2224

Working with the callBackURL parameter The callBackURL parameter can be provided to any method of the 3dcart web service and must have a valid URL format followed by the page that will handle the post

ie httpwww3dcartcom3dcartapiposthandlerasp

When this parameter is provided the web service will post the result xml to the specified page and return the following result to the requester

ltxml version=10 encoding=utf-8 gt ltResponse xmlns=gt ltDescriptiongtXML Posted to

httpwww3dcartcom3dcartapiposthandleraspltDescriptiongt

ltResponsegt

The entire XML will be posted to the specified page which has to be prepared to handle the information

Here is a sample code of a page that handles the post and save the XML into a file

ltlanguage=vbscriptgt lt 3DCart Shopping Cart System - Version 30 3dCart Store Web Service - Version 10 Sample script to handle the xml response from the web service using the callbackURL parameter gt lt Dim strXml objXmlDoc Receives the xml strXml = requestForm Loads the XML into a xmlDoc object Set objXmlDoc = serverCreateObject(MicrosoftXMLDOM) objXmlDocpreserveWhiteSpace = true objXmlDocloadxml(strXml) Once the XML is loaded you can do anything with the information In this sample script the XML is being saved into the textxml file objXmlDocsave(serverMapPath(testxml)) Set objXmlDoc = nothing gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 11: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1124

ltShippinggt0ltShippinggt ltMethodgtFree ShippingltMethodgt ltFirstNamegtSamltFirstNamegt ltLastNamegtJonesltLastNamegt ltCompany gt ltAddressgt1234 Holmberg RdltAddressgt ltAddress2 gt ltCitygtParklandltCitygt ltZipCodegt33067ltZipCodegt ltStateCodegtFLltStateCodegt ltCountryCodegtUSltCountryCodegt ltPhonegt1112223344ltPhonegt ltWeightgt000ltWeightgt ltStatusgtNewltStatusgt ltInternalCommentgtltInternalCommentgt ltTrackingCode gt ltShipmentgt ltOrderItemsgt ltItemgt ltShipmentIDgt1ltShipmentIDgt ltProductIDgt100514ltProductIDgt ltProductNamegtThis is the product name ndash Free ProductltProductNamegt ltQuantitygt1ltQuantitygt ltUnitPricegt000ltUnitPricegt ltUnitCostgt000ltUnitCostgt ltOptionPricegt000ltOptionPricegt ltWeightgt000ltWeightgt ltWarehouseIDgt0ltWarehouseIDgt ltDateAdded gt ltPageAdded gt ltItemgt ltItemgt ltShipmentIDgt1ltShipmentIDgt ltProductIDgtabc3ltProductIDgt ltProductNamegtProduct NameltProductNamegt ltQuantitygt1ltQuantitygt ltUnitPricegt150000ltUnitPricegt ltUnitCostgt700ltUnitCostgt ltOptionPricegt000ltOptionPricegt ltWeightgt3200ltWeightgt ltWarehouseIDgt2ltWarehouseIDgt ltDateAddedgt842008 55643 PMltDateAddedgt ltPageAddedgtProduct-Name_p_1234-3214htmlltPageAddedgt ltItemgt ltOrderItemsgt ltShippingInformationgt ltOrdergt ltGetOrdersResponsegt

22 getOrderCount

Description Get total orders

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1224

requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

startFrom Boolean If startFrom is true and invoiceNum is specified the web service will count orders gt= invoiceNum

If startFrom is false and invoiceNum is specified the web service will count just the specified order

If invoiceNum is not specified this parameter will be ignored

invoiceNum String Search for specific invoice number

status String Search orders by status

dateFrom Date Search orders that were placed after specified date Must be in mmddyyyy format

dateTo Date Search orders that were placed before specified date Must be in mmddyyyy format

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltstartFromgtfalseltstartFromgt

ltinvoiceNumgtltinvoiceNumgt ltstatusgtNewltstatusgt ltdateFromgt08012008ltdateFromgt ltdateTogt08312008ltdateTogt

ltcallBackURLgtltcallBackURLgt ltgetOrderCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrdersCountResponse xmlns=gt ltQuantitygt474ltQuantitygt ltOrdersCountResponsegt

23 getOrderStatus

Description Get the status of a specific order

Parameters

Name Type Description

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1324

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Search for specific invoice number

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt

ltcallBackURLgtltcallBackURLgt ltgetOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltStatusIdgt1ltStatusIdgt ltStatusTextgtNewltStatusTextgt ltOrderStatusResponsegt

24 updateOrderStatus

Description Update the status of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

newStatus String New status for the specified order

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1424

ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt ltnewStatusgtNewltnewStatusgt

ltcallBackURLgtltcallBackURLgt ltupdateOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltNewStatusgtnewltNewStatusgt ltUpdateOrderStatusResponsegt

25 updateOrderShipment

Description Update the tracking number and the shipping date of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

shipmentID Numeric Identifies the shipment id for multiple shipment orders This ID can be found on the response of the getOrder method

This field is required for multiple shipment orders

tracking String Tracking code of the specified ordershipment

shipmentDate Date Shipping date of the specified ordershipment

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderShipment xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1524

ltinvoiceNumgt1476ltinvoiceNumgt

ltshipmentIDgtltshipmentIDgt lttrackinggt1234567890lttrackinggt ltshipmentDategt01202009ltshipmentDategt

ltcallBackURLgtltcallBackURLgt ltupdateOrderShipmentgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderShipmentResponse xmlns=gt ltresultgtOKltresultgt ltUpdateOrderShipmentResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1624

3 Product Related Methods

31 getProduct

Description Get product information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProduct xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt

ltproductIdgtltproductIdgt ltcallBackURLgtltcallBackURLgt ltgetProductgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductDetailsResponse xmlns=gt ltProductgt ltProductIDgtprod123ltProductIDgt ltProductNamegtTest ProductltProductNamegt ltCategoriesgt ltCategorygt ltCategoryIDgt27704ltCategoryIDgt ltCategoryNamegtPackagingltCategoryNamegt ltCategorygt ltCategorygt ltCategoryIDgt25848ltCategoryIDgt ltCategoryNamegtTest SubltCategoryNamegt ltCategorygt ltCategoriesgt ltMfgidgt1221ltMfgidgt ltManufacturergtManufacturer AltManufacturergt ltDistributorgt3dcartltDistributorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1724

ltCostgt15400ltCostgt ltPricegt26100ltPricegt ltRetailPricegt462ltRetailPricegt ltSalePricegt000ltSalePricegt ltOnSalegt0ltOnSalegt ltStockgt10ltStockgt ltStockAlertgt0ltStockAlertgt ltWeightgt100ltWeightgt ltWidthgt000ltWidthgt ltHeightgt000ltHeightgt ltDepthgt000ltDepthgt ltMinimumOrdergt1ltMinimumOrdergt ltMaximumOrdergt0ltMaximumOrdergt ltDateCreatedgt912008ltDateCreatedgt ltDescriptiongtTest product descriptionltDescriptiongt ltExtendedDescriptiongtProduct descriptionltExtendedDescriptiongt ltKeywordsgtkeyword test product buy storeltKeywordsgt ltRelatedProducts gt ltShipCostgt000ltShipCostgt ltTitlegtProduct titlehellipltTitlegt ltMetaTags gt ltDisplayText gt ltHomeSpecialgt0ltHomeSpecialgt ltCategorySpecialgt0ltCategorySpecialgt ltHidegt0ltHidegt ltFreeShippinggt0ltFreeShippinggt ltNonTaxgt0ltNonTaxgt ltNotForsalegt0ltNotForsalegt ltGiftCertificategt0ltGiftCertificategt ltUserIdgtJohn AdminltUserIdgt ltLastUpdategt812008ltLastUpdategt ltExtraFieldsgt ltExtraField1 gt ltExtraField2 gt ltExtraField3 gt ltExtraField4 gt ltExtraField5 gt ltExtraField6 gt ltExtraField7 gt ltExtraField8 gt ltExtraField9 gt ltExtraField10 gt ltExtraFieldsgt ltUseCatoptionsgt0ltUseCatoptionsgt ltQuantityOptions gt ltPriceLevelgt ltPrice_1gt0ltPrice_1gt ltPrice_2gt0ltPrice_2gt ltPrice_3gt0ltPrice_3gt ltPrice_4gt0ltPrice_4gt ltPrice_5gt0ltPrice_5gt ltPrice_6gt0ltPrice_6gt ltPrice_7gt0ltPrice_7gt ltPrice_8gt0ltPrice_8gt ltPrice_9gt0ltPrice_9gt ltPrice_10gt0ltPrice_10gt ltPriceLevelgt ltMinOrdergt0ltMinOrdergt ltListingDisplayTypegt-1ltListingDisplayTypegt ltShowOutStockgt-1ltShowOutStockgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1824

ltPricingGroupOptgt0ltPricingGroupOptgt ltQuantityDiscountOptgt0ltQuantityDiscountOptgt ltLoginLevelgt-1ltLoginLevelgt ltRedirectTo gt ltAccessGroup gt ltSelfShipgt0ltSelfShipgt ltTaxCode gt lteProductgt lteProductPassword gt lteProductRandomgt0lteProductRandomgt lteProductExpiregt0lteProductExpiregt lteProductPath gt lteProductSerialgt0lteProductSerialgt lteProductInstructions gt lteProductReuseSerialgt0lteProductReuseSerialgt lteProductgt ltNonSearchablegt0ltNonSearchablegt ltInstockMessage gt ltOutOfStockMessage gt ltBackOrderMessage gt ltRewardsgt ltRewardPointsgt0ltRewardPointsgt ltRewardDisablegt0ltRewardDisablegt ltRewardRedeemgt2610ltRewardRedeemgt ltRewardsgt ltFileNamegtltFileNamegt ltImagesgt ltImagegt ltUrlgtassetsimagesprodtestjpgltUrlgt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltThumbnailgtassetsimagesthumb_prodtestjpgltThumbnailgt ltImagesgt ltOptionsgt ltOptiongt ltIdgt11ltIdgt ltOptionTypegtSizeltOptionTypegt ltValuesgt ltValuegt ltIDgt28ltIDgt ltNamegtSmallltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuegt ltIDgt29ltIDgt ltNamegtLargeltNamegt ltOptionPricegt000ltOptionPricegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1924

ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptiongt ltIdgt12ltIdgt ltOptionTypegtColorltOptionTypegt ltValuesgt ltValuegt ltIDgt30ltIDgt ltNamegtBlueltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptionsgt ltProductgt ltGetProductDetailsResponsegt

32 getProductCount

Description Get total products

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt ltgetProductCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductCountResponse xmlns=gt ltProductQuantitygt6041ltProductQuantitygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2024

ltGetProductCountResponsegt

33 getProductInventory

Description Get the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgtprod123ltproductIdgt

ltcallBackURLgtltcallBackURLgt ltgetProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltInventorygt10ltInventorygt ltGetInventoryResponsegt

34 updateProductInventory

Description Update the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2124

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

quantity Number Stock quantity for the specified product

replaceStock Boolean Indicates if the stock should be replaced or incremented by the new quantity

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgt prod123ltproductIdgt ltquantitygt50ltquantitygt ltreplaceStockgttrueltreplaceStockgt

ltcallBackURLgtltcallBackURLgt ltupdateProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltNewInventorygt50ltNewInventorygt ltUpdateInventoryResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2224

Working with the callBackURL parameter The callBackURL parameter can be provided to any method of the 3dcart web service and must have a valid URL format followed by the page that will handle the post

ie httpwww3dcartcom3dcartapiposthandlerasp

When this parameter is provided the web service will post the result xml to the specified page and return the following result to the requester

ltxml version=10 encoding=utf-8 gt ltResponse xmlns=gt ltDescriptiongtXML Posted to

httpwww3dcartcom3dcartapiposthandleraspltDescriptiongt

ltResponsegt

The entire XML will be posted to the specified page which has to be prepared to handle the information

Here is a sample code of a page that handles the post and save the XML into a file

ltlanguage=vbscriptgt lt 3DCart Shopping Cart System - Version 30 3dCart Store Web Service - Version 10 Sample script to handle the xml response from the web service using the callbackURL parameter gt lt Dim strXml objXmlDoc Receives the xml strXml = requestForm Loads the XML into a xmlDoc object Set objXmlDoc = serverCreateObject(MicrosoftXMLDOM) objXmlDocpreserveWhiteSpace = true objXmlDocloadxml(strXml) Once the XML is loaded you can do anything with the information In this sample script the XML is being saved into the textxml file objXmlDocsave(serverMapPath(testxml)) Set objXmlDoc = nothing gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 12: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1224

requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

startFrom Boolean If startFrom is true and invoiceNum is specified the web service will count orders gt= invoiceNum

If startFrom is false and invoiceNum is specified the web service will count just the specified order

If invoiceNum is not specified this parameter will be ignored

invoiceNum String Search for specific invoice number

status String Search orders by status

dateFrom Date Search orders that were placed after specified date Must be in mmddyyyy format

dateTo Date Search orders that were placed before specified date Must be in mmddyyyy format

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltstartFromgtfalseltstartFromgt

ltinvoiceNumgtltinvoiceNumgt ltstatusgtNewltstatusgt ltdateFromgt08012008ltdateFromgt ltdateTogt08312008ltdateTogt

ltcallBackURLgtltcallBackURLgt ltgetOrderCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrdersCountResponse xmlns=gt ltQuantitygt474ltQuantitygt ltOrdersCountResponsegt

23 getOrderStatus

Description Get the status of a specific order

Parameters

Name Type Description

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1324

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Search for specific invoice number

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt

ltcallBackURLgtltcallBackURLgt ltgetOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltStatusIdgt1ltStatusIdgt ltStatusTextgtNewltStatusTextgt ltOrderStatusResponsegt

24 updateOrderStatus

Description Update the status of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

newStatus String New status for the specified order

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1424

ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt ltnewStatusgtNewltnewStatusgt

ltcallBackURLgtltcallBackURLgt ltupdateOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltNewStatusgtnewltNewStatusgt ltUpdateOrderStatusResponsegt

25 updateOrderShipment

Description Update the tracking number and the shipping date of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

shipmentID Numeric Identifies the shipment id for multiple shipment orders This ID can be found on the response of the getOrder method

This field is required for multiple shipment orders

tracking String Tracking code of the specified ordershipment

shipmentDate Date Shipping date of the specified ordershipment

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderShipment xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1524

ltinvoiceNumgt1476ltinvoiceNumgt

ltshipmentIDgtltshipmentIDgt lttrackinggt1234567890lttrackinggt ltshipmentDategt01202009ltshipmentDategt

ltcallBackURLgtltcallBackURLgt ltupdateOrderShipmentgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderShipmentResponse xmlns=gt ltresultgtOKltresultgt ltUpdateOrderShipmentResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1624

3 Product Related Methods

31 getProduct

Description Get product information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProduct xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt

ltproductIdgtltproductIdgt ltcallBackURLgtltcallBackURLgt ltgetProductgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductDetailsResponse xmlns=gt ltProductgt ltProductIDgtprod123ltProductIDgt ltProductNamegtTest ProductltProductNamegt ltCategoriesgt ltCategorygt ltCategoryIDgt27704ltCategoryIDgt ltCategoryNamegtPackagingltCategoryNamegt ltCategorygt ltCategorygt ltCategoryIDgt25848ltCategoryIDgt ltCategoryNamegtTest SubltCategoryNamegt ltCategorygt ltCategoriesgt ltMfgidgt1221ltMfgidgt ltManufacturergtManufacturer AltManufacturergt ltDistributorgt3dcartltDistributorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1724

ltCostgt15400ltCostgt ltPricegt26100ltPricegt ltRetailPricegt462ltRetailPricegt ltSalePricegt000ltSalePricegt ltOnSalegt0ltOnSalegt ltStockgt10ltStockgt ltStockAlertgt0ltStockAlertgt ltWeightgt100ltWeightgt ltWidthgt000ltWidthgt ltHeightgt000ltHeightgt ltDepthgt000ltDepthgt ltMinimumOrdergt1ltMinimumOrdergt ltMaximumOrdergt0ltMaximumOrdergt ltDateCreatedgt912008ltDateCreatedgt ltDescriptiongtTest product descriptionltDescriptiongt ltExtendedDescriptiongtProduct descriptionltExtendedDescriptiongt ltKeywordsgtkeyword test product buy storeltKeywordsgt ltRelatedProducts gt ltShipCostgt000ltShipCostgt ltTitlegtProduct titlehellipltTitlegt ltMetaTags gt ltDisplayText gt ltHomeSpecialgt0ltHomeSpecialgt ltCategorySpecialgt0ltCategorySpecialgt ltHidegt0ltHidegt ltFreeShippinggt0ltFreeShippinggt ltNonTaxgt0ltNonTaxgt ltNotForsalegt0ltNotForsalegt ltGiftCertificategt0ltGiftCertificategt ltUserIdgtJohn AdminltUserIdgt ltLastUpdategt812008ltLastUpdategt ltExtraFieldsgt ltExtraField1 gt ltExtraField2 gt ltExtraField3 gt ltExtraField4 gt ltExtraField5 gt ltExtraField6 gt ltExtraField7 gt ltExtraField8 gt ltExtraField9 gt ltExtraField10 gt ltExtraFieldsgt ltUseCatoptionsgt0ltUseCatoptionsgt ltQuantityOptions gt ltPriceLevelgt ltPrice_1gt0ltPrice_1gt ltPrice_2gt0ltPrice_2gt ltPrice_3gt0ltPrice_3gt ltPrice_4gt0ltPrice_4gt ltPrice_5gt0ltPrice_5gt ltPrice_6gt0ltPrice_6gt ltPrice_7gt0ltPrice_7gt ltPrice_8gt0ltPrice_8gt ltPrice_9gt0ltPrice_9gt ltPrice_10gt0ltPrice_10gt ltPriceLevelgt ltMinOrdergt0ltMinOrdergt ltListingDisplayTypegt-1ltListingDisplayTypegt ltShowOutStockgt-1ltShowOutStockgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1824

ltPricingGroupOptgt0ltPricingGroupOptgt ltQuantityDiscountOptgt0ltQuantityDiscountOptgt ltLoginLevelgt-1ltLoginLevelgt ltRedirectTo gt ltAccessGroup gt ltSelfShipgt0ltSelfShipgt ltTaxCode gt lteProductgt lteProductPassword gt lteProductRandomgt0lteProductRandomgt lteProductExpiregt0lteProductExpiregt lteProductPath gt lteProductSerialgt0lteProductSerialgt lteProductInstructions gt lteProductReuseSerialgt0lteProductReuseSerialgt lteProductgt ltNonSearchablegt0ltNonSearchablegt ltInstockMessage gt ltOutOfStockMessage gt ltBackOrderMessage gt ltRewardsgt ltRewardPointsgt0ltRewardPointsgt ltRewardDisablegt0ltRewardDisablegt ltRewardRedeemgt2610ltRewardRedeemgt ltRewardsgt ltFileNamegtltFileNamegt ltImagesgt ltImagegt ltUrlgtassetsimagesprodtestjpgltUrlgt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltThumbnailgtassetsimagesthumb_prodtestjpgltThumbnailgt ltImagesgt ltOptionsgt ltOptiongt ltIdgt11ltIdgt ltOptionTypegtSizeltOptionTypegt ltValuesgt ltValuegt ltIDgt28ltIDgt ltNamegtSmallltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuegt ltIDgt29ltIDgt ltNamegtLargeltNamegt ltOptionPricegt000ltOptionPricegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1924

ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptiongt ltIdgt12ltIdgt ltOptionTypegtColorltOptionTypegt ltValuesgt ltValuegt ltIDgt30ltIDgt ltNamegtBlueltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptionsgt ltProductgt ltGetProductDetailsResponsegt

32 getProductCount

Description Get total products

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt ltgetProductCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductCountResponse xmlns=gt ltProductQuantitygt6041ltProductQuantitygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2024

ltGetProductCountResponsegt

33 getProductInventory

Description Get the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgtprod123ltproductIdgt

ltcallBackURLgtltcallBackURLgt ltgetProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltInventorygt10ltInventorygt ltGetInventoryResponsegt

34 updateProductInventory

Description Update the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2124

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

quantity Number Stock quantity for the specified product

replaceStock Boolean Indicates if the stock should be replaced or incremented by the new quantity

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgt prod123ltproductIdgt ltquantitygt50ltquantitygt ltreplaceStockgttrueltreplaceStockgt

ltcallBackURLgtltcallBackURLgt ltupdateProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltNewInventorygt50ltNewInventorygt ltUpdateInventoryResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2224

Working with the callBackURL parameter The callBackURL parameter can be provided to any method of the 3dcart web service and must have a valid URL format followed by the page that will handle the post

ie httpwww3dcartcom3dcartapiposthandlerasp

When this parameter is provided the web service will post the result xml to the specified page and return the following result to the requester

ltxml version=10 encoding=utf-8 gt ltResponse xmlns=gt ltDescriptiongtXML Posted to

httpwww3dcartcom3dcartapiposthandleraspltDescriptiongt

ltResponsegt

The entire XML will be posted to the specified page which has to be prepared to handle the information

Here is a sample code of a page that handles the post and save the XML into a file

ltlanguage=vbscriptgt lt 3DCart Shopping Cart System - Version 30 3dCart Store Web Service - Version 10 Sample script to handle the xml response from the web service using the callbackURL parameter gt lt Dim strXml objXmlDoc Receives the xml strXml = requestForm Loads the XML into a xmlDoc object Set objXmlDoc = serverCreateObject(MicrosoftXMLDOM) objXmlDocpreserveWhiteSpace = true objXmlDocloadxml(strXml) Once the XML is loaded you can do anything with the information In this sample script the XML is being saved into the textxml file objXmlDocsave(serverMapPath(testxml)) Set objXmlDoc = nothing gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 13: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1324

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Search for specific invoice number

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt

ltcallBackURLgtltcallBackURLgt ltgetOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltStatusIdgt1ltStatusIdgt ltStatusTextgtNewltStatusTextgt ltOrderStatusResponsegt

24 updateOrderStatus

Description Update the status of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

newStatus String New status for the specified order

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1424

ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt ltnewStatusgtNewltnewStatusgt

ltcallBackURLgtltcallBackURLgt ltupdateOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltNewStatusgtnewltNewStatusgt ltUpdateOrderStatusResponsegt

25 updateOrderShipment

Description Update the tracking number and the shipping date of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

shipmentID Numeric Identifies the shipment id for multiple shipment orders This ID can be found on the response of the getOrder method

This field is required for multiple shipment orders

tracking String Tracking code of the specified ordershipment

shipmentDate Date Shipping date of the specified ordershipment

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderShipment xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1524

ltinvoiceNumgt1476ltinvoiceNumgt

ltshipmentIDgtltshipmentIDgt lttrackinggt1234567890lttrackinggt ltshipmentDategt01202009ltshipmentDategt

ltcallBackURLgtltcallBackURLgt ltupdateOrderShipmentgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderShipmentResponse xmlns=gt ltresultgtOKltresultgt ltUpdateOrderShipmentResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1624

3 Product Related Methods

31 getProduct

Description Get product information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProduct xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt

ltproductIdgtltproductIdgt ltcallBackURLgtltcallBackURLgt ltgetProductgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductDetailsResponse xmlns=gt ltProductgt ltProductIDgtprod123ltProductIDgt ltProductNamegtTest ProductltProductNamegt ltCategoriesgt ltCategorygt ltCategoryIDgt27704ltCategoryIDgt ltCategoryNamegtPackagingltCategoryNamegt ltCategorygt ltCategorygt ltCategoryIDgt25848ltCategoryIDgt ltCategoryNamegtTest SubltCategoryNamegt ltCategorygt ltCategoriesgt ltMfgidgt1221ltMfgidgt ltManufacturergtManufacturer AltManufacturergt ltDistributorgt3dcartltDistributorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1724

ltCostgt15400ltCostgt ltPricegt26100ltPricegt ltRetailPricegt462ltRetailPricegt ltSalePricegt000ltSalePricegt ltOnSalegt0ltOnSalegt ltStockgt10ltStockgt ltStockAlertgt0ltStockAlertgt ltWeightgt100ltWeightgt ltWidthgt000ltWidthgt ltHeightgt000ltHeightgt ltDepthgt000ltDepthgt ltMinimumOrdergt1ltMinimumOrdergt ltMaximumOrdergt0ltMaximumOrdergt ltDateCreatedgt912008ltDateCreatedgt ltDescriptiongtTest product descriptionltDescriptiongt ltExtendedDescriptiongtProduct descriptionltExtendedDescriptiongt ltKeywordsgtkeyword test product buy storeltKeywordsgt ltRelatedProducts gt ltShipCostgt000ltShipCostgt ltTitlegtProduct titlehellipltTitlegt ltMetaTags gt ltDisplayText gt ltHomeSpecialgt0ltHomeSpecialgt ltCategorySpecialgt0ltCategorySpecialgt ltHidegt0ltHidegt ltFreeShippinggt0ltFreeShippinggt ltNonTaxgt0ltNonTaxgt ltNotForsalegt0ltNotForsalegt ltGiftCertificategt0ltGiftCertificategt ltUserIdgtJohn AdminltUserIdgt ltLastUpdategt812008ltLastUpdategt ltExtraFieldsgt ltExtraField1 gt ltExtraField2 gt ltExtraField3 gt ltExtraField4 gt ltExtraField5 gt ltExtraField6 gt ltExtraField7 gt ltExtraField8 gt ltExtraField9 gt ltExtraField10 gt ltExtraFieldsgt ltUseCatoptionsgt0ltUseCatoptionsgt ltQuantityOptions gt ltPriceLevelgt ltPrice_1gt0ltPrice_1gt ltPrice_2gt0ltPrice_2gt ltPrice_3gt0ltPrice_3gt ltPrice_4gt0ltPrice_4gt ltPrice_5gt0ltPrice_5gt ltPrice_6gt0ltPrice_6gt ltPrice_7gt0ltPrice_7gt ltPrice_8gt0ltPrice_8gt ltPrice_9gt0ltPrice_9gt ltPrice_10gt0ltPrice_10gt ltPriceLevelgt ltMinOrdergt0ltMinOrdergt ltListingDisplayTypegt-1ltListingDisplayTypegt ltShowOutStockgt-1ltShowOutStockgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1824

ltPricingGroupOptgt0ltPricingGroupOptgt ltQuantityDiscountOptgt0ltQuantityDiscountOptgt ltLoginLevelgt-1ltLoginLevelgt ltRedirectTo gt ltAccessGroup gt ltSelfShipgt0ltSelfShipgt ltTaxCode gt lteProductgt lteProductPassword gt lteProductRandomgt0lteProductRandomgt lteProductExpiregt0lteProductExpiregt lteProductPath gt lteProductSerialgt0lteProductSerialgt lteProductInstructions gt lteProductReuseSerialgt0lteProductReuseSerialgt lteProductgt ltNonSearchablegt0ltNonSearchablegt ltInstockMessage gt ltOutOfStockMessage gt ltBackOrderMessage gt ltRewardsgt ltRewardPointsgt0ltRewardPointsgt ltRewardDisablegt0ltRewardDisablegt ltRewardRedeemgt2610ltRewardRedeemgt ltRewardsgt ltFileNamegtltFileNamegt ltImagesgt ltImagegt ltUrlgtassetsimagesprodtestjpgltUrlgt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltThumbnailgtassetsimagesthumb_prodtestjpgltThumbnailgt ltImagesgt ltOptionsgt ltOptiongt ltIdgt11ltIdgt ltOptionTypegtSizeltOptionTypegt ltValuesgt ltValuegt ltIDgt28ltIDgt ltNamegtSmallltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuegt ltIDgt29ltIDgt ltNamegtLargeltNamegt ltOptionPricegt000ltOptionPricegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1924

ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptiongt ltIdgt12ltIdgt ltOptionTypegtColorltOptionTypegt ltValuesgt ltValuegt ltIDgt30ltIDgt ltNamegtBlueltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptionsgt ltProductgt ltGetProductDetailsResponsegt

32 getProductCount

Description Get total products

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt ltgetProductCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductCountResponse xmlns=gt ltProductQuantitygt6041ltProductQuantitygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2024

ltGetProductCountResponsegt

33 getProductInventory

Description Get the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgtprod123ltproductIdgt

ltcallBackURLgtltcallBackURLgt ltgetProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltInventorygt10ltInventorygt ltGetInventoryResponsegt

34 updateProductInventory

Description Update the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2124

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

quantity Number Stock quantity for the specified product

replaceStock Boolean Indicates if the stock should be replaced or incremented by the new quantity

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgt prod123ltproductIdgt ltquantitygt50ltquantitygt ltreplaceStockgttrueltreplaceStockgt

ltcallBackURLgtltcallBackURLgt ltupdateProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltNewInventorygt50ltNewInventorygt ltUpdateInventoryResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2224

Working with the callBackURL parameter The callBackURL parameter can be provided to any method of the 3dcart web service and must have a valid URL format followed by the page that will handle the post

ie httpwww3dcartcom3dcartapiposthandlerasp

When this parameter is provided the web service will post the result xml to the specified page and return the following result to the requester

ltxml version=10 encoding=utf-8 gt ltResponse xmlns=gt ltDescriptiongtXML Posted to

httpwww3dcartcom3dcartapiposthandleraspltDescriptiongt

ltResponsegt

The entire XML will be posted to the specified page which has to be prepared to handle the information

Here is a sample code of a page that handles the post and save the XML into a file

ltlanguage=vbscriptgt lt 3DCart Shopping Cart System - Version 30 3dCart Store Web Service - Version 10 Sample script to handle the xml response from the web service using the callbackURL parameter gt lt Dim strXml objXmlDoc Receives the xml strXml = requestForm Loads the XML into a xmlDoc object Set objXmlDoc = serverCreateObject(MicrosoftXMLDOM) objXmlDocpreserveWhiteSpace = true objXmlDocloadxml(strXml) Once the XML is loaded you can do anything with the information In this sample script the XML is being saved into the textxml file objXmlDocsave(serverMapPath(testxml)) Set objXmlDoc = nothing gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 14: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1424

ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderStatus xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltinvoiceNumgt1476ltinvoiceNumgt ltnewStatusgtNewltnewStatusgt

ltcallBackURLgtltcallBackURLgt ltupdateOrderStatusgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderStatusResponse xmlns=gt ltInvoiceNumgt1476ltInvoiceNumgt ltNewStatusgtnewltNewStatusgt ltUpdateOrderStatusResponsegt

25 updateOrderShipment

Description Update the tracking number and the shipping date of a specific order

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

invoiceNum String Invoice number to be updated

shipmentID Numeric Identifies the shipment id for multiple shipment orders This ID can be found on the response of the getOrder method

This field is required for multiple shipment orders

tracking String Tracking code of the specified ordershipment

shipmentDate Date Shipping date of the specified ordershipment

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateOrderShipment xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1524

ltinvoiceNumgt1476ltinvoiceNumgt

ltshipmentIDgtltshipmentIDgt lttrackinggt1234567890lttrackinggt ltshipmentDategt01202009ltshipmentDategt

ltcallBackURLgtltcallBackURLgt ltupdateOrderShipmentgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderShipmentResponse xmlns=gt ltresultgtOKltresultgt ltUpdateOrderShipmentResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1624

3 Product Related Methods

31 getProduct

Description Get product information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProduct xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt

ltproductIdgtltproductIdgt ltcallBackURLgtltcallBackURLgt ltgetProductgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductDetailsResponse xmlns=gt ltProductgt ltProductIDgtprod123ltProductIDgt ltProductNamegtTest ProductltProductNamegt ltCategoriesgt ltCategorygt ltCategoryIDgt27704ltCategoryIDgt ltCategoryNamegtPackagingltCategoryNamegt ltCategorygt ltCategorygt ltCategoryIDgt25848ltCategoryIDgt ltCategoryNamegtTest SubltCategoryNamegt ltCategorygt ltCategoriesgt ltMfgidgt1221ltMfgidgt ltManufacturergtManufacturer AltManufacturergt ltDistributorgt3dcartltDistributorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1724

ltCostgt15400ltCostgt ltPricegt26100ltPricegt ltRetailPricegt462ltRetailPricegt ltSalePricegt000ltSalePricegt ltOnSalegt0ltOnSalegt ltStockgt10ltStockgt ltStockAlertgt0ltStockAlertgt ltWeightgt100ltWeightgt ltWidthgt000ltWidthgt ltHeightgt000ltHeightgt ltDepthgt000ltDepthgt ltMinimumOrdergt1ltMinimumOrdergt ltMaximumOrdergt0ltMaximumOrdergt ltDateCreatedgt912008ltDateCreatedgt ltDescriptiongtTest product descriptionltDescriptiongt ltExtendedDescriptiongtProduct descriptionltExtendedDescriptiongt ltKeywordsgtkeyword test product buy storeltKeywordsgt ltRelatedProducts gt ltShipCostgt000ltShipCostgt ltTitlegtProduct titlehellipltTitlegt ltMetaTags gt ltDisplayText gt ltHomeSpecialgt0ltHomeSpecialgt ltCategorySpecialgt0ltCategorySpecialgt ltHidegt0ltHidegt ltFreeShippinggt0ltFreeShippinggt ltNonTaxgt0ltNonTaxgt ltNotForsalegt0ltNotForsalegt ltGiftCertificategt0ltGiftCertificategt ltUserIdgtJohn AdminltUserIdgt ltLastUpdategt812008ltLastUpdategt ltExtraFieldsgt ltExtraField1 gt ltExtraField2 gt ltExtraField3 gt ltExtraField4 gt ltExtraField5 gt ltExtraField6 gt ltExtraField7 gt ltExtraField8 gt ltExtraField9 gt ltExtraField10 gt ltExtraFieldsgt ltUseCatoptionsgt0ltUseCatoptionsgt ltQuantityOptions gt ltPriceLevelgt ltPrice_1gt0ltPrice_1gt ltPrice_2gt0ltPrice_2gt ltPrice_3gt0ltPrice_3gt ltPrice_4gt0ltPrice_4gt ltPrice_5gt0ltPrice_5gt ltPrice_6gt0ltPrice_6gt ltPrice_7gt0ltPrice_7gt ltPrice_8gt0ltPrice_8gt ltPrice_9gt0ltPrice_9gt ltPrice_10gt0ltPrice_10gt ltPriceLevelgt ltMinOrdergt0ltMinOrdergt ltListingDisplayTypegt-1ltListingDisplayTypegt ltShowOutStockgt-1ltShowOutStockgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1824

ltPricingGroupOptgt0ltPricingGroupOptgt ltQuantityDiscountOptgt0ltQuantityDiscountOptgt ltLoginLevelgt-1ltLoginLevelgt ltRedirectTo gt ltAccessGroup gt ltSelfShipgt0ltSelfShipgt ltTaxCode gt lteProductgt lteProductPassword gt lteProductRandomgt0lteProductRandomgt lteProductExpiregt0lteProductExpiregt lteProductPath gt lteProductSerialgt0lteProductSerialgt lteProductInstructions gt lteProductReuseSerialgt0lteProductReuseSerialgt lteProductgt ltNonSearchablegt0ltNonSearchablegt ltInstockMessage gt ltOutOfStockMessage gt ltBackOrderMessage gt ltRewardsgt ltRewardPointsgt0ltRewardPointsgt ltRewardDisablegt0ltRewardDisablegt ltRewardRedeemgt2610ltRewardRedeemgt ltRewardsgt ltFileNamegtltFileNamegt ltImagesgt ltImagegt ltUrlgtassetsimagesprodtestjpgltUrlgt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltThumbnailgtassetsimagesthumb_prodtestjpgltThumbnailgt ltImagesgt ltOptionsgt ltOptiongt ltIdgt11ltIdgt ltOptionTypegtSizeltOptionTypegt ltValuesgt ltValuegt ltIDgt28ltIDgt ltNamegtSmallltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuegt ltIDgt29ltIDgt ltNamegtLargeltNamegt ltOptionPricegt000ltOptionPricegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1924

ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptiongt ltIdgt12ltIdgt ltOptionTypegtColorltOptionTypegt ltValuesgt ltValuegt ltIDgt30ltIDgt ltNamegtBlueltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptionsgt ltProductgt ltGetProductDetailsResponsegt

32 getProductCount

Description Get total products

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt ltgetProductCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductCountResponse xmlns=gt ltProductQuantitygt6041ltProductQuantitygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2024

ltGetProductCountResponsegt

33 getProductInventory

Description Get the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgtprod123ltproductIdgt

ltcallBackURLgtltcallBackURLgt ltgetProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltInventorygt10ltInventorygt ltGetInventoryResponsegt

34 updateProductInventory

Description Update the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2124

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

quantity Number Stock quantity for the specified product

replaceStock Boolean Indicates if the stock should be replaced or incremented by the new quantity

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgt prod123ltproductIdgt ltquantitygt50ltquantitygt ltreplaceStockgttrueltreplaceStockgt

ltcallBackURLgtltcallBackURLgt ltupdateProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltNewInventorygt50ltNewInventorygt ltUpdateInventoryResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2224

Working with the callBackURL parameter The callBackURL parameter can be provided to any method of the 3dcart web service and must have a valid URL format followed by the page that will handle the post

ie httpwww3dcartcom3dcartapiposthandlerasp

When this parameter is provided the web service will post the result xml to the specified page and return the following result to the requester

ltxml version=10 encoding=utf-8 gt ltResponse xmlns=gt ltDescriptiongtXML Posted to

httpwww3dcartcom3dcartapiposthandleraspltDescriptiongt

ltResponsegt

The entire XML will be posted to the specified page which has to be prepared to handle the information

Here is a sample code of a page that handles the post and save the XML into a file

ltlanguage=vbscriptgt lt 3DCart Shopping Cart System - Version 30 3dCart Store Web Service - Version 10 Sample script to handle the xml response from the web service using the callbackURL parameter gt lt Dim strXml objXmlDoc Receives the xml strXml = requestForm Loads the XML into a xmlDoc object Set objXmlDoc = serverCreateObject(MicrosoftXMLDOM) objXmlDocpreserveWhiteSpace = true objXmlDocloadxml(strXml) Once the XML is loaded you can do anything with the information In this sample script the XML is being saved into the textxml file objXmlDocsave(serverMapPath(testxml)) Set objXmlDoc = nothing gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 15: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1524

ltinvoiceNumgt1476ltinvoiceNumgt

ltshipmentIDgtltshipmentIDgt lttrackinggt1234567890lttrackinggt ltshipmentDategt01202009ltshipmentDategt

ltcallBackURLgtltcallBackURLgt ltupdateOrderShipmentgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateOrderShipmentResponse xmlns=gt ltresultgtOKltresultgt ltUpdateOrderShipmentResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1624

3 Product Related Methods

31 getProduct

Description Get product information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProduct xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt

ltproductIdgtltproductIdgt ltcallBackURLgtltcallBackURLgt ltgetProductgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductDetailsResponse xmlns=gt ltProductgt ltProductIDgtprod123ltProductIDgt ltProductNamegtTest ProductltProductNamegt ltCategoriesgt ltCategorygt ltCategoryIDgt27704ltCategoryIDgt ltCategoryNamegtPackagingltCategoryNamegt ltCategorygt ltCategorygt ltCategoryIDgt25848ltCategoryIDgt ltCategoryNamegtTest SubltCategoryNamegt ltCategorygt ltCategoriesgt ltMfgidgt1221ltMfgidgt ltManufacturergtManufacturer AltManufacturergt ltDistributorgt3dcartltDistributorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1724

ltCostgt15400ltCostgt ltPricegt26100ltPricegt ltRetailPricegt462ltRetailPricegt ltSalePricegt000ltSalePricegt ltOnSalegt0ltOnSalegt ltStockgt10ltStockgt ltStockAlertgt0ltStockAlertgt ltWeightgt100ltWeightgt ltWidthgt000ltWidthgt ltHeightgt000ltHeightgt ltDepthgt000ltDepthgt ltMinimumOrdergt1ltMinimumOrdergt ltMaximumOrdergt0ltMaximumOrdergt ltDateCreatedgt912008ltDateCreatedgt ltDescriptiongtTest product descriptionltDescriptiongt ltExtendedDescriptiongtProduct descriptionltExtendedDescriptiongt ltKeywordsgtkeyword test product buy storeltKeywordsgt ltRelatedProducts gt ltShipCostgt000ltShipCostgt ltTitlegtProduct titlehellipltTitlegt ltMetaTags gt ltDisplayText gt ltHomeSpecialgt0ltHomeSpecialgt ltCategorySpecialgt0ltCategorySpecialgt ltHidegt0ltHidegt ltFreeShippinggt0ltFreeShippinggt ltNonTaxgt0ltNonTaxgt ltNotForsalegt0ltNotForsalegt ltGiftCertificategt0ltGiftCertificategt ltUserIdgtJohn AdminltUserIdgt ltLastUpdategt812008ltLastUpdategt ltExtraFieldsgt ltExtraField1 gt ltExtraField2 gt ltExtraField3 gt ltExtraField4 gt ltExtraField5 gt ltExtraField6 gt ltExtraField7 gt ltExtraField8 gt ltExtraField9 gt ltExtraField10 gt ltExtraFieldsgt ltUseCatoptionsgt0ltUseCatoptionsgt ltQuantityOptions gt ltPriceLevelgt ltPrice_1gt0ltPrice_1gt ltPrice_2gt0ltPrice_2gt ltPrice_3gt0ltPrice_3gt ltPrice_4gt0ltPrice_4gt ltPrice_5gt0ltPrice_5gt ltPrice_6gt0ltPrice_6gt ltPrice_7gt0ltPrice_7gt ltPrice_8gt0ltPrice_8gt ltPrice_9gt0ltPrice_9gt ltPrice_10gt0ltPrice_10gt ltPriceLevelgt ltMinOrdergt0ltMinOrdergt ltListingDisplayTypegt-1ltListingDisplayTypegt ltShowOutStockgt-1ltShowOutStockgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1824

ltPricingGroupOptgt0ltPricingGroupOptgt ltQuantityDiscountOptgt0ltQuantityDiscountOptgt ltLoginLevelgt-1ltLoginLevelgt ltRedirectTo gt ltAccessGroup gt ltSelfShipgt0ltSelfShipgt ltTaxCode gt lteProductgt lteProductPassword gt lteProductRandomgt0lteProductRandomgt lteProductExpiregt0lteProductExpiregt lteProductPath gt lteProductSerialgt0lteProductSerialgt lteProductInstructions gt lteProductReuseSerialgt0lteProductReuseSerialgt lteProductgt ltNonSearchablegt0ltNonSearchablegt ltInstockMessage gt ltOutOfStockMessage gt ltBackOrderMessage gt ltRewardsgt ltRewardPointsgt0ltRewardPointsgt ltRewardDisablegt0ltRewardDisablegt ltRewardRedeemgt2610ltRewardRedeemgt ltRewardsgt ltFileNamegtltFileNamegt ltImagesgt ltImagegt ltUrlgtassetsimagesprodtestjpgltUrlgt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltThumbnailgtassetsimagesthumb_prodtestjpgltThumbnailgt ltImagesgt ltOptionsgt ltOptiongt ltIdgt11ltIdgt ltOptionTypegtSizeltOptionTypegt ltValuesgt ltValuegt ltIDgt28ltIDgt ltNamegtSmallltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuegt ltIDgt29ltIDgt ltNamegtLargeltNamegt ltOptionPricegt000ltOptionPricegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1924

ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptiongt ltIdgt12ltIdgt ltOptionTypegtColorltOptionTypegt ltValuesgt ltValuegt ltIDgt30ltIDgt ltNamegtBlueltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptionsgt ltProductgt ltGetProductDetailsResponsegt

32 getProductCount

Description Get total products

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt ltgetProductCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductCountResponse xmlns=gt ltProductQuantitygt6041ltProductQuantitygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2024

ltGetProductCountResponsegt

33 getProductInventory

Description Get the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgtprod123ltproductIdgt

ltcallBackURLgtltcallBackURLgt ltgetProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltInventorygt10ltInventorygt ltGetInventoryResponsegt

34 updateProductInventory

Description Update the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2124

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

quantity Number Stock quantity for the specified product

replaceStock Boolean Indicates if the stock should be replaced or incremented by the new quantity

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgt prod123ltproductIdgt ltquantitygt50ltquantitygt ltreplaceStockgttrueltreplaceStockgt

ltcallBackURLgtltcallBackURLgt ltupdateProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltNewInventorygt50ltNewInventorygt ltUpdateInventoryResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2224

Working with the callBackURL parameter The callBackURL parameter can be provided to any method of the 3dcart web service and must have a valid URL format followed by the page that will handle the post

ie httpwww3dcartcom3dcartapiposthandlerasp

When this parameter is provided the web service will post the result xml to the specified page and return the following result to the requester

ltxml version=10 encoding=utf-8 gt ltResponse xmlns=gt ltDescriptiongtXML Posted to

httpwww3dcartcom3dcartapiposthandleraspltDescriptiongt

ltResponsegt

The entire XML will be posted to the specified page which has to be prepared to handle the information

Here is a sample code of a page that handles the post and save the XML into a file

ltlanguage=vbscriptgt lt 3DCart Shopping Cart System - Version 30 3dCart Store Web Service - Version 10 Sample script to handle the xml response from the web service using the callbackURL parameter gt lt Dim strXml objXmlDoc Receives the xml strXml = requestForm Loads the XML into a xmlDoc object Set objXmlDoc = serverCreateObject(MicrosoftXMLDOM) objXmlDocpreserveWhiteSpace = true objXmlDocloadxml(strXml) Once the XML is loaded you can do anything with the information In this sample script the XML is being saved into the textxml file objXmlDocsave(serverMapPath(testxml)) Set objXmlDoc = nothing gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 16: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1624

3 Product Related Methods

31 getProduct

Description Get product information

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

batchSize Numeric Number of records to pull Range 1 to 100

startNum Numeric Position to start the search Range 1 to x

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProduct xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltbatchSizegt1ltbatchSizegt ltstartNumgt1ltstartNumgt

ltproductIdgtltproductIdgt ltcallBackURLgtltcallBackURLgt ltgetProductgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductDetailsResponse xmlns=gt ltProductgt ltProductIDgtprod123ltProductIDgt ltProductNamegtTest ProductltProductNamegt ltCategoriesgt ltCategorygt ltCategoryIDgt27704ltCategoryIDgt ltCategoryNamegtPackagingltCategoryNamegt ltCategorygt ltCategorygt ltCategoryIDgt25848ltCategoryIDgt ltCategoryNamegtTest SubltCategoryNamegt ltCategorygt ltCategoriesgt ltMfgidgt1221ltMfgidgt ltManufacturergtManufacturer AltManufacturergt ltDistributorgt3dcartltDistributorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1724

ltCostgt15400ltCostgt ltPricegt26100ltPricegt ltRetailPricegt462ltRetailPricegt ltSalePricegt000ltSalePricegt ltOnSalegt0ltOnSalegt ltStockgt10ltStockgt ltStockAlertgt0ltStockAlertgt ltWeightgt100ltWeightgt ltWidthgt000ltWidthgt ltHeightgt000ltHeightgt ltDepthgt000ltDepthgt ltMinimumOrdergt1ltMinimumOrdergt ltMaximumOrdergt0ltMaximumOrdergt ltDateCreatedgt912008ltDateCreatedgt ltDescriptiongtTest product descriptionltDescriptiongt ltExtendedDescriptiongtProduct descriptionltExtendedDescriptiongt ltKeywordsgtkeyword test product buy storeltKeywordsgt ltRelatedProducts gt ltShipCostgt000ltShipCostgt ltTitlegtProduct titlehellipltTitlegt ltMetaTags gt ltDisplayText gt ltHomeSpecialgt0ltHomeSpecialgt ltCategorySpecialgt0ltCategorySpecialgt ltHidegt0ltHidegt ltFreeShippinggt0ltFreeShippinggt ltNonTaxgt0ltNonTaxgt ltNotForsalegt0ltNotForsalegt ltGiftCertificategt0ltGiftCertificategt ltUserIdgtJohn AdminltUserIdgt ltLastUpdategt812008ltLastUpdategt ltExtraFieldsgt ltExtraField1 gt ltExtraField2 gt ltExtraField3 gt ltExtraField4 gt ltExtraField5 gt ltExtraField6 gt ltExtraField7 gt ltExtraField8 gt ltExtraField9 gt ltExtraField10 gt ltExtraFieldsgt ltUseCatoptionsgt0ltUseCatoptionsgt ltQuantityOptions gt ltPriceLevelgt ltPrice_1gt0ltPrice_1gt ltPrice_2gt0ltPrice_2gt ltPrice_3gt0ltPrice_3gt ltPrice_4gt0ltPrice_4gt ltPrice_5gt0ltPrice_5gt ltPrice_6gt0ltPrice_6gt ltPrice_7gt0ltPrice_7gt ltPrice_8gt0ltPrice_8gt ltPrice_9gt0ltPrice_9gt ltPrice_10gt0ltPrice_10gt ltPriceLevelgt ltMinOrdergt0ltMinOrdergt ltListingDisplayTypegt-1ltListingDisplayTypegt ltShowOutStockgt-1ltShowOutStockgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1824

ltPricingGroupOptgt0ltPricingGroupOptgt ltQuantityDiscountOptgt0ltQuantityDiscountOptgt ltLoginLevelgt-1ltLoginLevelgt ltRedirectTo gt ltAccessGroup gt ltSelfShipgt0ltSelfShipgt ltTaxCode gt lteProductgt lteProductPassword gt lteProductRandomgt0lteProductRandomgt lteProductExpiregt0lteProductExpiregt lteProductPath gt lteProductSerialgt0lteProductSerialgt lteProductInstructions gt lteProductReuseSerialgt0lteProductReuseSerialgt lteProductgt ltNonSearchablegt0ltNonSearchablegt ltInstockMessage gt ltOutOfStockMessage gt ltBackOrderMessage gt ltRewardsgt ltRewardPointsgt0ltRewardPointsgt ltRewardDisablegt0ltRewardDisablegt ltRewardRedeemgt2610ltRewardRedeemgt ltRewardsgt ltFileNamegtltFileNamegt ltImagesgt ltImagegt ltUrlgtassetsimagesprodtestjpgltUrlgt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltThumbnailgtassetsimagesthumb_prodtestjpgltThumbnailgt ltImagesgt ltOptionsgt ltOptiongt ltIdgt11ltIdgt ltOptionTypegtSizeltOptionTypegt ltValuesgt ltValuegt ltIDgt28ltIDgt ltNamegtSmallltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuegt ltIDgt29ltIDgt ltNamegtLargeltNamegt ltOptionPricegt000ltOptionPricegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1924

ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptiongt ltIdgt12ltIdgt ltOptionTypegtColorltOptionTypegt ltValuesgt ltValuegt ltIDgt30ltIDgt ltNamegtBlueltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptionsgt ltProductgt ltGetProductDetailsResponsegt

32 getProductCount

Description Get total products

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt ltgetProductCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductCountResponse xmlns=gt ltProductQuantitygt6041ltProductQuantitygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2024

ltGetProductCountResponsegt

33 getProductInventory

Description Get the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgtprod123ltproductIdgt

ltcallBackURLgtltcallBackURLgt ltgetProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltInventorygt10ltInventorygt ltGetInventoryResponsegt

34 updateProductInventory

Description Update the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2124

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

quantity Number Stock quantity for the specified product

replaceStock Boolean Indicates if the stock should be replaced or incremented by the new quantity

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgt prod123ltproductIdgt ltquantitygt50ltquantitygt ltreplaceStockgttrueltreplaceStockgt

ltcallBackURLgtltcallBackURLgt ltupdateProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltNewInventorygt50ltNewInventorygt ltUpdateInventoryResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2224

Working with the callBackURL parameter The callBackURL parameter can be provided to any method of the 3dcart web service and must have a valid URL format followed by the page that will handle the post

ie httpwww3dcartcom3dcartapiposthandlerasp

When this parameter is provided the web service will post the result xml to the specified page and return the following result to the requester

ltxml version=10 encoding=utf-8 gt ltResponse xmlns=gt ltDescriptiongtXML Posted to

httpwww3dcartcom3dcartapiposthandleraspltDescriptiongt

ltResponsegt

The entire XML will be posted to the specified page which has to be prepared to handle the information

Here is a sample code of a page that handles the post and save the XML into a file

ltlanguage=vbscriptgt lt 3DCart Shopping Cart System - Version 30 3dCart Store Web Service - Version 10 Sample script to handle the xml response from the web service using the callbackURL parameter gt lt Dim strXml objXmlDoc Receives the xml strXml = requestForm Loads the XML into a xmlDoc object Set objXmlDoc = serverCreateObject(MicrosoftXMLDOM) objXmlDocpreserveWhiteSpace = true objXmlDocloadxml(strXml) Once the XML is loaded you can do anything with the information In this sample script the XML is being saved into the textxml file objXmlDocsave(serverMapPath(testxml)) Set objXmlDoc = nothing gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 17: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1724

ltCostgt15400ltCostgt ltPricegt26100ltPricegt ltRetailPricegt462ltRetailPricegt ltSalePricegt000ltSalePricegt ltOnSalegt0ltOnSalegt ltStockgt10ltStockgt ltStockAlertgt0ltStockAlertgt ltWeightgt100ltWeightgt ltWidthgt000ltWidthgt ltHeightgt000ltHeightgt ltDepthgt000ltDepthgt ltMinimumOrdergt1ltMinimumOrdergt ltMaximumOrdergt0ltMaximumOrdergt ltDateCreatedgt912008ltDateCreatedgt ltDescriptiongtTest product descriptionltDescriptiongt ltExtendedDescriptiongtProduct descriptionltExtendedDescriptiongt ltKeywordsgtkeyword test product buy storeltKeywordsgt ltRelatedProducts gt ltShipCostgt000ltShipCostgt ltTitlegtProduct titlehellipltTitlegt ltMetaTags gt ltDisplayText gt ltHomeSpecialgt0ltHomeSpecialgt ltCategorySpecialgt0ltCategorySpecialgt ltHidegt0ltHidegt ltFreeShippinggt0ltFreeShippinggt ltNonTaxgt0ltNonTaxgt ltNotForsalegt0ltNotForsalegt ltGiftCertificategt0ltGiftCertificategt ltUserIdgtJohn AdminltUserIdgt ltLastUpdategt812008ltLastUpdategt ltExtraFieldsgt ltExtraField1 gt ltExtraField2 gt ltExtraField3 gt ltExtraField4 gt ltExtraField5 gt ltExtraField6 gt ltExtraField7 gt ltExtraField8 gt ltExtraField9 gt ltExtraField10 gt ltExtraFieldsgt ltUseCatoptionsgt0ltUseCatoptionsgt ltQuantityOptions gt ltPriceLevelgt ltPrice_1gt0ltPrice_1gt ltPrice_2gt0ltPrice_2gt ltPrice_3gt0ltPrice_3gt ltPrice_4gt0ltPrice_4gt ltPrice_5gt0ltPrice_5gt ltPrice_6gt0ltPrice_6gt ltPrice_7gt0ltPrice_7gt ltPrice_8gt0ltPrice_8gt ltPrice_9gt0ltPrice_9gt ltPrice_10gt0ltPrice_10gt ltPriceLevelgt ltMinOrdergt0ltMinOrdergt ltListingDisplayTypegt-1ltListingDisplayTypegt ltShowOutStockgt-1ltShowOutStockgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1824

ltPricingGroupOptgt0ltPricingGroupOptgt ltQuantityDiscountOptgt0ltQuantityDiscountOptgt ltLoginLevelgt-1ltLoginLevelgt ltRedirectTo gt ltAccessGroup gt ltSelfShipgt0ltSelfShipgt ltTaxCode gt lteProductgt lteProductPassword gt lteProductRandomgt0lteProductRandomgt lteProductExpiregt0lteProductExpiregt lteProductPath gt lteProductSerialgt0lteProductSerialgt lteProductInstructions gt lteProductReuseSerialgt0lteProductReuseSerialgt lteProductgt ltNonSearchablegt0ltNonSearchablegt ltInstockMessage gt ltOutOfStockMessage gt ltBackOrderMessage gt ltRewardsgt ltRewardPointsgt0ltRewardPointsgt ltRewardDisablegt0ltRewardDisablegt ltRewardRedeemgt2610ltRewardRedeemgt ltRewardsgt ltFileNamegtltFileNamegt ltImagesgt ltImagegt ltUrlgtassetsimagesprodtestjpgltUrlgt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltThumbnailgtassetsimagesthumb_prodtestjpgltThumbnailgt ltImagesgt ltOptionsgt ltOptiongt ltIdgt11ltIdgt ltOptionTypegtSizeltOptionTypegt ltValuesgt ltValuegt ltIDgt28ltIDgt ltNamegtSmallltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuegt ltIDgt29ltIDgt ltNamegtLargeltNamegt ltOptionPricegt000ltOptionPricegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1924

ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptiongt ltIdgt12ltIdgt ltOptionTypegtColorltOptionTypegt ltValuesgt ltValuegt ltIDgt30ltIDgt ltNamegtBlueltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptionsgt ltProductgt ltGetProductDetailsResponsegt

32 getProductCount

Description Get total products

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt ltgetProductCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductCountResponse xmlns=gt ltProductQuantitygt6041ltProductQuantitygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2024

ltGetProductCountResponsegt

33 getProductInventory

Description Get the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgtprod123ltproductIdgt

ltcallBackURLgtltcallBackURLgt ltgetProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltInventorygt10ltInventorygt ltGetInventoryResponsegt

34 updateProductInventory

Description Update the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2124

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

quantity Number Stock quantity for the specified product

replaceStock Boolean Indicates if the stock should be replaced or incremented by the new quantity

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgt prod123ltproductIdgt ltquantitygt50ltquantitygt ltreplaceStockgttrueltreplaceStockgt

ltcallBackURLgtltcallBackURLgt ltupdateProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltNewInventorygt50ltNewInventorygt ltUpdateInventoryResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2224

Working with the callBackURL parameter The callBackURL parameter can be provided to any method of the 3dcart web service and must have a valid URL format followed by the page that will handle the post

ie httpwww3dcartcom3dcartapiposthandlerasp

When this parameter is provided the web service will post the result xml to the specified page and return the following result to the requester

ltxml version=10 encoding=utf-8 gt ltResponse xmlns=gt ltDescriptiongtXML Posted to

httpwww3dcartcom3dcartapiposthandleraspltDescriptiongt

ltResponsegt

The entire XML will be posted to the specified page which has to be prepared to handle the information

Here is a sample code of a page that handles the post and save the XML into a file

ltlanguage=vbscriptgt lt 3DCart Shopping Cart System - Version 30 3dCart Store Web Service - Version 10 Sample script to handle the xml response from the web service using the callbackURL parameter gt lt Dim strXml objXmlDoc Receives the xml strXml = requestForm Loads the XML into a xmlDoc object Set objXmlDoc = serverCreateObject(MicrosoftXMLDOM) objXmlDocpreserveWhiteSpace = true objXmlDocloadxml(strXml) Once the XML is loaded you can do anything with the information In this sample script the XML is being saved into the textxml file objXmlDocsave(serverMapPath(testxml)) Set objXmlDoc = nothing gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 18: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1824

ltPricingGroupOptgt0ltPricingGroupOptgt ltQuantityDiscountOptgt0ltQuantityDiscountOptgt ltLoginLevelgt-1ltLoginLevelgt ltRedirectTo gt ltAccessGroup gt ltSelfShipgt0ltSelfShipgt ltTaxCode gt lteProductgt lteProductPassword gt lteProductRandomgt0lteProductRandomgt lteProductExpiregt0lteProductExpiregt lteProductPath gt lteProductSerialgt0lteProductSerialgt lteProductInstructions gt lteProductReuseSerialgt0lteProductReuseSerialgt lteProductgt ltNonSearchablegt0ltNonSearchablegt ltInstockMessage gt ltOutOfStockMessage gt ltBackOrderMessage gt ltRewardsgt ltRewardPointsgt0ltRewardPointsgt ltRewardDisablegt0ltRewardDisablegt ltRewardRedeemgt2610ltRewardRedeemgt ltRewardsgt ltFileNamegtltFileNamegt ltImagesgt ltImagegt ltUrlgtassetsimagesprodtestjpgltUrlgt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltImagegt ltUrl gt ltCaption gt ltImagegt ltThumbnailgtassetsimagesthumb_prodtestjpgltThumbnailgt ltImagesgt ltOptionsgt ltOptiongt ltIdgt11ltIdgt ltOptionTypegtSizeltOptionTypegt ltValuesgt ltValuegt ltIDgt28ltIDgt ltNamegtSmallltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuegt ltIDgt29ltIDgt ltNamegtLargeltNamegt ltOptionPricegt000ltOptionPricegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1924

ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptiongt ltIdgt12ltIdgt ltOptionTypegtColorltOptionTypegt ltValuesgt ltValuegt ltIDgt30ltIDgt ltNamegtBlueltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptionsgt ltProductgt ltGetProductDetailsResponsegt

32 getProductCount

Description Get total products

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt ltgetProductCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductCountResponse xmlns=gt ltProductQuantitygt6041ltProductQuantitygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2024

ltGetProductCountResponsegt

33 getProductInventory

Description Get the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgtprod123ltproductIdgt

ltcallBackURLgtltcallBackURLgt ltgetProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltInventorygt10ltInventorygt ltGetInventoryResponsegt

34 updateProductInventory

Description Update the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2124

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

quantity Number Stock quantity for the specified product

replaceStock Boolean Indicates if the stock should be replaced or incremented by the new quantity

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgt prod123ltproductIdgt ltquantitygt50ltquantitygt ltreplaceStockgttrueltreplaceStockgt

ltcallBackURLgtltcallBackURLgt ltupdateProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltNewInventorygt50ltNewInventorygt ltUpdateInventoryResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2224

Working with the callBackURL parameter The callBackURL parameter can be provided to any method of the 3dcart web service and must have a valid URL format followed by the page that will handle the post

ie httpwww3dcartcom3dcartapiposthandlerasp

When this parameter is provided the web service will post the result xml to the specified page and return the following result to the requester

ltxml version=10 encoding=utf-8 gt ltResponse xmlns=gt ltDescriptiongtXML Posted to

httpwww3dcartcom3dcartapiposthandleraspltDescriptiongt

ltResponsegt

The entire XML will be posted to the specified page which has to be prepared to handle the information

Here is a sample code of a page that handles the post and save the XML into a file

ltlanguage=vbscriptgt lt 3DCart Shopping Cart System - Version 30 3dCart Store Web Service - Version 10 Sample script to handle the xml response from the web service using the callbackURL parameter gt lt Dim strXml objXmlDoc Receives the xml strXml = requestForm Loads the XML into a xmlDoc object Set objXmlDoc = serverCreateObject(MicrosoftXMLDOM) objXmlDocpreserveWhiteSpace = true objXmlDocloadxml(strXml) Once the XML is loaded you can do anything with the information In this sample script the XML is being saved into the textxml file objXmlDocsave(serverMapPath(testxml)) Set objXmlDoc = nothing gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 19: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 1924

ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptiongt ltIdgt12ltIdgt ltOptionTypegtColorltOptionTypegt ltValuesgt ltValuegt ltIDgt30ltIDgt ltNamegtBlueltNamegt ltOptionPricegt000ltOptionPricegt ltOptionPartNumber gt ltValuegt ltValuesgt ltOptiongt ltOptionsgt ltProductgt ltGetProductDetailsResponsegt

32 getProductCount

Description Get total products

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductCount xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt

ltcallBackURLgtltcallBackURLgt ltgetProductCountgt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetProductCountResponse xmlns=gt ltProductQuantitygt6041ltProductQuantitygt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2024

ltGetProductCountResponsegt

33 getProductInventory

Description Get the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgtprod123ltproductIdgt

ltcallBackURLgtltcallBackURLgt ltgetProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltInventorygt10ltInventorygt ltGetInventoryResponsegt

34 updateProductInventory

Description Update the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2124

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

quantity Number Stock quantity for the specified product

replaceStock Boolean Indicates if the stock should be replaced or incremented by the new quantity

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgt prod123ltproductIdgt ltquantitygt50ltquantitygt ltreplaceStockgttrueltreplaceStockgt

ltcallBackURLgtltcallBackURLgt ltupdateProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltNewInventorygt50ltNewInventorygt ltUpdateInventoryResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2224

Working with the callBackURL parameter The callBackURL parameter can be provided to any method of the 3dcart web service and must have a valid URL format followed by the page that will handle the post

ie httpwww3dcartcom3dcartapiposthandlerasp

When this parameter is provided the web service will post the result xml to the specified page and return the following result to the requester

ltxml version=10 encoding=utf-8 gt ltResponse xmlns=gt ltDescriptiongtXML Posted to

httpwww3dcartcom3dcartapiposthandleraspltDescriptiongt

ltResponsegt

The entire XML will be posted to the specified page which has to be prepared to handle the information

Here is a sample code of a page that handles the post and save the XML into a file

ltlanguage=vbscriptgt lt 3DCart Shopping Cart System - Version 30 3dCart Store Web Service - Version 10 Sample script to handle the xml response from the web service using the callbackURL parameter gt lt Dim strXml objXmlDoc Receives the xml strXml = requestForm Loads the XML into a xmlDoc object Set objXmlDoc = serverCreateObject(MicrosoftXMLDOM) objXmlDocpreserveWhiteSpace = true objXmlDocloadxml(strXml) Once the XML is loaded you can do anything with the information In this sample script the XML is being saved into the textxml file objXmlDocsave(serverMapPath(testxml)) Set objXmlDoc = nothing gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 20: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2024

ltGetProductCountResponsegt

33 getProductInventory

Description Get the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltgetProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgtprod123ltproductIdgt

ltcallBackURLgtltcallBackURLgt ltgetProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltGetInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltInventorygt10ltInventorygt ltGetInventoryResponsegt

34 updateProductInventory

Description Update the stock of a specific product

Parameters

Name Type Description

storeUrl String 3dCart Store URL from which the information will be requested

ie www3dcartcom

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2124

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

quantity Number Stock quantity for the specified product

replaceStock Boolean Indicates if the stock should be replaced or incremented by the new quantity

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgt prod123ltproductIdgt ltquantitygt50ltquantitygt ltreplaceStockgttrueltreplaceStockgt

ltcallBackURLgtltcallBackURLgt ltupdateProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltNewInventorygt50ltNewInventorygt ltUpdateInventoryResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2224

Working with the callBackURL parameter The callBackURL parameter can be provided to any method of the 3dcart web service and must have a valid URL format followed by the page that will handle the post

ie httpwww3dcartcom3dcartapiposthandlerasp

When this parameter is provided the web service will post the result xml to the specified page and return the following result to the requester

ltxml version=10 encoding=utf-8 gt ltResponse xmlns=gt ltDescriptiongtXML Posted to

httpwww3dcartcom3dcartapiposthandleraspltDescriptiongt

ltResponsegt

The entire XML will be posted to the specified page which has to be prepared to handle the information

Here is a sample code of a page that handles the post and save the XML into a file

ltlanguage=vbscriptgt lt 3DCart Shopping Cart System - Version 30 3dCart Store Web Service - Version 10 Sample script to handle the xml response from the web service using the callbackURL parameter gt lt Dim strXml objXmlDoc Receives the xml strXml = requestForm Loads the XML into a xmlDoc object Set objXmlDoc = serverCreateObject(MicrosoftXMLDOM) objXmlDocpreserveWhiteSpace = true objXmlDocloadxml(strXml) Once the XML is loaded you can do anything with the information In this sample script the XML is being saved into the textxml file objXmlDocsave(serverMapPath(testxml)) Set objXmlDoc = nothing gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 21: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2124

userKey String Auto-generated string See ldquoGetting Startedrdquo section

productId String Search for specific product id

quantity Number Stock quantity for the specified product

replaceStock Boolean Indicates if the stock should be replaced or incremented by the new quantity

callBackURL String URL where the XML response will be posted

Required parameters

Sample Request

ltxml version=10 encoding=utf-8gt ltsoapEnvelope xmlnsxsi=httpwwww3org2001XMLSchema-instance xmlnsxsd=httpwwww3org2001XMLSchema xmlnssoap=httpschemasxmlsoaporgsoapenvelopegt ltsoapBodygt ltupdateProductInventory xmlns=http3dcartcomgt ltstoreUrlgtwww3dcartcomltstoreUrlgt ltuserKeygt12345678912345678912345678912345ltuserKeygt ltproductIdgt prod123ltproductIdgt ltquantitygt50ltquantitygt ltreplaceStockgttrueltreplaceStockgt

ltcallBackURLgtltcallBackURLgt ltupdateProductInventorygt ltsoapBodygt ltsoapEnvelopegt

Sample Response

ltxml version=10 encoding=utf-8 gt ltUpdateInventoryResponse xmlns=gt ltProductIDgtprod123ltProductIDgt ltNewInventorygt50ltNewInventorygt ltUpdateInventoryResponsegt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2224

Working with the callBackURL parameter The callBackURL parameter can be provided to any method of the 3dcart web service and must have a valid URL format followed by the page that will handle the post

ie httpwww3dcartcom3dcartapiposthandlerasp

When this parameter is provided the web service will post the result xml to the specified page and return the following result to the requester

ltxml version=10 encoding=utf-8 gt ltResponse xmlns=gt ltDescriptiongtXML Posted to

httpwww3dcartcom3dcartapiposthandleraspltDescriptiongt

ltResponsegt

The entire XML will be posted to the specified page which has to be prepared to handle the information

Here is a sample code of a page that handles the post and save the XML into a file

ltlanguage=vbscriptgt lt 3DCart Shopping Cart System - Version 30 3dCart Store Web Service - Version 10 Sample script to handle the xml response from the web service using the callbackURL parameter gt lt Dim strXml objXmlDoc Receives the xml strXml = requestForm Loads the XML into a xmlDoc object Set objXmlDoc = serverCreateObject(MicrosoftXMLDOM) objXmlDocpreserveWhiteSpace = true objXmlDocloadxml(strXml) Once the XML is loaded you can do anything with the information In this sample script the XML is being saved into the textxml file objXmlDocsave(serverMapPath(testxml)) Set objXmlDoc = nothing gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 22: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2224

Working with the callBackURL parameter The callBackURL parameter can be provided to any method of the 3dcart web service and must have a valid URL format followed by the page that will handle the post

ie httpwww3dcartcom3dcartapiposthandlerasp

When this parameter is provided the web service will post the result xml to the specified page and return the following result to the requester

ltxml version=10 encoding=utf-8 gt ltResponse xmlns=gt ltDescriptiongtXML Posted to

httpwww3dcartcom3dcartapiposthandleraspltDescriptiongt

ltResponsegt

The entire XML will be posted to the specified page which has to be prepared to handle the information

Here is a sample code of a page that handles the post and save the XML into a file

ltlanguage=vbscriptgt lt 3DCart Shopping Cart System - Version 30 3dCart Store Web Service - Version 10 Sample script to handle the xml response from the web service using the callbackURL parameter gt lt Dim strXml objXmlDoc Receives the xml strXml = requestForm Loads the XML into a xmlDoc object Set objXmlDoc = serverCreateObject(MicrosoftXMLDOM) objXmlDocpreserveWhiteSpace = true objXmlDocloadxml(strXml) Once the XML is loaded you can do anything with the information In this sample script the XML is being saved into the textxml file objXmlDocsave(serverMapPath(testxml)) Set objXmlDoc = nothing gt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 23: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2324

Web Services Errors The following errors can be returned by the web service method

Type Code Description

XML file error Not well-formed

0 XML FILE BAD FORMED

1 UserIp Node Not Found UserKey Node Not Found

2 UserKey Node Not Found UserIp Node Not Found

3 ProductID Node Not Found

4 Quantity Node Not Found

5 BatchSize Node Not Found

6 StartNum Node Not Found

7 InvoiceNum Node Not Found

8 NewStatus Node Not Found

9 Invalid Method

Login Error

16 Bad IP

17 Bad Key

18 API Settings Not Enabled

Data Error Invalid Data

Request

31 Invalid Product Id

32 Invalid Quantity

33 Invalid Batch

34 Invalid Start Number

35 Invalid Invoice Number

36 Invalid Date

37 Invalid Range Between Dates

38 Invalid Order Start From

39 Invalid Status

40 Error posting to callbackurl

41 Invalid customerData

42 Invalid action

43 Invalid data

No Data Found

46 Product Not Found

47 Customer Not Found

48 Order Status Not Found

49 Order Not Found

Example of a login error (invalid user key)

ltxml version=10 encoding=utf-8 gt ltError xmlns=gt ltIdgt17ltIdgt ltDescriptiongtLogin ErrorltDescriptiongt ltErrorgt

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom

Page 24: API Technical Reference

3dCart Shopping Cart Software V3X Store Web Services

3dCart Store Web Service v10 www3dcartcom Page 2424

End - Yoursquove reached the end of this guide 3dCart has many other features not listed on this guide once your store is up and running continue exploring the features located on the different areas of your Store Manager If you have additional questions about any of the features you can read the full documentation at httphelp3dcartcom or clicking on the Help Icon from your Store Manager left navigation bar

Contacting 3dCart

3dCartrsquos support team is ready and willing to help you Feel free to contact us at any time and also visit our online knowledgebase and user forums that have many of your questions and issues already answered Web httpsupport3dcartcom KB httpsupport3dcartcomkb Forums httpforums3dcartcom Email support3dcartcom Phone (800) 828-6650 x 3 Thank you for using 3dCart Sincerely 3dCart Support Team support3dcartcom