API


Roamingtails comes with an out-of-the-box API, which will allow you to provide an API to your users or build a mobile app from your API.

In this section we will go into more depth on how you can use the Roamingtails API.

Configurations

Post Configurations

As System Admin, after authenticated you can create a county by calling the Configurations api endpoint.

    POST https://api.roamingtails.co/api/v1/configurations
    HEADER  'Accept': 'application/json',
            HEADER  'Authorization': 'Bearer ' + token,
            'Content-Type': 'application/x-www-form-urlencoded',

    RETURN
    config {
        data {
            0: {
                county_site_name: "jamescountyva"
                county_site_slogan: "A pet friendly county"
                logo: base64_image
                tags: "dogs, cats"
                email: "joe@jamescountyva.com"
                frontpage: "home"
                rows: 10
                address: 101 Main St.
            }
        }
    }
METHOD URI Bearer TOKEN
POST https://api.roamingtails.co/api/v1/configurations Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Find A Configurations

A configuration can be find and data retreived by calling the configurations/{IdOrCountySiteName} api endpoint.

    GET https://api.roamingtails.co/api/v1/configurations/{IdOrCountySiteName}

    PAYLOAD  
        'Accept': 'application/json',
        HEADER  'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/x-www-form-urlencoded',
        {
            county_site_name: "jamescountyva"
            county_site_slogan: "A pet friendly county"
            logo: base64_image
            tags: "dogs, cats"
            email: "joe@jamescountyva.com"
            frontpage: "home"
            rows: 10
            address: 101 Main St.
            zipcodes: [
                {
                    "id": 1,
                    "county_id": 2,
                    "zipcode": "23089",
                    "zipcode_name": "Lanexa"
                },
                {
                    "id": 2,
                    "county_id": 2,
                    "zipcode": "23168",
                    "zipcode_name": "Toano"
                },
            ]
       }
    RETURN 200
METHOD URI Bearer TOKEN
GET https://api.roamingtails.co/api/v1/configurations/{IdOrCountySiteName} Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Update A Configuration

A configuration can be updated and data changed by calling the configurations api endpoint.

    PUT https://api.roamingtails.co/api/v1/configurations/{id}

        'Accept': 'application/json',
        HEADER  'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/x-www-form-urlencoded',

        RETURN
        data {
            county_site_name: "jamescountyva"
            county_site_slogan: "A pet friendly county"
            logo: base64_image
            tags: "dogs, cats"
            email: "joe@jamescountyva.com"
            frontpage: "home"
            rows: 10
       }
    RETURN 200
METHOD URI Bearer TOKEN
PUT https://api.roamingtails.co/api/v1/configurations/{id} Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Delete A Configuration

As Admin user, after authenticated you can request to delete a configuration by calling the configurations/{id} api endpoint.

    DELETE https://api.roamingtails.co/api/v1/configurations/{id}

        'Accept': 'application/json',
        HEADER  'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/x-www-form-urlencoded',

    RETURN 200
METHOD URI Bearer TOKEN
DELETE https://api.roamingtails.co/api/v1/configurations/{id} Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

GET A County Resources - Restaurants, Hotels and services

You can request all the resources in a county by calling the configurations/{restaurants_or_services_or_hotels}/{county_site_name} api endpoint. restaurants_or_services_or_hotels can be restaurants like in configurations/restaurants/{county_site_name} or services like in configurations/{services}/{county_site_name} or hotels like in configurations/{hotels}/{county_site_name}

    GET https://api.roamingtails.co/api/v1/configurations/{restaurants_or_services_or_hotels}/{county_site_name}

        'Accept': 'application/json',
        'Content-Type': 'application/x-www-form-urlencoded',

    RETURN 200
METHOD URI Bearer TOKEN
GET https://api.roamingtails.co/api/v1/configurations/{restaurants_or_services_or_hotels}/{county_site_name} Bearer: --

Registering A User / register

Users can be registered in our application by visiting the /register route. The data need to be sent to this endpoint:

    POST https://api.roamingtails.co/api/v1/register
    PAYLOAD  
        'Accept': 'application/json',
        'Content-Type': 'application/x-www-form-urlencoded',
        {
            email: "jdoe@mail.com"
            first_name: "Joe"
            last_name: "Doe"
            address1: "123 Main Street"
            address2: "A"
            apt: "313"
            city: "Arlington"
            zipcode: "22206"
            state: "VA"
            county: county.value,
            phone: "2020000000"
            mobile: "2020000001"
            domain: "arlingtoncountyva"
            cert_date: certDate.value,
            auto_renew: autoRenew.checked,
            certificate: certificate.value
            cert_verified: false,
            expiration_date: [expiration_date: e.i. 1 or 2 or 3],
            tag_number: tagNo,
            tag_activated: false,
            pet_type: cat.checked?"Cat":"Dog",
            pet_status: spayed.checked?"Spayed/Neutered":"Unaltered",
            pet_gender: male.checked?"Male":"Female",
            pet_name: petName.value,
            pet_dob: petDob.value,
            pet_weight: petWeight.value,
            pet_breed: petBreed.value,
            pet_color: petColor.value,
            pet_hair: petHair.value,
            spayed_neutered: true/false
       }
    RETURN 200

