This shows you the differences between two versions of the page.
developers:api:signup [2014/10/16 13:10] Jaco van Wyk created |
developers:api:signup [2014/10/18 12:23] (current) Jaco van Wyk |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Signups ====== | ====== Signups ====== | ||
+ | |||
+ | The signup object gives you a level of control over signups that are completed, as well as ones in progress. | ||
+ | |||
+ | ===== Creating signups ===== | ||
+ | |||
+ | The ability to create signups that at a certain step of the process is a very powerful tool of the api. We do allow you to jump straight to certain points which is fully described by our [[developers:signups_and_payments:signup]] forms article. | ||
+ | |||
+ | Instead of passing all the information through on a GET request, or if you want to link to a signup for a client logged in we do have API requests that will create the signup. | ||
+ | |||
+ | ===== /v1/client/id/add_signup ===== | ||
+ | |||
+ | This api call will create a signup. Once created just redirect the client to url.signup that is returned by the call. This example automatically selects a service type, package and term for the client. | ||
+ | |||
+ | <code php> | ||
+ | $ curl -u user:pass -d 'options={"service_type":"Sample Service","service-package":"Small","service-term":1}' | ||
+ | > https://api.snapbill.com/v1/client/158958/add_signup.json | ||
+ | </code> | ||
+ | |||
+ | <source examples/signup.txt-1.json> | ||
+ | |||
+ | ===== /v1/signup/add ===== | ||
+ | |||
+ | This api creates a signup for an invoice. Full details about invoice signups are available in our Signup forms article. | ||
+ | |||
+ | <code php> | ||
+ | $ curl -u user:pass -d 'options={"signup_type":"Invoice","description[0]":"Cheese","price[0]":500}' | ||
+ | > https://api.snapbill.com/v1/signup/add.json | ||
+ | </code> | ||
+ | |||
+ | <source examples/signup.txt-2.json> | ||
+ | |||
+ | ==== Parameter listing ==== | ||
+ | |||
+ | ^Name ^Availability ^Description^ | ||
+ | |depth |get |The depth parameter signals the amount of data for the signup that was provided. depth=0 is the highest level that provides full detail.| | ||
+ | |id |get |The id of the signup in the system. This is guaranteed to be unique only over a single account.| | ||
+ | |xid |get |The xid of the signup in the system. This is guaranteed to be unique over all accounts (see General - Xid)| | ||