Skip to main content
All CollectionsIntegrationsAPIs
How To: Receive Order Callbacks via API
How To: Receive Order Callbacks via API
Samuel Gichuhi avatar
Written by Samuel Gichuhi
Updated over 4 months ago

If you are a web developer and are looking for more information about orders or other items on your website, you may want to consider creating webhooks for use with the API that has been created by Art Storefronts. If you are unsure of what webhooks are or what an API is used for, we strongly recommend you do not attempt to use this article. Instead, we suggest you reach out to a qualified web developer who can create and implementing webhooks for use with the API.

Art Storefronts allows you to subscribe to automatic order notifications via webhooks. You can set up a webhook within the Site Manager of your ASF Website, in the Integrations section.

There, you will want to enter in the URL that you would like the notifications to be sent to. Once you do this, upon receiving your next order, you will receive a notification with JSON data to the specified URL.

It is important to note that you will receive webhooks for orders created within that specific website only. If you are an ASF Fulfillment Vendor, you will receive those orders as well and there is nothing else you will need to do. However, if you have ASF "Controlled" Websites (formerly known as "child websites"), you will need to enter go to the Integrations section for each of those individual websites, and enter in the desired webhook URL.

The JSON data that you receive in a webhook will exactly replicate the JSON file that you are currently able to download in the Orders section, when exporting orders as JSON. If you would like to see the most recent example of the JSON data that you can expect to receive, please go export a file as JSON within the Orders section of your site manager.

If you want to learn how to receive order callbacks via the ASF API, please follow the directions below.

  1. Log in to your Art Storefronts Control Panel and in the Jump To Menu, click on the option labeled Integrations. This will take us to the section where we can the necessary webhooks.

    1.png

  2. You’ll be taken to a new page with two options. You will need to find the option labeled Webhooks and click on that tab. This is going to allow us to get to the page where we can implement the webhooks created by our respective developers.

    2.png

  3. Once you’re on the new tab, there’s a box that says Webhook URL. This is the box where you will need to enter the webhook that was created by your developers.

    Please Note: Art Storefronts will not assist you in creating this webhook. We are only here to provide you with the API. Anything further than showing you where to enter in the webhook falls outside of the scope of support offered by our Technical Support department. If you have issues we will IMMEDIATELY refer you back to your web developer.

    3.png

  4. After you’ve entered the Webhook into the box you need to be sure that you click on the button labeled Save. DO NOT CLICK THE BACK BUTTON. If you click anything other than Save, all your work will be lost.

    4.png

  5. After you click Save, the webhook will be added to the page. You’ll see an item labeled Show Failed. This section will show you anything that was returned as failed. This information will be something for you to provide to your web developers.

    Please Note: ASF will not help you decipher these items. This falls outside of the scope of support.

    5.png

  6. Edit is the next button you will see. You can click on this if you need to make changes to your Webhook.

    6.png

  7. Delete is the final button on the page. If you need to delete a specific webhook, this is what you will want to click on.

    7.png

  8. From here, you will want to check and make sure that your webhooks are functioning on order. In the Jump To Menu, select the option labeled Orders.

    8.png

  9. You’ll be taken to the Orders page where you will need to click on the order number of the Order you want to look at. We’ll be using the order 1002.

    9.png

  10. You’re going to be taken to the Order page proper. You need to scroll down to the section labeled API Events. This is where information about the callback is going to be listed. The first item is Sent At. This will tell you when the callback was sent.

    10.png

  11. The second item is Result. This is going to show a number. Generally, these numbers are errors that will enlighten you as to whether or not the webhook failed. You’ll need to discuss these with your web developer.

    11.png

  12. Success is the next section. This will simply tell you whether or not the callback worked properly. It will say either True or False.

    12.png

  13. Callback URL will show you the webhook you created and implemented.

    13.png

  14. The last section is labeled Payload and there is a button labeled View. You will need to click on this button if you wish to review the Payload.

    14.png

  15. The Payload will pop up in a new window and provide everything that you need. If there is something missing, please e-mail cs@artstorefronts.com and they can put in a request to have items added if they are necessary and makes sense.

    15.png

  16. If you would like more information about this or more specific and detailed information you can reference the following links. This information is specifically for developers to reference in making sure the API functions appropriately and everything runs smoothly.
    Art Storefronts API Information
    Art Storefronts API Document

Did this answer your question?