After successfully sent, a verification email will be sent and you'll need to confirm the email provided. Once the verification is done, you'll then be able to log in.

Login

After a user has created an account through your application, they can login by visiting the /login route. After successfully logging in the user will then be redirected to their dashboard.

You'll need to send the credentials to the api to get an Access Token: Your username (Email) and password as:

    const data = 'email=request_email&password=request_password';
    POST https://api.roamingtails.co/api/v1/authenticate?data
    HEADER  'Accept': 'application/json',
            'Content-Type': 'application/x-www-form-urlencoded',

    RETURN token
METHOD URI Bearer TOKEN
GET https://api.roamingtails.co/api/v1/authenticate?email=request_email&password=request_password -

If the authentication goes well, you'll receive a token that you can then use to get the user's details as following:

    GET https://api.roamingtails.co/api/v1/authenticate/user
    HEADER  'Authorization': 'Bearer ' + token,
            'Content-Type': 'application/x-www-form-urlencoded',

    RETURN
    user{
        id: 50
        name: ""
        email: "joe@mail.com"
        created_at: "2010-07-14 19:50:09"
        updated_at: "2020-01-27 07:59:01"
        api_token: null
        first_name: "Joe"
        last_name: "Doe"
        address1: "123 Main Street"
        address2: "A"
        apt: "313"
        city: "Arlington"
        zipcode: "22206"
        state: "VA"
        country_code: null
        phone: "2020000000"
        mobile: "2020000001"
        domain: "arlingtoncountyva"
        verification_code: "becb62c3fa9a62de0853bd37c8580e44255a14963b5def1f15d9f25bd8a1930c"
        is_verified: 1
        activation_code: null
        user_status: "1"
        picture: "1580129941.png"
        share_info: 0
        temp_address1: null
        temp_address2: null
        temp_address_apt: null
        temp_address_city: null
        temp_address_zipcode: null
        temp_address_state: null
        temp_address_country_code: null
        temp_address_first_name: null
        temp_address_last_name: null
        temp_address_phone: null
        temp_address_cell: null
        privileges: 1
        referrer_id: "054497"
        referrer_url: "hadim"
        referrer_lng_id: null
        lat: "38.8454702"
        lng: "-77.0859432"
    }
METHOD URI Bearer TOKEN
GET https://api.roamingtails.co/api/v1/authenticate/user Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Users

Get Users

As Admin user, after authenticated you can request access to your user data by calling the get/users api endpoint.

    GET https://api.roamingtails.co/api/v1/get/users
    HEADER  'Accept': 'application/json',
            HEADER  'Authorization': 'Bearer ' + token,
            'Content-Type': 'application/x-www-form-urlencoded',

    RETURN
    user{
        data{
            0: {
                address1: "123 Main Street"
                address2: null
                city: "Arlington"
                created_at: "2020-04-08 10:30:55"
                dob: "1990-04-08 00:00:00"
                email: "jhon.doe@rtmail.com"
                first_name: "Jhon"
                id: 396
                last_name: "Doe"
                lat: null
                lng: null
                mobile: null
                names: "Mx"
                pets: {
                    0: {
                        breed: "German"
                        color: "White"
                        created_at: "2018-08-23 12:42:49"
                        description: "Lovely little fury."
                        dob: "2018-08-01 00:00:00"
                        gender: null
                        hair: null
                        id: number
                        image: "1535024569.png"
                        insurance_id: ""
                        insurance_name: ""
                        medical_records: "1537830431.png"
                        microchip_id: ""
                        name: "Krista"
                        opt_out_dashboard_img: 0
                        other_type: ""
                        owner_id: "50"
                        tag_number: "1234567890"
                        type: "cat"
                        updated_at: "2020-05-20 11:18:20"
                        vet_address: "123 Main Street"
                        vet_name: ""
                        vet_number: ""
                        weight: null
                    }
                }
                phone: null
                state: "VA"
                tag_number: "RT01515543"
                tags: 1
                zipcode: "22206"
            }
        }
    }
METHOD URI Bearer TOKEN
GET https://api.roamingtails.co/api/v1/get/users Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Find A User

