# Quickstart

It usually take less than an hour to integrate Āto API. Your app sends a bunch of parameters and gets a pdf file in response.

We're available 24/7 to guide you through the integration process:

  1. Integration test (demo mode)
  2. Legal setup (with our IP specialist)
  3. API key generation (to use in prod)

You can contact us via Element, Twitter, Discord, LinkedIn or email

# Use the live demo

You can also do that using this static html file:

https://ato.works/ato-api-form.html

# Integrate in demo mode

Add this JS file in your project: https://github.com/ATO-nft/api-client/blob/main/ato-api-form.js

Here's an example of a json object to send to the server (placeholder values):

{
  "ArtworkName": "Blue Sky",
  "NftStandard": "ERC-721",
  "ArtworkDesc": "The artwork description goes here.",
  "FileName": "blue-sky.jpeg",
  "FileType": "jpeg",
  "FileSize": "51000",
  "CreatorName": "Olivier",
  "CreatorAddress": "0x00000This0is0my0Ethereum0address00000000",
  "ListNetwork": "Ethereum",
  "NftLicense": "Art",
  "RightLevel": "3",
  "RightAdapt": "on",
  "RightLogo": "on",
  "RightMerch": "on",
  "RightDuration": " 70",
  "SupplyNumber": "1",
  "RightExclusive": "on",
  "NonReissuance": "on",
  "ResaleRight": "8.0",
  "Mode": "2",
  "userKey": "",
  "PaymentToken": "Polygon",
  "VersionApi": "1.0",
  "VersionLicense": "1.0"
}

# Expected values

# Artwork
Name Type Description Example
ArtworkName String min: 1
max: 256
NFT #1
NftStandard select ERC-721
ERC-1155
ERC-721
NftLicence select Art
Gaming
Redeemale
Art
ArtworkDesc String min: 1
max: 4095
This is a demo
# Image
Name Type Description Example
FileName String min: 1
max: 256
artwork.png
FileType String min: 1
max: 10
png
FileSize Number min: 1
max: 40000000
24000
# Artist
Name Type Description Example
CreatorName String min: 1
max : 256
Francis
CreatorAddress String min: 42
max: 42
0x0000000000000000000000000000000000000000
ListNetwork select Polygon
Ethereum
Rinkeby
Rinkeby
# Rights
Name Type Description Example
RightLevel Number min: 1
max: 3
3
RightAdapt * checkbox on
undefined
RightLogo * checkbox on
undefined
RightMerch * checkbox on
undefined
RightDuration select 1...70 70
SupplyNumber Number min: 1
max: 1000000
1
RightExclusive * checkbox on
undefined
on
NonReissuance * checkbox on
undefined
on
ResaleRight select 1...10 8
# Pro version
Name Type Description Example
userKey String min: 42
max: 42
empty if demo mode
# Misc
Name Type Description Example
VersionApi select v1.0 v1.0

* optional

# JS example

In your app, add the following script:

httpRequest.open("POST", "http://ato-api.jcloud-ver-jpe.ik-server.com/"); // or https

let data = new FormData();
data.append("json", JSONValues);
data.append(
  "access",
  JSON.stringify({ user_id: "", pass: "", userNetwork: "Rinkeby", api: "v1.0" })
);
httpRequest.setRequestHeader(
  "Content-Type",
  "multipart/form-data; boundary=" + data._boundary
);
httpRequest.responseType = "arraybuffer";
httpRequest.send(data);

You will get a pdf file in response.

You may want to use this script to handle the response:

var fileName = httpRequest
  .getResponseHeader("Content-Disposition")
  .split("filename=")[1]
  .replaceAll('"', "");
var blob = new Blob([httpRequest.response], { type: "application/pdf" });

Then, save the pdf file on your own machine:

let url = window.URL.createObjectURL(blob);
let a = document.getElementById("downloadLink");
a.href = url;
if (fileName === undefined || fileName === "") {
  fileName = "IP_License.pdf";
}
a.download = fileName;
a.click();
window.URL.revokeObjectURL(url);

If the pdf file is blank, please check the UTF-8 conversion.

# Integrate in pro mode (multi-user)

  • Contact us directly via Element (preferred), Twitter, Discord, LinkedIn or email, so we can send you an API key.
  • Send Rinkeby ETH to this address: 0xf1eeb16879a7ecbda10675dcdebeb27db96f1b87 (testnet)
  • Add the api-server file in your Nodejs server
  • Adjust the server port line 78 (default is 8080)
  • Run the server: node api-server.js

Here's what your access object should look like:

access : {
   "user_id":"0x0000000000000000000000000000000000000000",
   "pass":"jjr0UrM0Sm53qGqJqHQDN/val1FBhXhfFAXUC93rG4bW5MTrmfHVO7FRhv/i8C+HNi/yOhZaaucC+EdLpavYfc9VZMbny/mz5pOwT9Q4njk7WrN9tixLrnK+KB/hn/jjkRgJ3vB0zAKtVUmk2OZb3XxBymOTDwlGoNcV2MHVva/uMEJVeJR6qCgPfIBhbOTTM6dzFlEzjIHyZrrEpTyUcHAihbJSOQbnDDJ8Bp5T8WjLUNkVAEy59sBGr5qYXcUiU9vPVJGZ2/vjelXqAO41DCblOgn55bg4z4868ZA9OVHmFh3yY2N3iVEu7gEKfpFr00AF/vQQEsJrI31A9Tu7OQ==",
   "userNetwork":"Rinkeby",
   "api":"v1.0"
}