Forums/Community/Community Support

Answered

Getting "Unprocessable Entity" on any Post Request

John Wolf
asked this on May 31, 2011 04:47 pm

 

I am just getting started with the Chargify API.  I am able to make Get requests successfully but I get the following error on any Post request.  I read the forums and changed my account to be in "Test" mode since I read that your site and gateway need to be in the same mode; however, I still cannot make this work.

I tried one of the simplest posts that I could find (below), without succcess.  Any help will be much appreciated.  Thanks.

 

> URI:

https://feedbackfire.chargify.com/product_families/targets/quantity...

> Parameters

"Content-Type", "application/x-www-form-urlencoded"

> Request

<?xml version="1.0" encoding="UTF-8"?>
        <quantity_based_component>
          <name>Swizzles</name>
          <unit_name>targets</unit_name>
          <pricing_scheme>pertarget</pricing_scheme>
          <unit_price>1.00</unit_price>
        </quantity_based_component>

 

>  Response (from Apigee):

 

HTTP/1.1 422 Unprocessable Entity

Status:
422
Content-Length:
1
Set-Cookie:
_chargify_session=BAh7CDoQX2NzcmZfdG9rZW4iMWliN1JYUW9SMmx0MG9HaDNZVjVVclRjd0FQVCt2d0FlSWRmUkQ2eTNOS2c9Og9zZXNzaW9uX2lkIiVlMDNmMjJmOTcyZGY5NDk1Y2IzZWQ3ZTUyZWU3YzI0NToOcmV0dXJuX3RvIhcvc3Vic2NyaXB0aW9ucy54bWw%3D--56114aef53678ebe847071e84831cfec3a3155dc; domain=.chargify.com; path=/; secure; HttpOnly
Content-Type:
application/xml; charset=utf-8
Connection:
keep-alive
X-Powered-By:
Phusion Passenger (mod_rails/mod_rack) 2.2.15
Server:
nginx/0.7.66 + Phusion Passenger 2.2.15 (mod_rails/mod_rack)
Cache-Control:
no-cache