As Admin user, after authenticated you can request to find a user's data by calling the user/{id} api endpoint.

    GET https://api.roamingtails.co/api/v1/user/{id}

    PAYLOAD  
        'Accept': 'application/json',
        HEADER  'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/x-www-form-urlencoded',
        {
            activation_code: null
            address1: "123 Main Rd"
            address2: ""
            api_token: null
            apt: "313"
            city: "Arlington"
            country_code: null
            county: "Arlington"
            created_at: "2018-07-14 19:50:09"
            email: "jdoe@rtmail.com"
            first_name: "J."
            id: 50
            is_verified: 1
            last_name: "Doe"
            lat: ""
            lng: ""
            mobile: ""
            name: ""
            phone: ""
            picture: "1580129941.png"
            privileges: 1
            referrer_id: "054497"
            referrer_lng_id: null
            referrer_url: ""
            share_info: 0
            state: "VA"
            temp_address1: ""
            temp_address2: null
            temp_address_apt: null
            temp_address_cell: null
            temp_address_city: null
            temp_address_country_code: null
            temp_address_first_name: ""
            temp_address_last_name: ""
            temp_address_phone: ""
            temp_address_state: null
            temp_address_zipcode: null
            updated_at: "2020-05-28 18:02:15"
            updated_by: 50
            user_status: "1"
            verification_code: "becb62c3fa9a62de0853bd37c8580e44255a14963b5def1f15d9f25bd8a1930c"
            zipcode: "22206",
            pets:  [
                {
                    "id": 66,
                    "owner_id": "50",
                    "email": "jane.doe@rtmail.com",
                    "name": "Krista",
                    "type": "dog",
                    "other_type": null,
                    "dob": "2018-08-01 00:00:00",
                    "breed": "German",
                    "color": "White",
                    "vet_name": "",
                    "vet_number": "",
                    "image": "1535024569.png",
                    "address1": "123 Main Street",
                    "address2": "",
                    "apt": "",
                    "city": "WAKE FOREST",
                    "zipcode": "27587",
                    "state": "NC",
                    "country_code": "",
                    "created_at": "2018-08-23T16:42:49.000000Z",
                    "updated_at": "2021-06-24T17:26:29.000000Z",
                    "tag_number": "1528436040",
                    "description": "Krista's profile",
                    "vet_address": "123 Main Street",
                    "medical_records": "1537830431.png",
                    "insurance_name": "",
                    "insurance_id": "",
                    "microchip_id": "",
                    "crc": null,
                    "opt_out_dashboard_img": 0,
                    "hair": "",
                    "gender": "Male",
                    "status": null,
                    "weight": null,
                    "dangerous_pet": null,
                    "spayed_neutered": null,
                    "dvm_license_number": null,
                    "notes": null,
                    "rabiescert_count": 0,
                    "license_count": 1,
                    "rabiescert": [],
                    "license": [
                        {
                            "id": 7,
                            "pet_id": 66,
                            "license_date": "2021-11-14",
                            "license_duration": 1,
                            "license_expiration_date": "2021-11-14 18:51:52",
                            "last_renewed_by": 50,
                            "created_at": "2021-11-14T23:51:52.000000Z",
                            "updated_at": "2021-11-14T23:51:52.000000Z",
                            "deleted_at": null
                        }
                    ]
                },
            ],
            exchanges: [
                {
                    "id": 1,
                    "user_id": 50,
                    "send_by": 40,
                    "type": "Email",
                    "subject": "Tag sent",
                    "updated_at": "2021-12-06T13:25:37.000000Z",
                    "content": "Sending the tag to user by mail to the address provided.",
                    "created_at": "2021-12-06T13:25:37.000000Z",
                    "deleted_at": null
                },
                {
                    "id": 2,
                    "user_id": 50,
                    "send_by": 50,
                    "type": "Text",
                    "subject": "Text Msg sent",
                    "updated_at": "2021-12-06T13:30:12.000000Z",
                    "content": "Sending a text nessage to user to make sure they pay on time their tag renewal fees.",
                    "created_at": "2021-12-06T13:30:12.000000Z",
                    "deleted_at": null
                }
            ]
       }
    RETURN 200
METHOD URI Bearer TOKEN
GET https://api.roamingtails.co/api/v1/user/{id} Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Update A User

As Admin user, after authenticated you can request to all or a part of your user's data by calling the user_update api endpoint.

    POST https://api.roamingtails.co/api/v1/user_update/{id}

        'Accept': 'application/json',
        HEADER  'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/x-www-form-urlencoded',

        RETURN
        data {
            'id': this.userId,
            'first_name': this.first_name,
            'last_name': this.last_name,
            'mobile': this.mobile,
            'phone': this.phone,
            'address1': this.address1,
            'address2': this.address2,
            'apt': this.apt,
            'city': this.city,
            'zipcode': this.zipcode,
            'state': this.state,
            'temp_address1': this.temp_address1,
            'temp_address2': this.temp_address2,
            'temp_address_apt': this.temp_address_apt,
            'temp_address_zipcode': this.temp_address_zipcode,
            'temp_address_state': this.temp_address_state,
            'temp_address_country_code': this.temp_address_country_code,
            'temp_address_first_name': this.temp_address_first_name,
            'temp_address_last_name': this.temp_address_last_name,
            'temp_address_phone': this.temp_address_phone,
            'temp_address_cell': this.temp_address_cell,
            'picture': formValue.picture
       }
    RETURN 200
