How to add orders using the API

I’m having the worst time trying to figure out how to add orders - and how to maintain them to keep them in sync with a separate system?

What API?
What technology? (XML-RPC or REST)

Thank you so much

There are multiple ways to accomplish this, with both XmlRpc as well as Rest.

Rest methods: Keap REST API
XmlRpc invoice methods: xml-rpc - Keap Developer Portal
XmlRpc place order method: xml-rpc - Keap Developer Portal

Each of these have various positives and negatives. The XmlRpc place order method is the best option if you are looking to do as much in as little API calls possible, but again it comes down to what your integration needs are.

If you could provide us with as much detail around your desired integration and flow of data, we can provide a more specific answer suited to your use case.

Here are some of the questions that would help me to provide a more specific answer for you:

  • Do you need to handle processing payments within Keap, or just looking to mark an order as having been paid?
  • What other order related data needs to be generated or represented? Products, Promo codes, discounts, shipping costs, taxes, etc.
  • Do you have recurring orders aka subscriptions, and how would you like those represented within Keap?
  • Is this a one way sync, or will you be generating orders within Keap that you also would like sync’d back outward to other systems?

Thank you for your response, Justin.

The integration is meant to be a one-way flow of data from our fulfillment house into Keap. Orders flow into the fulfillment house, are shipped from there, and customer updates occur there as well. It is desired that we “update the picture in Keap” with this same data. Our plan is to wake up once a day, identify records whose statuses have changed, and push them up to Keap via API. We plan to do this by first searching in Keap for a customer, grabbing the relevant data (which we believe is contact information, product information, order information, and order product information. Then we plan to identify what needs to change based on what we identified in our system, and then push up the necessary API calls to make that happen.

This will involve add/update to contacts, add/update to items, add/update to orders, and add/update to order products.

It is our understanding that there would not be a need to process payments on the Keap side of things. We would want the order to bear the best replica we could muster of how that order appears in our system. Payment information is probably not critical, but we have that available if it can be uploaded. Other things would be order status, order shipments, possibly tracking information - just whatever is relevant (and we need to identify that yet.)

Orders consist of “product” and “subscription”, both, but I think it may be safe to say we would treat subscriptions as a “product” in your system - it is a purchase made here but not necessarily needing to be tracked on your side. One thing that might be nice would be to identify an order item as a subscription and simply update status and expiration information.

We would not want the complexity of a two-way sync.

I hope I’ve answered the excellent questions you posed. Again, thank you very much.

Because it sounds like you are going to be itemizing the order items (product, shipping, tax, discount) I think the XmlRpc InvoiceService methods will suit your needs best.

Of course, you can always use both the XmlRpc and Rest v1 and v2 APIs (Contacts and Tags APIs were released this morning).

Most accomplish this by wrapping their API Client and utilizing whichever API endpoint is best for their needs.

Ok, thank you very much. (So sorry, I did not see this answer.)