Giter VIP home page Giter VIP logo

vat-service's Introduction

VAT Check Service

This service checks German VAT numbers against the VIES database

Installation

Clone the repository, then run:

make install

Usage

Simply run;

make run MODE={'debug' | 'release' | 'test'}

And you'll be able to send requests to the service at the address given in your terminal – by default http://localhost:8080

Here's an example request to send VAT number DE123456789 to the production service:

curl -d '{"vatNumber": "DE123456789"}' -H "Content-Type: application/json" -X POST http://localhost:3000/data

This request will return that DE123456789 is not a valid VAT number:

{
  "vatNumber": "DE123456789",
  "valid": false,
  "message": ""
}

Shape of the data

Input has the following shape:

type CheckVatRequest struct {
    VATNumber string `json:"vatNumber"`
}

Output has the following shape:

type CheckVatResponse struct {
    //The VAT number that was evaluated
    VATNumber string `json:"vatNumber"`
    //Whether the VAT number is valid
    Valid     bool   `json:"valid"`
    //Any error message, e.g. "VAT number should be at least 9 characters"
    Message   string `json:"message"`
}

vat-service's People

Contributors

ramseskamanda avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.