Channel Partner API - HTTPS POST Guide
Channel Partner API - HTTPS POST Guide
The HTTPS POST interface for the channel partner API is intended to allow interaction with the API by posting name/value pairs and receiving back simply formatted data.
- 1 Channel Partner API - HTTPS POST Guide
- 1.1 Call Center Checklist
- 1.2 URL
- 1.3 Credentials
- 1.4 Importing an Order
- 1.4.1 Understanding the Nested Data Structures
- 1.4.2 Processing the Results
- 1.4.3 Retries
- 1.5 Cancel an Order Using the UltraCart Order Id
- 1.5.1 Processing the Results
- 1.5.2 Retries
- 1.6 Cancel an Order Using the Channel Partner Order Id
- 1.6.1 Processing the Results
- 1.6.2 Retries
- 2 Examples
- 2.1 HTML Page
- 2.2 Visual Basic Module
Call Center Checklist
This is a checklist of commonly need information for call centers who are implementing this API to take orders for a merchant. If you are the developer in charge of the integration, you should contact the merchant and request the following information. The merchant can (and should) provide all of this to you.
Merchant ID. This is a CHAR5 string that identifies the merchant. It is uppercase. You will need to include it in every communication with UltraCart.
Item IDs. These are CHAR20 strings that identify product. They are not skus or external identifiers. The merchants create them as they see fit. You will need a "Merchant Item ID" and (optionally) a description for each item you take orders for.
Available Shipping Methods. You need a list of available shipping method. The methods are configured and turned off/on by the merchant. Examples are:
UPS: Ground,FedEx: Residential. Most shipping methods will contain <Carrier><colon><Method>, but the merchant is free to give them custom names.If the merchant requires an "Advertising Source", i.e., where did you hear from us?, you may need a list of sources from them. The merchant has the option to require/not require advertising sources, and also the option for free form or pick list. If the merchant requires advertising sources and requires a pick list, you will need that list to complete an order.
If coupons are being used, you will need a list of applicable coupon codes.
Summary: Merchant ID, Item IDs, Shipping Methods, Advertising Sources, Coupon Codes
URL
The URL for the API is:
HTTP POST is required and HTTP GET will be rejected with a 400 Bad Request response. To illustrate, click the link above.
Your post must have a Content-type header of application/x-www-form-urlencoded and must indeed be url encoded. Our firewalls will not allow un-encoded data to pass through. Will not happen.
Credentials
You'll notice below three fields (credentials.merchantId, credentials.channelPartnerCode, credentials.channelPartnerPassword) used to authenticate each request. These are NOT your normal login credentials. You must create a custom channel partner and specify these values in the UltraCart backend.
Steps:
Navigate to Home → Configuration
Scroll down to the Channel Partners section
Click on the Custom (Generic) link
Click the
newbutton.Enter the values.
Code | Up to 5 characters. This code identifies the channel. LGCY for a legacy system? It can be anything you desire to identify the source of data. |
|---|---|
Name | This is a login, up to 50 characters. Save yourself trouble and keep these simple. letters. numbers, underscores. Don't add spaces. You can. Just don't. |
API Password | Min 8 characters and up to 50 characters. A password for the login. Go nuts. |
Importing an Order
The table below shows all the possible parameters for the HTTPS POST.
Acceptable values for boolean parameters:true: true, TRUE, yes, YES, on, ON, y, Y, 1false false, FALSE, no, NO, off, OFF, n, N, 0
Parameter Name | Format | Description | Required |
|---|---|---|---|
method | String | This should be the value importOrder to trigger this particular API. | Y |
credentials.merchantId | String | UltraCart merchant ID to import into. | Y |
credentials.channelPartnerCode | String | Channel partner code to use. | Y |
credentials.channelPartnerPassword | String | API password configured on the channel partner | Y |
order.channelPartnerOrderId | String | A unique order ID from the external system. | Y |
order.paymentMethod | String | The method of payment. Allowed values are:
| Y |
order.noRealtimePaymentProcessing | Boolean | Leaves the order in Accounts Receivable instead of processing the card in real-time. |
|
order.skipPaymentProcessing | Boolean | Skip over the payment processing and move the order on to shipping. |
|
order.considerRecurring | Boolean | If the order is a recurring one generated by an outside system and you set this field to true, we will indicate the recurring flag to gateways that support it (Authorize.Net and PayPal Web Payments Pro) |
|
order.autoApprovePurchaseOrder | Boolean | Automatically approve the purchase order. |
|
order.storeIfPaymentDeclines | Boolean | Store the order in Accounts Receivable if the credit card declines | Recommend - Y |
order.treatWarningsAsErrors | Boolean | Consider all warnings (such as a pre-order warning) as errors that prevent the order from importing. | Defaults to Y |
order.storeCompleted | Boolean | Store the order in the completed orders stage. This is useful for importing historical orders from another system. |
|
order.creditCardAuthorizationReferenceNumber | String | If you authorized the order outside of UltraCart, this is the transaction identifier that UltraCart will use to capture the order. Review your payment gateway's integration guide to make sure you pass the correct value. For example, Authorize.Net gateways need to pass the transaction ID in this field and not the six character authorization ticket number. |
|
order.creditCardAuthorizationAmount | Number | If you authorized the order outside of UltraCart, this is the amount of the authorization. |
|
order.creditCardAuthorizationDts | Timestamp | If you authorized the order outside of UltraCart, this is the timestamp of the authorization in the format MM/DD/YYYY HH:MM:SS |
|
order.creditCardType | String | Visa, MasterCard, AMEX, or Discover | Y - CC Orders |
order.creditCardNumber | String | 15 or 16 digit credit card number (spaces or dashes OK) | Y - CC Orders |
order.creditCardToken | String | Token of the credit card (Stripe.com or other tokenizing gateway supported by UltraCart). |
|
order.creditCardExpirationMonth | Number | Month 1 through 12 (January = 1, December = 12) | Y - CC Orders |
order.creditCardExpirationYear | Number | Four Digit Year | Y - CC Orders |
order.creditCardExpirationMonthYear | String | The format MM/YY or MM/YYYY |
|
order.creditCardVerificationNumber | Number |
|
|
order.rotatingTransactionGatewayCode | String | The rotating transaction gateway code to use for this order. |
|
order.purchaseOrderNumber | String | The purchase order number. | Y- Purchase Order |
order.billToFirstName | String |
| Y |
order.billToLastName | String |
| Y |
order.billToTitle | String |
|
|
order.billToCompany | String |
|
|
order.billToAddress1 | String |
| Y |
order.billToAddress2 | String |
|
|
order.billToCity | String |
| Y |
order.billToState | String |
| Y |
order.billToPostalCode | String |
| Y |
order.billToCountry | String | Use the full spelling that UltraCart uses or provide the ISO-3166 two letter country code. | Y |
order.billToDayPhone | String |
|
|
order.billToEveningPhone | String |
|
|
order.email | String |
|
|
order.ccEmail | String |
|
|
order.associatedWithCustomerProfileIfPresent | String | If this is yes, the order will be associated with the customer profile that has the same email (if it exists) and they will receive their discounted pricing. |
|
order.shipToFirstName | String |
| Y - physical goods |
order.shipToLastName | String |
| Y - physical goods |
order.shipToTitle | String |
|
|
order.shipToCompany | String |
|
|
order.shipToAddress1 | String |
| Y - physical goods |
order.shipToAddress2 | String |
|
|
order.shipToCity | String |
| Y - physical goods |
order.shipToState | String |
| Y - physical goods |
order.shipToPostalCode | String |
| Y - physical goods |
order.shipToCountry | String | Use the full spelling that UltraCart uses or provide the ISO-3166 two letter country code. | Y - physical goods |
order.shipToPhone | String |
| Y - physical goods |
order.shipToEveningPhone | String |
|
|
order.shippingMethod | String | If the order requires shipping then you either need to specify the name of the method in this field, or pass order.leastCostRoute = true and let UltraCart pick the method of shipment | Maybe |
order.arbitraryTax | Number | The tax charged by the external system |
|
order.arbitraryTaxableSubtotal | Number | The taxable subtotal the tax was based upon by the external system |
|
order.arbitraryTaxRate | Number | The tax rate used by the external system |
|
order.arbitraryShippingHandlingTotal | Number | The shipping/handling cost charged by the external system |
|
order.taxExempt | Boolean |
|
|
order.giftMessage | String |
|
|
order.deliveryDate | Date | If specified, use the format MM/DD/YYYY |
|
order.shipOnDate | Date |
|
|
order.ipAddress | String | The IP address of the remote customer (pass 127.0.0.1) if not available | Y |
order.shipToResidential | Boolean | Will default to a business if not specified | Recommended |
order.mailingListOptIn | Boolean | Will default to opted out if not specified | Recommended |
order.specialInstructions | String | Special instructions from the customer about shipment |
|
order.screenBrandingThemeCode | String | The screen branding theme code to associate the order with. | Y |
order.advertisingSource | String |
|
|
order.customField1 | String | Custom value such as the DNIS of the caller up to 50 characters. |
|