openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 9.21 kB
JSON
{"openapi":"3.0.0","info":{"contact":{"name":"apiteam@taxrates.io"},"description":"Taxrates.io API - the successfully streamlined tax rates monitoring process. Use 'Expand operation' link on the right to see details. Start with authentication: get your token and generate authorization string. We recommend using <a href='https://www.getpostman.com/' target=_new>Postman</a> when discovering our API. Happy using!","license":{"name":"Private licence - only for using by authorized Members of taxrates.io","url":"http://taxrates.io/license/"},"termsOfService":"http://taxrates.io/terms/","title":"Taxrates.io","version":"3.0","x-apisguru-categories":["financial"],"x-logo":{"url":"https://pbs.twimg.com/profile_images/919999226955927553/lLFntE3W_400x400.jpg"},"x-origin":[{"format":"swagger","url":"https://api.taxrates.io/taxrates_io_API.yaml","version":"2.0"}],"x-preferred":true,"x-providerName":"taxrates.io"},"paths":{"/oauth/dialog":{"get":{"description":"This is the second endpoint you have to hit. When you got your token here you can generate your Bearer authorization header. The header will be used to authorize every API call.","parameters":[{"description":"Domain name: api.taxrates.io","in":"query","name":"domain","required":true,"schema":{"type":"string"}},{"description":"The token you got from <<token>> endpoint","in":"query","name":"token","required":true,"schema":{"type":"string"}},{"description":"You have to use api_member as a scope.","in":"query","name":"clientscope","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON formatted authorization string in return.","content":{"application/json":{"schema":{"properties":{"Authorization":{"description":"Bearer: __Your authorization key will appear here__","type":"string"}},"type":"object"}}}},"404":{"description":"No valid token found You have to call <<token>> endpoint to get/refresh your token first."},"default":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"summary":"Authorization endpoint","tags":["Authentication"]}},"/oauth/token":{"get":{"description":"This the very first URL you must hit when you want to use taxrates.io API. When you got your Client ID key and Client Secret key you are able to use our API resources.","parameters":[{"description":"Domain name: api.taxrates.io","in":"query","name":"domain","required":true,"schema":{"type":"string"}},{"description":"Your Client ID goes here. Check the dashboard if you do not know your Client ID.","in":"query","name":"clientid","required":true,"schema":{"type":"string"}},{"description":"Your Client Secret key goes here. Check the dashboard if you do not know your Client Secret key.","in":"query","name":"clientsecret","required":true,"schema":{"type":"string"}},{"description":"You have to use api_member as a scope.","in":"query","name":"clientscope","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. JSON formatted string in return.","content":{"application/json":{"schema":{"properties":{"clientid":{"description":"Your Client ID key","type":"string"},"domain":{"description":"The domain you are operating","type":"string"},"token":{"description":"Your token","type":"string"},"valid_to":{"description":"The date until your token is valid","type":"string"}},"type":"object"}}}},"404":{"description":"No Client ID found."},"default":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"summary":"Token generating URL","tags":["Authentication"]}},"/tax/byaddress":{"post":{"description":"This endpoint returns tax rates for the country based on the address provided","parameters":[{"description":"Domain name: api.taxrates.io","in":"query","name":"domain","required":true,"schema":{"type":"string"}},{"description":"You can filter your taxes by one of following types: 'standard', 'reduced', 'second reduced', 'third reduced' and 'super reduced'.","in":"query","name":"filter","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Address"}}},"description":"Address","required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rates"}}}},"404":{"description":"Country not found. Please check you address and make sure it is valid."},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}],"summary":"Get tax rates by address","tags":["Tax service"]}},"/tax/countrycode":{"get":{"description":"This endpoint returns all available tax rates for selected country","parameters":[{"description":"Domain name: api.taxrates.io","in":"query","name":"domain","required":true,"schema":{"type":"string"}},{"description":"Country code alpha 2","in":"query","name":"country_code","required":true,"schema":{"type":"string"}},{"description":"You can filter your taxes by one of following types: 'standard', 'reduced', 'second reduced', 'third reduced' and 'super reduced'.","in":"query","name":"filter","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rates"}}}},"404":{"description":"Country not found. Have you provided correct alpha-2 country code?"},"500":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}],"summary":"Returns tax rate for selected country","tags":["Tax service"]}},"/tax/ip":{"get":{"description":"This endpoint will return tax rates for country discovered based on Customer's IP address","parameters":[{"description":"Domain name: api.taxrates.io","in":"query","name":"domain","required":true,"schema":{"type":"string"}},{"description":"Customer's IP address","in":"query","name":"ip","required":true,"schema":{"type":"string"}},{"description":"You can filter your taxes by one of following types: 'standard', 'reduced', 'second reduced', 'third reduced' and 'super reduced'.","in":"query","name":"filter","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"An array of tax rates for VAT, GST & TAX","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Rates"},"type":"array"}}}},"404":{"description":"Geolocation can not be processed/No matching country found"},"default":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}],"summary":"Tax rates by geolocation based on Customer IP address","tags":["Tax service"]}},"/tax/rates":{"get":{"description":"This method returns all tax rates configured on Member's account","parameters":[{"description":"Domain name: api.taxrates.io","in":"query","name":"domain","required":true,"schema":{"type":"string"}},{"description":"You can filter your taxes by one of following types: 'standard', 'reduced', 'second reduced', 'third reduced' and 'super reduced'.","in":"query","name":"filter","required":false,"schema":{"type":"string"}},{"description":"You must provide a zip code if one of your selected countries is United States and you've had selected a state on your Taxrates.io member's dashboard.","in":"query","name":"zip","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"An array of tax rates","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Rates"},"type":"array"}}}},"404":{"description":"No configured tax rates found. Have you added any country to your account?"},"default":{"description":"Unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"Bearer":[]}],"summary":"Get all tax rates","tags":["Tax service"]}}},"servers":[{"url":"https://api.taxrates.io/api/v3"}],"components":{"securitySchemes":{"Bearer":{"in":"header","name":"Authorization","type":"apiKey"}},"schemas":{"Address":{"properties":{"apartment_number":{"description":"Apartment number if any","type":"string"},"city":{"description":"City name","type":"string"},"country":{"description":"Country name","type":"string"},"postal_code":{"description":"City zip code","type":"string"},"state":{"description":"Province or state","type":"string"},"street":{"description":"Street","type":"string"},"street_number":{"description":"Street number","type":"string"}},"type":"object"},"Error":{"properties":{"code":{"format":"int32","type":"integer"},"fields":{"type":"string"},"message":{"type":"string"}},"type":"object"},"Rates":{"properties":{"country_name":{"description":"The country name","type":"string"},"taxes":{"items":{"$ref":"#/components/schemas/Tax"},"type":"array"}},"type":"object"},"Tax":{"properties":{"Country":{"description":"The country name","type":"string"},"Type":{"description":"The tax type","type":"string"},"data_name":{"description":"The tax name and description (VAT, GST, PIT, CIT etc)","type":"string"},"data_value":{"description":"The tax value in percents","type":"string"}},"type":"object"}}}}