METHOD URI Bearer TOKEN
POST https://api.roamingtails.co/api/v1/user_update/{id} Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Delete A User

As Admin user, after authenticated you can request to delete a user's data by calling the user/{id} api endpoint.

    DELETE https://api.roamingtails.co/api/v1/user/{id}

        'Accept': 'application/json',
        HEADER  'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/x-www-form-urlencoded',

    RETURN 200
METHOD URI Bearer TOKEN
DELETE https://api.roamingtails.co/api/v1/user/{id} Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Exchanges

Get Exchanges

As Admin user, after authenticated you can access to user's data and get all the exhanges by calling the exchanges/{id} api endpoint.

    GET https://api.roamingtails.co/api/v1/exchanges/{id}
    HEADER  'Accept': 'application/json',
            HEADER  'Authorization': 'Bearer ' + token,
            'Content-Type': 'application/x-www-form-urlencoded',

    RETURN
    user{
        data {
            id: 128
            subject: 'Tag sent'
            type: "email || text"
            created_at: "2021-12-12 10:30:55"
            content: "Sending the tag to user by mail to the address provided."
            sent_by: 40
            user_id: 1440
        }
    }
METHOD URI Bearer TOKEN
GET https://api.roamingtails.co/api/v1/exchanges/id Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Create An Exchange

As Admin user, after succesfully authenticated can exchange with users by sending Email | Text by posting data to the api endpoint exchange.

    POST https://api.roamingtails.co/api/v1/exchanges

    PAYLOAD  
        'Accept': 'application/json',
        HEADER  'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/x-www-form-urlencoded',
        {
            id: 128
            subject: 'Tag sent'
            type: "email || text"
            content: "Sending the Roamingtails tag to the user by mail to the provided address."
            user_id: 1440
        }
    RETURN 200
METHOD URI Bearer TOKEN
POST https://api.roamingtails.co/api/v1/exchanges Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Delete An Exchange

As Admin user, after succesfully authenticated can delete an exchange with users by sending Email | Text by sending data to the api endpoint exchanges/id.

    DELETE https://api.roamingtails.co/api/v1/exchanges/{id}

    PAYLOAD  
        'Accept': 'application/json',
        HEADER  'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/x-www-form-urlencoded',
        {
            id: 4
        }
    RETURN 200
METHOD URI Bearer TOKEN
DELETE https://api.roamingtails.co/api/v1/exchanges/{id} Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Pets profile

Get Pets

