If you’ve worked with integrations in the past, you may have seen phrases like API and webhook without really thinking much of it. You’re asked to present this long string of random letters and numbers, or maybe you have to copy over a special URL for your account. You know they seem important, and you know they can make or break your connections, but what are they? What do they do?
API: Actually Pretty Interesting
Let’s start with APIs. An API (Application Programming Interface) is the connection between two applications, allowing them to pass along information to and from one another.
Think of it like giving your friend your phone number. If you are your online store and your friend is Order Desk, your phone number would be the API key. Your friend can use your number to call and talk to you to see how things are going, and the two of you can exchange updates whenever something new happens.
So when you’re connecting your shopping cart to Order Desk with an API key, you’re essentially opening up a line of communication between your store and Order Desk, where information about your orders can be exchanged. It’s worth noting that this isn’t a constant line of communication, as Order Desk checks on a specific schedule that we refer to as an appointment. For example, one of your integrations could have an appointment that occurs once every hour, where Order Desk will check the integration for any new updates during that time.
The API itself is built with a specific set of commands that other applications can use to request and send details. This is why you may notice that some of our integrations offer features that others don’t—it’s likely because the API we’re communicating with doesn’t support that particular option. Some applications may only offer a bare bones API, allowing you to send and receive only basic information, while other applications may have a more robust API with a wider range of features.
Webhooked on a Feeling
Unlike appointments, where we’re checking in with an integration on a set schedule to see if there are any updates, webhooks work a little differently. With webhooks (sometimes referred to as callback URLs), the integration can send us a notification with an update that we will pull in right when they send it. If they don’t send a webhook, Order Desk won’t need to check in as there wouldn’t be anything for us to look for.
With our integrations that use webhooks, you would need find the notification URL in the integration settings and provide it to the service you’re looking to set up. For example, when you use our Gooten integration you’ll need to set up the notification URL to receive order shipment details. This is either done by giving the URL to your contact at the company you are looking to work with, or by pasting it somewhere within the third party account’s settings.
So while an API key is akin to a phone number like we mentioned above, a webhook is more like sending a letter or email. If you’re working with an integration that sends a shipment integration via webhook, it would be like them writing a letter to Order Desk with the shipping details included. That way, Order Desk can update the order when it’s shipped without having to ask for that information.
For some of our other integrations that use webhooks, the webhook is sent within each order when we send them through the integration. They’ll then automatically send the shipment details back through that webhook. Or we will setup the webhooks for you, if the API allows us to do that for you.
So Which Am I Using?
Since each of our integrations can be unique in terms of their connection methods and available features, the method Order Desk uses to send and receive order details will be just as distinctive. Because of this, we will always make a note of which method you’ll be working with in each of our integration guides. So if you need to grab an API key for an integration then you’ll be prompted to do so when following the setup steps, whereas the notification URL for webhooks will be mentioned in the instructions as needed. Our support team can also help you with any questions you may have on the Order Desk side of things, however for questions that fall outside of our app you may need to contact the service you’re integrating with in order to receive some guidance.