TREVCO API Developer’s Guide Abstract With the Trevco API you can streamline submitting orders, retrieving order status and tracking information, and obtaining an up-to-date list of products Contents Introduction ........................................................................................................................................................................... 2 Audience For This Guide....................................................................................................................................................... 2 Minimum Requirements ........................................................................................................................................................ 2 Object Model ........................................................................................................................................................................ 2 OrderItem........................................................................................................................................................................... 2 Order .................................................................................................................................................................................. 3 OrderStatus ........................................................................................................................................................................ 3 OrderStatusRequest .......................................................................................................................................................... 4 OrderStatusResponse ........................................................................................................................................................ 5 SubmitOrderRequest ......................................................................................................................................................... 5 SubmitOrderResponse....................................................................................................................................................... 5 Methods................................................................................................................................................................................. 6 GetOrderStatus .................................................................................................................................................................. 6 SubmitOrder ....................................................................................................................................................................... 6 Appendix A ........................................................................................................................................................................... 7 Shipping Methods .............................................................................................................................................................. 7 Order Statuses .................................................................................................................................................................... 7 Error Messages ................................................................................................................................................................... 7 Introduction This guide describes the Web development required to connect an e-commerce Web site, a retail point of sale, or other application to the Trevco API. The Trevco API is a web service that: Handles the request to submit an order and provides a response to determine if that order was received Handles the request of retrieving the status of an order and responds with the status of an order including tracking information (if applicable). Handles the request of obtaining an up-to-date list of products and responds with that list The security of a Trevco API data transmission is ensured through a 192-bit Secure Sockets Layer (SSL) connection between the merchant and the Trevco API. The API can be reached at https://b2b.trevcoinc.com/services/trevco.asmx The WSDL for the API can be viewed at: https://b2b.trevcoinc.com/services/trevco.asmx?wsdl Audience for This Guide The developers who write the code that integrates merchant websites with the Trevco API are the primary audience for this document. In most cases, these users are not merchants themselves. Minimum Requirements Before you begin, check with the merchant to make sure that the following requirements have been met. It is strongly recommended that you work closely with the merchant to ensure that any other business and Web site requirements (for example, bank or processor requirements, Web site design preferences) are included in their Trevco integration. The merchant must be an approved customer with Trevco Inc. The merchant must be supplied with an API Key and API Passcode and have the ability to store that information securely The merchant web site must have server-side scripting such as ASP.Net, PHP, Java, and Perl. Object Model OrderItem An order item is the product being purchased. Field Name ItemName Quantity ImageName ColorCode Description The SKU of the item. Dynamic items will always begin with ZZZ000 followed by the Body Style and Size (required) Data Type String (up to 25 characters) Example AAC100-AL-1 The quantity of this item being ordered (required) The name of the image from your FTP folder (dynamic only) Integer 2 String (up to 25 characters) DESIGN999.png The ID number for the color of the blank shirt (dynamic only) Integer 02 Or ZZZ000-AL-1 (for dynamic) Order An order is one or many items being purchased by the same customer and shipped to the same address. Field Name CustomerName PurchaseDate PurchaseOrderNumber ShipAddress1 ShipAddress2 ShipCity ShipState ShipZip ShipCountry ShipMethod ShipUsingMyAccount OrderItems Description The name of the customer (required) Date of purchase (optional) Unique number identifying the order from merchant system, always prepend with something uniqueaddress to your the company Street (required) shipment is going to (required) City the shipment is going to (required) State the shipment is going to (required) Postal code the shipment is going to (required) Country the shipment is going to (required) Method in which the shipment will be shipped (required) Identifies if Trevco is using your shipping account (required) Collection or Array of Order Items. See object model for OrderItem (required) Data Type String (up to 256 characters) String (MM/DD/YYYY format) String (up to 256 characters) Example Chris Brallier Sting (up to 256 characters 1900 Stephenson Hwy 03/18/2013 P123456789 Suite 200 Troy String (up to 50 characters) MI 48083 United States Integer (see list in Appendix A) 108507 Boolean False Object OrderStatus An order item is the product being purchased, this object is read only. Field Name PurchaseOrderNumber OrderStatus TrackingNumber Description Unique number identifying the order from merchant system The status of the order (See Appendix A) The tracking number from the carrier Data Type String Example P123456789 String SHIPPED String Z123456789012345 Data Type String Example OrderStatusRequest A request for the status of an order or multiple orders Field Name APIKey APIPasscode PurchaseOrderNumbers Description The API Key provided to you by Trevco (required) The API Passcode provided to you by Trevco (required) A collection of unique numbers identifying the orders from merchant system (required) String String Collection OrderStatusResponse A response to the request for an Order Status. Field Name OrderStatuses IsError ErrorMessage Description A collection of OrderStatus (see OrderStatus Object) Indicates if the request encountered an error An error message if an error was encountered Data Type Object Collection of OrderStatus Example Boolean false Description The API Key provided to you by Trevco (required) The API Passcode provided to you by Trevco (required) The order to be submitted (required) Data Type String String (see Appendix A for error messages) SubmitOrderRequest A request to submit an order Field Name APIKey APIPasscode Order Example String Object SubmitOrderResponse A response to the request to submit an order. Field Name Order IsError ErrorMessage Description The order submitted (see Order Object) Indicates if the request encountered an error An error message if an error was encountered Data Type Object Example Boolean false String (see Appendix A for error messages) Methods GetOrderStatus This method can be used to return the status of a single order or multiple orders. Input: OrderStatusRequest Output: OrderStatusResponse SubmitOrder This method is used to send Trevco a drop ship order. Input: SubmitOrderRequest Output: SubmitOrderResponse Appendix A Shipping Methods Listed below are the typical shipping methods in which Trevco will ship a package. The identity field is what is used when submitting an order to us. Identity 108507 Name MAIL INNOVATIONS DOMESTIC Description Flat rate shipping for any item under a pound (16oz). 85572 USPS FIRSTCLASS US Postal Service usually within 3 -4 business days 85575 USPS PRIORITY 1924 UPS GROUND US Postal Service usually within 2 business days Standard ground service provided by UPS. (3-5) business days 1926 UPS 2NDDAYAIR UPS delivers in 2 business days 1927 UPS NEXTDAY UPS delivers the next business day 1929 FEDEX GROUND 1931 FEDEX 2DAY Standard ground service provided by FedEx. (3-5) business days FedEx delivers in 2 business days 1932 FEDEX STD OVERNIGHT FedEx delivers the next business day Order Statuses Listed below are the statuses that can be returned when retrieving the status of an order. Status NOTFOUND Description The Purchase Order Number submitted when requesting the status of an order could not be found REJECTED PENDING The Order was rejected. This may be due to an order we cannot ship international or there may be an outstanding balance on your account This is the typical status that an order resides in until it is shipped SHIPPED The order has been shipped and is in transit or may have arrived Error Messages Listed below are error messages and their cause Error Code 1000 Error Message API key or passcode is incorrect 1101 No licenses have been assigned 1102 No items could be found 1001 Request denied 1201 No orders could be found 1301 1302 Customer is missing Shipping Address is missing or incomplete 1303 1304 1305 Item could not be found Shipping method is invalid Item quantity is invalid Resolution Check to make sure you are using the correct API Key and Passcode. Both are case sensitive. Contact Trevco to make sure licenses have been assigned to your account. Contact Trevco to make sure licenses have been assigned to your account. Check to make sure you are supplying all required information The order response object returned 0 order status records. Make sure the orders you are requesting status on, have been submitted Check the customer’s name is supplied Check the address field to make sure all required field are supplied Check to make sure item being submitted is correct Check to make sure the shipping method is supplied Check to make sure item quantity is a number greater than zero
© Copyright 2026 Paperzz