New orders from WooCommerce to API

I have a WooC store where I sell print-on-demand products. When a new order comes in, I would need to send all order data to the print company’s (supplier) API, se they can produce and ship the products on-demand, according to provided order data, automatically.

The suppliers API documentation is very good and they have a clear JSON example order to help with formatting. Also I undestand and know the data that WooCommerce gives of each order at checkout. However, I dont have the understanding to write custom JS that would send a POST request to the API and I’m thinking of Parabola as an easier way to accomplish this.

Has anyone done anything similar? Is there a way to get this to work with Parabola? Where would be a good place to start?

Couldnt get too far even after some tutorials and training and I might need an extra hand. :slight_smile:

Hi @Samuel,

Sounds like a good use case for Parabola! What is the name of the service or API you’re sending your WooCommerce data to?

Formatting your JSON data isn’t too tricky once you know what to look for. Check out our how to guide to get started on working with APIs in Parabola.

If you can share a link to the API documentation you’re referencing, I can help get you pointed in the right direction!

1 Like

Hey @daniel , thanks for your reply! :sunglasses:

The provider’s API documentation can be found here.

Also, thanks for the link! I’ll start digging and learning. :sunglasses:

Thanks for sending that! Follow these steps to start sending data to the Printmotor API.

  1. Generate a Service Key in Printmotor. If you’ve signed up previously, you should have one already.
  2. In Parabola, drag the “Send to an API” step on the canvas.
  3. Click on the step and scroll down to Request Headers. Add X-Printmotor-Service as your header key. Enter your Service Key as your header value.

  1. Head back to the Printmotor documentation and scroll down to the Authorisation section.
  2. You’ll need to generate an Authorization Header by entering your username and password into the form fields.
  3. Once generated, head back to Parabola and select Username and Password as your Authentication Type. Add your Authorization Header as your Username. You can leave the Password blank.

Next, we’ll need to configure the request itself.

  1. At the top of the step, select POST as your Request Method.
  2. Enter the following URL into the API Endpoint URL:

Lastly, we’ll need to construct the JSON to send to the API.

"orderer" : {
  "firstName": "{First Name Column}",
  "lastName": "{Last Name Column}",
  "emailAddress": "{Email Column}",
  "phone": "{Phone Column}"

To dynamically reference the column values in your Parabola data, wrap the column names in {curly brackets}.

Copy and paste this snippet below for a preconfigured API step. All you need to do is swap out the values for your store.