-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdomains.openapi.json
More file actions
1 lines (1 loc) · 24.2 KB
/
Copy pathdomains.openapi.json
File metadata and controls
1 lines (1 loc) · 24.2 KB
1
{"openapi":"3.0.0","info":{"description":"This web service allows you to purchase and manage .it domains.","version":"1.0.0","title":"Domains","termsOfService":"https://openapi.it/en/terms-and-conditions","contact":{"url":"https://openapi.it/en/support","name":"Support"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"servers":[{"url":"https://domains.altravia.com","description":"Production"},{"url":"https://test.domains.altravia.com","description":"Sandbox"}],"tags":[{"name":"Contact","description":"Calls for checking, managing and recording contacts"},{"name":"Domain","description":"Calls for the control, management and registration of domains"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Domain_Object":{"type":"object","properties":{"status":{"type":"array","items":{"type":"string"}},"domain":{"type":"string"},"ns":{"type":"array","items":{"type":"string"}},"registrant":{"type":"string"},"admin":{"type":"string"},"tech":{"type":"string"},"authinfo":{"type":"string"},"crDate":{"type":"string"},"exDate":{"type":"string"},"dnssec":{"type":"array","items":{"type":"string"}},"owner":{"type":"string"},"timestamp":{"type":"string"},"renewal_date":{"type":"string"}}},"Contact_Object":{"type":"object","properties":{"status":{"type":"array","items":{"type":"string"}},"handle":{"type":"string"},"name":{"type":"string"},"org":{"type":"string"},"street":{"type":"string"},"street2":{"type":"string"},"street3":{"type":"string"},"city":{"type":"string"},"province":{"type":"string"},"postalcode":{"type":"string"},"countrycode":{"type":"string"},"voice":{"type":"string"},"fax":{"type":"string"},"email":{"type":"string"},"authinfo":{"type":"string"},"consentforpublishing":{"type":"integer","enum":[0,1]},"nationalitycode":{"type":"string"},"entitytype":{"type":"integer","enum":[0,1,2,3,4,5,6,7]},"regcode":{"type":"string"},"schoolcode":{"type":"string"},"owner":{"type":"string"},"timestamp":{"type":"integer"}}},"PostBodyDomain":{"type":"object","properties":{"domain":{"type":"string","description":"Domain name"},"authinfo":{"type":"string","description":"Domain authorization code"},"registrant":{"type":"string","description":"Registrant identifier"},"admin":{"type":"string","description":"Admin identifier"},"tech":{"type":"array","items":{"type":"string","description":"Tech identifier list"}},"dns":{"type":"array","items":{"type":"string","description":"List of dns to add"}}},"required":["domain","authinfo","registrant","admin","tech","dns"]},"PostBodyContact":{"type":"object","properties":{"name":{"type":"string","description":"Contact name"},"org":{"type":"string","description":"Contact organization"},"street":{"type":"string","description":"Contact address"},"city":{"type":"string","description":"Contact city"},"province":{"type":"string","description":"Contact province"},"postalcode":{"type":"string","description":"Contact postal code"},"countrycode":{"type":"string","description":"Contact country code"},"voice":{"type":"string","description":"Contact telephone number; only this international format accepted:'+39.3502285745'"},"email":{"type":"string","description":"Contact email"},"nationalitycode":{"type":"string","example":"IT","description":"Contact nationality code"},"entitytype":{"type":"integer","enum":[0,1,2,3,4,5,6,7],"description":"Contact entity type: - 0: non-registering contact; - 1: natural persons; - 2: companies, sole proprietorships; - 3: freelancers; - 4: non-profit organizations; - 5: public entities; - 6: other subjects; - 7: foreign subjects"},"regcode":{"type":"string","example":"VNNLGR87F12N115F","description":"Tax code or VAT number"}},"required":["name","org","street","city","province","postalcode","countrycode","voice","email"]},"PutBodyContact":{"type":"object","properties":{"name":{"type":"string","description":"Contact name"},"org":{"type":"string","description":"Contact organization"},"street":{"type":"string","description":"Contact address"},"city":{"type":"string","description":"Contact city"},"province":{"type":"string","description":"Contact province"},"postalcode":{"type":"string","description":"Contact postal code"},"countrycode":{"type":"string","description":"Contact country code"},"voice":{"type":"string","description":"Contact telephone number; only this international format accepted:'+39.3502285745'"},"email":{"type":"string","description":"Contact email"},"consentforpublishing":{"type":"boolean","description":"Contact privacy"},"nationalitycode":{"type":"string","example":"IT","description":"Contact nationality code"},"entitytype":{"type":"integer","enum":[0,1,2,3,4,5,6,7],"description":"Contact entity type: - 0: non-registering contact; - 1: natural persons; - 2: companies, sole proprietorships; - 3: freelancers; - 4: non-profit organizations; - 5: public entities; - 6: other subjects; - 7: foreign subjects"},"regcode":{"type":"string","example":"VNNLGR87F12N115F","description":"Tax code or VAT number"}}},"PutBodyDomain":{"type":"object","properties":{"registrant":{"type":"string","description":"Identification of the new registrant"},"admin":{"type":"string","description":"Identification of the new admin"},"tech":{"type":"array","items":{"type":"string","description":"List of new tech identifiers"}},"dns":{"type":"array","items":{"type":"string","description":"List of new dns to add"}}}}}},"paths":{"/contact":{"get":{"tags":["Contact"],"summary":"List of your contacts","description":"This method lets you see the list of contacts associated with your domains","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string"}},"success":{"type":"boolean"},"message":{"type":"string"},"error":{"type":"integer"}}},"example":{"data":["AV-1386xxxxx161","AV-xxxx797541768","AV-1485797xxxx32","AV-13xxx3651xx21","Lxxx43"],"success":true,"message":"","error":null}}}},"404":{"description":"Not Found","content":{"application/json":{"example":{"success":false,"message":"your database is empty!","error":206,"data":null}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Contact"],"summary":"Create new contact","description":"This method allows you to register a new contact in the system, which you will then need to associate with the new domains to be purchased. If you want to create a 'registrant' contact, 'nationalitycode', 'entitytype' and 'regcode' are mandatory.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostBodyContact"},"example":{"name":"Jane Doe","org":"Jane Doe","street":"Via xxx 2","city":"Terni","province":"TR","postalcode":"05100","countrycode":"IT","voice":"+39.349xxxxxxx","email":"j.doe@altravia.com"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"handle":{"type":"string"}}},"success":{"type":"boolean"},"message":{"type":"string"},"error":{"type":"integer"}}},"example":{"data":{"handle":"AV-9xxx54609"},"message":"Greeting OK. Login OK. Create contact 'AV-9xxx54609' created. Logout OK.","success":true,"error":null}}}},"406":{"description":"Not Acceptable","content":{"application/json":{"example":{"success":false,"message":"voice must be in international format: '+39.3502285745'!","error":232,"data":null}}}},"412":{"description":"Precondition Failed","content":{"application/json":{"example":{"success":false,"message":"Connection FAILED.","error":200,"data":null}}}},"417":{"description":"Expectation Failed","content":{"application/json":{"example":{"success":false,"message":"Create contact failed: ","error":238,"data":null}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"example":{"success":false,"message":"email required!","error":233,"data":null}}}}},"security":[{"bearerAuth":[]}]}},"/contact/{handle}":{"get":{"tags":["Contact"],"summary":"Single contact","description":"This method allows you to see the single contact related to the parameter passed in the path","parameters":[{"name":"handle","in":"path","description":"Contact Id","required":true,"schema":{"type":"string","example":"DD7766"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contact_Object"},"success":{"type":"boolean"},"message":{"type":"string"},"error":{"type":"integer"}}},"example":{"data":{"status":["ok","linked"],"handle":"DD7766","name":"Lxxa Sxxxxi","org":"Altxxxia srl","street":"Via A. Mixxxvoi 683","street2":"","street3":"","city":"Roma","province":"RM","postalcode":"00178","countrycode":"IT","voice":"xxxxxxxx","fax":"xxxxxxx","email":"domini@altravia.com","authinfo":"","consentforpublishing":1,"nationalitycode":"","entitytype":0,"regcode":"","schoolcode":"","owner":"api@altravia.com","timestamp":1563193303},"success":true,"message":"","error":null}}}},"404":{"description":"Not Found","content":{"application/json":{"example":{"success":false,"message":"contact LG56T does not exist in your database!","error":207,"data":null}}}}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Contact"],"summary":"Update a contact","description":"This method allows you to update contact information like name, email, privacy or voice. If the contact is a registrant and 'nationalitycode', 'entitytype', 'regcode' are already filled in, it is no longer possible to change them","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutBodyContact"},"example":{"consentforpublishing":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{}},"success":{"type":"boolean"},"message":{"type":"string"},"error":{"type":"integer"}}},"example":{"data":[],"message":"Greeting OK. Login OK. Contact 'AV-9826xxx609' is now up to date. Logout OK.","success":true,"error":null}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"success":false,"message":"Missing contact!","error":249,"data":null}}}},"404":{"description":"Not Found","content":{"application/json":{"example":{"success":false,"message":"contact LG56T does not exist in your database!","error":207,"data":null}}}},"406":{"description":"Not Acceptable","content":{"application/json":{"example":{"success":false,"message":"registrant contact, the org field is no longer editable!","error":242,"data":null}}}},"412":{"description":"Precondition Failed","content":{"application/json":{"example":{"success":false,"message":"Connection FAILED.","error":200,"data":null}}}},"417":{"description":"Expectation Failed","content":{"application/json":{"example":{"success":false,"message":"Error: unable to update contact: ","error":247,"data":null}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Contact"],"summary":"Delete a contact","description":"This method allows you to delete a contact within the system","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{}},"success":{"type":"boolean"},"message":{"type":"string"},"error":{"type":"integer"}}},"example":{"data":[],"message":"Greeting OK. Login OK. Contatc 'AV-14xxx37405' not available, trying to delete... OK. Logout OK.","success":true,"error":null}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"success":false,"message":"Missing contact!","error":249,"data":null}}}},"403":{"description":"Forbidden","content":{"application/json":{"example":{"success":false,"message":"contact Lxx676T is registrant for a domain, cancellation is not allowed!","error":260,"data":null}}}},"404":{"description":"Not Found","content":{"application/json":{"example":{"success":false,"message":"contact LG5xx does not exist in your database!","error":207,"data":null}}}},"412":{"description":"Precondition Failed","content":{"application/json":{"example":{"success":false,"message":"Connection FAILED.","error":200,"data":null}}}},"417":{"description":"Expectation Failed","content":{"application/json":{"example":{"success":false,"message":"Delete FAILED: ","error":264,"data":null}}}}},"security":[{"bearerAuth":[]}]}},"/check/{domain}":{"get":{"tags":["Domain"],"summary":"Check domain","description":"This method lets you know if a domain is available","parameters":[{"name":"domain","in":"path","description":"domain name","required":true,"schema":{"type":"string","example":"provasitotest.it"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string"}},"success":{"type":"boolean"},"message":{"type":"string"},"error":{"type":"integer"}}},"example":{"data":[],"success":true,"message":"Greeting OK. Login OK. Domain 'provasitotest.it' is available. Logout OK.","error":null}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"success":false,"message":"Missing domain!","error":204,"data":null}}}},"412":{"description":"Precondition Failed","content":{"application/json":{"example":{"success":false,"message":"Domain '{provasitotest.it}' is NOT available.","error":202,"data":null}}}}},"security":[{"bearerAuth":[]}]}},"/domain":{"get":{"tags":["Domain"],"summary":"List of your domains","description":"This method allows you to see the list of domains registered by your profile","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string"}},"success":{"type":"boolean"},"message":{"type":"string"},"error":{"type":"integer"}}},"example":{"data":["miosito.it","tuosito.it","sitox.it","sitoy.it"],"success":true,"message":"","error":null}}}},"404":{"description":"Not Found","content":{"application/json":{"example":{"success":false,"message":"your database is empty!","error":206,"data":null}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Domain"],"summary":"Register a new domain","description":"This method allows you to register a new domain or transfer an existing one. For the addition of a new domain are required: 'domain', 'registrant', 'admin', 'tech', 'dns'; for the transfer of an existing domain are mandatory: 'domain', 'authinfo'","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostBodyDomain"},"example":{"domain":"miosito.it","registrant":"AV-xxx3493248xxx","admin":"xx77xx","tech":["AV-14xx49324xxx"],"dns":["dns1.tuosito.com","dns2.tuosito.com","dns3.tuosito.com"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{}},"success":{"type":"boolean"},"message":{"type":"string"},"price":{"type":"integer"},"error":{"type":"integer"}}},"example":{"data":[],"message":"Greeting OK. Login OK. Domain 'miosito.it' is available. Domain 'miosito.it' created. Logout OK.","price":10,"success":true,"error":null}}}},"402":{"description":"Payment Required","content":{"application/json":{"example":{"success":false,"message":"Insufficient Credit in Wallet: 182.03","error":221,"data":null}}}},"406":{"description":"Not Acceptable","content":{"application/json":{"example":{"success":false,"message":"to much tech, 6 max!","error":213,"data":null}}}},"412":{"description":"Precondition Failed","content":{"application/json":{"example":{"success":false,"message":"Your credit of 5 does not cover the cost of 10.","error":219,"data":null}}}},"417":{"description":"Expectation Failed","content":{"application/json":{"example":{"success":false,"message":"Transfer FAILED: ","error":222,"data":null}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"example":{"success":false,"message":"registrant required!","error":209,"data":null}}}}},"security":[{"bearerAuth":[]}]}},"/domain/{domain}":{"get":{"tags":["Domain"],"summary":"Single domain","description":"This method allows you to see the single domain related to the parameter passed in the path","parameters":[{"name":"domain","in":"path","description":"Domain name","required":true,"schema":{"type":"string","example":"miosito.it"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Domain_Object"},"success":{"type":"boolean"},"message":{"type":"string"},"error":{"type":"integer"}}},"example":{"data":{"status":["ok"],"domain":"miosito.it","ns":["dns1.tuosito.com","dns2.tuosito.com","dns3.tuosito.com"],"registrant":"AV-xxxxxxxxx","admin":"AV-xxxxxxxx","tech":"AV-xxxxxxxxx","authinfo":"xxxxxxxxxx","crDate":"2002-11-14T00:00:00.000+01:00","exDate":"2020-02-21T23:59:59.000+01:00","dnssec":[],"owner":"api@altravia.com","timestamp":1565354292,"renewal_date":"09/09/2020"},"success":true,"message":"","error":null}}}},"404":{"description":"Not Found","content":{"application/json":{"example":{"success":false,"message":"domain test.it does not exist in your database!","error":205,"data":null}}}}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Domain"],"summary":"Update a domain","description":"This method allows you to update domain information like registrant, admin, tech or dns. Both the 'registrant' and the 'dns' must be updated alone and not in the presence of other parameters, not even together","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutBodyDomain"},"example":{"dns":["dns1.tuosito.com","dns2.tuosito.com","dns3.tuosito.com"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{}},"success":{"type":"boolean"},"message":{"type":"string"},"error":{"type":"integer"}}},"example":{"data":[],"message":"Greeting OK. Login OK. Adding NS: ns1.tuosito.com. Adding NS: ns2.tuosito.com. Adding NS: ns3.tuosito.com. Domain 'miosito.it' is now up to date. Logout OK.","success":true,"error":null}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"success":false,"message":"Missing domain!","error":204,"data":null}}}},"404":{"description":"Not Found","content":{"application/json":{"example":{"success":false,"message":"domain test.it does not exist in your database!","error":205,"data":null}}}},"406":{"description":"Not Acceptable","content":{"application/json":{"example":{"success":false,"message":"dns must contain 2 record at least!","error":216,"data":null}}}},"409":{"description":"Conflict","content":{"application/json":{"example":{"success":false,"message":"registrant and dns needs to be modified by itself!","error":250,"data":null}}}},"412":{"description":"Precondition Failed","content":{"application/json":{"example":{"success":false,"message":"Connection FAILED.","error":200,"data":null}}}},"417":{"description":"Expectation Failed","content":{"application/json":{"example":{"success":false,"message":"Update registrant to domain 'tuosito.it' FAILED: ","error":251,"data":null}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Domain"],"summary":"Delete a domain","description":"This method allows you to delete a domain","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{}},"success":{"type":"boolean"},"message":{"type":"string"},"error":{"type":"integer"}}},"example":{"data":[],"message":"Greeting OK. Login OK. Domain 'tuosito.it' not available, trying to delete... OK. Logout OK.","success":true,"error":null}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"success":false,"message":"Missing domain!","error":204,"data":null}}}},"404":{"description":"Not Found","content":{"application/json":{"example":{"success":false,"message":"domain test.it does not exist in your database!","error":205,"data":null}}}},"412":{"description":"Precondition Failed","content":{"application/json":{"example":{"success":false,"message":"Connection FAILED.","error":200,"data":null}}}},"417":{"description":"Expectation Failed","content":{"application/json":{"example":{"success":false,"message":"Delete FAILED: ","error":259,"data":null}}}}},"security":[{"bearerAuth":[]}]}},"/domain/{domain}/registrant":{"get":{"tags":["Domain"],"summary":"Get the registrant","description":"This method shows you who the registrant contact of your domain is","parameters":[{"name":"domain","in":"path","description":"domain name","required":true,"schema":{"type":"string","example":"miosito.it"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"registrant":{"type":"string"}}},"success":{"type":"boolean"},"message":{"type":"string"},"error":{"type":"integer"}}},"example":{"data":{"registrant":"AV-146xxx248xx6"},"success":true,"message":"","error":null}}}},"404":{"description":"Not Found","content":{"application/json":{"example":{"success":false,"message":"domain test.it does not exist in your database!","error":204,"data":null}}}}},"security":[{"bearerAuth":[]}]}},"/domain/{domain}/admin":{"get":{"tags":["Domain"],"summary":"Get the admin","description":"This method shows you who the admin contact of your domain is","parameters":[{"name":"domain","in":"path","description":"domain name","required":true,"schema":{"type":"string","example":"miosito.it"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"admin":{"type":"string"}}},"success":{"type":"boolean"},"message":{"type":"string"},"error":{"type":"integer"}}},"example":{"data":{"admin":"AV-1xxx4932xx976"},"success":true,"message":"","error":null}}}},"404":{"description":"Not Found","content":{"application/json":{"example":{"success":false,"message":"domain test.it does not exist in your database!","error":204,"data":null}}}}},"security":[{"bearerAuth":[]}]}},"/domain/{domain}/tech":{"get":{"tags":["Domain"],"summary":"Get the tech","description":"This method shows you who the tech contact of your domain is","parameters":[{"name":"domain","in":"path","description":"domain name","required":true,"schema":{"type":"string","example":"miosito.it"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"tech":{"type":"string"}}},"success":{"type":"boolean"},"message":{"type":"string"},"error":{"type":"integer"}}},"example":{"data":{"tech":"AV-1xxx4932xxxx"},"success":true,"message":"","error":null}}}},"404":{"description":"Not Found","content":{"application/json":{"example":{"success":false,"message":"domain test.it does not exist in your database!","error":204,"data":null}}}}},"security":[{"bearerAuth":[]}]}},"/domain/{domain}/tech/{handle}":{"delete":{"tags":["Domain"],"summary":"Delete the tech","description":"This method allows you to delete a tech from a specific domain","parameters":[{"name":"domain","in":"path","description":"domain name","required":true,"schema":{"type":"string","example":"miosito.it"}},{"name":"handle","in":"path","description":"Tech id","required":true,"schema":{"type":"string","example":"AV-1xxx4932xxx76"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"string"}},"success":{"type":"boolean"},"message":{"type":"string"},"error":{"type":"integer"}}},"example":{"data":[],"success":true,"message":"Greeting OK. Login OK. Removing TECH-C: xxx743. TECH-C xxx743 is deleted. Logout OK.","error":null}}}},"400":{"description":"Bad Request","content":{"application/json":{"example":{"success":false,"message":"you have to specify a tech to be able to remove it!","error":256,"data":null}}}},"404":{"description":"Not Found","content":{"application/json":{"example":{"success":false,"message":"domain test.it does not exist in your database!","error":205,"data":null}}}},"412":{"description":"Precondition Failed","content":{"application/json":{"example":{"success":false,"message":"Connection FAILED.","error":200,"data":null}}}},"417":{"description":"Expectation Failed","content":{"application/json":{"example":{"success":false,"message":"Removing TECH-C FAILED: ","error":257,"data":null}}}}},"security":[{"bearerAuth":[]}]}}},"externalDocs":{"description":"First time here? Generate a new access token","url":"https://console.openapi.com/oauth"}}