account_purchases


Handles Upgrades/Purchases to accounts and associated domains.


Available HTTP and Response Types
DELETE GET PUT | JSON

4 Methods


  • DELETE
    https://api.pagely.com/ v1 / account_purchases /single

    Available To Reseller Account

    Description

    Removes the upgrade and cancels whatever the product was doing, IE: disables CDN.

    Sample Response


      Required Params

      id int purchase id
  • GET
    https://api.pagely.com/ v1 / account_purchases /single

    Available To Reseller Account

    Description

    curl -H “X-API-KEY:<key>” https://api.pagely.com/v1/account_purchases/single?id=1234

    Sample Response

    {"id":"1234","status":"2","active":"1","recurring":"0","account_id":"1111","domain_id":"2222","product_id":"1","profile_id":"0","title":"FTP Access","desc":"FTP Access","type":"default","amount":"0.00","date_paid":"0","bill_dayofmonth":"1","date_last_invoiced":"1345337696","date_added":"1345337694","date_updated":"1345337696","uid":"nIFHYRys0u9WJGuYSjnf6hADhVwXhNJN2TNSvYXK"}

  • GET
    https://api.pagely.com/ v1 / account_purchases /all

    Available To Reseller Account

    Description

    Get all purchases made by an account.

    curl -H “X-API-KEY:<key>” https://api.pagely.com/v1/accoupurchases/all?account_id=1234

    Sample Response

    {"result":2,"count":1,"limit":25,"offset":0,"objects":[{"id":"111","status":"2","active":"1","recurring":"0","account_id":"1234","domain_id":"4321","product_id":"1","profile_id":"0","title":"FTP Access","desc":"FTP Access","type":"default","amount":"0.00","date_paid":"0","bill_dayofmonth":"1","date_last_invoiced":"1345337696","date_added":"1345337694","date_updated":"1345337696","uid":"nIFHYRys0u9WJGuYSjnf6hADhVwXhNJN2TNSvYXK"}]}

      Required Params

      account_id int
      post new_1423092364 bool

      Optional Params

      domain_id int all purchases must be associated with a domain
      inc_product bool include product in result
      limit int 25
      offset int 0
      order_by string id
      order_dir string DESC
      reseller_id int set by API-KEY
      s string search string
  • PUT
    https://api.pagely.com/ v1 / account_purchases /single

    Available To Reseller Account

    Description

    Create a new purchase/upgrade for a client. This call is made for each item in a cart. Example; if the user has 3 items in the cart, we would call 3 times with a unique product id.

    Sample Response


      Required Params

      account_id int
      domain_id int
      product_id int

      Optional Params

      profile_id int billing profile to use for payment