Developer API - Applications

  1. Application types
  2. Application attributes
  3. List of all applications
  4. Find a specific application
  5. Create a new application
  6. Update an application
  7. Delete an application

Application types

Currently only POSXML apps are supported, but soon Ruby apps will be available as well, so app requests should always indicate the app type.

Application attributes

An application have the following attributes:

Name Type Description
id Integer Record ID
name String Application name
description String Brief description
authorizer_url String Authorizer IP address or URL.
communication_format String Authorizer communication format (HTTP, ISO8583 or ISO20022).
displayable Boolean Determine wether the application should be displayed in the services menu
pos_display_label String POS exibition name (if displayable is true)
crc String Application CRC
size Integer Application size (bytes)
uuid String Universally unique identifier
bytecode Bytecode Application binary
updated_at String Timestamp in ISO 8601 format
created_at String Timestamp in ISO 8601 format
created_by Integer User ID that created the record
created_via String Channel used to create the record (Interface or API)

List of all applications

Return an array with all applications.

Method and URL format

GET https://api.cloudwalk.io/{version}/apps/{type}?access_token={token}

Example of use

$ curl -X GET "https://api.cloudwalk.io/v1/apps/posxml?access_token=$TOKEN"
require 'net/http'

token = 'API_TOKEN'

uri = URI("https://api.cloudwalk.io/v1/apps/posxml?access_token=#{token}")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

res = http.request(request)

puts "Response #{res.code} #{res.message}: #{res.body}"

Example of response

{
   "pagination":{
      "page":1,
      "total_pages":1,
      "entries":2,
      "total_entries":2
   },
   "posxml_apps":[
      {
         "posxml_app":{
            "id":172,
            "name":"helloworld.posxml",
            "description":"Hello World",
            "authorizer_url":"http://myhost.com",
            "communication_format":"http",
            "displayable":true,
            "pos_display_label":"HELLO WORLD",
            "crc":"5A02",
            "size":18,
            "uuid":"2ca44bb6567747f8a3b0eed5dfe714f0",
            "bytecode":"ZDAKMApoZWxsb3dvcmxkLnBvc3htbAoNdQ0=",
            "updated_at":"2015-01-30T12:09:49-03:00",
            "created_at":"2015-01-30T12:09:30-03:00",
            "created_by":218,
            "created_via":"interface"
         }
      },
      {
         "posxml_app":{
            "id":173,
            "name":"sample.posxml",
            "description":"Sample App",
            "authorizer_url":"tcp://myhost.com:800",
            "communication_format":"http",
            "displayable":true,
            "pos_display_label":"SAMPLE APP",
            "crc":"1FAE",
            "size":17,
            "uuid":"34809a19bc192aa901823c911230ff0a"
            "bytecode":"ZDAKMApzYW1wbGUucG9zeG1sCg11DQ==",
            "updated_at":"2015-01-30T12:13:26-03:00",
            "created_at":"2015-01-30T12:12:42-03:00",
            "created_by":218,
            "created_via":"interface"
         }
      }
   ]
}

Find a specific application

Return the details of a specific application.

Method and URL format

GET https://api.cloudwalk.io/{version}/apps/{type}/{app_id}?access_token={token}

Example of use

$ curl -X GET "https://api.cloudwalk.io/v1/apps/posxml/172?access_token=$TOKEN"
require 'net/http'

token = 'API_TOKEN'

uri = URI("https://api.cloudwalk.io/v1/apps/posxml/172?access_token=#{token}")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri)

res = http.request(request)

puts "Response #{res.code} #{res.message}: #{res.body}"

Example of response

