JonBlog
Thoughts on website ideas, PHP and other tech topics, plus going car-free
Using the Fotolia Business API with a subscription
Categories: Tech misc

I’ve been working with the Fotolia Business API recently to integrate stock image purchasing into a web application, and by-and-large it does what it says on the tin. However I’ve found the documentation to be somewhat lacking, and it’s not made any easier given that new messages to the (rather quiet) discussion group must wait for manual approval. Last week I ran into a roadblock when purchasing image licenses via a subscription rather than with credits – I got an ‘Insufficent Credit Value’ error when calling getMedia (and I’m not the only one who’s run into this problem).

Firstly, one must be approved to access a subscription via the API, presumably since images of all resolutions become the same price (of one download). Also, the license type name (S, M, L etc) must be prefixed with the string “Subscription_Monthly_” (or “Subscription_” for a daily subscription) – neither of which appear to be documented. Also, image license types ‘XS’, ‘X’ and ‘XV’ cannot be purchased against a subscription, and so should be filtered out of any choice offered to end users (and as far as I can tell there is no API call to list just subscription-compatible licenses).

Update 16 Apr

Also undocumented (afaict) are the error codes for some API exceptions. Here are two I’ve discovered:

  • “Insufficent Credit Value” (3000) – not enough credit to purchase an image. Occurs also when (incorrectly) trying to buy a credit-priced license rather than a subscription-priced one. I believe this error is associated with having a monthly subscription.
  • “Not enough download slots left” (3099) – the same as above, but for a daily subscription.

 

Leave a Reply