API - Pull Book Details from ISBNdb into Shopify Store

Looking for information and support in updating Shopify book details with data coming from the ISBNdb API.

Hey @Daryl_Young :wave:

Feel free to paste this snippet into your Parabola builder: parabola:cb:1dd6d0f9d6bb488783bb69b7d32bc4d1

All you’ll need to do is paste in your API key and connect your data and the API connection will be ready to go.

As for the Shopify piece, which fields in Shopify are you hoping to update with book details? Unfortunately product updates are currently outside the scope of our “Send to Shopify” step, however we’re able to quickly configure this update using the “Send to API” step.

If you’re trying to edit the product description, you can use this snippet here: parabola:cb:abff6903bfc3497b823ff920b65410bf

For additional support configuring the Shopify API connection (including accessing your API key), feel free to reference this documentation.

Let us know how this approach works out, or if you have any other questions.

Thanks Adam, this has gotten me further than I’ve been. I’m getting the below error…how should I mitigate?

Given your Max Requests per minute limit and the number of rows, your step will take longer than 60 minutes to run. Please adjust your settings or pass in less data.

Daryl Young

I used a spreadsheet that only had 3 items listed to check the functionality and received the following error:

{
“message”: “User is not authorized to access this resource with an explicit deny”
}

{
“headers”: {
“Authorization”: "Bearer ",
“Content-Type”: “application/json”,
“User-Agent”: “insomnia/5.12.4”
},
“method”: “GET”,
“url”: “https://api2.isbndb.com/book/9781499200010”
}

No problem Daryl!

Which subscription plan are you currently on? If you’re a Premium or Pro subscriber, I recommend reviewing their API docs to update your API Endpoint.

If you’re a Premium subscriber, you can increase the “Requests per minute” under the “Rate Limiting” section to 180; if you’re on Pro, you can increase it to 300. If not on one of these plans, 60 is the allowed maximum.

Since ISBNDB has a default limit of 1 request per second across all endpoints, if you’re not on one of the mentioned plans, the maximum number of records that you’ll be able to pull in in 1 flow run is 3600 (60 minutes * 60 requests per minute). (Note: flows time out after 60 minutes, so you cannot configure a flow that runs for over 60 minutes). Realistically, since other steps need time to calculate as well, the true number is actually a bit lower than 3600.

To reduce the amount of rows being sent to the API, you can use the “Limit Rows” step and do some guess-and-check to see how many rows you can enrich in 1 flow run. Keep in mind you also need to send data to Shopify’s API, which will also take time.

Another approach is to first use the “Insert Row Numbers” step, then use a filter step to work through your records. For instance, first keep rows where the row number is less than 3k, then on the second flow run keep rows between 3k-6k, etc. If you’re able to share how many rows you’re working with, I can try to be a bit more specific here.

As for the authorization error, I recommend pasting your API key in the “Request Header” section under “Authorization”. Based on your current request body, it looks like you did not include the API key.

Hope this helps!

Thanks Adam,

I removed the “Authorization” from my response since it was being posted in the forum. I’ve reached out to ISBNdb to see if they can provide a solution. Fingers crossed, as this is the platform I prefer to use.

Daryl

Ah I see, good call on your end! Based on the “Bearer” part of the JSON, it looks like you’ve selected “Bearer Token” under the “Authentication” section?

If that’s the case, can you please try changing Auth to “None”? As long as the token is in the header, then we should be good to go.

After this change, the enrich with API step should work properly. If you receive a 404 error (meaning they could not find one of your specific ISBNs), try adding a filter step before the API step, removing rows where ISBN is equal to the ISBN that caused the error.

Adam,

I tried some different ISBNs and it worked! I’m going to try the filter step to get that working.

Quick question, I noticed that the subjects aren’t listed. Is there another query that I need to do to pull the subject in?

Daryl

Glad to hear it Daryl!

Based on the example response from the API docs for the the endpoint you’re targeting, it does seem like subject info is included:

Example Response
{
  "title": "string",
  "title_long": "string",
  "isbn": "string",
  "isbn13": "string",
  "dewey_decimal": "string",
  "binding": "string",
  "publisher": "string",
  "language": "string",
  "date_published": "2021-08-26T22:14:42.089Z",
  "edition": "string",
  "pages": 0,
  "dimensions": "string",
  "overview": "string",
  "image": "string",
  "msrp": 0,
  "excerpt": "string",
  "synopsys": "string",
  "authors": [
    "string"
  ],
  "subjects": [
    "string"
  ],
  "reviews": [
    "string"
  ],
  "prices": [
    {
      "condition": "string",
      "merchant": "string",
      "merchant_logo": "string",
      "merchant_logo_offset": {
        "x": "string",
        "y": "string"
      },
      "shipping": "string",
      "price": "string",
      "total": "string",
      "link": "string"
    }
  ],
  "related": {
    "type": "string"
  }
}

It’s possible that this information is not available for the ISBNs that you’ve so far looked up, so I’d be curious to see if trying additional ISBNs resolves the issue here. This does seem like the best endpoint for fetching subject info for a specific ISBN.

Thanks Adam, I’ll run another test this evening. Thanks for everything!!!

Daryl

1 Like