BackInBlack Inc. Developer Portal

Introduction

Welcome to the Back In Black Inc. Developer Portal! BackInBlack strives to streamline the shipping process for clients, no matter where you go. We've worked hard to provide developer resources to build custom integrations with BackInBlack. If you're interested in becoming a partner of ours, drop us a line by visiting our main portal and we'll get in touch.

Integrating with BiBiSolutions

BiBiSolutions strives to streamline shipping and order management for online sellers, no matter where they sell their products online. We are continuously adding new marketplaces, shopping carts, and integration tools; because we know the e-commerce space is growing. As a result, we've worked hard to provide developer resources to build custom integrations with BiBiSolutions.

There are two methods to integrate with BiBiSolutions:

  • Custom Integration to your shopping cart
  • BiBiSolutions API

Custom Integration

Looking for a more 1-to-1 relationship between BiBiSolutions and your chosen selling platform? Our custom integration allows the user to sync orders within BiBiSolutions in automatically, in addition to BiBiSolutions automatically sending shipment status and tracking information updates back to your cart or marketplace once your orders have been shipped. It's the best way to sync up orders with BiBiSolutions and have the most seamless experience.

Custom Integration allows you to perform two major functions:

  • Provide order information to BiBiSolutions, including recipient address, products, customers, etc.
  • Receive tracking information when an order is shipped, including shipping method, shipping status, tracking number, and more

Contact us to see if Custom Integration to your store front is the right solution for you. Once you decide to create a Custom Integration you will be assigned a BiBiSolutions team that will create a plan, develop the integration, deploy and test the integration. Once integrated BiBiSolutions will be able to pull data from your store front and pass back data from your storefront seamlessly and automatically. Contact us for more information on our Custom Integration services.

BiBiSolutions API

Our API is available for any plan, and allows for read access to almost all data in your account, and write access to create specific objects, like Orders, Customers, and Products. The API is a great way to get data directly to and from BiBiSolutions, like creating products, customers, and querying order & shipping data.

This API allows developers to build applications that interface with the BiBiSolutions platform. The API can be used to automate many tasks including:

  • Managing Orders
  • Managing Shipments
  • Creating Shipping Labels
  • Retrieving Shipping Rates
  • and more!

To learn more about our API, please review our API documentation below.

Which one should I pick?

The method that's right for your integration very much depends on the type of integration you're planning on implementing. A Custom Store allows BiBiSolutions to pull order information from your platform the very same way we pull data from marketplaces such as eBay, Amazon, and Shopify. Once an order has been shipped in BiBiSolutions, BiBiSolutions automatically pushes tracking information back to your custom store. Though the functionality afforded by this approach is limited to these 2 main functions, much of the heavy lifting is performed by BiBiSolutions. Importing orders and sending tracking information is performed automatically by BiBiSolutions.

An API integration, on the other hand, exposes much more functionality, but requires that the developer do much of the heavy lifting. Orders must be pushed to BiBiSolutions by using our /api/submitOrder endpoint. The API allows developers to perform many more functions. The functionality the API affords are typical actions that a user would perform if using the web app.

Considerations

  • Will your integration be the main order management tool for the online seller? If so, the API's broader range of functionality may be the best option.
  • Do you have the development staff to connect to the API's? If not, Custom Integration could be the best solution because we do all the work.

BiBiSolutions API Requirements

End Point

Endpoints are located at the following domain https://www.bibisolutions.net/api and will need to have a specific reference added to return data. PLEASE NOTE: You cannot access this URL directly and must reference one of the specific endpoints below.

Basic Authentication

Bibisolutions uses Basic Authentication in addition to utilizing a simple access token. You can login by hitting our /api endpoint and providing both your public and secret key as a username:password pair. An example request is as follows:

https://public-key:secret-key@bibisolutions.net/api/

If your public and secret key check out, you should get the following JSON response (with a different token and expiration date of course):


    {
    "success": true,
    "token": "f245903492fcb34859d00e4bd23cefe489d697f7d60fe3c9219152390abd117e",
    "expires": "2016-08-02 8:49:09",
    "X-Rate-Limit-Limit": 60,
    "X-Rate-Limit-Remaining": 30,
    "X-Rate-Limit-Reset": 20
    }

In the event that your public and secret key are invalid or disabled, you should get the following message:


    {
    "success": false,
    "message": "Invalid credentials."
    }

Note: If you are using .NET or are receiving a 401 or 403 error instead of a valid token, you can use the X-Authorization header and pass the Basic Auth credentials to it via the string "Basic " + the Base64 encoded value of public-key:pass. Once you receive a valid token, you will need to continue to pass the X-Authorization header with "Basic " + the Base64 encoded value of public-key:token to interact with our API.

Successful Token Generation

Now that you've successfully created an access token, you can make any further API requests to our end point using your new token as the password - good for use until the expires date (24 hours after your first token request). So now you would call our end point using the following URI:

https://public-key:token@bibisolutions.net/api/request-here

403 Response

If you are receiving a 403 response back on your requests, it is likely that you are using an expired token; tokens last 24 hours after generation.

Generate a new token by hitting the https://public-key:secret-key@bibisolutions.net/api/ endpoint and use the token provided in the response for further requests.

API Rate Limits

In an effort to ensure consistent application performance and increased scalability, we have implemented rate limiting on the BiBiSolutions API. Your integration will need to be able to handle HTTP rate limiting status messages as defined below:

Response Headers

All responses will include headers with status information about rate limiting.

  1. X-Rate-Limit-Limit: the maximum number of requests per minute to the endpoint
  2. X-Rate-Limit-Remaining: the available requests remaining in the current window
  3. X-Rate-Limit-Reset: the number of seconds remaining until the next window begins

Hitting the Limit

If your application hits the rate limit, a HTTPS 429 response code will be returned with this body:

{
    "message": "Too Many Requests"
}

And these headers, assuming it is 60 seconds into the current window:

{
    "X-Rate-Limit-Limit": 60,
    "X-Rate-Limit-Remaining": 0,
    "X-Rate-Limit-Reset": 20
}

When the limit is reached, your application should stop making requests until X-Rate-Limit-Reset seconds have elapsed. The current Rate limit for each set of the API Key and Secret is 60 requests per minute.

Data Limits

In the same effort to ensure consistent application performance and increased scalability, we have implemented data limits into the BiBiSolutions API as well. These data limits come into play when a response returns large amounts of data. We use the following response parameter to limit the amount of data per request:

{
    "hasMoreResults": true
}

If hasMoreResults is set to true in the API response, you may include the $_POST['offset'] parameter in your API request with an offset value of 2 (offset is by default 1 if not specified) and increment by one until hasMoreResults returns false.

Server Responses

In addition to the message header, each JSON response will provide a status code which you can use while integrating into our platform.

Code Description
200 OK - The request was successful (some API calls may return 201 instead).
201 Created - The request was successful and a resource was created.
204 No Content - The request was successful but there is no representation to return (that is, the response is empty).
400 Bad Request - The request could not be understood or was missing required parameters.
401 Unauthorized - Authentication failed or user does not have permissions for the requested operation.
403 Forbidden - Access denied.
404 Not Found - Resource was not found.
405 Method Not Allowed - Requested method is not supported for the specified resource.
429 Too Many Requests - Exceeded BiBiSolutions API limits. When the limit is reached, your application should stop making requests until X-Rate-Limit-Reset seconds have elapsed.
500 Internal Server Error - BiBiSolutions has encountered an error.

