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.
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.
| Environment | URL |
|---|---|
| Staging | https://staging-myvet-api.mypethq.io/api/v1/register-microchip |
| Production | https://myvet-api.mypethq.io/api/v1/register-microchip |
Authentication
Authenticate each request with these HTTP headers:
| Header | Description |
|---|---|
APIUSER | Your API username |
APIKEY | Your 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
| Header | Required | Description |
|---|---|---|
Content-Type | Required | Must be application/json |
APIUSER | Required | Your API username |
APIKEY | Required | Your API key |
Response headers
| Header | Description |
|---|---|
Resultcode | The status code for the result of the operation |
Resultdetails | More information about the result |
Response codes
The API returns an HTTP 200 response, with more status information in the response headers.
| Resultcode | Resultdetails | Meaning |
|---|---|---|
54000 | A URL to download the confirmation PDF | Success: registration complete |
54100 | This microchip is already registered with <databasename>. Please contact them for more information. | Error: the microchip is registered on another database |
54100 | This 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 |
54102 | Registration rejected - Invalid chip number | Error: the microchip number isn’t valid |
54103 | Registration rejected - Invalid data | Error: the request has invalid or badly formed data |
54108 | This 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
}| Field | Required | Description |
|---|---|---|
ThirdPartyDisclosure | Required | Whether the owner allows third-party disclosure (“Yes” or “No”) |
ReceiveEmail | Optional | Whether the owner wants to receive emails (“Yes” or “No”) |
Authorisation | Required | The owner’s authorisation for the registration, usually agreement text |
Identification.PracticeID | Required | Practice identifier (UUID format) |
Identification.Source | Optional | Source system identifier |
OwnerDetails.Salutation | Optional | Owner’s title |
OwnerDetails.Forenames | Required | Owner’s first name or names |
OwnerDetails.Surname | Required | Owner’s surname |
OwnerDetails.Address.Line1 | Required | First line of the address |
OwnerDetails.Address.LineOther | Optional | Other address lines |
OwnerDetails.Address.County_State | Required | County |
OwnerDetails.Address.PostalCode | Required | Postcode |
OwnerDetails.DaytimePhone | Optional | Daytime phone number |
OwnerDetails.EveningPhone | Optional | Evening phone number |
OwnerDetails.MobilePhone | Optional* | Mobile phone number |
OwnerDetails.EmailAddress | Optional* | Email address |
PetDetails.Name | Optional | Pet’s name |
PetDetails.Species | Optional | Species, for example “Feline” or “Canine” |
PetDetails.DateOfBirth | Optional | Date of birth (YYYY-MM-DD) |
PetDetails.Gender | Optional | “Male” or “Female” |
PetDetails.Neutered | Optional | Whether the pet is neutered (“Yes” or “No”) |
PetDetails.Breed.FreeText | Optional | Breed description |
MicrochipDetails.MicrochipNumber | Required | Microchip number |
MicrochipDetails.ImplantDate | Optional | Date of implantation (YYYY-MM-DD) |
MicrochipDetails.ImplanterName | Required | Name 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.