This shows you the differences between two versions of the page.
developers:api:package [2014/10/16 13:07] Jaco van Wyk created |
developers:api:package [2014/10/18 07:49] (current) Jaco van Wyk |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Packages ====== | ====== Packages ====== | ||
+ | ===== /v1/package/id/get ===== | ||
+ | |||
+ | Retrieve a package by id and return it's details. | ||
+ | |||
+ | ==== Parameter listing ==== | ||
+ | |||
+ | ^Name ^Availability ^Description^ | ||
+ | |depth |get |The depth parameter signals the amount of data for the package that was provided. depth=0 is the highest level that provides full detail.| | ||
+ | |name |get |The name of the package. This is used as the reference and must be unique over a given account for a specific service type and currency.| | ||
+ | |setup |get |The setup fee of the package as a string in the currency of the package.| | ||
+ | |setup_cents |get |An integer value of the setup fee in cents.| | ||
+ | |terms |get |An array of the different available terms for the package| | ||
+ | |↳ type |get |The type of term. Only option at the moment is "daymonth".| | ||
+ | |↳ day |get |The day at which the package is due. Always '1' at the moment.| | ||
+ | |↳ interval |get |The number of months between renewals of the package. Monthly renewals will be set to 1, quarterly is 3, annually 12, ...| | ||
+ | |↳ description |get |A neat description explaining the terms recurrence (Monthly / Two months / Annual / ...)| | ||
+ | |↳ fee |get |The recurring fee for the package as a string.| | ||
+ | |↳ fee_cents |get |An integer value of the fee measured in cents.| | ||
+ | |currency |get |A currency object for the package.| | ||
+ | |service_type |get |A service type that the package belongs to.| | ||
+ | |available |get |A boolean value indicating if the package is available on the signup form or not.| | ||
+ | |state |get |The state the package is in. Usually "active" but will be set to "dead" if it is removed.| | ||
+ | |||
+ | ===== /v1/package/list ===== | ||
+ | |||
+ | List all the packages of all the clients of this account. | ||
+ | |||
+ | Results can optionally be filtered by the filters listed below. | ||
+ | |||
+ | <code php> | ||
+ | $ curl -u user:pass -d "service_type_id=596" \ | ||
+ | > https://api.snapbill.com/v1/package/list.json | ||
+ | </code> | ||
+ | |||
+ | <source examples/package.txt-1.json> | ||
+ | |||
+ | ==== List Packages Filters ==== | ||
+ | |||
+ | ^Name ^Availability ^Description^ | ||
+ | |service_type |get |The service type of the packages.| | ||
+ | |name |get |The name of the packages.| | ||
+ | |page |get |The page of results to return.| | ||
+ | |perpage |get |The number of results per page to return.| |