Notes:
- replace {flock} with the client identifier
- 200 = OK
- 201 = create
- 4xx = Client screwed up
- 404 = not found (also returned on bad user credentials)
- 409 = conflict (auth and structure ok but a problem with the data values)
- 5xx = Sheep screwed up
$url = 'https://api.sheepcrm.com/api/v1/sheep-app/user/auth/'; | |
$flock = 'example'; | |
$sheep_token_name = 'my_third_party_app'; | |
$post_data['email'] = $email; | |
$post_data['password'] = $password; | |
$post_data['token_name'] = $sheep_token_name; | |
$post_data['token_timeout'] = 43200; | |
$post_data['secure_hash'] = time(); |
$payload = json_encode($packet); | |
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); | |
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); | |
// Set URL on which you want to post the Form and/or data | |
curl_setopt($ch, CURLOPT_URL, $url); | |
// Header fields | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array( | |
'Content-type: application/json', |
{u'_links': [], | |
u'billing_address': {u'address1': u'', | |
u'address2': u'', | |
u'city': u'', | |
u'company': u'', | |
u'country': u'', | |
u'country_code': u'', | |
u'latitude': 0, | |
u'longitude': 0, | |
u'name': u'', |
Notes:
GET
the -d
switch is an http POST
--- | |
layout: sermon | |
series: "Book of 1Timothy" | |
title: "Challenging with Grace." | |
date: "2014-05-11 11:00:00" | |
audio: "/documents/2014-05-11 Rich White.mp3" | |
speaker: "Rich White" | |
speaker_info: "" | |
duration: "23" | |
youtube_videos: [""] |