Our documentation has moved!

You are currently viewing a legacy version of our help articles.
For the most up-to-date version, please use the new Chargify Help & Support Site.
Follow

Allocations API

We recently introduced a new resource to the Chargify API: Allocations

What are Allocations?

Allocations describe a change to the allocated quantity for a particular Component (either Quantity-Based or On/Off) for a particular Subscription.

Working with this resource, you can:

  • List Allocations : View the history of the allocated quantity for the component over time
  • Create an Allocation : Set a new allocated quantity for the line-item (as an alternative to setting the allocated quantity directly on the Component Line-Item resource)

Example

Request:

curl -u :X https://<subdomain>.chargify.com/subscriptions/2585595/components/11960/allocations.json

Response:

[
  {
    "allocation":{
      "memo":"moving to 7",
      "timestamp":"2012-11-20T22:00:37Z",
      "quantity":7,
      "component_id":11960,
      "subscription_id":2585595
    }
  },
  {
    "allocation":{
      "memo":null,
      "timestamp":"2012-11-20T21:48:09Z",
      "quantity":3,
      "component_id":11960,
      "subscription_id":2585595
    }
  }
]

Full Documentation: http://docs.chargify.com/api-allocations

Enjoy!

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

2 Comments

  • 0
    Avatar
    Matt Johnston

    you should fix those .dev links on the bulleted list. 

  • 0
    Avatar
    Michael Klett

    @Matt: fixed, thanks!

Please sign in to leave a comment.
Powered by Zendesk