Whenever i hit the lulu URL via PHP cURL i'm getting error, here is few for your reference
[error_value] => Books must have a positive page count set for pricing.
[error_type] => LApiInvalidArgumentsException
this error raised when i hit the URL : https://apps.lulu.com/api/publish/v1/base_cost
i have given the inputs like this
$url = 'https://apps.lulu.com/api/publish/v1/base_cost';
$ch1 = curl_init();
curl_setopt($ch1, CURLOPT_URL, $url);
$data = "api_key=" . urlencode($api_key) .
"&auth_user=" . urlencode($auth_user) .
"&auth_token=" . urlencode($auth_token) .
"&project=" . urlencode(json_encode($project_json)) .
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch1, CURLOPT_POST, true);
curl_setopt($ch1, CURLOPT_VERBOSE, true);
curl_setopt($ch1, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch1, CURLOPT_POSTFIELDS, $data);
I feel better if you provide me the API in PHP via cURL that would be fast and easy to use LULU API.
Message edited by Raja 3 years ago
3 years ago
I looked into this and it points out an error in our documentation: pageCount should actually be page_count. Try changing the last part of your $data string to
"&page_count=" . $pageCount;
And see if that works for you.
I've updated the documentation accordingly.
3 years ago
Yes, it worked for me. Thanks for your response
Please sign in to add a post.