Formaloo API Documentation v1.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Welcome to the Formaloo API! You can use our API to access Formaloo API endpoints, to integrate your app with Formaloo CDP and get useful insights on your customers.
We have language bindings in Shell, Ruby, Python, PHP, Java, Go, NodeJS and JavaScript! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.
We really appreciate your feedback on the Formaloo API and the Documentation. Get in touch using the contact details provided.
Some useful links: - OAuth2 - OAuth2
Base URLs:
Email: Support
Web: Support
Getting Started
- Go to your CDP Dashboard and create a Connection to get your
API_KEY
andAPI_SECRET
. - Use your keys to connect to the api.
API Key
must be included in all requests to the api. Also you need to authorize your app using one ofAuthorization Code
orClient Credentials
flow.- Standard OAuth2 flow is used to secure the endpoints Read More
- WARNING! client-side apps should only use
authorization code
flow.
- Get your
business slug
via api using Get Businesses endpoint.- NOTE: Business slugs do not change, so your can run this as a one time api call outside of your app and just as a preparation step to setup your main app integration, and include it in almost all your subsequent api calls as a query param. (All query params are shown in the endpoint request params, where needed.)
- Use formaloo pre-defined "action types" or create your own using action types api to register user/system activities in the CDP.
- Enjoy your formaloo integration!
Response Codes
The Formaloo API uses the following response codes:
Status Code | Meaning |
---|---|
200 | OK -- Your request is successful. |
201 | Created -- Your request is successful and a resource is created. |
400 | Bad Request -- Your request is invalid. |
401 | Unauthorized -- Your API key is wrong. |
403 | Forbidden -- The kitten requested is hidden for administrators only. |
404 | Not Found -- The specified kitten could not be found. |
405 | Method Not Allowed -- You tried to access a kitten with an invalid method. |
429 | Too Many Requests -- You're requesting too many kittens! Slow down! |
500 | Internal Server Error -- We had a problem with our server. Try again later. |
503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |
Authentication/Authorization
oAuth2
- Flow: authorizationCode
- Authorization URL = https://accounts.formaloo.com/profiles/login
- Token URL = https://api.formaloo.com/v1.0/oauth/authorize
- Flow: clientCredentials
- Token URL = https://api.formaloo.com/v1.0/oauth/authorize
- Flow: authorizationCode
API Key (ApiKey)
- Parameter Name: x-api-key, in: header.
Action Type Groups
Get Action Type Group List
Code samples
curl --request GET \
--url 'https://api.formaloo.com/v1.0/action-type-groups/?active_business=string' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'x-api-key: API_KEY'
fetch("https://api.formaloo.com/v1.0/action-type-groups/?active_business=string", {
"method": "GET",
"headers": {
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.formaloo.com/v1.0/action-type-groups/',
qs: {active_business: 'string'},
headers: {
Accept: 'application/json',
'x-api-key': 'API_KEY',
Authorization: 'Bearer {access-token}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
headers = {
'Accept': "application/json",
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("GET", "/v1.0/action-type-groups/?active_business=string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/action-type-groups/?active_business=string"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "application/json")
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://api.formaloo.com/v1.0/action-type-groups/');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'active_business' => 'string'
]));
$request->setHeaders([
'Accept' => 'application/json',
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/action-type-groups/?active_business=string")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://api.formaloo.com/v1.0/action-type-groups/?active_business=string")
.header("Accept", "application/json")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.asString();
import Foundation
let headers = [
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/action-type-groups/?active_business=string")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET /action-type-groups/
Use this endpoint to get a list of all action type groups, if you want to create your action type based on one of them.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
active_business | query | string | true | Slug of the business we're performing the action on. |
page | query | integer | false | A page number within the paginated result set. |
search | query | string | false | A search query on the list items. |
x-api-key | header | string | true | The application secret provided to the client. |
Example responses
200 Response
{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"page_size": 10,
"page_count": 13,
"current_page": 3,
"action_type_groups": [
{
"title": "string",
"description": "string",
"default_text_template": {
"property1": null,
"property2": null
},
"slug": "string"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | PaginatedActionTypeGroupList |
Action Types
Get Action Type List
Code samples
curl --request GET \
--url 'https://api.formaloo.com/v1.0/action-types/?active_business=string' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'x-api-key: API_KEY'
fetch("https://api.formaloo.com/v1.0/action-types/?active_business=string", {
"method": "GET",
"headers": {
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.formaloo.com/v1.0/action-types/',
qs: {active_business: 'string'},
headers: {
Accept: 'application/json',
'x-api-key': 'API_KEY',
Authorization: 'Bearer {access-token}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
headers = {
'Accept': "application/json",
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("GET", "/v1.0/action-types/?active_business=string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/action-types/?active_business=string"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "application/json")
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://api.formaloo.com/v1.0/action-types/');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'active_business' => 'string'
]));
$request->setHeaders([
'Accept' => 'application/json',
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/action-types/?active_business=string")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://api.formaloo.com/v1.0/action-types/?active_business=string")
.header("Accept", "application/json")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.asString();
import Foundation
let headers = [
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/action-types/?active_business=string")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET /action-types/
Use this endpoint to get a list of all action types defined on your integration, or the integrations you're using.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
active_business | query | string | true | Slug of the business we're performing the action on. |
page | query | integer | false | A page number within the paginated result set. |
search | query | string | false | A search query on the list items. |
x-api-key | header | string | true | The application secret provided to the client. |
Example responses
200 Response
{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"page_size": 10,
"page_count": 13,
"current_page": 3,
"action_types": [
{
"title": "string",
"description": "string",
"integration": {
"title": "string",
"description": "string",
"slug": "string",
"website": "http://example.com"
},
"tags": [
{
"title": "string",
"description": "string",
"slug": "string"
}
],
"slug": "string",
"is_owned": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"default_operation_type": "create",
"activity_text_template": {
"property1": null,
"property2": null
},
"action_score": -2147483648,
"group": {
"title": "string",
"description": "string",
"default_text_template": {
"property1": null,
"property2": null
},
"slug": "string"
}
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | PaginatedActionTypeList |
Create Action Type
Code samples
curl --request POST \
--url 'https://api.formaloo.com/v1.0/action-types/?active_business=string' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--header 'x-api-key: API_KEY' \
--data '{"title":"string","description":"string","default_operation_type":"create","activity_text_template":{"property1":null,"property2":null},"action_score":-2147483648}'
fetch("https://api.formaloo.com/v1.0/action-types/?active_business=string", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
},
"body": "{\"title\":\"string\",\"description\":\"string\",\"default_operation_type\":\"create\",\"activity_text_template\":{\"property1\":null,\"property2\":null},\"action_score\":-2147483648}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'POST',
url: 'https://api.formaloo.com/v1.0/action-types/',
qs: {active_business: 'string'},
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
'x-api-key': 'API_KEY',
Authorization: 'Bearer {access-token}'
},
body: {
title: 'string',
description: 'string',
default_operation_type: 'create',
activity_text_template: {property1: null, property2: null},
action_score: -2147483648
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
payload = "{\"title\":\"string\",\"description\":\"string\",\"default_operation_type\":\"create\",\"activity_text_template\":{\"property1\":null,\"property2\":null},\"action_score\":-2147483648}"
headers = {
'Content-Type': "application/json",
'Accept': "application/json",
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("POST", "/v1.0/action-types/?active_business=string", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/action-types/?active_business=string"
payload := strings.NewReader("{\"title\":\"string\",\"description\":\"string\",\"default_operation_type\":\"create\",\"activity_text_template\":{\"property1\":null,\"property2\":null},\"action_score\":-2147483648}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$body = new http\Message\Body;
$body->append('{"title":"string","description":"string","default_operation_type":"create","activity_text_template":{"property1":null,"property2":null},"action_score":-2147483648}');
$request->setRequestUrl('https://api.formaloo.com/v1.0/action-types/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'active_business' => 'string'
]));
$request->setHeaders([
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/action-types/?active_business=string")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
request.body = "{\"title\":\"string\",\"description\":\"string\",\"default_operation_type\":\"create\",\"activity_text_template\":{\"property1\":null,\"property2\":null},\"action_score\":-2147483648}"
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.post("https://api.formaloo.com/v1.0/action-types/?active_business=string")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.body("{\"title\":\"string\",\"description\":\"string\",\"default_operation_type\":\"create\",\"activity_text_template\":{\"property1\":null,\"property2\":null},\"action_score\":-2147483648}")
.asString();
import Foundation
let headers = [
"Content-Type": "application/json",
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let parameters = [
"title": "string",
"description": "string",
"default_operation_type": "create",
"activity_text_template": [
"property1": ,
"property2":
],
"action_score": -2147483648
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/action-types/?active_business=string")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST /action-types/
Use this endpoint to create a custom action type on your integration, if you want to catch a desired activity (e.g. visiting a page).
Body parameter
{
"title": "string",
"description": "string",
"default_operation_type": "create",
"activity_text_template": {
"property1": null,
"property2": null
},
"action_score": -2147483648
}
title: string
description: string
default_operation_type: create
activity_text_template:
? property1
? property2
action_score: -2147483648
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
active_business | query | string | true | Slug of the business we're performing the action on. |
search | query | string | false | A search query on the list items. |
x-api-key | header | string | true | The application secret provided to the client. |
body | body | ActionType | true | none |
» title | body | string | true | action type's title. |
» description | body | string¦null | false | a short and optional desctiption on the nature of the action type. |
» integration | body | ShortIntegrationSerializer | true | none |
»» title | body | string | true | none |
»» description | body | string¦null | false | none |
»» slug | body | string¦null | false | none |
»» website | body | string(uri)¦null | false | none |
» tags | body | [Tag] | true | none |
»» title | body | string | true | tag's assigned or auto-generated title. |
»» description | body | string¦null | false | an optional description on the tag. |
»» slug | body | string | true | none |
» slug | body | string | true | none |
» is_owned | body | boolean | true | none |
» created_at | body | string(date-time) | true | none |
» updated_at | body | string(date-time) | true | none |
» default_operation_type | body | DefaultOperationTypeEnum | false | shows the default operation type for the activities with this action type. |
» activity_text_template | body | object | false | add a series of text templates for the activities with this action type. for example {"en": "An order with was the order code {order_code} was created."} |
»» additionalProperties | body | any | false | none |
» action_score | body | integer | false | how much score will a customer gain by performing a activity with this action type? (as defined by action type owner.) |
» group | body | ActionTypeGroup | true | none |
»» title | body | string | true | action type group's title. |
»» description | body | string¦null | false | a short and optional desctiption on the nature of the action type group. |
»» default_text_template | body | object | false | add a series of text templates for the activities in this group. for example {"en": "An order with was the order code {order_code} was created."} |
»»» additionalProperties | body | any | false | none |
»» slug | body | string¦null | false | none |
Enumerated Values
Parameter | Value |
---|---|
» default_operation_type | create |
» default_operation_type | read |
» default_operation_type | update |
» default_operation_type | delete |
» default_operation_type | undefined |
Example responses
200 Response
{
"title": "string",
"description": "string",
"integration": {
"title": "string",
"description": "string",
"slug": "string",
"website": "http://example.com"
},
"tags": [
{
"title": "string",
"description": "string",
"slug": "string"
}
],
"slug": "string",
"is_owned": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"default_operation_type": "create",
"activity_text_template": {
"property1": null,
"property2": null
},
"action_score": -2147483648,
"group": {
"title": "string",
"description": "string",
"default_text_template": {
"property1": null,
"property2": null
},
"slug": "string"
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | ActionType |
Get Action Type
Code samples
curl --request GET \
--url https://api.formaloo.com/v1.0/action-types/string/ \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'x-api-key: API_KEY'
fetch("https://api.formaloo.com/v1.0/action-types/string/", {
"method": "GET",
"headers": {
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.formaloo.com/v1.0/action-types/string/',
headers: {
Accept: 'application/json',
'x-api-key': 'API_KEY',
Authorization: 'Bearer {access-token}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
headers = {
'Accept': "application/json",
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("GET", "/v1.0/action-types/string/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/action-types/string/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "application/json")
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://api.formaloo.com/v1.0/action-types/string/');
$request->setRequestMethod('GET');
$request->setHeaders([
'Accept' => 'application/json',
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/action-types/string/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://api.formaloo.com/v1.0/action-types/string/")
.header("Accept", "application/json")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.asString();
import Foundation
let headers = [
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/action-types/string/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET /action-types/{slug}/
Get a specific action type with its data.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
slug | path | string | true | none |
x-api-key | header | string | true | The application secret provided to the client. |
Example responses
200 Response
{
"title": "string",
"description": "string",
"integration": {
"title": "string",
"description": "string",
"slug": "string",
"website": "http://example.com"
},
"tags": [
{
"title": "string",
"description": "string",
"slug": "string"
}
],
"slug": "string",
"is_owned": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"default_operation_type": "create",
"activity_text_template": {
"property1": null,
"property2": null
},
"action_score": -2147483648,
"group": {
"title": "string",
"description": "string",
"default_text_template": {
"property1": null,
"property2": null
},
"slug": "string"
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | ActionType |
Edit Action Type
Code samples
curl --request PATCH \
--url https://api.formaloo.com/v1.0/action-types/string/ \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--header 'x-api-key: API_KEY' \
--data '{"title":"string","description":"string","default_operation_type":"create","activity_text_template":{"property1":null,"property2":null},"action_score":-2147483648}'
fetch("https://api.formaloo.com/v1.0/action-types/string/", {
"method": "PATCH",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
},
"body": "{\"title\":\"string\",\"description\":\"string\",\"default_operation_type\":\"create\",\"activity_text_template\":{\"property1\":null,\"property2\":null},\"action_score\":-2147483648}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'PATCH',
url: 'https://api.formaloo.com/v1.0/action-types/string/',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
'x-api-key': 'API_KEY',
Authorization: 'Bearer {access-token}'
},
body: {
title: 'string',
description: 'string',
default_operation_type: 'create',
activity_text_template: {property1: null, property2: null},
action_score: -2147483648
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
payload = "{\"title\":\"string\",\"description\":\"string\",\"default_operation_type\":\"create\",\"activity_text_template\":{\"property1\":null,\"property2\":null},\"action_score\":-2147483648}"
headers = {
'Content-Type': "application/json",
'Accept': "application/json",
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("PATCH", "/v1.0/action-types/string/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/action-types/string/"
payload := strings.NewReader("{\"title\":\"string\",\"description\":\"string\",\"default_operation_type\":\"create\",\"activity_text_template\":{\"property1\":null,\"property2\":null},\"action_score\":-2147483648}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$body = new http\Message\Body;
$body->append('{"title":"string","description":"string","default_operation_type":"create","activity_text_template":{"property1":null,"property2":null},"action_score":-2147483648}');
$request->setRequestUrl('https://api.formaloo.com/v1.0/action-types/string/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/action-types/string/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
request.body = "{\"title\":\"string\",\"description\":\"string\",\"default_operation_type\":\"create\",\"activity_text_template\":{\"property1\":null,\"property2\":null},\"action_score\":-2147483648}"
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.patch("https://api.formaloo.com/v1.0/action-types/string/")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.body("{\"title\":\"string\",\"description\":\"string\",\"default_operation_type\":\"create\",\"activity_text_template\":{\"property1\":null,\"property2\":null},\"action_score\":-2147483648}")
.asString();
import Foundation
let headers = [
"Content-Type": "application/json",
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let parameters = [
"title": "string",
"description": "string",
"default_operation_type": "create",
"activity_text_template": [
"property1": ,
"property2":
],
"action_score": -2147483648
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/action-types/string/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH /action-types/{slug}/
Update an action type's data.
Body parameter
{
"title": "string",
"description": "string",
"default_operation_type": "create",
"activity_text_template": {
"property1": null,
"property2": null
},
"action_score": -2147483648
}
title: string
description: string
default_operation_type: create
activity_text_template:
? property1
? property2
action_score: -2147483648
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
slug | path | string | true | none |
x-api-key | header | string | true | The application secret provided to the client. |
body | body | PatchedActionType | false | none |
» title | body | string | false | action type's title. |
» description | body | string¦null | false | a short and optional desctiption on the nature of the action type. |
» integration | body | ShortIntegrationSerializer | false | none |
»» title | body | string | true | none |
»» description | body | string¦null | false | none |
»» slug | body | string¦null | false | none |
»» website | body | string(uri)¦null | false | none |
» tags | body | [Tag] | false | none |
»» title | body | string | true | tag's assigned or auto-generated title. |
»» description | body | string¦null | false | an optional description on the tag. |
»» slug | body | string | true | none |
» slug | body | string | false | none |
» is_owned | body | boolean | false | none |
» created_at | body | string(date-time) | false | none |
» updated_at | body | string(date-time) | false | none |
» default_operation_type | body | DefaultOperationTypeEnum | false | shows the default operation type for the activities with this action type. |
» activity_text_template | body | object | false | add a series of text templates for the activities with this action type. for example {"en": "An order with was the order code {order_code} was created."} |
»» additionalProperties | body | any | false | none |
» action_score | body | integer | false | how much score will a customer gain by performing a activity with this action type? (as defined by action type owner.) |
» group | body | ActionTypeGroup | false | none |
»» title | body | string | true | action type group's title. |
»» description | body | string¦null | false | a short and optional desctiption on the nature of the action type group. |
»» default_text_template | body | object | false | add a series of text templates for the activities in this group. for example {"en": "An order with was the order code {order_code} was created."} |
»»» additionalProperties | body | any | false | none |
»» slug | body | string¦null | false | none |
Enumerated Values
Parameter | Value |
---|---|
» default_operation_type | create |
» default_operation_type | read |
» default_operation_type | update |
» default_operation_type | delete |
» default_operation_type | undefined |
Example responses
200 Response
{
"title": "string",
"description": "string",
"integration": {
"title": "string",
"description": "string",
"slug": "string",
"website": "http://example.com"
},
"tags": [
{
"title": "string",
"description": "string",
"slug": "string"
}
],
"slug": "string",
"is_owned": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"default_operation_type": "create",
"activity_text_template": {
"property1": null,
"property2": null
},
"action_score": -2147483648,
"group": {
"title": "string",
"description": "string",
"default_text_template": {
"property1": null,
"property2": null
},
"slug": "string"
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | ActionType |
Delete Action Type
Code samples
curl --request DELETE \
--url https://api.formaloo.com/v1.0/action-types/string/ \
--header 'Authorization: Bearer {access-token}' \
--header 'x-api-key: API_KEY'
fetch("https://api.formaloo.com/v1.0/action-types/string/", {
"method": "DELETE",
"headers": {
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'DELETE',
url: 'https://api.formaloo.com/v1.0/action-types/string/',
headers: {'x-api-key': 'API_KEY', Authorization: 'Bearer {access-token}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
headers = {
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("DELETE", "/v1.0/action-types/string/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/action-types/string/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://api.formaloo.com/v1.0/action-types/string/');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/action-types/string/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.delete("https://api.formaloo.com/v1.0/action-types/string/")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.asString();
import Foundation
let headers = [
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/action-types/string/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE /action-types/{slug}/
Delete an action type.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
slug | path | string | true | none |
x-api-key | header | string | true | The application secret provided to the client. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No response body | None |
Activities
Get Activity List
Code samples
curl --request GET \
--url 'https://api.formaloo.com/v1.0/activities?active_business=string' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'x-api-key: API_KEY'
fetch("https://api.formaloo.com/v1.0/activities?active_business=string", {
"method": "GET",
"headers": {
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.formaloo.com/v1.0/activities',
qs: {active_business: 'string'},
headers: {
Accept: 'application/json',
'x-api-key': 'API_KEY',
Authorization: 'Bearer {access-token}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
headers = {
'Accept': "application/json",
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("GET", "/v1.0/activities?active_business=string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/activities?active_business=string"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "application/json")
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://api.formaloo.com/v1.0/activities');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'active_business' => 'string'
]));
$request->setHeaders([
'Accept' => 'application/json',
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/activities?active_business=string")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://api.formaloo.com/v1.0/activities?active_business=string")
.header("Accept", "application/json")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.asString();
import Foundation
let headers = [
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/activities?active_business=string")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET /activities
Use this endpoint to get a list of all activities created for the cuurent business using this integration.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
action_type | query | string | false | none |
active_business | query | string | true | Slug of the business we're performing the action on. |
activity_date | query | string(date) | false | Query over the date. |
created_at | query | string(date) | false | Query over the date. |
customer | query | string | false | none |
operation_type | query | string | false | Comma seperated list. |
page | query | integer | false | A page number within the paginated result set. |
search | query | string | false | A search query on the list items. |
x-api-key | header | string | true | The application secret provided to the client. |
Example responses
200 Response
{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"page_size": 10,
"page_count": 13,
"current_page": 3,
"activities": [
{
"action": {
"title": "string",
"description": "string",
"slug": "string"
},
"operation_type": "create",
"description": "string",
"activity_date": "2019-08-24T14:15:22Z",
"customer": {
"full_name": "string",
"email": "user@example.com",
"phone_number": "string",
"code": "f5d62b05-370e-48be-a755-8675ca146431",
"slug": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"score": 0,
"level": 0
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"slug": "string"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | PaginatedActivityListList |
Create Activity
Code samples
curl --request POST \
--url 'https://api.formaloo.com/v1.0/activities?active_business=string' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--header 'x-api-key: API_KEY' \
--data '{"action":{"title":"string","description":"string"},"operation_type":"create","activity_date":"2019-08-24T14:15:22Z","slug":"string"}'
fetch("https://api.formaloo.com/v1.0/activities?active_business=string", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
},
"body": "{\"action\":{\"title\":\"string\",\"description\":\"string\"},\"operation_type\":\"create\",\"activity_date\":\"2019-08-24T14:15:22Z\",\"slug\":\"string\"}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'POST',
url: 'https://api.formaloo.com/v1.0/activities',
qs: {active_business: 'string'},
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
'x-api-key': 'API_KEY',
Authorization: 'Bearer {access-token}'
},
body: {
action: {title: 'string', description: 'string'},
operation_type: 'create',
activity_date: '2019-08-24T14:15:22Z',
slug: 'string'
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
payload = "{\"action\":{\"title\":\"string\",\"description\":\"string\"},\"operation_type\":\"create\",\"activity_date\":\"2019-08-24T14:15:22Z\",\"slug\":\"string\"}"
headers = {
'Content-Type': "application/json",
'Accept': "application/json",
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("POST", "/v1.0/activities?active_business=string", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/activities?active_business=string"
payload := strings.NewReader("{\"action\":{\"title\":\"string\",\"description\":\"string\"},\"operation_type\":\"create\",\"activity_date\":\"2019-08-24T14:15:22Z\",\"slug\":\"string\"}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$body = new http\Message\Body;
$body->append('{"action":{"title":"string","description":"string"},"operation_type":"create","activity_date":"2019-08-24T14:15:22Z","slug":"string"}');
$request->setRequestUrl('https://api.formaloo.com/v1.0/activities');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'active_business' => 'string'
]));
$request->setHeaders([
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/activities?active_business=string")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
request.body = "{\"action\":{\"title\":\"string\",\"description\":\"string\"},\"operation_type\":\"create\",\"activity_date\":\"2019-08-24T14:15:22Z\",\"slug\":\"string\"}"
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.post("https://api.formaloo.com/v1.0/activities?active_business=string")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.body("{\"action\":{\"title\":\"string\",\"description\":\"string\"},\"operation_type\":\"create\",\"activity_date\":\"2019-08-24T14:15:22Z\",\"slug\":\"string\"}")
.asString();
import Foundation
let headers = [
"Content-Type": "application/json",
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let parameters = [
"action": [
"title": "string",
"description": "string"
],
"operation_type": "create",
"activity_date": "2019-08-24T14:15:22Z",
"slug": "string"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/activities?active_business=string")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST /activities
Use this endpoint to create an activity for a new or existing customer (e.g. An rer was created, a form was submitted, etc).
Body parameter
{
"action": {
"title": "string",
"description": "string"
},
"operation_type": "create",
"activity_date": "2019-08-24T14:15:22Z",
"slug": "string"
}
action:
title: string
description: string
operation_type: create
activity_date: 2019-08-24T14:15:22Z
slug: string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
action_type | query | string | false | none |
active_business | query | string | true | Slug of the business we're performing the action on. |
activity_date | query | string(date) | false | Query over the date. |
created_at | query | string(date) | false | Query over the date. |
customer | query | string | false | none |
operation_type | query | string | false | Comma seperated list. |
search | query | string | false | A search query on the list items. |
x-api-key | header | string | true | The application secret provided to the client. |
body | body | ActivityList | true | none |
» action | body | ActionTypeShort | true | none |
»» title | body | string | true | action type's title. |
»» description | body | string¦null | false | a short and optional desctiption on the nature of the action type. |
»» slug | body | string | true | none |
» operation_type | body | OperationTypeEnum | false | shows the activity operation type (create, read, update, delete). if not sent, will be set to the actiom type's default opertation type. |
» description | body | string | true | none |
» activity_date | body | string(date-time) | false | the date and time in which the activity has happend. |
» customer | body | ShortCustomer | true | none |
»» full_name | body | string¦null | false | customer's full name. |
body | string(email)¦null | false | customer's primary email address. | |
»» phone_number | body | string¦null | false | customer's primary phone number. |
»» code | body | string(uuid) | false | a unique code identifying the customer. |
»» slug | body | string¦null | false | none |
»» created_at | body | string(date-time) | true | none |
»» updated_at | body | string(date-time) | true | none |
»» score | body | integer | false | how much score does the customer have? (as shown to the business). |
»» level | body | integer | false | customer's level based on their score and other customers' score. |
» created_at | body | string(date-time) | true | none |
» updated_at | body | string(date-time) | true | none |
» slug | body | string¦null | false | none |
Enumerated Values
Parameter | Value |
---|---|
» operation_type | create |
» operation_type | read |
» operation_type | update |
» operation_type | delete |
» operation_type | undefined |
Example responses
200 Response
{
"action": {
"title": "string",
"description": "string",
"slug": "string"
},
"operation_type": "create",
"description": "string",
"activity_date": "2019-08-24T14:15:22Z",
"customer": {
"full_name": "string",
"email": "user@example.com",
"phone_number": "string",
"code": "f5d62b05-370e-48be-a755-8675ca146431",
"slug": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"score": 0,
"level": 0
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"slug": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | ActivityList |
Businesses
Get Business List
Code samples
curl --request GET \
--url https://api.formaloo.com/v1.0/businesses/ \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'x-api-key: API_KEY'
fetch("https://api.formaloo.com/v1.0/businesses/", {
"method": "GET",
"headers": {
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.formaloo.com/v1.0/businesses/',
headers: {
Accept: 'application/json',
'x-api-key': 'API_KEY',
Authorization: 'Bearer {access-token}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
headers = {
'Accept': "application/json",
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("GET", "/v1.0/businesses/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/businesses/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "application/json")
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://api.formaloo.com/v1.0/businesses/');
$request->setRequestMethod('GET');
$request->setHeaders([
'Accept' => 'application/json',
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/businesses/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://api.formaloo.com/v1.0/businesses/")
.header("Accept", "application/json")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.asString();
import Foundation
let headers = [
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/businesses/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET /businesses/
Gives a list of available businesses for the current user.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
search | query | string | false | A search query on the list items. |
x-api-key | header | string | true | The application secret provided to the client. |
Example responses
200 Response
[
{
"full_name": "string",
"email": "user@example.com",
"phone_number": "string",
"code": "f5d62b05-370e-48be-a755-8675ca146431",
"slug": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"score": 0,
"level": 0
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [ShortCustomer] | false | none | none |
» full_name | string¦null | false | none | customer's full name. |
string(email)¦null | false | none | customer's primary email address. | |
» phone_number | string¦null | false | none | customer's primary phone number. |
» code | string(uuid) | false | none | a unique code identifying the customer. |
» slug | string¦null | false | none | none |
» created_at | string(date-time) | true | read-only | none |
» updated_at | string(date-time) | true | read-only | none |
» score | integer | false | none | how much score does the customer have? (as shown to the business). |
» level | integer | false | none | customer's level based on their score and other customers' score. |
Currencies
Get Currency List
Code samples
curl --request GET \
--url 'https://api.formaloo.com/v1.0/currencies/?active_business=string' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'x-api-key: API_KEY'
fetch("https://api.formaloo.com/v1.0/currencies/?active_business=string", {
"method": "GET",
"headers": {
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.formaloo.com/v1.0/currencies/',
qs: {active_business: 'string'},
headers: {
Accept: 'application/json',
'x-api-key': 'API_KEY',
Authorization: 'Bearer {access-token}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
headers = {
'Accept': "application/json",
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("GET", "/v1.0/currencies/?active_business=string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/currencies/?active_business=string"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "application/json")
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://api.formaloo.com/v1.0/currencies/');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'active_business' => 'string'
]));
$request->setHeaders([
'Accept' => 'application/json',
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/currencies/?active_business=string")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://api.formaloo.com/v1.0/currencies/?active_business=string")
.header("Accept", "application/json")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.asString();
import Foundation
let headers = [
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/currencies/?active_business=string")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET /currencies/
Use this endpoint to get a list of available currencies for activities' monetary value.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
active_business | query | string | true | Slug of the business we're performing the action on. |
page | query | integer | false | A page number within the paginated result set. |
search | query | string | false | A search query on the list items. |
x-api-key | header | string | true | The application secret provided to the client. |
Example responses
200 Response
{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"page_size": 10,
"page_count": 13,
"current_page": 3,
"currencies": [
{
"title": "string",
"iso_code": "string"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | PaginatedCurrencyList |
Customers
Get Customer List
Code samples
curl --request GET \
--url 'https://api.formaloo.com/v1.0/customers/?active_business=string' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'x-api-key: API_KEY'
fetch("https://api.formaloo.com/v1.0/customers/?active_business=string", {
"method": "GET",
"headers": {
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.formaloo.com/v1.0/customers/',
qs: {active_business: 'string'},
headers: {
Accept: 'application/json',
'x-api-key': 'API_KEY',
Authorization: 'Bearer {access-token}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
headers = {
'Accept': "application/json",
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("GET", "/v1.0/customers/?active_business=string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/customers/?active_business=string"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "application/json")
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://api.formaloo.com/v1.0/customers/');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'active_business' => 'string'
]));
$request->setHeaders([
'Accept' => 'application/json',
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/customers/?active_business=string")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://api.formaloo.com/v1.0/customers/?active_business=string")
.header("Accept", "application/json")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.asString();
import Foundation
let headers = [
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/customers/?active_business=string")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET /customers/
Gives a list of all customers on the current business.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
active_business | query | string | true | Slug of the business we're performing the action on. |
page | query | integer | false | A page number within the paginated result set. |
search | query | string | false | A search query on the list items. |
x-api-key | header | string | true | The application secret provided to the client. |
Example responses
200 Response
{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"page_size": 10,
"page_count": 13,
"current_page": 3,
"customers": [
{
"code": "f5d62b05-370e-48be-a755-8675ca146431",
"customer_data": {
"property1": null,
"property2": null
},
"full_name": "string",
"email": "user@example.com",
"phone_number": "string",
"tags": [
{
"title": "string",
"description": "string",
"slug": "string"
}
],
"score": 0,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | PaginatedCreateCustomerList |
Create Customer
Code samples
curl --request POST \
--url 'https://api.formaloo.com/v1.0/customers/?active_business=string' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--header 'x-api-key: API_KEY' \
--data '{"customer_data":{"property1":null,"property2":null},"full_name":"string","email":"user@example.com","phone_number":"string","tags":[{"title":"string","description":"string","slug":"string"}],"score":0}'
fetch("https://api.formaloo.com/v1.0/customers/?active_business=string", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
},
"body": "{\"customer_data\":{\"property1\":null,\"property2\":null},\"full_name\":\"string\",\"email\":\"user@example.com\",\"phone_number\":\"string\",\"tags\":[{\"title\":\"string\",\"description\":\"string\",\"slug\":\"string\"}],\"score\":0}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'POST',
url: 'https://api.formaloo.com/v1.0/customers/',
qs: {active_business: 'string'},
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
'x-api-key': 'API_KEY',
Authorization: 'Bearer {access-token}'
},
body: {
customer_data: {property1: null, property2: null},
full_name: 'string',
email: 'user@example.com',
phone_number: 'string',
tags: [{title: 'string', description: 'string', slug: 'string'}],
score: 0
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
payload = "{\"customer_data\":{\"property1\":null,\"property2\":null},\"full_name\":\"string\",\"email\":\"user@example.com\",\"phone_number\":\"string\",\"tags\":[{\"title\":\"string\",\"description\":\"string\",\"slug\":\"string\"}],\"score\":0}"
headers = {
'Content-Type': "application/json",
'Accept': "application/json",
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("POST", "/v1.0/customers/?active_business=string", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/customers/?active_business=string"
payload := strings.NewReader("{\"customer_data\":{\"property1\":null,\"property2\":null},\"full_name\":\"string\",\"email\":\"user@example.com\",\"phone_number\":\"string\",\"tags\":[{\"title\":\"string\",\"description\":\"string\",\"slug\":\"string\"}],\"score\":0}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$body = new http\Message\Body;
$body->append('{"customer_data":{"property1":null,"property2":null},"full_name":"string","email":"user@example.com","phone_number":"string","tags":[{"title":"string","description":"string","slug":"string"}],"score":0}');
$request->setRequestUrl('https://api.formaloo.com/v1.0/customers/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'active_business' => 'string'
]));
$request->setHeaders([
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/customers/?active_business=string")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
request.body = "{\"customer_data\":{\"property1\":null,\"property2\":null},\"full_name\":\"string\",\"email\":\"user@example.com\",\"phone_number\":\"string\",\"tags\":[{\"title\":\"string\",\"description\":\"string\",\"slug\":\"string\"}],\"score\":0}"
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.post("https://api.formaloo.com/v1.0/customers/?active_business=string")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.body("{\"customer_data\":{\"property1\":null,\"property2\":null},\"full_name\":\"string\",\"email\":\"user@example.com\",\"phone_number\":\"string\",\"tags\":[{\"title\":\"string\",\"description\":\"string\",\"slug\":\"string\"}],\"score\":0}")
.asString();
import Foundation
let headers = [
"Content-Type": "application/json",
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let parameters = [
"customer_data": [
"property1": ,
"property2":
],
"full_name": "string",
"email": "user@example.com",
"phone_number": "string",
"tags": [
[
"title": "string",
"description": "string",
"slug": "string"
]
],
"score": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/customers/?active_business=string")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST /customers/
Create a new customer on the current business.
Body parameter
{
"customer_data": {
"property1": null,
"property2": null
},
"full_name": "string",
"email": "user@example.com",
"phone_number": "string",
"tags": [
{
"title": "string",
"description": "string",
"slug": "string"
}
],
"score": 0
}
customer_data:
? property1
? property2
full_name: string
email: user@example.com
phone_number: string
tags:
- title: string
description: string
slug: string
score: 0
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
active_business | query | string | true | Slug of the business we're performing the action on. |
search | query | string | false | A search query on the list items. |
x-api-key | header | string | true | The application secret provided to the client. |
body | body | CreateCustomer | false | none |
» code | body | string(uuid) | true | a unique code identifying the customer. |
» customer_data | body | object | false | any data available on the customer in json format. |
»» additionalProperties | body | any | false | none |
» full_name | body | string¦null | false | customer's full name. |
body | string(email)¦null | false | customer's primary email address. | |
» phone_number | body | string¦null | false | customer's primary phone number. |
» tags | body | [AddTag] | false | Any tags we want to add to the customer after creation or update. |
»» title | body | string | false | tag's assigned or auto-generated title. |
»» description | body | string¦null | false | an optional description on the tag. |
»» slug | body | string¦null | false | none |
» score | body | integer | false | If you want the customer have an initial score (or and update on exisintg customer's score) send the score on this field. |
» created_at | body | string(date-time) | true | none |
» updated_at | body | string(date-time) | true | none |
Example responses
200 Response
{
"code": "f5d62b05-370e-48be-a755-8675ca146431",
"customer_data": {
"property1": null,
"property2": null
},
"full_name": "string",
"email": "user@example.com",
"phone_number": "string",
"tags": [
{
"title": "string",
"description": "string",
"slug": "string"
}
],
"score": 0,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | CreateCustomer |
Get Customer
Code samples
curl --request GET \
--url https://api.formaloo.com/v1.0/customers/string/ \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'x-api-key: API_KEY'
fetch("https://api.formaloo.com/v1.0/customers/string/", {
"method": "GET",
"headers": {
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.formaloo.com/v1.0/customers/string/',
headers: {
Accept: 'application/json',
'x-api-key': 'API_KEY',
Authorization: 'Bearer {access-token}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
headers = {
'Accept': "application/json",
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("GET", "/v1.0/customers/string/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/customers/string/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "application/json")
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://api.formaloo.com/v1.0/customers/string/');
$request->setRequestMethod('GET');
$request->setHeaders([
'Accept' => 'application/json',
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/customers/string/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://api.formaloo.com/v1.0/customers/string/")
.header("Accept", "application/json")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.asString();
import Foundation
let headers = [
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/customers/string/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET /customers/{code}/
Get a customer's data.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
code | path | string | true | none |
x-api-key | header | string | true | The application secret provided to the client. |
Example responses
200 Response
{
"code": "f5d62b05-370e-48be-a755-8675ca146431",
"customer_data": {
"property1": null,
"property2": null
},
"full_name": "string",
"email": "user@example.com",
"phone_number": "string",
"tags": [
{
"title": "string",
"description": "string",
"slug": "string"
}
],
"score": 0,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | CreateCustomer |
Edit Customer
Code samples
curl --request PATCH \
--url https://api.formaloo.com/v1.0/customers/string/ \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--header 'x-api-key: API_KEY' \
--data '{"customer_data":{"property1":null,"property2":null},"full_name":"string","email":"user@example.com","phone_number":"string","tags":[{"title":"string","description":"string","slug":"string"}],"score":0}'
fetch("https://api.formaloo.com/v1.0/customers/string/", {
"method": "PATCH",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
},
"body": "{\"customer_data\":{\"property1\":null,\"property2\":null},\"full_name\":\"string\",\"email\":\"user@example.com\",\"phone_number\":\"string\",\"tags\":[{\"title\":\"string\",\"description\":\"string\",\"slug\":\"string\"}],\"score\":0}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'PATCH',
url: 'https://api.formaloo.com/v1.0/customers/string/',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
'x-api-key': 'API_KEY',
Authorization: 'Bearer {access-token}'
},
body: {
customer_data: {property1: null, property2: null},
full_name: 'string',
email: 'user@example.com',
phone_number: 'string',
tags: [{title: 'string', description: 'string', slug: 'string'}],
score: 0
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
payload = "{\"customer_data\":{\"property1\":null,\"property2\":null},\"full_name\":\"string\",\"email\":\"user@example.com\",\"phone_number\":\"string\",\"tags\":[{\"title\":\"string\",\"description\":\"string\",\"slug\":\"string\"}],\"score\":0}"
headers = {
'Content-Type': "application/json",
'Accept': "application/json",
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("PATCH", "/v1.0/customers/string/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/customers/string/"
payload := strings.NewReader("{\"customer_data\":{\"property1\":null,\"property2\":null},\"full_name\":\"string\",\"email\":\"user@example.com\",\"phone_number\":\"string\",\"tags\":[{\"title\":\"string\",\"description\":\"string\",\"slug\":\"string\"}],\"score\":0}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$body = new http\Message\Body;
$body->append('{"customer_data":{"property1":null,"property2":null},"full_name":"string","email":"user@example.com","phone_number":"string","tags":[{"title":"string","description":"string","slug":"string"}],"score":0}');
$request->setRequestUrl('https://api.formaloo.com/v1.0/customers/string/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/customers/string/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
request.body = "{\"customer_data\":{\"property1\":null,\"property2\":null},\"full_name\":\"string\",\"email\":\"user@example.com\",\"phone_number\":\"string\",\"tags\":[{\"title\":\"string\",\"description\":\"string\",\"slug\":\"string\"}],\"score\":0}"
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.patch("https://api.formaloo.com/v1.0/customers/string/")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.body("{\"customer_data\":{\"property1\":null,\"property2\":null},\"full_name\":\"string\",\"email\":\"user@example.com\",\"phone_number\":\"string\",\"tags\":[{\"title\":\"string\",\"description\":\"string\",\"slug\":\"string\"}],\"score\":0}")
.asString();
import Foundation
let headers = [
"Content-Type": "application/json",
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let parameters = [
"customer_data": [
"property1": ,
"property2":
],
"full_name": "string",
"email": "user@example.com",
"phone_number": "string",
"tags": [
[
"title": "string",
"description": "string",
"slug": "string"
]
],
"score": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/customers/string/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH /customers/{code}/
Update a customer.
Body parameter
{
"customer_data": {
"property1": null,
"property2": null
},
"full_name": "string",
"email": "user@example.com",
"phone_number": "string",
"tags": [
{
"title": "string",
"description": "string",
"slug": "string"
}
],
"score": 0
}
customer_data:
? property1
? property2
full_name: string
email: user@example.com
phone_number: string
tags:
- title: string
description: string
slug: string
score: 0
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
code | path | string | true | none |
x-api-key | header | string | true | The application secret provided to the client. |
body | body | PatchedCreateCustomer | false | none |
» code | body | string(uuid) | false | a unique code identifying the customer. |
» customer_data | body | object | false | any data available on the customer in json format. |
»» additionalProperties | body | any | false | none |
» full_name | body | string¦null | false | customer's full name. |
body | string(email)¦null | false | customer's primary email address. | |
» phone_number | body | string¦null | false | customer's primary phone number. |
» tags | body | [PatchedAddTag] | false | Any tags we want to add to the customer after creation or update. |
»» title | body | string | false | tag's assigned or auto-generated title. |
»» description | body | string¦null | false | an optional description on the tag. |
»» slug | body | string¦null | false | none |
» score | body | integer | false | If you want the customer have an initial score (or and update on exisintg customer's score) send the score on this field. |
» created_at | body | string(date-time) | false | none |
» updated_at | body | string(date-time) | false | none |
Example responses
200 Response
{
"code": "f5d62b05-370e-48be-a755-8675ca146431",
"customer_data": {
"property1": null,
"property2": null
},
"full_name": "string",
"email": "user@example.com",
"phone_number": "string",
"tags": [
{
"title": "string",
"description": "string",
"slug": "string"
}
],
"score": 0,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | CreateCustomer |
Delete Customer
Code samples
curl --request DELETE \
--url https://api.formaloo.com/v1.0/customers/string/ \
--header 'Authorization: Bearer {access-token}' \
--header 'x-api-key: API_KEY'
fetch("https://api.formaloo.com/v1.0/customers/string/", {
"method": "DELETE",
"headers": {
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'DELETE',
url: 'https://api.formaloo.com/v1.0/customers/string/',
headers: {'x-api-key': 'API_KEY', Authorization: 'Bearer {access-token}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
headers = {
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("DELETE", "/v1.0/customers/string/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/customers/string/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://api.formaloo.com/v1.0/customers/string/');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/customers/string/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.delete("https://api.formaloo.com/v1.0/customers/string/")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.asString();
import Foundation
let headers = [
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/customers/string/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE /customers/{code}/
Delete a customer.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
code | path | string | true | none |
x-api-key | header | string | true | The application secret provided to the client. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No response body | None |
Get Customer Activity List
Code samples
curl --request GET \
--url 'https://api.formaloo.com/v1.0/customers/string/activities/?active_business=string' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'x-api-key: API_KEY'
fetch("https://api.formaloo.com/v1.0/customers/string/activities/?active_business=string", {
"method": "GET",
"headers": {
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.formaloo.com/v1.0/customers/string/activities/',
qs: {active_business: 'string'},
headers: {
Accept: 'application/json',
'x-api-key': 'API_KEY',
Authorization: 'Bearer {access-token}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
headers = {
'Accept': "application/json",
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("GET", "/v1.0/customers/string/activities/?active_business=string", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/customers/string/activities/?active_business=string"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "application/json")
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://api.formaloo.com/v1.0/customers/string/activities/');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'active_business' => 'string'
]));
$request->setHeaders([
'Accept' => 'application/json',
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/customers/string/activities/?active_business=string")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://api.formaloo.com/v1.0/customers/string/activities/?active_business=string")
.header("Accept", "application/json")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.asString();
import Foundation
let headers = [
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/customers/string/activities/?active_business=string")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET /customers/{slug}/activities/
Gives a list of a customer's activities.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
active_business | query | string | true | Slug of the business we're performing the action on. |
operation | query | string | false | Comma seperated list. |
search | query | string | false | A search query on the list items. |
slug | path | string | true | none |
type | query | string | false | Comma seperated list. |
x-api-key | header | string | true | The application secret provided to the client. |
Example responses
200 Response
[
{
"action": {
"title": "string",
"description": "string",
"slug": "string"
},
"operation_type": "create",
"description": "string",
"currency": {
"title": "string",
"iso_code": "string"
},
"monetary_value": "string",
"activity_date": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"slug": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [ActivityShort] | false | none | none |
» action | ActionTypeShort | true | none | none |
»» title | string | true | none | action type's title. |
»» description | string¦null | false | none | a short and optional desctiption on the nature of the action type. |
»» slug | string | true | read-only | none |
» operation_type | OperationTypeEnum | false | none | shows the activity operation type (create, read, update, delete). if not sent, will be set to the actiom type's default opertation type. |
» description | string | true | read-only | none |
» currency | Currency | true | read-only | none |
»» title | string | true | none | currency's display name. |
»» iso_code | string | true | none | the iso code for the currency. |
» monetary_value | string(decimal) | false | none | monetary value of the activty. (e.g. payment amount for a purchase activity). |
» activity_date | string(date-time) | false | none | the date and time in which the activity has happend. |
» created_at | string(date-time) | true | read-only | none |
» updated_at | string(date-time) | true | read-only | none |
» slug | string¦null | false | none | none |
Enumerated Values
Property | Value |
---|---|
operation_type | create |
operation_type | read |
operation_type | update |
operation_type | delete |
operation_type | undefined |
Create Customer Batch Import
Code samples
curl --request POST \
--url https://api.formaloo.com/v1.0/customers/batch/ \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--header 'x-api-key: API_KEY' \
--data '{"file":"http://example.com","customers_data":{"property1":null,"property2":null},"file_type":"excel"}'
fetch("https://api.formaloo.com/v1.0/customers/batch/", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
},
"body": "{\"file\":\"http://example.com\",\"customers_data\":{\"property1\":null,\"property2\":null},\"file_type\":\"excel\"}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'POST',
url: 'https://api.formaloo.com/v1.0/customers/batch/',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
'x-api-key': 'API_KEY',
Authorization: 'Bearer {access-token}'
},
body: {
file: 'http://example.com',
customers_data: {property1: null, property2: null},
file_type: 'excel'
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
payload = "{\"file\":\"http://example.com\",\"customers_data\":{\"property1\":null,\"property2\":null},\"file_type\":\"excel\"}"
headers = {
'Content-Type': "application/json",
'Accept': "application/json",
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("POST", "/v1.0/customers/batch/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/customers/batch/"
payload := strings.NewReader("{\"file\":\"http://example.com\",\"customers_data\":{\"property1\":null,\"property2\":null},\"file_type\":\"excel\"}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$body = new http\Message\Body;
$body->append('{"file":"http://example.com","customers_data":{"property1":null,"property2":null},"file_type":"excel"}');
$request->setRequestUrl('https://api.formaloo.com/v1.0/customers/batch/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/customers/batch/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
request.body = "{\"file\":\"http://example.com\",\"customers_data\":{\"property1\":null,\"property2\":null},\"file_type\":\"excel\"}"
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.post("https://api.formaloo.com/v1.0/customers/batch/")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.body("{\"file\":\"http://example.com\",\"customers_data\":{\"property1\":null,\"property2\":null},\"file_type\":\"excel\"}")
.asString();
import Foundation
let headers = [
"Content-Type": "application/json",
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let parameters = [
"file": "http://example.com",
"customers_data": [
"property1": ,
"property2":
],
"file_type": "excel"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/customers/batch/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST /customers/batch/
Create a batch customer creation job based on json data or excel file.
Body parameter
{
"file": "http://example.com",
"customers_data": {
"property1": null,
"property2": null
},
"file_type": "excel"
}
file: http://example.com
customers_data:
? property1
? property2
file_type: excel
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
search | query | string | false | A search query on the list items. |
x-api-key | header | string | true | The application secret provided to the client. |
body | body | CustomerBatchImportSerializer | false | none |
» status | body | StatusEnum | true | what's the status on this batch import job? |
» file | body | string(uri) | false | the file, containig the customer data we're importing. |
» customers_data | body | object | false | Use if you want to send json data without using a file. |
»» additionalProperties | body | any | false | none |
» file_type | body | FileTypeEnum | false | what's the type of the data we're importing? |
» slug | body | string | true | none |
» created_at | body | string(date-time) | true | none |
» imported_at | body | string(date-time) | true | when was the batch data successfully imported? (null, if not imported). |
» import_results | body | object | true | will contain the data about he imported batch, like customers count, new customer and existing customers etc. |
»» additionalProperties | body | any | false | none |
Enumerated Values
Parameter | Value |
---|---|
» status | new |
» status | queued |
» status | in_progress |
» status | imported |
» status | failed |
» status | canceled |
» file_type | excel |
» file_type | json |
Example responses
200 Response
{
"status": "new",
"file": "http://example.com",
"customers_data": {
"property1": null,
"property2": null
},
"file_type": "excel",
"slug": "string",
"created_at": "2019-08-24T14:15:22Z",
"imported_at": "2019-08-24T14:15:22Z",
"import_results": {
"property1": null,
"property2": null
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | CustomerBatchImportSerializer |
Get Customer Batch Import
Code samples
curl --request GET \
--url https://api.formaloo.com/v1.0/customers/batch/string/ \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'x-api-key: API_KEY'
fetch("https://api.formaloo.com/v1.0/customers/batch/string/", {
"method": "GET",
"headers": {
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.formaloo.com/v1.0/customers/batch/string/',
headers: {
Accept: 'application/json',
'x-api-key': 'API_KEY',
Authorization: 'Bearer {access-token}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
headers = {
'Accept': "application/json",
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("GET", "/v1.0/customers/batch/string/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/customers/batch/string/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "application/json")
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://api.formaloo.com/v1.0/customers/batch/string/');
$request->setRequestMethod('GET');
$request->setHeaders([
'Accept' => 'application/json',
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/customers/batch/string/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://api.formaloo.com/v1.0/customers/batch/string/")
.header("Accept", "application/json")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.asString();
import Foundation
let headers = [
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/customers/batch/string/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET /customers/batch/{slug}/
Get a customer batch info object to see its status.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
slug | path | string | true | none |
x-api-key | header | string | true | The application secret provided to the client. |
Example responses
200 Response
{
"status": "new",
"file": "http://example.com",
"customers_data": {
"property1": null,
"property2": null
},
"file_type": "excel",
"slug": "string",
"created_at": "2019-08-24T14:15:22Z",
"imported_at": "2019-08-24T14:15:22Z",
"import_results": {
"property1": null,
"property2": null
}
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | CustomerBatchImportSerializer |
Tags
Get Tag List
Code samples
curl --request GET \
--url https://api.formaloo.com/v1.0/tags/ \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'x-api-key: API_KEY'
fetch("https://api.formaloo.com/v1.0/tags/", {
"method": "GET",
"headers": {
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.formaloo.com/v1.0/tags/',
headers: {
Accept: 'application/json',
'x-api-key': 'API_KEY',
Authorization: 'Bearer {access-token}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
headers = {
'Accept': "application/json",
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("GET", "/v1.0/tags/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/tags/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "application/json")
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://api.formaloo.com/v1.0/tags/');
$request->setRequestMethod('GET');
$request->setHeaders([
'Accept' => 'application/json',
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/tags/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://api.formaloo.com/v1.0/tags/")
.header("Accept", "application/json")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.asString();
import Foundation
let headers = [
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/tags/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET /tags/
Use this endpoint to create a tag to use in action types' setttings.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
page | query | integer | false | A page number within the paginated result set. |
search | query | string | false | A search query on the list items. |
x-api-key | header | string | true | The application secret provided to the client. |
Example responses
200 Response
{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"page_size": 10,
"page_count": 13,
"current_page": 3,
"tags": [
{
"title": "string",
"description": "string",
"slug": "string"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | PaginatedTagList |
Create Tag
Code samples
curl --request POST \
--url https://api.formaloo.com/v1.0/tags/ \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--header 'x-api-key: API_KEY' \
--data '{"title":"string","description":"string"}'
fetch("https://api.formaloo.com/v1.0/tags/", {
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
},
"body": "{\"title\":\"string\",\"description\":\"string\"}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'POST',
url: 'https://api.formaloo.com/v1.0/tags/',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
'x-api-key': 'API_KEY',
Authorization: 'Bearer {access-token}'
},
body: {title: 'string', description: 'string'},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
payload = "{\"title\":\"string\",\"description\":\"string\"}"
headers = {
'Content-Type': "application/json",
'Accept': "application/json",
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("POST", "/v1.0/tags/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/tags/"
payload := strings.NewReader("{\"title\":\"string\",\"description\":\"string\"}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$body = new http\Message\Body;
$body->append('{"title":"string","description":"string"}');
$request->setRequestUrl('https://api.formaloo.com/v1.0/tags/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/tags/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
request.body = "{\"title\":\"string\",\"description\":\"string\"}"
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.post("https://api.formaloo.com/v1.0/tags/")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.body("{\"title\":\"string\",\"description\":\"string\"}")
.asString();
import Foundation
let headers = [
"Content-Type": "application/json",
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let parameters = [
"title": "string",
"description": "string"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/tags/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST /tags/
Use this endpoint to get a list of all tags on a business.
Body parameter
{
"title": "string",
"description": "string"
}
title: string
description: string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
search | query | string | false | A search query on the list items. |
x-api-key | header | string | true | The application secret provided to the client. |
body | body | Tag | true | none |
» title | body | string | true | tag's assigned or auto-generated title. |
» description | body | string¦null | false | an optional description on the tag. |
» slug | body | string | true | none |
Example responses
200 Response
{
"title": "string",
"description": "string",
"slug": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | Tag |
Get Tag
Code samples
curl --request GET \
--url https://api.formaloo.com/v1.0/tags/string/ \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'x-api-key: API_KEY'
fetch("https://api.formaloo.com/v1.0/tags/string/", {
"method": "GET",
"headers": {
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.formaloo.com/v1.0/tags/string/',
headers: {
Accept: 'application/json',
'x-api-key': 'API_KEY',
Authorization: 'Bearer {access-token}'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
headers = {
'Accept': "application/json",
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("GET", "/v1.0/tags/string/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/tags/string/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "application/json")
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://api.formaloo.com/v1.0/tags/string/');
$request->setRequestMethod('GET');
$request->setHeaders([
'Accept' => 'application/json',
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/tags/string/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://api.formaloo.com/v1.0/tags/string/")
.header("Accept", "application/json")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.asString();
import Foundation
let headers = [
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/tags/string/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET /tags/{slug}/
Get a specific tag.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
slug | path | string | true | none |
x-api-key | header | string | true | The application secret provided to the client. |
Example responses
200 Response
{
"title": "string",
"description": "string",
"slug": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | Tag |
Edit Tag
Code samples
curl --request PATCH \
--url https://api.formaloo.com/v1.0/tags/string/ \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--header 'x-api-key: API_KEY' \
--data '{"title":"string","description":"string"}'
fetch("https://api.formaloo.com/v1.0/tags/string/", {
"method": "PATCH",
"headers": {
"Content-Type": "application/json",
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
},
"body": "{\"title\":\"string\",\"description\":\"string\"}"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'PATCH',
url: 'https://api.formaloo.com/v1.0/tags/string/',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json',
'x-api-key': 'API_KEY',
Authorization: 'Bearer {access-token}'
},
body: {title: 'string', description: 'string'},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
payload = "{\"title\":\"string\",\"description\":\"string\"}"
headers = {
'Content-Type': "application/json",
'Accept': "application/json",
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("PATCH", "/v1.0/tags/string/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/tags/string/"
payload := strings.NewReader("{\"title\":\"string\",\"description\":\"string\"}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Accept", "application/json")
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$body = new http\Message\Body;
$body->append('{"title":"string","description":"string"}');
$request->setRequestUrl('https://api.formaloo.com/v1.0/tags/string/');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/tags/string/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request["Accept"] = 'application/json'
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
request.body = "{\"title\":\"string\",\"description\":\"string\"}"
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.patch("https://api.formaloo.com/v1.0/tags/string/")
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.body("{\"title\":\"string\",\"description\":\"string\"}")
.asString();
import Foundation
let headers = [
"Content-Type": "application/json",
"Accept": "application/json",
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let parameters = [
"title": "string",
"description": "string"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/tags/string/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH /tags/{slug}/
Update a tag.
Body parameter
{
"title": "string",
"description": "string"
}
title: string
description: string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
slug | path | string | true | none |
x-api-key | header | string | true | The application secret provided to the client. |
body | body | PatchedTag | false | none |
» title | body | string | false | tag's assigned or auto-generated title. |
» description | body | string¦null | false | an optional description on the tag. |
» slug | body | string | false | none |
Example responses
200 Response
{
"title": "string",
"description": "string",
"slug": "string"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | Tag |
Delete Tag
Code samples
curl --request DELETE \
--url https://api.formaloo.com/v1.0/tags/string/ \
--header 'Authorization: Bearer {access-token}' \
--header 'x-api-key: API_KEY'
fetch("https://api.formaloo.com/v1.0/tags/string/", {
"method": "DELETE",
"headers": {
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
}
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'DELETE',
url: 'https://api.formaloo.com/v1.0/tags/string/',
headers: {'x-api-key': 'API_KEY', Authorization: 'Bearer {access-token}'}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import http.client
conn = http.client.HTTPSConnection("api.formaloo.com")
headers = {
'x-api-key': "API_KEY",
'Authorization': "Bearer {access-token}"
}
conn.request("DELETE", "/v1.0/tags/string/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.formaloo.com/v1.0/tags/string/"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "API_KEY")
req.Header.Add("Authorization", "Bearer {access-token}")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://api.formaloo.com/v1.0/tags/string/');
$request->setRequestMethod('DELETE');
$request->setHeaders([
'x-api-key' => 'API_KEY',
'Authorization' => 'Bearer {access-token}'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.formaloo.com/v1.0/tags/string/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = 'API_KEY'
request["Authorization"] = 'Bearer {access-token}'
response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.delete("https://api.formaloo.com/v1.0/tags/string/")
.header("x-api-key", "API_KEY")
.header("Authorization", "Bearer {access-token}")
.asString();
import Foundation
let headers = [
"x-api-key": "API_KEY",
"Authorization": "Bearer {access-token}"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://api.formaloo.com/v1.0/tags/string/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE /tags/{slug}/
Delete a tag.
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
slug | path | string | true | none |
x-api-key | header | string | true | The application secret provided to the client. |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | No response body | None |
Schemas
ActionType
{
"title": "string",
"description": "string",
"integration": {
"title": "string",
"description": "string",
"slug": "string",
"website": "http://example.com"
},
"tags": [
{
"title": "string",
"description": "string",
"slug": "string"
}
],
"slug": "string",
"is_owned": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"default_operation_type": "create",
"activity_text_template": {
"property1": null,
"property2": null
},
"action_score": -2147483648,
"group": {
"title": "string",
"description": "string",
"default_text_template": {
"property1": null,
"property2": null
},
"slug": "string"
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
title | string | true | none | action type's title. |
description | string¦null | false | none | a short and optional desctiption on the nature of the action type. |
integration | ShortIntegrationSerializer | true | read-only | none |
tags | [Tag] | true | read-only | none |
slug | string | true | read-only | none |
is_owned | boolean | true | read-only | none |
created_at | string(date-time) | true | read-only | none |
updated_at | string(date-time) | true | read-only | none |
default_operation_type | DefaultOperationTypeEnum | false | none | shows the default operation type for the activities with this action type. |
activity_text_template | object | false | none | add a series of text templates for the activities with this action type. for example {"en": "An order with was the order code {order_code} was created."} |
» additionalProperties | any | false | none | none |
action_score | integer | false | none | how much score will a customer gain by performing a activity with this action type? (as defined by action type owner.) |
group | ActionTypeGroup | true | read-only | none |
ActionTypeGroup
{
"title": "string",
"description": "string",
"default_text_template": {
"property1": null,
"property2": null
},
"slug": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
title | string | true | none | action type group's title. |
description | string¦null | false | none | a short and optional desctiption on the nature of the action type group. |
default_text_template | object | false | none | add a series of text templates for the activities in this group. for example {"en": "An order with was the order code {order_code} was created."} |
» additionalProperties | any | false | none | none |
slug | string¦null | false | none | none |
ActionTypeShort
{
"title": "string",
"description": "string",
"slug": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
title | string | true | none | action type's title. |
description | string¦null | false | none | a short and optional desctiption on the nature of the action type. |
slug | string | true | read-only | none |
ActivityList
{
"action": {
"title": "string",
"description": "string",
"slug": "string"
},
"operation_type": "create",
"description": "string",
"activity_date": "2019-08-24T14:15:22Z",
"customer": {
"full_name": "string",
"email": "user@example.com",
"phone_number": "string",
"code": "f5d62b05-370e-48be-a755-8675ca146431",
"slug": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"score": 0,
"level": 0
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"slug": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
action | ActionTypeShort | true | none | none |
operation_type | OperationTypeEnum | false | none | shows the activity operation type (create, read, update, delete). if not sent, will be set to the actiom type's default opertation type. |
description | string | true | read-only | none |
activity_date | string(date-time) | false | none | the date and time in which the activity has happend. |
customer | ShortCustomer | true | read-only | none |
created_at | string(date-time) | true | read-only | none |
updated_at | string(date-time) | true | read-only | none |
slug | string¦null | false | none | none |
ActivityShort
{
"action": {
"title": "string",
"description": "string",
"slug": "string"
},
"operation_type": "create",
"description": "string",
"currency": {
"title": "string",
"iso_code": "string"
},
"monetary_value": "string",
"activity_date": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"slug": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
action | ActionTypeShort | true | none | none |
operation_type | OperationTypeEnum | false | none | shows the activity operation type (create, read, update, delete). if not sent, will be set to the actiom type's default opertation type. |
description | string | true | read-only | none |
currency | Currency | true | read-only | none |
monetary_value | string(decimal) | false | none | monetary value of the activty. (e.g. payment amount for a purchase activity). |
activity_date | string(date-time) | false | none | the date and time in which the activity has happend. |
created_at | string(date-time) | true | read-only | none |
updated_at | string(date-time) | true | read-only | none |
slug | string¦null | false | none | none |
AddTag
{
"title": "string",
"description": "string",
"slug": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
title | string | false | none | tag's assigned or auto-generated title. |
description | string¦null | false | none | an optional description on the tag. |
slug | string¦null | false | none | none |
Business
{
"title": "string",
"description": "string",
"slug": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
title | string | true | none | business entity's title. |
description | string¦null | false | none | any description on the business. |
slug | string¦null | false | none | none |
CreateCustomer
{
"code": "f5d62b05-370e-48be-a755-8675ca146431",
"customer_data": {
"property1": null,
"property2": null
},
"full_name": "string",
"email": "user@example.com",
"phone_number": "string",
"tags": [
{
"title": "string",
"description": "string",
"slug": "string"
}
],
"score": 0,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string(uuid) | true | read-only | a unique code identifying the customer. |
customer_data | object | false | none | any data available on the customer in json format. |
» additionalProperties | any | false | none | none |
full_name | string¦null | false | none | customer's full name. |
string(email)¦null | false | none | customer's primary email address. | |
phone_number | string¦null | false | none | customer's primary phone number. |
tags | [AddTag] | false | none | Any tags we want to add to the customer after creation or update. |
score | integer | false | none | If you want the customer have an initial score (or and update on exisintg customer's score) send the score on this field. |
created_at | string(date-time) | true | read-only | none |
updated_at | string(date-time) | true | read-only | none |
Currency
{
"title": "string",
"iso_code": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
title | string | true | none | currency's display name. |
iso_code | string | true | none | the iso code for the currency. |
CustomerBatchImportSerializer
{
"status": "new",
"file": "http://example.com",
"customers_data": {
"property1": null,
"property2": null
},
"file_type": "excel",
"slug": "string",
"created_at": "2019-08-24T14:15:22Z",
"imported_at": "2019-08-24T14:15:22Z",
"import_results": {
"property1": null,
"property2": null
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
status | StatusEnum | true | read-only | what's the status on this batch import job? |
file | string(uri) | false | none | the file, containig the customer data we're importing. |
customers_data | object | false | none | Use if you want to send json data without using a file. |
» additionalProperties | any | false | none | none |
file_type | FileTypeEnum | false | none | what's the type of the data we're importing? |
slug | string | true | read-only | none |
created_at | string(date-time) | true | read-only | none |
imported_at | string(date-time) | true | read-only | when was the batch data successfully imported? (null, if not imported). |
import_results | object | true | read-only | will contain the data about he imported batch, like customers count, new customer and existing customers etc. |
» additionalProperties | any | false | none | none |
DefaultOperationTypeEnum
"create"
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | none |
Enumerated Values
Property | Value |
---|---|
anonymous | create |
anonymous | read |
anonymous | update |
anonymous | delete |
anonymous | undefined |
FileTypeEnum
"excel"
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | none |
Enumerated Values
Property | Value |
---|---|
anonymous | excel |
anonymous | json |
OperationTypeEnum
"create"
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | none |
Enumerated Values
Property | Value |
---|---|
anonymous | create |
anonymous | read |
anonymous | update |
anonymous | delete |
anonymous | undefined |
PaginatedActionTypeGroupList
{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"page_size": 10,
"page_count": 13,
"current_page": 3,
"action_type_groups": [
{
"title": "string",
"description": "string",
"default_text_template": {
"property1": null,
"property2": null
},
"slug": "string"
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
count | integer | false | none | none |
next | string(uri)¦null | false | none | none |
previous | string(uri)¦null | false | none | none |
page_size | integer | false | none | none |
page_count | integer | false | none | none |
current_page | integer | false | none | none |
action_type_groups | [ActionTypeGroup] | false | none | none |
PaginatedActionTypeList
{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"page_size": 10,
"page_count": 13,
"current_page": 3,
"action_types": [
{
"title": "string",
"description": "string",
"integration": {
"title": "string",
"description": "string",
"slug": "string",
"website": "http://example.com"
},
"tags": [
{
"title": "string",
"description": "string",
"slug": "string"
}
],
"slug": "string",
"is_owned": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"default_operation_type": "create",
"activity_text_template": {
"property1": null,
"property2": null
},
"action_score": -2147483648,
"group": {
"title": "string",
"description": "string",
"default_text_template": {
"property1": null,
"property2": null
},
"slug": "string"
}
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
count | integer | false | none | none |
next | string(uri)¦null | false | none | none |
previous | string(uri)¦null | false | none | none |
page_size | integer | false | none | none |
page_count | integer | false | none | none |
current_page | integer | false | none | none |
action_types | [ActionType] | false | none | none |
PaginatedActivityListList
{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"page_size": 10,
"page_count": 13,
"current_page": 3,
"activities": [
{
"action": {
"title": "string",
"description": "string",
"slug": "string"
},
"operation_type": "create",
"description": "string",
"activity_date": "2019-08-24T14:15:22Z",
"customer": {
"full_name": "string",
"email": "user@example.com",
"phone_number": "string",
"code": "f5d62b05-370e-48be-a755-8675ca146431",
"slug": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"score": 0,
"level": 0
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"slug": "string"
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
count | integer | false | none | none |
next | string(uri)¦null | false | none | none |
previous | string(uri)¦null | false | none | none |
page_size | integer | false | none | none |
page_count | integer | false | none | none |
current_page | integer | false | none | none |
activities | [ActivityList] | false | none | none |
PaginatedCreateCustomerList
{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"page_size": 10,
"page_count": 13,
"current_page": 3,
"customers": [
{
"code": "f5d62b05-370e-48be-a755-8675ca146431",
"customer_data": {
"property1": null,
"property2": null
},
"full_name": "string",
"email": "user@example.com",
"phone_number": "string",
"tags": [
{
"title": "string",
"description": "string",
"slug": "string"
}
],
"score": 0,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
count | integer | false | none | none |
next | string(uri)¦null | false | none | none |
previous | string(uri)¦null | false | none | none |
page_size | integer | false | none | none |
page_count | integer | false | none | none |
current_page | integer | false | none | none |
customers | [CreateCustomer] | false | none | none |
PaginatedCurrencyList
{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"page_size": 10,
"page_count": 13,
"current_page": 3,
"currencies": [
{
"title": "string",
"iso_code": "string"
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
count | integer | false | none | none |
next | string(uri)¦null | false | none | none |
previous | string(uri)¦null | false | none | none |
page_size | integer | false | none | none |
page_count | integer | false | none | none |
current_page | integer | false | none | none |
currencies | [Currency] | false | none | none |
PaginatedIntegrationListList
{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"page_size": 10,
"page_count": 13,
"current_page": 3,
"integrations": [
{
"title": "string",
"description": "string",
"is_public_app": true,
"slug": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"business": {
"title": "string",
"description": "string",
"slug": "string"
},
"can_edit": true,
"website": "http://example.com"
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
count | integer | false | none | none |
next | string(uri)¦null | false | none | none |
previous | string(uri)¦null | false | none | none |
page_size | integer | false | none | none |
page_count | integer | false | none | none |
current_page | integer | false | none | none |
integrations | [IntegrationList] | false | none | none |
PaginatedTagList
{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"page_size": 10,
"page_count": 13,
"current_page": 3,
"tags": [
{
"title": "string",
"description": "string",
"slug": "string"
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
count | integer | false | none | none |
next | string(uri)¦null | false | none | none |
previous | string(uri)¦null | false | none | none |
page_size | integer | false | none | none |
page_count | integer | false | none | none |
current_page | integer | false | none | none |
tags | [Tag] | false | none | none |
PatchedActionType
{
"title": "string",
"description": "string",
"integration": {
"title": "string",
"description": "string",
"slug": "string",
"website": "http://example.com"
},
"tags": [
{
"title": "string",
"description": "string",
"slug": "string"
}
],
"slug": "string",
"is_owned": true,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"default_operation_type": "create",
"activity_text_template": {
"property1": null,
"property2": null
},
"action_score": -2147483648,
"group": {
"title": "string",
"description": "string",
"default_text_template": {
"property1": null,
"property2": null
},
"slug": "string"
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
title | string | false | none | action type's title. |
description | string¦null | false | none | a short and optional desctiption on the nature of the action type. |
integration | ShortIntegrationSerializer | false | read-only | none |
tags | [Tag] | false | read-only | none |
slug | string | false | read-only | none |
is_owned | boolean | false | read-only | none |
created_at | string(date-time) | false | read-only | none |
updated_at | string(date-time) | false | read-only | none |
default_operation_type | DefaultOperationTypeEnum | false | none | shows the default operation type for the activities with this action type. |
activity_text_template | object | false | none | add a series of text templates for the activities with this action type. for example {"en": "An order with was the order code {order_code} was created."} |
» additionalProperties | any | false | none | none |
action_score | integer | false | none | how much score will a customer gain by performing a activity with this action type? (as defined by action type owner.) |
group | ActionTypeGroup | false | read-only | none |
PatchedAddTag
{
"title": "string",
"description": "string",
"slug": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
title | string | false | none | tag's assigned or auto-generated title. |
description | string¦null | false | none | an optional description on the tag. |
slug | string¦null | false | none | none |
PatchedCreateCustomer
{
"code": "f5d62b05-370e-48be-a755-8675ca146431",
"customer_data": {
"property1": null,
"property2": null
},
"full_name": "string",
"email": "user@example.com",
"phone_number": "string",
"tags": [
{
"title": "string",
"description": "string",
"slug": "string"
}
],
"score": 0,
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | string(uuid) | false | read-only | a unique code identifying the customer. |
customer_data | object | false | none | any data available on the customer in json format. |
» additionalProperties | any | false | none | none |
full_name | string¦null | false | none | customer's full name. |
string(email)¦null | false | none | customer's primary email address. | |
phone_number | string¦null | false | none | customer's primary phone number. |
tags | [PatchedAddTag] | false | none | Any tags we want to add to the customer after creation or update. |
score | integer | false | none | If you want the customer have an initial score (or and update on exisintg customer's score) send the score on this field. |
created_at | string(date-time) | false | read-only | none |
updated_at | string(date-time) | false | read-only | none |
PatchedIntegration
{
"title": "string",
"description": "string",
"is_public_app": true,
"slug": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"business": {
"title": "string",
"description": "string",
"slug": "string"
},
"key": "string",
"secret": "string",
"can_edit": true,
"website": "http://example.com",
"enabled": true
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
title | string | false | none | none |
description | string¦null | false | none | none |
is_public_app | boolean | false | none | none |
slug | string¦null | false | none | none |
created_at | string(date-time) | false | read-only | none |
updated_at | string(date-time) | false | read-only | none |
business | Business | false | read-only | none |
key | string | false | read-only | none |
secret | string | false | read-only | none |
can_edit | boolean | false | read-only | none |
website | string(uri)¦null | false | none | none |
enabled | boolean | false | none | none |
PatchedTag
{
"title": "string",
"description": "string",
"slug": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
title | string | false | none | tag's assigned or auto-generated title. |
description | string¦null | false | none | an optional description on the tag. |
slug | string | false | read-only | none |
ShortCustomer
{
"full_name": "string",
"email": "user@example.com",
"phone_number": "string",
"code": "f5d62b05-370e-48be-a755-8675ca146431",
"slug": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"score": 0,
"level": 0
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
full_name | string¦null | false | none | customer's full name. |
string(email)¦null | false | none | customer's primary email address. | |
phone_number | string¦null | false | none | customer's primary phone number. |
code | string(uuid) | false | none | a unique code identifying the customer. |
slug | string¦null | false | none | none |
created_at | string(date-time) | true | read-only | none |
updated_at | string(date-time) | true | read-only | none |
score | integer | false | none | how much score does the customer have? (as shown to the business). |
level | integer | false | none | customer's level based on their score and other customers' score. |
ShortIntegrationSerializer
{
"title": "string",
"description": "string",
"slug": "string",
"website": "http://example.com"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
title | string | true | none | none |
description | string¦null | false | none | none |
slug | string¦null | false | none | none |
website | string(uri)¦null | false | none | none |
StatusEnum
"new"
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | none |
Enumerated Values
Property | Value |
---|---|
anonymous | new |
anonymous | queued |
anonymous | in_progress |
anonymous | imported |
anonymous | failed |
anonymous | canceled |
Tag
{
"title": "string",
"description": "string",
"slug": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
title | string | true | none | tag's assigned or auto-generated title. |
description | string¦null | false | none | an optional description on the tag. |
slug | string | true | read-only | none |