Create a Profile
Profiles are the central record for all account and identity information that you enter into the system. As a first step create a profile for the individual or organization that you want to transact with.
Accepts a ProfileRequest object. Returnas a ProfileResponse object.
Example (Ruby)
require 'uri'
require 'net/http'
url = URI("https://api.opentransact.com/v1/profiles")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["authorization"] = "Bearer #{API_KEY}"
request["content-type"] = 'application/vnd.api+json'
request.body = {
"data": {
"type": "profiles",
"attributes": {
"owner": {
"type": "people",
"first-name": "John",
"last-name": "Clancy"
}
},
"relationships": {
"application": {
"data": {
"type": "applications",
"id": $APPLICATION_ID
}
}
}
}
}.to_json
response = http.request(request)
puts response.read_body
Example (cURL)
curl --request POST \
--url https://api.opentransact.com/v1/profiles \
--header 'authorization: Bearer $API_KEY' \
--header 'content-type: application/vnd.api+json' \
--data '{
"data": {
"type": "profiles",
"attributes": {
"owner": {
"type": "people",
"first-name": "John",
"last-name": "Clancy"
}
},
"relationships": {
"application": {
"data": {
"type": "applications",
"id": $APPLICATION_ID
}
}
}
}
}'