Table of Contents

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 Signup forms 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.

    $ 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

File: examples/signup.txt-1.json -

    {
      "code": 200,
      "type": "item",
      "class": "signup",
      "signup": {
        "depth": 0,
        "id": 41051,
        "xid": "Clw:KBb",
        "created": "2014-08-22 09:58:12",
        "step": "service",
        "options": {
          "service_type": "Sample Service",
          "service-package": "Small",
          "service-term": 1
        },
        "errors": [],
        "urls": {
          "signup": "https://demo.snapbill.com/signup/Clw:KBb/=OTJhZjllZWM2"
        }
      }
    }

/v1/signup/add

This api creates a signup for an invoice. Full details about invoice signups are available in our Signup forms article.

    $ curl -u user:pass -d 'options={"signup_type":"Invoice","description[0]":"Cheese","price[0]":500}'
    >      https://api.snapbill.com/v1/signup/add.json

File: examples/signup.txt-2.json -

    {
      "code": 200,
      "type": "item",
      "class": "signup",
      "signup": {
        "depth": 0,
        "id": 41052,
        "xid": "Clw:KBc",
        "created": "2014-08-22 09:58:18",
        "step": "customer",
        "options": {
          "signup_type": "Invoice",
          "description[0]": "Cheese",
          "price[0]": 500
        },
        "errors": [],
        "urls": {
          "signup": "https://demo.snapbill.com/signup/Clw:KBc/=MGRkNGY2MjRi"
        }
      }
    }

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)