DateTime Format and Time Zone

BiBiSolutions uses the ISO 8601 combined format for dateTime stamps being submitted to and returned from the API. Please be sure to submit all dateTime values as follows:

yyyy-mm-dd hh:mm:ss (24 hour notation). Example - 2016-11-29 23:59:59 The time zone represented in all API responses is CST/CDT. Similarly, BiBiSolutions asks that you make all time zone conversions and submit any dateTime requests in CST/CDT.

Reference

How can I get access to BiBiSolutions's API?

There are two ways to generate API Keys:

  1. Through the BiBiSolution application
  2. Using the BiBiSolutions API key generation API

Using the BiBiSolutions application:

BiBiSolutions API is available for any plan, and allows for read access to almost all data in your account, and write access to create specific objects, like Order.

If you need your API access keys:

Head to Setup > Administrations > API Setup or if you have access and you are logged in click here.

You can then generate a set of API keys if you don't already have them.

Generate API Keys Screenshot

Generating API Keys

If you do not know your public key or secret, navigate here to retrieve them - if you are not logged in or do not have access, this link will not work. These are required for basic authentication.

Using the BiBiSolutions API Key Generation:

Creates a new BiBiSolutions account and generates an apiKey and apiSecret to be used by the newly created account. PLEASE NOTE: This endpoint does not require API key and API Secret credentials. The Authorization header can be left off. Use of this specific endpoint requires email verification and is closely monitored for violations of our Terms of Use. All other endpoints listed in this document can be accessed by submitting proper authorization credentials in the header of the request.

To begin, you will need to format a JSON request with the post variable $_POST['genApi'] containing the following fields:

Property Data Type Description
firstName string, required First Name
lastName string, required Last Name
email string, required Email address. This will also be the username of the account.
password string, required Password to set for account access.
companyName string, required Name of Company
addr1 string, required Company Address - Street 1
addr2 string, optional Company Address - Street 2
city string, required Company Address - City
state string, required Company Address - State
zip string, required Company Address - Zip Code
countryCode string, required Company Address - Country. Please use a 2-character country code.
phone string, optional Company Phone number

An example JSON request is as follows:

{
    "firstName": "John",
    "lastName": "Doe",
    "email": "john@doe.com",
    "companyName": "JD Corp",
    "addr1": "Address 1",
    "addr2": "Address 2",
    "city": "City",
    "state": "CA",
    "zip": "90210",
    "countryCode": "US",
    "phone": ""
}

You must submit your request to our custom API generation endpoint: https://bibisolutions.net/gapi/. After submitting your request, you will receive a JSON response with a success or failure message indicating any potential issues. If successful, you will be required to click a validation link sent to the email address submitted in the genApi POST to finish processing the request. After validation, the following will be done automatically:

  1. A special user account will be generated for use (this account cannot log into bibisolutions.net).
  2. A public and secret API key will be generated and associated with the account above.
  3. A client code and warehouse location will automatically be chosen for you based on the information provided.
  4. The public and secret API key along with client code and warehouse details will be provided at the validation link and also sent to the corresponding email address for your records.

What can you do with Order Submit?

The BiBiSolutions API lets you do the following with the Order Submit resource. More detailed versions of these general actions may be available:

Orders API

You can submit orders, update orders, and more using our Orders API. See the following examples for how to use Orders API.

/api/submitOrder

Order Properties & Format