Users can see their pets profile, after authenticated they can send a request by calling the pets api endpoint. County staff can all use this api endpoint to get all their constituents' pets.

    GET https://api.roamingtails.co/api/v1/pets
    HEADER  'Accept': 'application/json',
            HEADER  'Authorization': 'Bearer ' + token,
            'Content-Type': 'application/x-www-form-urlencoded',

    RETURN
    data: {
        current_page: 1
        data: [
            0 {
                breed: "German"
                color: "White"
                crc: null
                created_at: "2018-08-23 12:42:49"
                description: "Sweetheart! Our fur baby daughter..."
                dob: "2018-08-01"
                gender: null
                hair: null
                id: 66
                image: "1535024569.png"
                insurance_id: ""
                insurance_name: ""
                medical_records: "1537830431.png"
                microchip_id: ""
                name: "Krista"
                opt_out_dashboard_img: 0
                other_type: null
                owner_id: "50"
                status: null
                tag_number: "11234567890"
                type: "cat"
                updated_at: "2020-04-15 16:13:20"
                vet_address: "123 Mainn Street"
                vet_name: ""
                vet_number: ""
                weight: null
            }
        ]
        first_page_url: "http://rt.sntu/api/v1/pets/all?page=1"
        from: 1
        last_page: 14
        last_page_url: "http://rt.sntu/api/v1/pets/all?page=14"
        next_page_url: "http://rt.sntu/api/v1/pets/all?page=2"
        path: "http://rt.sntu/api/v1/pets/all"
        per_page: 99
        prev_page_url: null
        to: 99
        total: 1293
        success: true
METHOD URI Bearer TOKEN
GET https://api.roamingtails.co/api/v1/pets Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Get a Pet

Users can query a specific pet to access to its profile, after authenticated they can send a request by calling the pets/{id} api endpoint.

    GET https://api.roamingtails.co/api/v1/pets/{id}
    HEADER  'Accept': 'application/json',
            HEADER  'Authorization': 'Bearer ' + token,
            'Content-Type': 'application/x-www-form-urlencoded',

    RETURN
    data {
        breed: "German"
        color: "White"
        crc: null
        created_at: "2018-08-23 12:42:49"
        description: "Sweetheart! Our fur baby daughter..."
        dob: "2018-08-01"
        email: "jdoe@rtmail.com"
        gender: null
        hair: null
        id: 66
        image: "1535024569.png"
        insurance_id: ""
        insurance_name: ""
        medical_records: "1537830431.png"
        microchip_id: ""
        name: "Krista"
        opt_out_dashboard_img: 0
        other_type: null
        owner_id: "50"
        status: null
        tag_number: "11234567890"
        type: "cat"
        updated_at: "2020-04-15 16:13:20"
        vet_address: "123 Mainn Street"
        vet_name: ""
        vet_number: ""
        weight: null
        notes: 'Notes'
    }
METHOD URI Bearer TOKEN
GET https://api.roamingtails.co/api/v1/pets/{id} Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Register a Pet

Users can register a pet profile, after authenticated they can send a request by calling the pets api endpoint.

    POST https://api.roamingtails.co/api/v1/pets
    PAYLOAD  
        'Accept': 'application/json',
        HEADER  'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/x-www-form-urlencoded',
        {
            'id': data.pet_id,
            'name': data.name,
            'type': data.type,
            'other_type': data.other_type,
            'dob': data.dob,
            'breed': data.breed,
            'color': data.color,
            'vet_name': data.vet_name,
            'vet_number': data.vet_number,
            'image': values.image,
            'tag_number': data.tag_number,
            'description': data.description,
            'vet_address': data.vet_address,
            'medical_records': values.medical_records,
            'crc': values.crc,
            'insurance_name': data.insurance_name,
            'insurance_id': data.insurance_id,
            'microchip_id': data.microchip_id,
            'opt_out_dashboard_img': data.opt_out_dashboard_img,
            'dangerous_pet': 0,
            spayed_neutered: true/false,
            notes: 'Notes'
        }
METHOD URI Bearer TOKEN
POST https://api.roamingtails.co/api/v1/pets Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Update a Pet

Users can update a specific pet to access to its profile, after authenticated they can send a request by calling the pets/edit api endpoint.

    POST https://api.roamingtails.co/api/v1/pets/edit
    PAYLOAD  
        'Accept': 'application/json',
        HEADER  'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/x-www-form-urlencoded',
        {
            'id': data.pet_id,
            'name': data.name,
            'type': data.type,
            'other_type': data.other_type,
            'dob': data.dob,
            'breed': data.breed,
            'color': data.color,
            'vet_name': data.vet_name,
            'vet_number': data.vet_number,
            'image': values.image,
            'tag_number': data.tag_number,
            'description': data.description,
            'vet_address': data.vet_address,
            'medical_records': values.medical_records,
            'crc': values.crc,
            'insurance_name': data.insurance_name,
            'insurance_id': data.insurance_id,
            'microchip_id': data.microchip_id,
            'opt_out_dashboard_img': data.opt_out_dashboard_img,
            'dangerous_pet': data.dangerous_pet,
            spayed_neutered: true/false,
            notes: 'Notes'
        }
METHOD URI Bearer TOKEN
POST https://api.roamingtails.co/api/v1/pets/edit Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Delete a Pet

Users can delete a pet profile, after authenticated they can send a request by calling the pets/{id} api endpoint.

    DELETE https://api.roamingtails.co/api/v1/pets/{id}
    HEADER  'Accept': 'application/json',
            HEADER  'Authorization': 'Bearer ' + token,
            'Content-Type': 'application/x-www-form-urlencoded',

    RETURN 200
METHOD URI Bearer TOKEN
DELETE https://api.roamingtails.co/api/v1/pets/{id} Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Rabies certificate

Create a rabies certificate

Users (veterinarians) can create rabies certificate and send them to the county's representitative by using the register rabies certificate rabies api endpoint.

    POST https://api.roamingtails.co/api/v1/rabies
    PAYLOAD  
        'Accept': 'application/json',
        HEADER  'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/x-www-form-urlencoded',
        {
            'pet_id': data.pet_id, // Optional
            'cert_date': data.cert_date,
            'cert_time': data.cert_time,
            'auto_renew': data.auto_renew,
            'certificate': data.certificate,
            'cert_verified': data.cert_verified,
            'created_by': data.created_by,
            'date_of_last_rabies': data.date_of_last_rabies
        }
METHOD URI Bearer TOKEN
POST https://api.roamingtails.co/api/v1/rabies Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

update a rabies certificate

Users (veterinarians, county staff) can update a rabies certificate by using the rabies certificate rabies update api endpoint.

    PUT https://api.roamingtails.co/api/v1/rabies
    PAYLOAD  
        'Accept': 'application/json',
        HEADER  'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/x-www-form-urlencoded',
        {
            'pet_id': pet_id
        }
METHOD URI Bearer TOKEN
PUT https://api.roamingtails.co/api/v1/rabies Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Renew a rabies certificate

Users (veterinarians, county staff) can renew rabies certificate by using the rabies certificate rabies renew api endpoint.

    POST https://api.roamingtails.co/api/v1/rabies/renew
    PAYLOAD  
        'Accept': 'application/json',
        HEADER  'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/x-www-form-urlencoded',
        {
            'pet_id': pet_id
        }
METHOD URI Bearer TOKEN
POST https://api.roamingtails.co/api/v1/rabies/renew Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

License

Create a License certificate

Users (veterinarians) can create a license by making a post request to the API endpoint license.

    POST https://api.roamingtails.co/api/v1/licenses
    PAYLOAD  
        'Accept': 'application/json',
        HEADER  'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/x-www-form-urlencoded',
        {
            'pet_id': 1,
            'license_duration': 4,
        }
METHOD URI Bearer TOKEN
POST https://api.roamingtails.co/api/v1/license Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Verify a Pet License

RT/County staffs can verify a pet's license by sending a POST requestion to the endpoint /licenses/validation route. Only the petId will be needed in the payload to find the license and validate the License.

    POST https://api.roamingtails.co/api/v1/licenses/validation
    PAYLOAD  
        'Accept': 'application/json',
        'Content-Type': 'application/x-www-form-urlencoded',
        {
            pet_id: 1
       }
    RETURN 200
METHOD URI Bearer TOKEN
POST https://api.roamingtails.co/api/v1/licenses/validation Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Get a Pet License

RT/County staffs can get a pet's license by sending a POST requestion to the endpoint /licenses/{petId} route. Only the petId will be needed in the parameter to find the license and validate the License.

    Get https://api.roamingtails.co/api/v1/licenses/{petId}
    RETURN 200
METHOD URI Bearer TOKEN
POST https://api.roamingtails.co/api/v1/licenses/{petId} Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Tags

Activate a Tag

After a User has created a pet profile, he/she can then link their pet with a tag by activating that latter. Here's hoow it's done from the Tag Activate api endpoint.

    POST https://api.roamingtails.co/api/v1/tags/activate/{tagNumber}/{petId}
    HEADER  'Accept': 'application/json',
            HEADER  'Authorization': 'Bearer ' + token,
            'Content-Type': 'application/x-www-form-urlencoded',

    RETURN 200
METHOD URI Bearer TOKEN
POST https://api.roamingtails.co/api/v1/tags/activate/{tagNumber}/{petId} Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Deactivate a Tag

A tag can be deactivated a used with another tag profile. Here's hoow it's done from the Tag Deactivate api endpoint.

    POST https://api.roamingtails.co/api/v1/tags/deactivate/{tagNumber}/{petId}
    HEADER  'Accept': 'application/json',
            HEADER  'Authorization': 'Bearer ' + token,
            'Content-Type': 'application/x-www-form-urlencoded',

    RETURN 200
METHOD URI Bearer TOKEN
POST https://api.roamingtails.co/api/v1/tags/deactivate/{tagNumber}/{petId} Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9
METHOD URI Bearer TOKEN
POST https://api.roamingtails.co/api/v1/tags/activate/{tagNumber}/{petId} Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Locate/Scan a Tag / Alert An Owner

A pet can be located by scanning their tag but this will send an alert to the pet owner with the location where the tag was scanned from. Here's the api endpoint.

    POST https://api.roamingtails.co/api/v1/tag/scanner
    HEADER  'Accept': 'application/json',
            HEADER  'Authorization': 'Bearer ' + token,
            'Content-Type': 'application/x-www-form-urlencoded',
            {
                'tag': data.tag_number,
                'latitude': data.latitude,
                'longitude': data.longitude
            }

    RETURN 200
METHOD URI Bearer TOKEN
POST https://api.roamingtails.co/api/v1/tag/scanner Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Locate a Pet from scanned Tag

A pet can be located when its tag has been scanned and an email/text received by the owner. Here's the api endpoint.

    GET https://api.roamingtails.co/api/v1/tags/locations/getLocationsFromEmail/{token}
    HEADER  'Accept': 'application/json',
            'Content-Type': 'application/x-www-form-urlencoded',
            {
              'id', 'tag_number', 'owner_id', 'pet_id', 'created_at', 'updated_at', 'latitude', 'longitude', 'address', 'new', 'nexmoid', 'enc_locations', 'pet.name', 'pet.owner_id', 'pet.email', 'pet.type', 'pet.id', 'pet.address1', 'pet.city', 'pet.zipcode', 'pet.state', 'users.phone', 'users.mobile'
            }

    RETURN 200
METHOD URI Bearer TOKEN
GET https://api.roamingtails.co/api/v1/tags/locations/getLocationsFromEmail/{token} Bearer: -

Pet Locations

This api endpoint returns all the locations where a pet's tag has been scanned from. Here it's.

    GET https://api.roamingtails.co/api/v1/tags/locations/get
    HEADER  'Accept': 'application/json',
            'Authorization': 'Bearer ' + token,
            'Content-Type': 'application/x-www-form-urlencoded',
            {
                'id', 'tag_number', 'owner_id', 'pet_id', 'created_at', 'updated_at', 'latitude', 'longitude', 'address', 'new', 'nexmoid', 'enc_locations', 'pet.name', 'pet.owner_id', 'pet.email', 'pet.type', 'pet.id', 'pet.address1', 'pet.city', 'pet.zipcode', 'pet.state', 'users.phone', 'users.mobile'
            }

    RETURN 200
METHOD URI Bearer TOKEN
GET https://api.roamingtails.co/api/v1/tags/locations/get Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Search a Pet Profile by Tag

A missing pet can be found by searching its tag number. Here's hoow it's done from the Tag api endpoint.

    GET https://api.roamingtails.co/api/v1/pet/tag/{number}
    HEADER  'Accept': 'application/json',
            'Content-Type': 'application/x-www-form-urlencoded',

    RETURN
        data {
            activation_code: null
            address: null
            address1: "123 Main Street"
            address2: ""
            api_token: null
            apt: ""
            breed: "German"
            city: "WAKE FOREST"
            color: "White"
            spayed_neutered: true/false
            country_code: ""
            county: "WAKE"
            crc: null
            created_at: "2018-08-23 12:42:49"
            description: "Lovely little fury"
            dob: "2018-08-01 00:00:00"
            email: "jdoe@email.com"
            first_name: "J."
            gender: null
            hair: null
            id: 66
            notes: 'Notes'
            image: "1535024569.png"
            insurance_id: ""
            insurance_name: ""
            is_verified: 1
            last_name: "DOE"
            lat: "11111111"
            latitude: "11111111"
            lng: "-77.122222"
            longitude: "-77.122222"
            medical_records: "1537830431.png"
            microchip_id: ""
            mobile: ""
            name: "Kris"
            opt_email: 1
            opt_out_dashboard_img: 0
            opt_sms: 1
            other_type: ""
            owner_id: "50"
            phone: ""
            picture: "1580129941.png"
            privileges: 1
            referrer_id: ""
            referrer_lng_id: null
            referrer_url: ""
            share_info: 0
            state: "NC"
            status: null
            tag_number: ""
            temp_address1: ""
            temp_address2: null
            temp_address_apt: null
            temp_address_cell: null
            temp_address_city: null
            temp_address_country_code: null
            temp_address_first_name: ""
            temp_address_last_name: ""
            temp_address_phone: ""
            temp_address_state: null
            temp_address_zipcode: null
            type: "cat"
            updated_at: "2020-04-26 08:12:42"
            user_status: "1"
            verification_code: ""
            vet_address: ""
            vet_name: ""
            vet_number: ""
            weight: null
            zipcode: "27587"
        }
METHOD URI Bearer TOKEN
GET https://api.roamingtails.co/api/v1/pet/tag/{number} -

Restaurants

Next, let's move on to learning how you can use this API to request Restaurants data. After we recieve the request, we can retrieve and return the data from our application. Here's how it's called:

    GET https://api.roamingtails.co/api/v1/restaurants
    HEADER  
        'Accept': 'application/json',
        'Content-Type': 'application/x-www-form-urlencoded',

    RETURN
    data{
        0: {
            address1: "1265 Airport Rd S"
            address2: ""
            apt: ""
            city: "Naples"
            country_code: ""
            created_at: "-0001-11-30 00:00:00"
            email: ""
            fees_sruct: ""
            id: 2047
            latitude: "26.141025"
            longitude: "-81.766099"
            name: "Rumba Cuban Cafe"
            pet_allowed: ""
            pet_weight_allowed: ""
            phone: "239-659-2996"
            state: "FL"
            updated_at: "-0001-11-30 00:00:00"
            website: "http://www.rumbacubancafe.com"
            zipcode: "34104"
        }
    }
METHOD URI Bearer TOKEN
GET https://api.roamingtails.co/api/v1/restaurants -

Services

Same as the Restaurants endpoint, let's move on to learning how you can use this API to request Services data. After we recieve the request, we can retrieve and return the data from our application. Here's how it's called:

    GET https://api.roamingtails.co/api/v1/services
    HEADER  
        'Accept': 'application/json',
        'Content-Type': 'application/x-www-form-urlencoded',

    RETURN
        data {
            0: {
                address1: "2624 Columbia Pike"
                address2: ""
                apt: ""
                city: "Arlington"
                country_code: ""
                created_at: "-0001-11-30 00:00:00"
                email: ""
                fees_sruct: ""
                id: 159
                latitude: "38.8627604"
                longitude: "-77.0855269"
                name: "Arlington Animal Hospital"
                pet_allowed: ""
                pet_weight_allowed: ""
                phone: "703-920-5300"
                state: "VA"
                updated_at: "-0001-11-30 00:00:00"
                website: "http://myarlingtonvet.com"
                zipcode: "22204"
            }
        }
METHOD URI Bearer TOKEN
GET https://api.roamingtails.co/api/v1/services -

Hotels

Same as the Restaurants endpoint, let's move on to learning how you can use this API to request Hotels data. After we recieve the request, we can retrieve and return the data from our application. Here's how it's called:

    GET https://api.roamingtails.co/api/v1/hotels
    HEADER  
        'Accept': 'application/json',
        'Content-Type': 'application/x-www-form-urlencoded',

    RETURN
        data {
            0: {
                address1: "1315 16th St NW"
                address2: ""
                apt: ""
                city: "Washington"
                country_code: ""
                created_at: "-0001-11-30 00:00:00"
                email: ""
                fees_sruct: "No Fee"
                id: 542
                latitude: "38.9082289"
                longitude: "-77.0360652"
                name: "Hotel Rouge"
                pet_allowed: "3"
                pet_weight_allowed: "No Limit"
                phone: "202-232-8000"
                state: "DC"
                updated_at: "-0001-11-30 00:00:00"
                website: "1"
                zipcode: "20036"
            }
        }
METHOD URI Bearer TOKEN
GET https://api.roamingtails.co/api/v1/hotels -

Find a Privacy / Settings

User's Privacy / Settings is needed to determine the infomation they want to share with the public when their pet's tag is scanned.

    GET https://api.roamingtails.co/api/v1/privacy/user_id
    HEADER  
        'Accept': 'application/json',
        'Content-Type': 'application/x-www-form-urlencoded',

    RETURN
        data {
            0: {
                activation_code: boolean
                address1: boolean
                address2: boolean
                api_token: boolean
                apt: boolean
                city: boolean
                country_code: boolean
                county: boolean
                created_at: boolean
                email: boolean
                first_name: boolean
                last_name: boolean
                mobile: boolean
                name: boolean
                phone: boolean
                picture: boolean
                share_info: 1
                state: boolean
                temp_address1: boolean
                temp_address2: boolean
                temp_address_apt: boolean
                temp_address_cell: boolean
                temp_address_city: boolean
                temp_address_country_code: boolean
                temp_address_first_name: boolean
                temp_address_last_name: boolean
                temp_address_phone: boolean
                temp_address_state: boolean
                temp_address_zipcode: boolean
                zipcode: boolean
            }
        }
METHOD URI Bearer TOKEN
GET https://api.roamingtails.co/api/v1/privacy -

Update A Privacy / Settings

    PUT https://api.roamingtails.co/api/v1/privacy/{id}

        'Accept': 'application/json',
        HEADER  'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/x-www-form-urlencoded',

        RETURN
        data {
            activation_code: boolean
                address1: boolean
                address2: boolean
                api_token: boolean
                apt: boolean
                city: boolean
                country_code: boolean
                county: boolean
                created_at: boolean
                email: boolean
                first_name: boolean
                last_name: boolean
                mobile: boolean
                name: boolean
                phone: boolean
                picture: boolean
                share_info: 1
                state: boolean
                temp_address1: boolean
                temp_address2: boolean
                temp_address_apt: boolean
                temp_address_cell: boolean
                temp_address_city: boolean
                temp_address_country_code: boolean
                temp_address_first_name: boolean
                temp_address_last_name: boolean
                temp_address_phone: boolean
                temp_address_state: boolean
                temp_address_zipcode: boolean
                zipcode: boolean
       }
    RETURN 200
METHOD URI Bearer TOKEN
PUT https://api.roamingtails.co/api/v1/privacy/{id} Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9

Delete A Privacy/Settings

    DELETE https://api.roamingtails.co/api/v1/privacy/{id}

        'Accept': 'application/json',
        HEADER  'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/x-www-form-urlencoded',

    RETURN 200
METHOD URI Bearer TOKEN
DELETE https://api.roamingtails.co/api/v1/privacy/{id} Bearer: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9