AutoPower API Documentation

AutoPower API Documentation

API Access Requirements

To enable access to our API, the following steps must be completed:
  1. Submit Static IP Address: Provide the static IP address of the server that will be initiating API requests. This is required for security and whitelisting purposes.
  2. Port Assignment: Once the IP address is received and verified, a dedicated port number will be assigned to your server for API communication.
  3. API Key: You will also be given an API Key.
Note: Ensure the submitted IP is publicly routable and consistently used for all requests. Changes to the IP will require reauthorization.

API Calls


DESCRIPTION
CALL:
Info
Replace 5013 with the port number designated to you.
PARAMETERS:
WEBSVC.IM.PART.SEARCH(IN.CRITERIA, IN.SHOW.ZERO.QOH.TF, IN.SHOW.ZERO.WEIGHT.TF, IN.MAX.WEIGHT, IN.CUST.ID)
IN.CRITERIA (STRING): Term used to define search criteria.
IN.SHOW.ZERO.QOH.TF (BOOLEAN): Show parts even if you don't have them in stock.
IN.SHOW.ZERO.WEIGHT.TF (BOOLEAN): Show parts even if weight data is 0 or null.
IN.MAX.WEIGHT (INTEGER): Excludes parts greater than or equal to this amount (Pounds).
IN.CUST.ID (STRING)
: Enter the Customer ID if available; otherwise, use "RETAIL" as the default.

RETURN SUCCESS:
{
   "success":"true",
   "parts":[
      {
         "id":"ACE08-00688",
         "vendor":"ACE",
         "partnumber":"08-00688",
         "description":"UNDER HOOD LIGHT BAR",
         "minimumquantity":"",
         "uom":"EA",
         "quantityavailable":"0",
         "weight":"12.3",
         "partprice":"$50.00",
         "coreprice":"$10.00"
      }
   ]
}
RETURN FAIL:
{
   "success":false,
   "error":{
      "code":"102",
      "message":"SEARCH CRITERIA IS EMPTY!"
   }
}

KEYWORD
DESCRIPTION
EXPLANATION:
success 
Indicates whether the call was successful.

id
Unique identifier for the part, composed of the vendor and part number.

Vendor
The supplier or manufacturer of the part.

partnumber
The specific number assigned to identify the part.

description
A brief summary of the part's features or purpose.

minimumquantity
The minimum number of units that must be ordered.

uom
Unit of Measure. The unit in which the part is sold (e.g., Each, Box).

quantityavailable
The current number of units in stock.

weight
This is how much the product weighs in pounds.

partprice
The price of the part, excluding any core charge.

coreprice
The additional cost for the part’s core, if applicable.



Error Codes

Error Code: 101

MESSAGE: 
Critical file is missing on the server.
SOLUTION: 
Contact AutoPower and inform them of the error number and message.

Error Code: 102

MESSAGE: Input parameter is missing or incorrect.
SOLUTION: Make sure you validate user input.

Error Code: 103

MESSAGEUnable to connect to server.
SOLUTION: AutoPower will need to resolve why it can't connect to the database.

Error Code: 104

MESSAGE​​​​​Not an authorized API call.
SOLUTION: Check the spelling of your API call.

Error Code: 401

MESSAGE: Missing API Key.
SOLUTION: Make sure the API key is included in the header of every request.

Error Code: 402

MESSAGE: Incorrect API Key.
SOLUTION: Confirm with AutoPower you are utilizing the correct key.