Automated Checkout
The Automated Checkout service allows the automation of the entire checkout process, including adding a list of items to the cart. It is available at the following URLs:
https://www.verical.com/server-webapp/api/automatedCheckouthttps://cart.arrow.com/server-webapp/api/automatedCheckout
Request Parameters
Parameter | Description | Required |
---|---|---|
username | The email address of the customer to be associated to the sales order. * The customer associated with this account must have a valid Credit Account and Terms. |
yes |
password | The SHA-256 encoded password of the customer. | yes |
customerPONumber | The purchase order number to be used as a reference for the customer. | yes |
shipToAddressId | The ID associated with the ship-to address. * This address must already exist within Verical's internal systems. |
yes |
itemIds | A comma-separated list of Verical vendor items IDs. | yes |
quantities | A comma-separated list of quantities for each Verical vendor item id specified by the itemIds parameter. | yes |
billToAddressId | The Navision address ID to be used for the bill-to address. * This address must already exist within Navision and not be a freight forwarder |
no |
customerUsername | The username of the customer for which the order will be placed (only used when the username above is that of a CSR) | no |
arrowRegion | The region in which Arrow customer exists | no |
arrowCustomerNumber | The Arrow customer number which is used to look up customer-specific pricing | no |
sourceCodes | A comma-separated list of Arrow source codes | yes/no* |
discountCode | A discount code to apply to the order | no |
stAddressName | The name to be used for the ship-to address | yes/no |
stCompanyName | The company name to be used for the ship-to address | no |
stPhoneNumber | The phone number to be used for the ship-to address | yes/no |
stCountryCode | The two character country code to be used for the ship-to address (e.g. US) | yes/no |
stStreet1 | The first line of the street address to be used for the ship-to address | yes/no |
stStreet2 | The second line of the street address to be used for the ship-to address | no |
stStateProvince | The state or province to be used for the ultimate destination address * This field is only required for the ship-to address |
yes/no |
stCity | The city to be used ffor the ship-to address | yes/no |
stPostalCode | The postal code to be used for the ship-to address | yes/no |
stAddressType | The address type to be used for the ship-to address - must be one of the following:
|
yes/no |
ucAddressName | The name to be uses for the ultimate destination address | yes/no |
ucCompanyName | The company name to be used for the ultimate destination address | no |
ucPhoneNumber | The phone number to be used for the ultimate destination address | yes/no |
ucCountryCode | The two character country code to be used for the ultimate destination address (e.g. US) | yes/no |
ucStreet1 | The first line of the street address to be used for the ultimate destination address | yes/no |
ucStreet2 | The second line of the street address to be used for the ultimate destination address | no |
ucStateProvince | The state or province to be used for the ultimate destination address * This field is only required for certain country codes |
yes/no |
ucCity | The city to be used for the ultimate destination address | yes/no |
ucPostalCode | The postal code to be used for the ultimate destination address | yes/no |
ucAddressType | The address type to be used for the ultimate destination address - must be one of the following:
|
yes/no |
source | A parameter that allows a user to specify a source | no |
submitOrder | A flag which specifies the ability to submit the order | no |
* When an ultimate destination address is to be included (i.e., the address type on the ship-to address is a Freight Forwarder), all fields marked with a value of "Y/N" in the "Required?" column above become REQUIRED (with the exception of the sourceCodes parameter - see below)
** When using Arrow source part IDs as the itemIds, the sourceCodes parameter becomes REQUIRED
Example API Calls
The examples below all use the Verical test environment at qa.verical.com. The production server is www.verical.com.
- This example assumes no ultimate destination address is being included in the request (the most basic case)
API Address: https://qa.verical.com
GET /server-webapp/api/automatedCheckout?username=<username>&password=<password>&customerPONumber=myTestPO&shipToAddressId=ST100022&itemIds=12345&quantities=500 - This example assumes an ultimate destination address is being includes in the request
API Address: https://qa.verical.com
GET /server-webapp/api/automatedCheckout?username=<username>&password=<password>&customerPONumber=myTestPO&shipToAddressId=ST100022&itemIds=12345&quantities=500&ucAddressName=Test%20Name&ucCompanyName=Test%20Company%20Name&ucPhoneNumber=5551237895&ucCountryCode=US&ucStreet1=123%20Main%20Street&ucStateProvince=OH&ucCity=Cleveland&ucPostalCode=44114&ucAddressType=Direct%20Consumer - This example uses an Arrow part
API Address: https://qa.verical.com
GET /server-webapp/api/automatedCheckout?username=<username>&password=<password>&itemIds=65107928S734687N2346&quantities=1&sourceCodes=NAC&customerPONumber=Test&shipToAddressId=ST200357
Example Response
By default this API returns XML, below is an example for an arrow part and formatted in JSON.
{ "OrderPlaced": { "serverErrors": "", "ProcessedCartEntry": { "Tiers": "", "aqt": "0", "bord": "f", "cOfC": "f", "dcd": "", "edd": "1489363200", "factoryStock": "f", "itot": "173.0000", "lfr": "f", "moq": "0", "ncnr": "f", "ons": "f", "inc": "0", "ped": "0", "qty": "10000", "svcs": "f", "sandd": "f", "esd": "1489017600", "slt": "0", "upc": "0.0173", "vid": "C_194737", "warranty": "" }, "id": "WEB-SO1354411", "stAddressId": "ST207660", "submitted": "true", "subtotal": "173", "total": "173" } }
Available Shipping Methods
Domestic Options
Agent Code | Service Code |
---|---|
FEDEX | 2DAY |
FEDEX | 2DAY AM |
FEDEX | EXPRESS SAVER |
FEDEX | FIRST OVERNIGHT |
FEDEX | GROUND SERVICE |
FEDEX | HOME DELIVERY |
FEDEX | PRIORITY |
FEDEX | STANDARD OVERNIGHT |
UPS | 2ND DAY AIR |
UPS | 2ND DAY AIR AM |
UPS | 3 DAY SELECT |
UPS | GROUND |
UPS | NEXT DAY AIR |
UPS | NEXT DAY AIR AM |
UPS | NEXT DAY AIR SAVER |
USPS | 1ST CLASS MAIL |
USPS | PRIORITY EXPRESS |
USPS | PRIORITY MAIL |
International Options
Agent Code | Service Code |
---|---|
DHL | EXPRESS |
FEDEX | ECONOMY |
FEDEX | PRIORITY-I |
UPS | EXPEDITED |
UPS | EXPRESS-I |
UPS | SAVER-I |
UPS | STANDARD |
Potential Error Messages
The following is a list of error messages* that could be received as a result of an error in the API request or one of the Arrow/Verical internal prerequisites not being completed. This list DOES NOT ENCAPSULATE ALL POSSIBLE ERRORS that could be generated by the API.
Error Code | Description |
---|---|
checkout.user.not.found | The provided email address (username) was not found |
checkout.invalid.password | The provided email address (username) was found but the password (password) is incorrect for the given Customer |
address.not.found | The provided ship-to address ID (shipToAddressId) was not found |
checkout.address.not.terms | The provided ship-to address ID (shipToAddressId) was but is not marked as a Terms address |
checkout.shipping.domestic.not.found | The default domestic shipping methods are not available for the sales order |
checkout.shipping.international.not.found | The default international shipping methods are not available for the sales order |
checkout.item.id.invalid | One of the provided item IDs (itemIds) are blank |
checkout.item.quantity.invalid | One of the provided quantities (quantities) are blank |
checkout.length.not.equal | The provided number of item IDs (itemIds) does not equal the provided number of quantities (quantities) |
checkout.invalid.quantity | One of the provided quantities is found to not be a valid number |
checkout.item.not.found | One of the provided item IDs (itemIds) is not found within Marketplace |
checkout.item.quantity.minimum | The provided quantity for a given item ID does not meet the minimum order quantity for the item |
checkout.item.quantity.maximum | The provided quantity for a given item ID is greater than the total amount available for the item |
checkout.item.quantity.increment | The provided quantity for a given item ID is not a valid increment for the item |
checkout.invalid.address.type | The provided address type for the ultimate destination address is not a valid type |
checkout.uc.required | The provided ship-to address ID (shipToAddressId) is found but no ultimate destination address information is provided |
checkout.uc.freight.forwarder | The provided address type for the ultimate destination is found to be "Freight Forwarder" |
navision.soap.exception | An internal database error occurred |
navision.failed.sales.order.create | The sales order was created in Verical's internal system, but the response returned was empty |
navision.failed.sales.lines.update | The sales lines were created in Verical's internal system and applied to the sales order but the response returned was empty |
navision.failed.sales.order.update | The sales order update function failed in Verical's internal system |
navision.failed.sales.order.submit | The sales order was unable to be placed in Verical's internal system. |