{
  "posxml_app":{
    "id":172,
    "name":"helloworld.posxml",
    "description":"Hello World",
    "authorizer_url":"http://myhost.com",
    "communication_format":"http",
    "displayable":true,
    "pos_display_label":"HELLO WORLD",
    "crc":"5A02",
    "size":18,
    "uuid":"2ca44bb6567747f8a3b0eed5dfe714f0",
    "bytecode":"ZDAKMApIZWxsbyBXb3JsZAoN",
    "updated_at":"2015-01-30T12:09:49-03:00",
    "created_at":"2015-01-30T12:09:30-03:00",
    "created_by":218,
    "created_via":"interface"
  }
}

Create a new application

Create a new application.

Method and URL format

POST https://api.cloudwalk.io/{version}/apps/{type}?access_token={token}

Example of use

$ curl -X POST "https://api.cloudwalk.io/v1/apps/posxml?access_token=$TOKEN" \
-d '{"name":"newapp","description":"desc","displayable":"false","authorizer_url":"http://auth.io"}'
require 'net/http'
require 'json'

token = 'API_TOKEN'

payload = {
  "name" => "newapp",
  "description" => "desc",
  "displayable" => false,
  "authorizer_url" => "http://auth.io"
}

uri = URI("https://api.cloudwalk.io/v1/apps/posxml?access_token=#{token}")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Post.new(uri.request_uri)
request.body = payload.to_json

res = http.request(request)

puts "Response #{res.code} #{res.message}: #{res.body}"

Example of response

{
  "posxml_app":{
    "id":173,
    "name":"newapp.posxml",
    "description":"desc",
    "authorizer_url":"http://auth.io",
    "communication_format":"http",
    "displayable":false,
    "pos_display_label":"",
    "crc":"EFBD",
    "size":20,
    "uuid":"763f25a891924e0d974d5df871381b11",
    "bytecode":"ZDAKMApuZXdhcHAucG9zeG1sCg0=",
    "updated_at":"2015-01-30T20:33:31Z",
    "created_at":"2015-01-30T20:33:31Z",
    "created_by":218,
    "created_via":"api"
  }
}

Update an application

Update an existing application.

Method and URL format

PUT https://api.cloudwalk.io/{version}/apps/{type}/{app_id}?access_token={token}

Example of use

The bytecode sent on the parameter binary must be encoded with Base64.

$ curl -X PUT "https://api.cloudwalk.io/v1/apps/posxml/173?access_token=$TOKEN" \
-d '{"binary":"ZDAKMApDbG91ZFdhbGsKDQ=="}'
require 'net/http'
require 'json'

token = 'API_TOKEN'

payload = {
  "binary" => "ZDAKMApDbG91ZFdhbGsKDQ=="
}

uri = URI("https://api.cloudwalk.io/v1/apps/posxml/173?access_token=#{token}")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Put.new(uri.request_uri)
request.body = payload.to_json

puts "Response #{res.code} #{res.message}: #{res.body}"

Example of response

{
  "posxml_app":{
    "id":173,
    "name":"newapp.posxml",
    "description":"desc",
    "authorizer_url":"http://auth.io",
    "communication_format":"http",
    "displayable":false,
    "pos_display_label":"",
    "crc":"905A",
    "size":16,
    "uuid":"6828c8d4b01242158243b797ae10df4b",
    "binary":"ZDAKMApDbG91ZFdhbGsKDQ==",
    "updated_at":"2015-01-30T21:50:21Z",
    "created_at":"2015-01-30T21:39:23Z",
    "created_by":218,
    "created_via":"api"
  }
}

Delete an application

Delete an application.

Method and URL format

DELETE https://api.cloudwalk.io/{version}/apps/{type}/{app_id}?access_token={token}

Example of use

$ curl -X DELETE "https://api.cloudwalk.io/v1/apps/posxml/173?access_token=$TOKEN"
require 'net/http'

token = 'API_TOKEN'

uri = URI("https://api.cloudwalk.io/v1/apps/posxml/173?access_token=#{token}")

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(uri.request_uri)

res = http.request(request)

puts "Response #{res.code} #{res.message}: #{res.body}"

Example of response

{}