Skip to content
The Defra-compliant microchip database & the MyVet practice platform
For developers

Microchip registration API

Register pet microchips with MyPet from your own system. The API takes registration data in JSON, and returns status information in its response headers.

  1. Overview
  2. Authentication
  3. Endpoint
  4. Response codes
  5. Data model
  6. Examples

Overview

This API lets developers register pet microchips in our system. It accepts microchip registration data in JSON format, and returns status information in the response headers.

EnvironmentURL
Staginghttps://staging-myvet-api.mypethq.io/api/v1/register-microchip
Productionhttps://myvet-api.mypethq.io/api/v1/register-microchip

Authentication

Authenticate each request with these HTTP headers:

HeaderDescription
APIUSERYour API username
APIKEYYour API key

Email support@mypethq.io to get your API credentials.

Required fields

Either OwnerDetails.EmailAddress or OwnerDetails.MobilePhone must be provided. At least one of these two fields is needed for the registration to succeed.

Endpoint

POST /api/v1/register-microchip

Registers a new microchip in the system.

Request headers

HeaderRequiredDescription
Content-TypeRequiredMust be application/json
APIUSERRequiredYour API username
APIKEYRequiredYour API key

Response headers

HeaderDescription
ResultcodeThe status code for the result of the operation
ResultdetailsMore information about the result

Response codes

The API returns an HTTP 200 response, with more status information in the response headers.

ResultcodeResultdetailsMeaning
54000A URL to download the confirmation PDFSuccess: registration complete
54100This microchip is already registered with <databasename>. Please contact them for more information.Error: the microchip is registered on another database
54100This pet is already registered to this pet owner. If they need help please email support@mypethq.io.Error: the pet is already registered to this owner
54102Registration rejected - Invalid chip numberError: the microchip number isn’t valid
54103Registration rejected - Invalid dataError: the request has invalid or badly formed data
54108This microchip is registered to another keeper. We have opened a support ticket and we will reach out to the pet owner in 24 hours.Error: the microchip is registered to a different owner, and a support ticket has been opened automatically

Data model

The API expects a JSON payload with this structure:

{
  "Identification": {
    "PracticeID": string,
    "Source": string
  },
  "OwnerDetails": {
    "Salutation": string,
    "Forenames": string,
    "Surname": string,
    "Address": {
      "Line1": string,
      "LineOther": string,
      "County_State": string,
      "PostalCode": string
    },
    "DaytimePhone": string,
    "EveningPhone": string,
    "MobilePhone": string,
    "EmailAddress": string
  },
  "PetDetails": {
    "Name": string,
    "Species": string,
    "DateOfBirth": string, // Format: YYYY-MM-DD
    "Gender": string, // "Male" or "Female"
    "Neutered": string, // "Yes" or "No"
    "Breed": {
      "FreeText": string
    }
  },
  "MicrochipDetails": {
    "MicrochipNumber": string,
    "ImplantDate": string, // Format: YYYY-MM-DD
    "ImplanterName": string
  },
  "ThirdPartyDisclosure": string, // "Yes" or "No"
  "ReceiveEmail": string, // "Yes" or "No"
  "Authorisation": string
}
FieldRequiredDescription
ThirdPartyDisclosureRequiredWhether the owner allows third-party disclosure (“Yes” or “No”)
ReceiveEmailOptionalWhether the owner wants to receive emails (“Yes” or “No”)
AuthorisationRequiredThe owner’s authorisation for the registration, usually agreement text
Identification.PracticeIDRequiredPractice identifier (UUID format)
Identification.SourceOptionalSource system identifier
OwnerDetails.SalutationOptionalOwner’s title
OwnerDetails.ForenamesRequiredOwner’s first name or names
OwnerDetails.SurnameRequiredOwner’s surname
OwnerDetails.Address.Line1RequiredFirst line of the address
OwnerDetails.Address.LineOtherOptionalOther address lines
OwnerDetails.Address.County_StateRequiredCounty
OwnerDetails.Address.PostalCodeRequiredPostcode
OwnerDetails.DaytimePhoneOptionalDaytime phone number
OwnerDetails.EveningPhoneOptionalEvening phone number
OwnerDetails.MobilePhoneOptional*Mobile phone number
OwnerDetails.EmailAddressOptional*Email address
PetDetails.NameOptionalPet’s name
PetDetails.SpeciesOptionalSpecies, for example “Feline” or “Canine”
PetDetails.DateOfBirthOptionalDate of birth (YYYY-MM-DD)
PetDetails.GenderOptional“Male” or “Female”
PetDetails.NeuteredOptionalWhether the pet is neutered (“Yes” or “No”)
PetDetails.Breed.FreeTextOptionalBreed description
MicrochipDetails.MicrochipNumberRequiredMicrochip number
MicrochipDetails.ImplantDateOptionalDate of implantation (YYYY-MM-DD)
MicrochipDetails.ImplanterNameRequiredName of the implanter

* Either EmailAddress or MobilePhone is required.

Examples

Example request

POST /api/v1/register-microchip HTTP/1.1
Host: staging-myvet-api.mypethq.io
Content-Type: application/json
APIUSER: your_api_username
APIKEY: your_api_key

{
  "Identification": {
    "PracticeID": "550e8400-e29b-41d4-a716-446655440000",
    "Source": "OnlineForm"
  },
  "OwnerDetails": {
    "Salutation": "Mr",
    "Forenames": "John Michael",
    "Surname": "Doe",
    "Address": {
      "Line1": "123 Main Street",
      "LineOther": "Apt 4B",
      "County_State": "Surrey",
      "PostalCode": "GU1 1AA"
    },
    "DaytimePhone": "01234567890",
    "EveningPhone": "09876543210",
    "MobilePhone": "+44 7700 900123",
    "EmailAddress": "john.doe@example.com"
  },
  "PetDetails": {
    "Name": "Rex",
    "Species": "Dog",
    "DateOfBirth": "2020-06-15",
    "Gender": "Male",
    "Neutered": "Yes",
    "Breed": {
      "FreeText": "Labrador Retriever"
    }
  },
  "MicrochipDetails": {
    "MicrochipNumber": "123456369012345",
    "ImplantDate": "2021-03-10",
    "ImplanterName": "Dr. Smith"
  },
  "ThirdPartyDisclosure": "Yes",
  "ReceiveEmail": "Yes",
  "Authorisation": "I agree to the terms and conditions."
}

Example responses

Successful registration

HTTP/1.1 200 OK
Content-Type: application/json
Resultcode: 54000
Resultdetails: https://staging-myvet-file-upload.s3.eu-west-1.amazonaws.com/certificates/440575279249937_registration_certificate.pdf

{}

Error: already registered

HTTP/1.1 200 OK
Content-Type: application/json
Resultcode: 54100
Resultdetails: This microchip is already registered with Petlog. Please contact them for more information.

{}

Error: invalid data

HTTP/1.1 200 OK
Content-Type: application/json
Resultcode: 54103
Resultdetails: Registration rejected - Invalid data

{}

For support, email support@mypethq.io.