ChannelApe Blog

Wholesale API Integration Guide

Written by Jordan Stokes | Dec 20, 2021 10:27:12 PM

Who is this for?

This guide is written for a technical audience who possess an understanding of the order and fulfillment processes that are standard to EDI retailer integration

  • If you are an operations leader looking for the best way to marry X12 EDI retailers, VANs, or other providers with ChannelApe’s Fulfillment Management System

Foreword

ChannelApe is a stateful system and this sometimes makes integration difficult for message-based systems.  

Additionally, the Rate Limiting of our RESTful APIs may introduce more complexity if your system is unable to recover and retry rejected requests.

Please see the ChannelApe API documentation to learn more about our APIs.

References

Authorization

ChannelApe’s API endpoints are authenticated using a secret token via a custom header on every API call, X-Channel-Ape-Authorization-Token.

Tokens are created alongside API Users which must be done by a business owner.

Overview of Wholesale API Integration Dataflows

Creating Purchase Orders

To fulfill an order, create an order in ChannelApe.

  • ChannelApe requires one shipping destination per order so if customers are placing multi-store orders you will need to split the 850 by shipping destination
  • ChannelApe’s Inventory Management System is indexed by SKU, which is your Vendor Part Number (your SKU). In order for ChannelApe to accurately maintain inventory these orders must use the Vendor’s Part Numbers, so if customers are placing orders with their Buyer Part Numbers (their SKUs) you will need to convert these to your SKU before creating the order in ChannelApe.
    • The same goes for UPC.  ChannelApe’s Inventory Management System does not use UPC so you will need to convert the item to the SKU on record with ChannelApe.
      • If the Buyer’s catalog is available in CSV format, ChannelApe can import the catalog and you can use our Variant Searches API to perform the cross-reference lookup on their SKU or UPC.

Retrieving the Purchase Orders Acknowledgement

To generate a Purchase Order Acknowledgement, query ChannelApe for IN_PROGRESS orders on the Wholesale Channel or if you’re looking for a specific Purchase Order, you can query ChannelApe by purchase Order Number, and create an 855 for each PENDING fulfillment found.

  • Note: You will need to keep track of which PENDING fulfillments you’ve processed and acknowledged.  PENDING fulfillments will have two fields you can use for this: the id which is on the fulfillment level and the warehouse_order_id which is in the fulfillment’s additional fields.
  • You can optionally specify an updated timestamp to return only orders updated since the last time you queried if your system is capable of maintaining the last query time.
  • Some 3PLs can reject a fulfillment request, when this happens ChannelApe will change the order to HOLD.

cURL Example

curl –location –request GET ‘https://api.channelape.com/v1/orders?channelId=846d2a6d-f420-441e-bffe-5c064f8c75de&status=IN_PROGRESS&updatedAtStartDate=2021-06-01T20:00:00.403Z&updatedAtEndDate=2021-06-01T20:30:00.403Z’ \
–header ‘Content-Type: application/json’ \
–header ‘X-Channel-Ape-Authorization-Token: XXXXXXXX-cbeb-4f28-801d-XXXXXXXXXX67’

Retrieving Shipment Confirmations

To get Shipment Confirmations, query ChannelApe for IN_PROGRESS orders on the Wholesale Channel or if you’re looking for a specific Purchase Order, you can query ChannelApe by purchase Order Number, and create an 856 for each OPEN fulfillment found.

  • Note: As with the previous step, you will need to keep track of which OPEN fulfillments you’ve processed. The id is the best field to use for OPEN fulfillments
  • After processing the OPEN fulfillment, change the fulfillment status to SUCCESS by PATCHing the order fulfillments list.
    • Caution: We do not support PATCH on the fulfillment level so you will need to preserve all the fulfillments in your request body.
  • If there are no more PENDING or OPEN fulfillments on the order, change the order status to CLOSED by PATCHing just the order status.
  • SOPI and SOTPI structures must be built on your end.  ChannelApe’s fulfillment data model provides access to the GS1-128, SSCC-18, BOL, and Master BOL as additional fields on the fulfillment.

cURL Example

curl –location –request PATCH ‘https://api.channelape.com/v1/orders/21c922c0-69a4-425b-aea3-4ad8e1aaffc4’ \
–header ‘Content-Type: application/json’ \
–header ‘X-Channel-Ape-Authorization-Token: XXXXXXXX-cbeb-4f28-801d-XXXXXXXXXX67’ \
–data-raw ‘{
“status”: “CLOSED”,
“fulfillments”: [
{
“id”: “1091235123”,
“status”: “SUCCESS”,
“shippingCompany”: “UPS”,
“shippingMethod”: “GROUND”,
“trackingNumber”: “1Z999AA10123456784”,
“warehouseOrderId”: “#100351-1”,
“billOfLading”: “12000013”,
“masterBillOfLading”: “”,
“palletCode”: “01108479760000401319112010ABC1234”,
“containerCode”: “00001234560000000018”,
“lineItems”: [
{
“id”: “1”,
“sku”: “VN120-1”,
“upc”: “123456789012”,
“quantity”: “12”
}
]
}
]
}’

Generating Invoices

To generate Invoices, query ChannelApe for CLOSED orders on the Wholesale Channel.

  • Note: You will need to keep track of which orders you processed to ensure you are not duplicating invoices. 
  • As with the other steps, you have the option of querying orders that have been updated since the last time you queried if your system is capable of storing the last query time.