Contacts

List a shop’s contacts (customers).

{
  "_links": {
    "btc:contacts": {
      "href": "https://api.bootic.net/v1/...{?page,q,created_on_gte...}",
      "templated": true
    }
  }
}

HTTP GET

$ curl -X GET -H "Authorization: Bearer xxxx" -i https://api.bootic.net/v1/shops/123/contacts.json
Status: 200 OK
Content-Type: application/json; charset=utf-8
Connection: keep-alive
ETag: "0728e2965bd03e20a7f1c33add2f8775"
Last-Modified: Fri, 20 Jun 2014 22:34:14 GMT
Cache-Control: must-revalidate, private, max-age=0
Date: Wed, 31 Jul 2013 21:11:52 GMT
X-OAuth-Scopes: public
{
  "_links": {
    "curies": [
      {
        "name": "btc",
        "href": "https://developers.bootic.net/rels/{rel}",
        "templated": true
      }
    ],
    "btc:shop": {
      "href": "https://api.bootic.net/v1/shops/123",
      "title": "Shop for these contacts"
    },
    "self": {
      "href": "https://api.bootic.net/v1/shops/123/contacts.json?page=1"
    },
    "next": {
      "href": "https://api.bootic.net/v1/shops/123/contacts.json?page=2"
    },
    "last": {
      "href": "https://api.bootic.net/v1/shops/123/contacts.json?page=290"
    }
  },
  "total_items": 14486,
  "per_page": 50,
  "page": 1,
  "_embedded": {
    "items": [

    ]
  }
}

The response is a results entity for a paginated list of items.

Contact entities

The items array within the _embedded block of the contact results is an array of summary contact entities.
A single contact entity looks like the following:

{
  "_class": [
    "contact"
  ],
  "id": 402766,
  "name": "Joe Bloggs",
  "email": "joe.bloggs@gmail.com",
  "phone_number": "1234567890",
  "company": "Acme",
  "opt_in": false,
  "created_on": "2016-10-26T21:00:29.000Z",
  "updated_on": "2016-10-26T21:00:29.000Z",
  "available_orders_count": 10
}

Query string filters

Parameter name description example default value allowed values
q Full text search “?q=Joe”    
page Page number “?page=1” 1  
per_page Products per page “?per_page=20” 50  
created_on_gte Created on, greater or equal “?created_on_gte=2013-12-22 12:00:00”    
created_on_lte Created on, less or equal “?created_on_lte=2013-12-22 23:59:59”    
updated_on_gte Updated on, greater or equal “?updated_on_gte=2014-01-01”    
updated_on_lte Updated on, less or equal “?updated_on_lte=2014-02-01”    
sort Sort column “?sort=name.asc” created_on.desc created_on.asc, created_on.desc, updated_on.asc, updated_on.desc, name.asc, name.desc