Property Description
Test Test flag. Set this value to T (true) if you want to test an order before submitting it to see if any errors occur during processing. Specify F (false) if you wish to submit an order to our production environment.
EntryDate The date the order was taken – format YYYYMMDD
FutureDate Used to set a ship date in the future. Format YYYYMMDD
Source Offer code for this order. This can be setup in the BiBi Solutions application under Setup > Setting > Offers (https://bibisolutions.net/settings/offers). You can get a list of Offers that have been setup by using the listOffers API.
ProdDollars Total of all product dollars for this order.
PHAmt Total processing and handling for this order.
TaxAmt Total tax charged for this order.
RushProcessing Set to “Yes” if you want this order to go the front of the line for shipping
PayMethod The payment option used for this order. For credit card use:
VI for Visa,
MC for Master Card,
AX for American Express,
DI for Diners Club

For order that have already been settled use: PP for pre-paid order

For PayPal orders use PY

For electronic check orders use EC and fill in the "CheckInfo" section.

These pay methods can be setup in the BiBi Solutions application under Setup > Settings > Pay Methods.
EntireOrderInstallment Use this to indicate that this order is a multi-pay order. Valid options are Y or N
Comment Use this to add an order comment or gift message.
"AffiliateMarketing": {
	"MarketingInfo": {
		"Type": "",
		"Affiliate": "",
		"WebSite": "",
		"Script": "",
		"TVMedia": "",
		"Number800": ""
	}
}
Note: This section can be left blank if you do not want to track order source of tie back to media spend.

Use this section to associate this order with a Marketing source:

Type: Type of Marketer (Web Orders (i.e., Search or Affiliate), Call center, etc.
Affiliate: Name of affiliate if there was one.
WebSite: website the order came from.
Script: Call center script used to obtain this order
TVMedia: identifies the TV media station used to obtain this order
Number800: used to identify the phone number used to obtain this order
"Coupons": {
	"Coupon": {
		"CouponType": "",
		"CouponNumber": "",
		"DollarDiscountAmount": "",
		"PercentageDiscount": ""
	}
}
Used to offer a discount off the order amount:

CouponType: Should be "3rdPartyCoupon" or leave blank.
CouponNumber: Coupon identification (i.e. FAMDIS25) eight character limit.
DollarDiscountAmount: Dollar amount off - (e.g., 3.99, 2.99, 0.50).
PercentageDiscount: Percentage off (e.g., 15, 20 30).
"Billing": {
	"Billto": {
		"FirstName": "John",
		"MiddleInitial": "",
		"LastName": "Doe",
		"CompanyName": "",
		"Address1": "123 WILLIS AVENUE",
		"Address2": "APT 23",
		"Address3": "",
		"City": "Los Angeles",
		"State": "CA",
		"ZipCode": "91402",
		"Country": "US",
		"DayPhone": "",
		"Email": "producer@company.com"
	}
}
FirstName: The first name of the person associated with the payment method.
MiddleInitial: The middle initial of the person associated with the payment method (optional).
LastName: The last name of the person associated with the payment method.
CompanyName: The company associated with the payment method.
Address1: The street address of the billing address.
Address2: An optional additional field for the street address of the billing address.
Address3: Same as Address2.
City: The city of the billing address.
State: The state of the billing address.
ZipCode: The zip code of the billing address.
Country: The two-letter code (ISO 3166-1 alpha-2) for the country of the billing address.
DayPhone: The phone number at the billing address.
Email: An email address belonging to the billing customer.
"CreditCardInfo": {
	"CreditCard": {
		"CreditCardNumber": "",
		"CreditCardExpDate": "",
		"CreditCardType": "",
		"CreditCardAuthorization": "",
		"TranID": ""
	}
}
Used for credit card orders that have not been settled but have had a authorization done against them.

CreditCardNumber: the number on the credit card
CreditCardExpDate: the expiration date of the credit card – format MMYY
CreditCardType: VI for Visa, MC for Master Card, AX for American Express, DI for Diners Club, PY for PayPal.
CreditCardAuthorization: the 6 digit authorization number obtained when the card was authorized by payment processor.
TranID: the authorization transaction ID
"CheckInfo": {
	"Check": {
		"RemitAmount": 0,
		"CheckNumber": "",
		"BankAccount": "",
		"RoutingNumber": ""
	}
}
If paying with Electronic Check – Pay method type EC

RemitAmount: the amount of the check. This should be the total dollars of the order (Product dollars + PHAmt + TaxAmt)
CheckNumber: number of the check used
BankAccount: the bank account number
RoutingNumber: the bank routing number
"Product": [
	{
		"LineNo": "",
		"ItemNo": "E0044-TW-E72",
		"Amount": "",
		"Quantity": 1,
		"Description": "",
		"Ship-Meth-Cd": 24,
		"BillTable": ""
	}
]
Used to tell what items (products) are on the order.

LineNo: Line number of the item, first item on the order is line number 1, second is line number 2, etc.
ItemNo: Item number (product or SKU) of the item on the order. You can get a list of valid SKU via the listProducts API.
Amount: The unit price of the item (product)
Quantity: The number of this item (product) on this order
Description: The description of the item (product)
Ship-Meth-Cd: The ship method that will be used for this item - These ship methods can be setup in the BiBi Solutions application under Setup > Settings > Ship Methods (https://bibisolutions.net/settings/shipMethods) or you can list the ship methods that have been setup via the listShipMethods API.

Note: Default US Domestic Ground = 24, Default International = 81

BillTable: If this item is a multi-pay (installment pay) item then put the number of payments here (BIL2 for 2 pay, BIL3 for 3 pay, BIL5 for 5 pay)
"Shipping": {
	"Shipto": {
		"FirstName": "John",
		"MiddleInitial": "",
		"LastName": "Doe",
		"CompanyName": "",
		"Address1": "123 WILLIS AVENUE",
		"Address2": "APT 23",
		"Address3": "",
		"City": "Los Angeles",
		"State": "CA",
		"ZipCode": "91402",
		"Country": "US",
		"DayPhone": "",
		"Email": "producer@company.com"
	}
}
FirstName: The first name of the person associated with the payment method.
MiddleInitial: The middle initial of the person associated with the payment method (optional).
LastName: The last name of the person associated with the payment method.
CompanyName: The company associated with the payment method.
Address1: The street address of the shipping address.
Address2: An optional additional field for the street address of the shipping address.
Address3: Same as Address2.
City: The city of the shipping address.
State: The state of the shipping address.
ZipCode: The zip code of the shipping address.
Country: The two-letter code (ISO 3166-1 alpha-2) for the country of the shipping address.
DayPhone: The phone number at the shipping address.
Email: An email address belonging to the shipping customer.

JSON Format Example: Format a request with the POST variable $_POST['orders'] with the following data -


{
	"Test": "T",
	"Orders": [ {
		"Order": {
			"Header": {
				"HeaderGroup": {
				"OrderNumber": "CustomerOrderNumber",
				"EntryDate": "YYYYMMDD",
				"FutureDate": "",
				"Source": "SourceCode",
				"ProdDollars": 0,
				"PHAmt": 0,
				"TaxAmt": 0,
				"RushProcessing": "N",
				"PayMethod": "PP",
				"Comment": "Order comment or gift message.",
				"EntireOrderInstallment": "",
					"AffiliateMarketing": {
						"MarketingInfo": {
							"Type": "",
							"Affiliate": "",
							"WebSite": "",
							"Script": "",
							"TVMedia": "",
							"Number800": ""
						}
					}
				}
			},
			"Coupons": {
				"Coupon": {
					"CouponType": "",
					"CouponNumber": "",
					"DollarDiscountAmount": "",
					"PercentageDiscount": ""
				}
			},
			"Billing": {
				"Billto": {
					"FirstName": "John",
					"MiddleInitial": "",
					"LastName": "Doe",
					"CompanyName": "",
					"Address1": "123 WILLIS AVENUE",
					"Address2": "APT 23",
					"Address3": "",
					"City": "Los Angeles",
					"State": "CA",
					"ZipCode": "91402",
					"Country": "US",
					"DayPhone": "",
					"Email": "producer@company.com"
				}
			},
			"CreditCardInfo": {
				"CreditCard": {
					"CreditCardNumber": "",
					"CreditCardExpDate": "",
					"CreditCardType": "",
					"CreditCardAuthorization": "",
					"TranID": ""
				}
			},
			"CheckInfo": {
				"Check": {
					"RemitAmount": 0,
					"CheckNumber": "",
					"BankAccount": "",
					"RoutingNumber": ""
				}
			},
			"ProductManifest": {
				"Product": [
					{
						"LineNo": "",
						"ItemNo": "E0044-TW-E72",
						"Amount": "",
						"Quantity": 1,
						"Description": "",
						"Ship-Meth-Cd": 24,
						"BillTable": ""
					}
				]
			},
			"Shipping": {
				"Shipto": {
					"FirstName": "Jane",
					"MiddleInitial": "",
					"LastName": "Doe",
					"CompanyName": "",
					"Address1": "123 WILLIS AVENUE",
					"Address2": "APT 23",
					"Address3": "",
					"City": "Los Angeles",
					"State": "CA",
					"ZipCode": "91402",
					"Country": "US",
					"DayPhone": "",
					"Email": ""
				}
			}
		}
    } ]
}


Here is some simple PHP logic for posting to our endpoint:

// Include library
require_once "bibi_sdk_2-04.php";

// Set public and secret keys
$public = "PUBLIC_KEY";
$secret = "YOUR_SECRET";

// Initialize the API with public and secret keys
$api = new Bibi_SDK($public, $secret);

// Authenticate and grab token
$tokenResponse = $api->Authenticate();

// Handle token response automatically
$api->HandleTokenResponse($tokenResponse);


/* Sample order data */
$order_data = '{
	"Test": "T",
	"Orders": [
		{
			"Order": {
				// Order fields from the above format example
			}
		},
		{
			"Order": {
				// This is another order
			}
		},
		{
			"Order": {
				// Third order
			}
		}
	]
}';

// Assign order data to orders POST variable
$data = array( 'orders' => $order_data );

// Submit our response
$response = $api->submitOrder( $data );

Below is a sample .NET implementation on posting to our endpoint:

var request = WebRequest.Create("https://www.bibisolutions.net/api/submitOrder");

string authInfo = "PUBLIC_KEY_HERE" + ":" + "TOKEN_HERE";
authInfo = Convert.ToBase64String(Encoding.ASCII.GetBytes(authInfo));

request.PreAuthenticate = true;
request.Headers["Authorization"] = "Basic " + authInfo;

var postData = "orders=" + "JSON_ORDER_DATA_STRING";
var data = Encoding.ASCII.GetBytes(postData);

request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;

using (var stream = request.GetRequestStream())
{
	stream.Write(data, 0, data.Length);
}

WebResponse wr = request.GetResponse();
Stream receiveStream = wr.GetResponseStream();
StreamReader reader = new StreamReader(receiveStream, Encoding.UTF8);

string content = reader.ReadToEnd();

Console.WriteLine(content);

Once you've posted the orders to our end point, you should get the following response if successful:


    {
    "success": true,
    "message": "Orders uploaded.",
    "X-Rate-Limit-Limit": 60,
    "X-Rate-Limit-Remaining": 30,
    "X-Rate-Limit-Reset": 20
    }


/api/orderStatus

The orderStatus endpoint can be queried using the following parameters:

Parameters Description
orderNumber Filter order status by customer order number
timestamp UNIX timestamp or 'YYYY-MM-DD HH:MM:SS' date format (max of 30 days)
status Can be mixed with the parameters above, potential values are: New, Collate Printed, Auto Checked, Shipped, ShippedExternal, Backordered, Backordered-HTC (on backorder because of other items on the order), Returned, Cancelled, Hold, Pending, Declined, Mixed (Mixed status only valid at Order Header level)
offset Used in any API that has paged results, more info here

Note: The orderNumber and timestamp parameters cannot be used together. You can however mix orderNumber/status or timestamp/status parameters, or use the status parameter alone.

Due to the potential size of data queried through this API, there is a limit of 100 records per query. If there are more results waiting, the server will respond with hasMoreResults: true. In this event, hit the same API in a loop using the $_POST['offset'] parameter as described here until hasMoreResults returns false.

Below is an example response once you have hit our orderStatus API -

{
	"success": true,
	"result": {
		"header": [{
			"customer_order_number": "PKG12345",
			"third_party_short_number": "T0000123",
			"billto_company": "COMPANY NAME",
			"billto_firstname": "",
			"billto_lastname": "",
			"billto_middle_initial": "",
			"billto_ref1": "",
			"billto_ref2": "",
			"billto_street": "123 MAIN DRIVE",
			"billto_city": "COLUMBIA",
			"billto_state": "MO",
			"billto_zip": "90210",
			"billto_country_code": "US",
			"billto_phone": "",
			"billto_email": "",
			"shipto_company": "COMPANY NAME",
			"shipto_firstname": "",
			"shipto_lastname": "",
			"shipto_middle_initial": "",
			"shipto_ref1": "",
			"shipto_ref2": "",
			"shipto_street": "123 MAIN DRIVE",
			"shipto_city": "COLUMBIA",
			"shipto_state": "MO",
			"shipto_zip": "90210",
			"shipto_country_code": "US",
			"shipto_phone": "",
			"shipto_email": "",
			"future_date": "0000-00-00"
		}],
		"details": {
			"T00001230001": {
				"ship_method": "USPS First Class",
				"status": "Shipped",
				"items": [{
					"item_no": "ITM-123",
					"item_quantity": "2",
					"item_description": "Peanut Butter and Jelly (ORGANIC)",
					"item_price": "15.96"
				}],
				"tracking_numbers": {
					"9400110200828627551759": {
						"weight": "0.7500",
						"cost": "3.74"
					}
				}
			}
		}
	},
	"hasMoreResults": false,
	"code": 201,
	"message": "",
	"X-Rate-Limit-Limit": 60,
	"X-Rate-Limit-Remaining": 59,
	"X-Rate-Limit-Reset": 60
}

/api/updateOrder/

Update an existing order by including the order ID in the end point URI - eg: /api/updateOrder/orderId. Include the following POST data $_POST['order'] (see: submitOrder for a list of property descriptions):

NOTE: An order can only be updated if the current order status is one of the following:

  • New
  • Backordered
  • Decline
  • Pending
  • Hold

{
	"Test": "T",
	"Orders": [ {
		"Order": {
			"Header": {
				"HeaderGroup": {
				"OrderNumber": "CustomerOrderNumber",
				"EntryDate": "YYYYMMDD",
				"FutureDate": "",
				"Source": "SourceCode",
				"ProdDollars": 0,
				"PHAmt": 0,
				"TaxAmt": 0,
				"RushProcessing": "N",
				"PayMethod": "PP",
				"Comment": "Order comment or gift message.",
				"EntireOrderInstallment": "",
					"AffiliateMarketing": {
						"MarketingInfo": {
							"Type": "",
							"Affiliate": "",
							"WebSite": "",
							"Script": "",
							"TVMedia": "",
							"Number800": ""
						}
					}
				}
			},
			"Coupons": {
				"Coupon": {
					"CouponType": "",
					"CouponNumber": "",
					"DollarDiscountAmount": "",
					"PercentageDiscount": ""
				}
			},
			"Billing": {
				"Billto": {
					"FirstName": "John",
					"MiddleInitial": "",
					"LastName": "Doe",
					"CompanyName": "",
					"Address1": "123 WILLIS AVENUE",
					"Address2": "APT 23",
					"Address3": "",
					"City": "Los Angeles",
					"State": "CA",
					"ZipCode": "91402",
					"Country": "US",
					"DayPhone": "",
					"Email": "producer@company.com"
				}
			},
			"CreditCardInfo": {
				"CreditCard": {
					"CreditCardNumber": "",
					"CreditCardExpDate": "",
					"CreditCardType": "",
					"CreditCardAuthorization": "",
					"TranID": ""
				}
			},
			"CheckInfo": {
				"Check": {
					"RemitAmount": 0,
					"CheckNumber": "",
					"BankAccount": "",
					"RoutingNumber": ""
				}
			},
			"ProductManifest": {
				"Product": [
					{
						"LineNo": "",
						"ItemNo": "E0044-TW-E72",
						"Amount": "",
						"Quantity": 1,
						"Description": "",
						"Ship-Meth-Cd": 24,
						"BillTable": ""
					}
				]
			},
			"Shipping": {
				"Shipto": {
					"FirstName": "Jane",
					"MiddleInitial": "",
					"LastName": "Doe",
					"CompanyName": "",
					"Address1": "123 WILLIS AVENUE",
					"Address2": "APT 23",
					"Address3": "",
					"City": "Los Angeles",
					"State": "CA",
					"ZipCode": "91402",
					"Country": "US",
					"DayPhone": "",
					"Email": ""
				}
			}
		}
    } ]
}

/api/cancelOrder/

Cancel an existing order by including the order ID in the end point URI - eg: /api/cancelOrder/orderId.

NOTE: An order can only be canceled if the current order status is one of the following:

  • New
  • Backordered
  • Decline
  • Pending
  • Hold

Property Description
cancelEntireOrder Flag to determine whether or not to cancel the entire order including all line items. Set to Y (yes) or N (no).
orderNumber The order number you wish to cancel.
products If cancelEntireOrder is set to N, pass a JSON encoded array of product numbers, or a string of comma delimited product numbers that represent which products you wish to remove from the order.

Returns API

You can get a list of all line items returned by customer_order_number or date range parameters. See the following examples for how to use the Returns API.


Property Description
customer_order_number Search by customer_order_number either via /api/listReturns/customer_order_number OR by passing it through the $_POST['json'] array.
date_start, date_end Search by a date range by passing it through the $_POST['json'] array, eg:

{
	"date_start": "2018-01-30 00:00:00" ,
	"date_end": "2018-02-30 00:00:00" 
}

/api/listReturns

Format a request with the POST variable $_POST['json'] as follows:

            {
            "customer_order_number": "CUSTOMER_ORDER_NUMBER"
            }

OR

{
	"date_start": "2018-01-30 00:00:00" ,
	"date_end": "2018-02-30 00:00:00" 
}

A sample response will look like:

{
	"success": true,
	"result": [{
		"customer_order_number": "CUSTORDERNO",
		"product_number": "PRODUCTNO",
		"product_description": "PRODUCTDESC",
		"quantity": "QTY",
		"return_id": "RETURNREASON ID",
		"return_reason": "RETURNREASON",
		"date_time": "2018-01-05 00:00:00",
		"inventory_disposition": "DISPOSITION"
	}],
	"hasMoreResults": false,
	"code": 201,
	"message": "",
	"X-Rate-Limit-Limit": 60,
	"X-Rate-Limit-Remaining": 59,
	"X-Rate-Limit-Reset": 60
}


Products API

Use the below table as a reference for properties described in the Products API.


Property Description
product_number* The product identifier - must be 20 characters or less. Required.
short_description* Short description for a product. Required.
long_description Long description for a product.
product_alias A product alias specifies another name that might be used for a product. Product alias cannot be an existing product number or be used as a product alias for another product.
sub_with_product This is a product that can substitute the defined product_number on orders if there is no inventory for this product. This product must already exist in the system.
category1 Category 1 identifier. A product category is a way to organize products in your store by the type of products you sell.
category2 Category 2 identifier. A product category is a way to organize products in your store by the type of products you sell.
category3 Category 3 identifier. A product category is a way to organize products in your store by the type of products you sell.
category4 Category 4 identifier. A product category is a way to organize products in your store by the type of products you sell
available 1/0. Is this product available for orders? If so set to 1 then this product can be used on orders, otherwise use 0 - the product is not available for new orders.
not_available_date Date (YYYY-MM-DD) that a product will become not available for new orders. Once this date has been reached the "available": field will be set to 0000-00-00 (null). Once this date has been reached the "available" field will be set to 0 (No).
price Selling price of this product.
postage_handling Postage and Handling amount for this product.
extra_ph If there is extra Postage and Handling needed for specific shipping areas. Example - outside continental US.
list_price The MSRP value of this product.
product_cost Cost of the product. This will be used in some sales reports to calculate gross margin if available.
quantity_in_stock This is the physical inventory for this product. This field is determined by the system. This field cannot be set during insert or update.
primary_loc The warehouse primary picking location for this product.
allocated_quantity This is the amount of inventory that is allocated to orders in the warehouse that have not shipped. This field is determined by the system. This field cannot be set during insert or update.
backorder_quantity The amount of inventory that are in backorder status. This field is determined by the system. This field cannot be set during insert or update.
product_status* The status of an item. Please use the listProductStatusCodes API to retrieve a list of available product status. Required.
low_stock_limit This is used to determine when an item should be reordered. If this quantity is reached a reorder will be generated. "0" means manual reorder will be done.
reorder_amount When low_stock_limit is reached this will be the amount to reorder.
min_order_amount This is the minimum amount that can be ordered on a new customer order.
max_order_amount This is the maximum amount that can be ordered on a new customer order.
weight The weight of the product.
height The height of the product.
width The width of the product.
length The length of the product.
tax_exempt 1 or 0. Set to 1 if you want the item exempt from any tax calculations. Default is 0.
ship_separate 1 or 0. Set to 1 if this product needs to ship by itself always. Default is 0.
upc_code Universal Product Code for this product.
marketplace This field can be used to identify the source marketplace of the product. This field is determined by the system. This field cannot be set during insert or update.
harmonization_code The international commodity description code for this product.

For more information on harmonization codes please visit https://www.export.gov/article?id=Find-HS-Code.

For a full list of Harmonization Codes, head to hts.usitc.gov.

The purpose of a Harmonization Code (also referred to as Tariff Code, Customs Tariffs, Harmonized Tariff Codes, and Harmonized System Code) is to expedite the shipping process for international orders, as they are used for tax assessment purposes. This is a system used to trade most of the merchandise that is sent internationally and is a universal economic language and code for your goods.

Once an order reaches an international border, these codes will help the customs office to identify what it is that you are shipping. So it is recommended to have your harmonization codes listed and properly-identified at time of label creation.

You can submit products using our Products API. See below for how to format a request and send it to our endpoint:

/api/upsertProduct

Format a request with the POST variable $_POST['product'] as follows:

Note: To update a product, simply include an existing product_number in the API call. Any products that exist in our system will be updated, otherwise a new product will be inserted.

{
    "product_number": "",
    "short_description": "",
    "long_description": "",
    "product_alias": "",
    "sub_with_product": "",
    "category1": "",
    "category2": "",
    "category3": "",
    "category4": "",
    "available": "",
    "not_available_date": "",
    "price": 0,
    "postage_handling": 0,
    "extra_ph": 0,
    "list_price": 0,
    "product_cost": 0,
    "product_status": "R1",
    "low_stock_limit": 0,
    "reorder_amount": 0,
    "min_order_amount": 0,
    "weight": 0,
    "height": 0,
    "width": 0,
    "length": 0,
    "tax_exempt": 0,
    "ship_separate": 0,
    "upc_code": 0,
    "marketplace": "",
    "harmonization_code": 0
}

Once you've posted the product to our end point, you should get one of the following responses if successful:


    {
    "success": true,
    "result": "EDP_NO_HERE",
    "message": "Product inserted.",
    "X-Rate-Limit-Limit": 60,
    "X-Rate-Limit-Remaining": 30,
    "X-Rate-Limit-Reset": 20
    }


OR:


    {
    "success": true,
    "message": "Product updated.",
    "X-Rate-Limit-Limit": 60,
    "X-Rate-Limit-Remaining": 30,
    "X-Rate-Limit-Reset": 20
    }


/api/upsertProducts

Pass an array of JSON encoded data to upload or update multiple products. Format a request with the POST variable $_POST['products'] as follows:

Note: To update a product, simply include an existing product_number in the API call. Any products that exist in our system will be updated, otherwise a new product will be inserted.


    [
    {
    "product_number": "PRODUCT1",
    "short_description": "",
    "long_description": "",
    "product_alias": "",
    "sub_with_product": "",
    "category1": "",
    "category2": "",
    "category3": "",
    "category4": "",
    "available": "",
    "not_available_date": "",
    "price": 0,
    "postage_handling": 0,
    "extra_ph": 0,
    "list_price": 0,
    "product_cost": 0,
    "product_status": "R1",
    "low_stock_limit": 0,
    "reorder_amount": 0,
    "min_order_amount": 0,
    "weight": 0,
    "height": 0,
    "width": 0,
    "length": 0,
    "tax_exempt": 0,
    "ship_separate": 0,
    "upc_code": 0,
    "marketplace": "",
    "harmonization_code": 0
    },
    {
    "product_number": "PRODUCT2",
    "short_description": "",
    "long_description": "",
    "product_alias": "",
    "sub_with_product": "",
    "category1": "",
    "category2": "",
    "category3": "",
    "category4": "",
    "available": "",
    "not_available_date": "",
    "price": 0,
    "postage_handling": 0,
    "extra_ph": 0,
    "list_price": 0,
    "product_cost": 0,
    "product_status": "R1",
    "low_stock_limit": 0,
    "reorder_amount": 0,
    "min_order_amount": 0,
    "weight": 0,
    "height": 0,
    "width": 0,
    "length": 0,
    "tax_exempt": 0,
    "ship_separate": 0,
    "upc_code": 0,
    "marketplace": "",
    "harmonization_code": 0
    },
    {
    "product_number": "PRODUCT3",
    "short_description": "",
    "long_description": "",
    "product_alias": "",
    "sub_with_product": "",
    "category1": "",
    "category2": "",
    "category3": "",
    "category4": "",
    "available": "",
    "not_available_date": "",
    "price": 0,
    "postage_handling": 0,
    "extra_ph": 0,
    "list_price": 0,
    "product_cost": 0,
    "product_status": "R1",
    "low_stock_limit": 0,
    "reorder_amount": 0,
    "min_order_amount": 0,
    "weight": 0,
    "height": 0,
    "width": 0,
    "length": 0,
    "tax_exempt": 0,
    "ship_separate": 0,
    "upc_code": 0,
    "marketplace": "",
    "harmonization_code": 0
    }
    ]


Once you've posted the product to our end point, you should get the following response if successful:


    {
    "success": true,
    "result": [
    null,
    "EDP_NO_HERE",
    "EDP_NO_HERE"
    ],
    "message": [
    "Product updated.",
    "Product inserted.",
    "Product inserted."
    ]
    "X-Rate-Limit-Limit": 60,
    "X-Rate-Limit-Remaining": 30,
    "X-Rate-Limit-Reset": 20
    }


/api/listProduct

Lists a product based on the ID specified in the end point URI - eg: /api/listProduct/productId. No POST data is required. An example response is below:


    {
    "third_party_id_no": 12345,
    "product_number": "PRODUCT1",
    "short_description": "",
    "long_description": "",
    "product_alias": "",
    "sub_with_product": "",
    "category1": "",
    "category2": "",
    "category3": "",
    "category4": "",
    "available": "",
    "not_available_date": "",
    "price": 0,
    "postage_handling": 0,
    "extra_ph": 0,
    "list_price": 0,
    "product_cost": 0,
    "quantity_in_stock": 100,
    "allocated_quantity": 0,
    "backorder_quantity": 0,
    "product_status": "R1",
    "low_stock_limit": 0,
    "reorder_amount": 0,
    "min_order_amount": 0,
    "weight": 0,
    "height": 0,
    "width": 0,
    "length": 0,
    "tax_exempt": 0,
    "ship_separate": 0,
    "upc_code": 0,
    "marketplace": "",
    "harmonization_code": 0
    }


/api/listProducts

Lists an array of products. Format a request with the POST variable $_POST['json'] as follows.

Property DataType Required Default Description
offset Integer false 1 The Offset of the number of records of the multiple perPage parameter
perPage Integer false 100 Quantity to return in each response
min_qty Integer false none Set a minimum quantity that is present in the warehouse
max_qty Integer false none Set a maximum quantity that is present in the warehouse

An example JSON request is as follows:


    {
    "offset": 1,
    "perPage": 10,
    "min_qty": 1,
    "max_qty": 10
    }

An example response is below:


    {
    "success": true,
    "result": [{
    "product_number": "PRODUCT_NUMBER",
    "short_description": "PRODUCT_DESC",
    "price": "X.XX",
    "postage_handling": 0,
    "extra_ph": 0,
    "list_price": 0,
    "product_cost": 0,
    "quantity_in_stock": "XX",
    "allocated_quantity": 0,
    "backorder_quantity": 0,
    "product_status": "R1",
    "upc_code": "000000000000"
    },
    {
    "product_number": "PRODUCT_NUMBER2",
    "short_description": "PRODUCT_DESC2",
    "price": "X.XX",
    "postage_handling": 0,
    "extra_ph": 0,
    "list_price": 0,
    "product_cost": 0,
    "quantity_in_stock": "XX",
    "allocated_quantity": 0,
    "backorder_quantity": 0,
    "product_status": "R1",
    "upc_code": "000000000000"
    },
    ...
    ],
    "hasMoreResults": true,
    "code": 201,
    "message": "",
    "X-Rate-Limit-Limit": 60,
    "X-Rate-Limit-Remaining": 59,
    "X-Rate-Limit-Reset": 60
    }


/api/listProductStatusCodes

Retrieve a list of product statuses that can be included in your upsertProduct/upsertProducts API calls. No POST parameters are needed.


Advanced Shipping Notices API

The diagram below shows the relationship between inner pack units, inner packs and boxes. The concepts are used in our ASN API to identify what inventory and how much is coming our way.

number_of_units_inner_pack = 4
(units per pack)
number_of_inner_packs = 2
(packs per box)
number_of_boxes = 2
(boxes per line entry)










number_of_pallets = 1 quantity = number_of_units_inner_pack * number_of_inner_packs * number_of_boxes
16 = ( 4 * 2 * 2 )
ASN diagram


ASN Properties

Property Description
asn_bol_track_number* A unique number assigned by the shipper for this shipment (The carrier's BOL (Bill of Lading) number or tracking number) – Required Field.
date_shipped* Date the shipment is sent - Required Field
expected_delivery_date* Date the shipment is expected to get to the destination – Required Field
expected_delivery_time* Time the shipment is expected to get to the destination (values 6:00:00, 8:00:00, 10:00:00, 12:00:00, 14:00:00, 16:00:00, 18:00:00) – Required Field
carrier_name Name of the shipping company that is shipping the product
carrier_phone Phone number of the carrier
shipment_origination_city City the shipment is being sent from
shipment_origination_state If US or Canada the state or providence the shipment is being sent from
shipment_origination_country* The two-letter code (ISO 3166-1 alpha-2) for the country the shipment is being sent from –Required Field
destination_warehouse* City or warehouse of the ship to (Example: Wisconsin) –Required Field
po_number The purchase order number being filled by this Advance Ship Notice.
boxes_under_lbs Total number of boxes on this shipment that are under a pound.
boxes_over_lbs Total number of boxes on this shipment that are over a pound.
total_pallets Total number of pallets on this shipment - ASN.
total_boxes Total number of boxes on this shipment - ASN.
"Products": [{
    "product_number":
    "quantity":
    "box_number":
    "number_of_boxes":
    "pallet_number":
    "number_of_pallets":
    "number_of_inner_packs":
    "number_of_units_inner_pack":
    "weight_of_box":
},

product_number* – clients product number - this number must be in our system in order to accept this ASN - Required Field

quantity* – the eaches quantity for the product_number for this line entry - Required Field

box_number – if being sent in by boxes that are number this would be the box number that this product is in

number_of_boxes – if being sent in by boxes that are number this would be the box number that this product is in

pallet_number - if not being sent by box number then this is the total number of boxes this product is in

number_of_pallets - if being sent by pallet then this would be the pallet number that this product is on

number_of_inner_packs - the number of inner container

number_of_units_inner_pack - the number of eaches per inner container; if inner boxes are used, this is the number of selling units within the inner boxes only

weight_of_box - weight of the box in pounds


You can submit advanced shipping notices using our ASN API. See below for how to format a request and send it to our endpoint:

/api/createASN

Creates an ASN with header details and products. Format a request with the POST variable $_POST['json'] as follows:

{
	"Header": {
		"asn_bol_track_number": "ASN_TRACK_NO",
		"date_shipped": "2017-02-14",
		"expected_delivery_date": "2017-02-14",
		"expected_delivery_time": "07:07:07",
		"carrier_name": "CARRIER",
		"carrier_phone": "3601234567",
		"shipment_origination_city": "OLYMPIA",
		"shipment_origination_state": "WA",
		"shipment_origination_country": "US",
		"destination_warehouse": "BWI",
		"po_number": "90210"
	},
	"Products": [{
			"product_number": "00-1300",
			"quantity": "6",
			"box_number": "", 
			"number_of_boxes": "5",
			"pallet_number": "",
			"number_of_pallets": "3",
			"number_of_inner_packs": "2",
			"number_of_units_inner_pack": "4", 	
			"weight_of_box": "1"
		},
		{
			"product_number": "00-1301",
			"quantity": "8",
			"box_number": "", 
			"number_of_boxes": "7", 
			"pallet_number": "", 
			"number_of_pallets": "5", 
			"number_of_inner_packs": "4",
			"number_of_units_inner_pack": "4", 			
			"weight_of_box": "3"
	}]
}

Response


    {
    "success":true,
    "result":"42",
    "hasMoreResults":false,
    "code":201,
    "message":"ASN has been created.",
    "X-Rate-Limit-Limit":60,
    "X-Rate-Limit-Remaining":38,
    "X-Rate-Limit-Reset":29
    }


However, if the asn_bol_track_number already exists, you will get a response similar to the following:


    {
    "success":false,
    "message":"ASN header information could not be added.",
    "hasMoreResults":false,
    "code":400
    }


/api/addASNProduct

Adds product details to an existing ASN. Format a request with the POST variable $_POST['json'] as follows:


    {
    "asn_bol_track_number":"ASN_TRACK_NO",
    "product_number": "PRODUCT_NO",
    "quantity": "3",
    "box_number": "1",
    "number_of_boxes": "1",
    "pallet_number": "6",
    "number_of_pallets": "1",
    "number_of_inner_packs": "4",
    "number_of_units_inner_pack": "4",
    "weight_of_box": "3"
    }


Response


    {
    "success":true,
    "result":"64",
    "hasMoreResults":false,
    "code":201,
    "message":"ASN product added.",
    "X-Rate-Limit-Limit":60,
    "X-Rate-Limit-Remaining":39,
    "X-Rate-Limit-Reset":60
    }


ASN_TRACK_NO is the unique identifier provided in the ASN header information that links your product details to the ASN.

Products must be unique per ASN so attempting to add multiple details with the same product will result in the following response:


    {
    "success":false,
    "message":"ASN Product could not be added",
    "hasMoreResults":false,
    "code":400
    }


/api/deleteASNProduct

Delete product details from an existing ASN. Requires passing asn_bol_track_number and product_number. Format a request with the POST variable $_POST['json'] as demonstrated below:


    {
    "asn_bol_track_number":"ASN_TRACK_NO",
    "product_number":"PRODUCT_NO"
    }


Response


    {
    "success":true,
    "result":null,
    "hasMoreResults":false,
    "code":204,
    "message":"ASN product deleted.",
    "X-Rate-Limit-Limit":60,
    "X-Rate-Limit-Remaining":38,
    "X-Rate-Limit-Reset":0
    }


/api/updateASNStatus

Update the status of an ASN. Requires passing asn_bol_track_number and status. Format a request with the POST variable $_POST['json'] as demonstrated below:


    {
    "asn_bol_track_number":"ASN_TRACK_NO",
    "status":"Open|Closed"
    }


Response


    {
    "success":true,
    "result":null,
    "hasMoreResults":false,
    "code":204,
    "message":"",
    "X-Rate-Limit-Limit":60,
    "X-Rate-Limit-Remaining":39,
    "X-Rate-Limit-Reset":60
    }


/api/getASNDetails

Get the ASN header and product details by asn_bol_track_number. Format a request with the POST variable $_POST['json'] as demonstrated below:


    {
    "asn_bol_track_number":"ASN_TRACK_NO"
    }


Response


    {
    "success":true
    "result":{
    "header":{
    "asn_bol_track_number":"ASN_TRACK_NO",
    "date_shipped":"2017-02-14",
    "expected_delivery_date":"2017-02-14",
    "expected_delivery_time":"07:07:07",
    "carrier_name":"CARRIER",
    "carrier_phone":"3601234567",
    "shipment_origination_city":"OLYMPIA",
    "shipment_origination_state":"WA",
    "shipment_origination_country": "US",
    "destination_warehouse":"BWI",
    "po_number":"90210",
    "status":"Open",
    "boxes_under_lbs":"3",
    "boxes_over_lbs":"0",
    "total_pallets":"14"
    },
    "products":[{
    "product_number":"00-1300",
    "short_description":"Keep it Classic Designer Style Stretch Bracelet As",
    "quantity":"6",
    "box_number": "1",
    "number_of_boxes": "7",
    "pallet_number": "6",
    "number_of_pallets": "5",
    "number_of_inner_packs": "4",
    "number_of_units_inner_pack": "4",
    "weight_of_box": "3"
    }]
    },
    "hasMoreResults":false,
    "code":201,
    "message":"ASN fetched",
    "X-Rate-Limit-Limit":60,
    "X-Rate-Limit-Remaining":39,
    "X-Rate-Limit-Reset":60
    }


/api/getASNProduct

Get the details of an ASN product. Format a request with the POST variable $_POST['json'] as demonstrated below:


    {
    "asn_bol_track_number":"ASN_TRACK_NO",
    "product_number":"00-1300"
    }


Response


    {
    "success":true,
    "result": [{
    "id":"55",
    "asn_header_id":"39",
    "asn_bol_track_number":"ASN_TRACK_NO",
    "product_number":"00-1300",
    "short_description":"Keep it Classic Designer Style Stretch Bracelet As",
    "quantity":"6",
    "box_number": "1",
    "number_of_boxes": "7",
    "pallet_number": "6",
    "number_of_pallets": "5",
    "number_of_inner_packs": "4",
    "number_of_units_inner_pack": "4",
    "weight_of_box": "3"
    }],
    "hasMoreResults":false,
    "code":201,
    "message":"",
    "X-Rate-Limit-Limit":60,
    "X-Rate-Limit-Remaining":39,
    "X-Rate-Limit-Reset":60
    }


/api/listASNs

Get a list of available ASNs.


Response


    {
    "success":true
    ,"result":[
    {
    "asn_bol_track_number":"TEST123",
    "date_shipped":"2017-08-14",
    "expected_delivery_date":"2017-08-18",
    "expected_delivery_time":"08:00:00",
    "carrier_name":"TESTCO",
    "carrier_phone":"",
    "shipment_origination_city":"",
    "shipment_origination_state":"",
    "shipment_origination_country": "",
    "destination_warehouse":"BWI",
    "po_number":"123456",
    "status":"Closed",
    "boxes_under_lbs":"2",
    "boxes_over_lbs":"0",
    "total_pallets":"5"
    },
    {
    "asn_bol_track_number":"TEST1234",
    "date_shipped":"2017-08-14",
    "expected_delivery_date":"2017-08-18",
    "expected_delivery_time":"06:00:00",
    "carrier_name":"TESTCO",
    "carrier_phone":"",
    "shipment_origination_city":"",
    "shipment_origination_state":"",
    "shipment_origination_country": "",
    "destination_warehouse":"BWI",
    "po_number":"123456",
    "status":"Closed",
    "boxes_under_lbs":"2",
    "boxes_over_lbs":"0",
    "total_pallets":"5"
    },
    {
    "asn_bol_track_number":"TESX",
    "date_shipped":"2017-08-31",
    "expected_delivery_date":"2017-08-31",
    "expected_delivery_time":"06:00:00",
    "carrier_name":"JOHNDOE",
    "carrier_phone":"",
    "shipment_origination_city":"",
    "shipment_origination_state":"",
    "shipment_origination_country": "",
    "destination_warehouse":"BWI",
    "po_number":"123456",
    "status":"Closed",
    "boxes_under_lbs":"2",
    "boxes_over_lbs":"0",
    "total_pallets":"0"
    }
    ],
    "hasMoreResults":false,
    "code":201,
    "message":"",
    "X-Rate-Limit-Limit":60,
    "X-Rate-Limit-Remaining":39,
    "X-Rate-Limit-Reset":60
    }
 


/api/deleteASN

Delete an ASN by asn_bol_track_number. Format a request with the POST variable $_POST['json'] as demonstrated below:


Request


    {
    "asn_bol_track_number":"ASN_TRACK_NO"
    }
 


Response


    {
    "success":true,
    "result":null,
    "hasMoreResults":false,
    "code":204,
    "message":"ASN deleted.",
    "X-Rate-Limit-Limit":60,
    "X-Rate-Limit-Remaining":39,
    "X-Rate-Limit-Reset":60
    }
 


General APIs

Feel free to call these APIs to query information on our database.

/api/listShipMethods

You can get a list of ship methods using the above endpoint. You will get a JSON response in the following format:


    {
    "success":true,
    "result": [ {
    "code": "01",
    "short": "UPS Second Day Air",
    "is_expedite": "1",
    "is_generic": "0"
    },
    {
    "code":"02",
    "short":"UPS Ground",
    "is_expedite":"0",
    "is_generic":"0"
    },
    {
    "code":"03",
    "short":"UPS Next Day Air",
    "is_expedite":"1",
    "is_generic":"0"
    },
    {
    "code":"04",
    "short":"Truck",
    "is_expedite":"0",
    "is_generic":"0"
    },
    {
    "code":"05",
    "short":"USPS Priority Mail",
    "is_expedite":"0",
    "is_generic":"0"
    },
    {
    "code":"06",
    "short":"UPS Third Day Select",
    "is_expedite":"1",
    "is_generic":"0"
    },
    {
    "code":"08",
    "short":"USPS Standard Mail (STD A)",
    "is_expedite":"0",
    "is_generic":"0"
    },
    {
    "code":"09",
    "short":"USPS First Class",
    "is_expedite":"0",
    "is_generic":"0"
    }
    ],
    "X-Rate-Limit-Limit":60,
    "X-Rate-Limit-Remaining": 30,
    "X-Rate-Limit-Reset": 20
    }


/api/listPaymentMethods

You can get a list of ship methods using the above endpoint. You will get a JSON response in the following format:


    {
    "success":true,
    "result": [ {
    "code":"PP",
    "name":"Pre-Paid"
    },
    {
    "code":"VI",
    "name":"Visa"
    },
    {
    "code":"MC",
    "name":"MasterCard"
    },
    {
    "code":"AX",
    "name":"American Express"
    },
    {
    "code":"DI"
    ,"name":"Discover"
    }] ,
    "X-Rate-Limit-Limit":60,
    "X-Rate-Limit-Remaining": 30,
    "X-Rate-Limit-Reset": 20
    }


/api/listCountries

You can get a list of countries we support using the above endpoint. You will get a JSON response in the following format:


    {
    "success":true,
    "result": [ {
    "name":"AFGHANISTAN",
    "iso":"AF",
    "un1":"AFG",
    "un2":"004",
    "ecom":"1000"
    },
    {
    "name":"ALBANIA",
    "iso":"AL",
    "un1":"ALB",
    "un2":"008",
    "ecom":"1001"
    },
    {
    "name":"ALGERIA",
    "iso":"DZ",
    "un1":"DZA",
    "un2":"012",
    "ecom":"1002"
    } ],
    "X-Rate-Limit-Limit":60,
    "X-Rate-Limit-Remaining": 30,
    "X-Rate-Limit-Reset": 20
    }


/api/listStates

You can get a list of states we support using the above endpoint. You will get a JSON response in the following format:


    {
    "success":true,
    "result": [ {
    "name":"ALABAMA",
    "abbrev":"AL"
    },
    {
    "name":"ALASKA",
    "abbrev":"AK"
    },
    {
    "name":"ARIZONA",
    "abbrev":"AZ"
    },
    {
    "name":"ARKANSAS",
    "abbrev":"AR"
    } ],
    "X-Rate-Limit-Limit":60,
    "X-Rate-Limit-Remaining": 30,
    "X-Rate-Limit-Reset": 20
    }


/api/listOffers

You can get a list of offers (source codes) valid for your account:


    {
    "success":true,
    "result":[{
    "source": "TESTONETWO",
    "trading_partner": "1",
    "offer": "TEST",
    "use": "ONETWO",
    "referenceKey": "TESTOFFER",
    "description": "This is a test offer",
    "startDate": "2017-04-12",
    "finishDate": "2017-04-26"
    }],
    "X-Rate-Limit-Limit":60,
    "X-Rate-Limit-Remaining": 30,
    "X-Rate-Limit-Reset": 20
    }


Software Development Kits

While you can program your own SDK to utilize our APIs, we have provided our own SDKs for you to use with sample applications provided within. Feel free to use our SDK to learn how to use the Bibi API or you can write your own that follows our endpoint logic.

If you would like to contribute your own SDK in another language, please contact us and let us know and we will try including it and give proper credits.

PHP SDK (v2.05.0)

The PHP SDK can be downloaded here.

Usage instructions are contained within the .zip file. Extract the ZIP with your favorite compression application and follow the README.txt for further instructions. There will be a sample application called bibi_sdk.php which uses the SDK to make calls to our API endpoint. Simply follow the logic to see how our API can be used.

dotNET SDK (v2.03)

The dotNET SDK can be downloaded here.

Usage instructions are contained within the .zip file. Extract the ZIP with your favorite compression application and follow the README.txt for further instructions. There will be a sample solution called Bibi_SDK_Sample.sln which uses the SDK to make calls to our API endpoint. Simply follow the logic to see how our API can be used.

Custom Integrations

Please use the Contact page if you are interested in or require a custom integration and specify what framework(s) or programming language(s) you need assistance with. Alternatively, if you have a custom integration that you would like to provide us with or need help finalizing, we would be more than happy to add it to our list of SDKs. Help us, help you!












  • Customer Service
  • Inventory
  • Shipping
  • Reports
  • Setup