Movement Services | ScotEID
Overview
ScotEID (Scotland Electronic Identification) is the Scottish animal movement identification and traceability service for sheep, goats, and pigs. The service provides comprehensive livestock movement management, including real-time animal tracking via electronic ear tags (RFID), movement notifications, historical data queries, and movement amendments.
Service Details
- Service Name: ScotEID
- Service ID: 8241af88-f0cc-4bc5-95b0-778a6f0bd37b
- Service Tag:
SCOTEID - Supported Species: Sheep, Goats, Pigs
- Property Type: Farms only
- Countries: Scotland
- Property Identifier: CPH (County-Parish-Holding) format:
CC/PPP/HHHH
Transaction Types
The ScotEID service supports the following transaction types and capabilities:
| Transaction Type | Capability Code | Description | Applies To | Request Type |
|---|---|---|---|---|
| Move On | MoveOn |
Record arrival of animals at a destination property | Sheep, Pigs | CreateCompleteLotRequest_Structure |
| Move Off | MoveOff |
Record departure of animals from a property | Sheep, Pigs | CreateCompleteLotRequest_Structure |
| Update Move On | UpdateMoveOn |
Amend arrival details of a previously recorded movement | Sheep, Pigs | UpdateCompleteLotRequest_Structure |
| Update Move Off | UpdateMoveOff |
Amend departure details of a previously recorded movement | Sheep, Pigs | UpdateCompleteLotRequest_Structure |
| Cancel Movement | CancelMovement |
Cancel a previously recorded movement | Sheep, Pigs | CancelCompleteLotByReferenceRequest_Structure |
| Animals on Property | GetAnimalsOnProperty |
Query animals currently at a property | Sheep, Pigs | GetAnimalsOnHoldingRequest_Structure |
| Historical Data | GetHistoricalData |
Query movement history for a specific date | Sheep, Pigs | GetCompleteLotByDateRequest_Structure |
Field Keys Reference
All ScotEID field keys use the namespace prefix ScotEID.Movement.*. This document provides the complete list of available field keys organized by category.
General Information Fields
| Field Key | Data Type | Required | Max Length | Description |
|---|---|---|---|---|
ScotEID.Movement.LotNumber |
String | ✓ Yes | 10 | Unique identifier for the movement batch/lot |
ScotEID.Movement.LotDate |
DateTime | ✓ Yes | - | Date associated with the lot (yyyy-MM-ddThh:mm:ss) |
ScotEID.Movement.LotReference |
String | ✓ Yes | 32 | Lot reference number for cancellations |
ScotEID.Movement.ExternalReference |
String | No | 32 | External reference code for tracking |
ScotEID.Movement.LotDescription |
Integer | No | - | Lot classification (1-7) |
ScotEID.Movement.BatchMark |
String | No | 8 | Batch identification mark |
ScotEID.Movement.MovementType |
Integer | ✓ Yes | - | Type of movement (2-4) |
ScotEID.Movement.Species |
Integer | ✓ Yes | - | Species code (2=Cattle, 3=Pig, 4=Sheep, 44=Goats, 60=Deer) |
ScotEID.Movement.HeadCount |
Integer | ✓ Yes | - | Expected number of animals in movement |
ScotEID.Movement.ReadCount |
Integer | ✓ Yes | - | Number of animals physically read with RFID |
ScotEID.Movement.VisuallyRead |
Integer | No | - | Number of animals identified visually |
ScotEID.Movement.DOACount |
Integer | No | - | Number of Dead On Arrival (DOA) animals |
ScotEID.Movement.AllEID |
Boolean | No | - | All animals have electronic ID (EID) |
Location Fields
| Field Key | Data Type | Required | Format | Description |
|---|---|---|---|---|
ScotEID.Movement.DepartureLocation |
String | ✓ Yes | CC/PPP/HHHH | CPH code of origin property |
ScotEID.Movement.DestinationLocation |
String | ✓ Yes | CC/PPP/HHHH | CPH code of destination property |
ScotEID.Movement.ReadLocation |
String | No | CC/PPP/HHHH | CPH code where animals were read |
ScotEID.Movement.HoldingNumber |
String | ✓ (Query) | CC/PPP/HHHH | Property to query for animals |
Date/Time Fields
| Field Key | Data Type | Required | Description |
|---|---|---|---|
ScotEID.Movement.DepartureDate |
DateTime | No | Actual departure date from origin (yyyy-MM-ddThh:mm:ss) |
ScotEID.Movement.ArrivalDate |
DateTime | ✓ (MoveOn) | Arrival date at destination (yyyy-MM-ddThh:mm:ss) |
ScotEID.Movement.OnwardDepartureDate |
DateTime | No | Onward departure from intermediate location |
ScotEID.Movement.Transport.DepartureTime |
DateTime | No | Time of departure |
ScotEID.Movement.Transport.LoadingDateTime |
DateTime | No | Date and time of loading animals |
ScotEID.Movement.Transport.UnloadingDateTime |
DateTime | No | Date and time of unloading animals |
Departure Property Details
| Field Key | Data Type | Required | Max Length | Description |
|---|---|---|---|---|
ScotEID.Departure.FlockNumber |
Integer | No | - | Flock/herd number at departure |
ScotEID.Departure.SlapMark |
String | No | 8 | Visual identification mark at departure |
ScotEID.Departure.Name |
String | No | 60 | Name of keeper/owner at departure |
ScotEID.Departure.Address1 |
String | No | 60 | Address line 1 |
ScotEID.Departure.Address2 |
String | No | 60 | Address line 2 |
ScotEID.Departure.Address3 |
String | No | 60 | Address line 3 |
ScotEID.Departure.Address4 |
String | No | 60 | Address line 4 |
ScotEID.Departure.PostCode |
String | No | 9 | Postal code |
ScotEID.Departure.Tel |
String | No | 16 | Telephone number |
ScotEID.Departure.Email |
String | No | 100 | Email address |
ScotEID.Departure.AssuranceNumber |
Integer | No | - | Assurance scheme number |
Destination Property Details
| Field Key | Data Type | Required | Max Length | Description |
|---|---|---|---|---|
ScotEID.Destination.FlockNumber |
Integer | No | - | Flock/herd number at destination |
ScotEID.Destination.SlapMark |
String | No | 8 | Visual identification mark at destination |
ScotEID.Destination.Name |
String | No | 60 | Name of keeper/owner at destination |
ScotEID.Destination.Address1 |
String | No | 60 | Address line 1 |
ScotEID.Destination.Address2 |
String | No | 60 | Address line 2 |
ScotEID.Destination.Address3 |
String | No | 60 | Address line 3 |
ScotEID.Destination.Address4 |
String | No | 60 | Address line 4 |
ScotEID.Destination.PostCode |
String | No | 9 | Postal code |
ScotEID.Destination.Tel |
String | No | 16 | Telephone number |
ScotEID.Destination.Email |
String | No | 100 | Email address |
ScotEID.Destination.AssuranceNumber |
Integer | No | - | Assurance scheme number |
Transport Details
| Field Key | Data Type | Required | Max Length | Description |
|---|---|---|---|---|
ScotEID.Movement.Transport.HaulierName |
String | No | 60 | Name of transport company |
ScotEID.Movement.Transport.DriverName |
String | No | 60 | Name of vehicle driver |
ScotEID.Movement.Transport.RegistrationNumber |
String | No | - | Vehicle registration plate |
ScotEID.Movement.Transport.PermitNumber |
Integer | No | - | Transport permit number |
ScotEID.Movement.Transport.ExpectedDuration |
String | No | - | Expected transport duration in hours |
Animal Query Response Fields
| Field Key | Data Type | Description |
|---|---|---|
ScotEID.Movement.AnimalNumber |
String | Unique animal identification number |
ScotEID.Movement.LastReadLocation |
String | CPH where animal was last read |
ScotEID.Movement.LastDestinationLocation |
String | Last destination CPH |
ScotEID.Movement.LastMovementType |
Integer | Type of last movement |
ScotEID.Movement.LastMovementDate |
DateTime | Date of last movement |
ScotEID.Movement.LastDepartureLocation |
String | Last departure location |
ScotEID.Movement.DefraTagCode |
String | DEFRA tag identification |
ScotEID.Movement.IssueDate |
DateTime | Date animal ID was issued |
ScotEID.Movement.IssueHolding |
String | Holding where animal was issued |
ScotEID.Movement.Hex |
String | Hexadecimal representation of tag data |
ScotEID.Movement.ETASVerified |
Boolean | ETAS verification status |
Financial/Administrative Fields
| Field Key | Data Type | Required | Description |
|---|---|---|---|
ScotEID.Movement.BuyerInvoiceNumber |
Integer | No | Invoice number for buyer |
ScotEID.Movement.SellerPaymentNumber |
Integer | No | Payment reference for seller |
Health/Welfare Fields
| Field Key | Data Type | Required | Description |
|---|---|---|---|
ScotEID.Movement.ConsignmentMedicines |
Boolean | No | Consignment medicines present |
ScotEID.Movement.IndividualMedicines |
Boolean | No | Individual medicines applied |
ScotEID.Movement.HerniaPigs |
Integer | No | Number of hernia-affected pigs |
ScotEID.Movement.InjuredPigs |
Integer | No | Number of injured pigs |
ScotEID.Movement.PoorDoerPigs |
Integer | No | Number of poor-doing pigs |
ScotEID.Movement.TailBitePigs |
Integer | No | Number of tail-bitten pigs |
ScotEID.Movement.WithdrawalPeriodsMet |
Boolean | No | Medication withdrawal periods met |
ScotEID.Movement.ZNCPScore |
Integer | No | Zoonotic disease check score |
Move On (Arrival)
Records the arrival of animals at a destination property. This transaction notifies the system that animals have been received and scanned at their destination holding.
Request Structure: CreateCompleteLotRequest_Structure
<CreateCompleteLotRequest_Structure>
<ApplicationName>ProgramName</ApplicationName>
<ApplicationVersion>ProgramVersion</ApplicationVersion>
<ApplicationKey></ApplicationKey>
<SchemaVersion>1</SchemaVersion>
<Timestamp>2023-06-15T14:30:00+01:00</Timestamp>
<Lot>
<LotNumber>0005</LotNumber>
<LotDate>2023-06-15T14:30:00</LotDate>
<MovementType>4</MovementType>
<Species>4</Species>
<HeadCount>2</HeadCount>
<ReadCount>2</ReadCount>
<DepartureLocation>11/222/3333</DepartureLocation>
<DestinationLocation>44/555/6666</DestinationLocation>
<ArrivalDate>2023-06-15T14:30:00</ArrivalDate>
<DepartureKeeper>
<FlockNumber>1001</FlockNumber>
<SlapMark>ABC</SlapMark>
<Name>John Smith</Name>
<AssuranceNumber>123456</AssuranceNumber>
</DepartureKeeper>
<DestinationKeeper>
<FlockNumber>2001</FlockNumber>
<SlapMark>XYZ</SlapMark>
<Name>Jane Doe</Name>
<AssuranceNumber>654321</AssuranceNumber>
</DestinationKeeper>
<TransportInformation>
<HaulierName>Transport Ltd</HaulierName>
<DriverName>John Driver</DriverName>
<RegistrationNumber>AB12CDE</RegistrationNumber>
</TransportInformation>
<TagReadings>
<TagReading ISO24631="1 0 04 00 0 826 0543210 00600" Timestamp="2023-06-15T14:30:00" />
<TagReading ISO24631="1 0 04 00 0 826 0543210 00601" Timestamp="2023-06-15T14:30:00" />
</TagReadings>
</Lot>
</CreateCompleteLotRequest_Structure>
Fields Required for Move On
| Field Key | Required | Type | Notes |
|---|---|---|---|
ScotEID.Movement.LotNumber |
Yes | String | Unique batch identifier |
ScotEID.Movement.LotDate |
Yes | DateTime | Movement date |
ScotEID.Movement.MovementType |
Yes | Integer | Always 4 for Move On |
ScotEID.Movement.Species |
Yes | Integer | 4=Sheep, 3=Pig, 44=Goats |
ScotEID.Movement.HeadCount |
Yes | Integer | Expected animal count |
ScotEID.Movement.DestinationLocation |
Yes | String | CPH (CC/PPP/HHHH) |
ScotEID.Movement.ArrivalDate |
Yes | DateTime | When animals arrived |
ScotEID.Destination.FlockNumber |
No | Integer | Destination flock ID |
ScotEID.Destination.Name |
No | String | Destination keeper name |
Response: CreateCompleteLotResponse_Structure
<CreateCompleteLotResponse_Structure>
<Timestamp>2023-06-15T14:30:00</Timestamp>
<Lot>
<LotReference>201518</LotReference>
<LotNumber>0005</LotNumber>
<DepartureLocation>11/222/3333</DepartureLocation>
<DestinationLocation>44/555/6666</DestinationLocation>
</Lot>
</CreateCompleteLotResponse_Structure>
JSON Example
{
"transactionType": "MoveOn",
"speciesCode": "S",
"transactionDate": "2023-06-15T14:30:00Z",
"fields": {
"ScotEID.Movement.LotNumber": "0005",
"ScotEID.Movement.LotDate": "2023-06-15T14:30:00Z",
"ScotEID.Movement.MovementType": "4",
"ScotEID.Movement.Species": "4",
"ScotEID.Movement.HeadCount": "2",
"ScotEID.Movement.ReadCount": "2",
"ScotEID.Movement.DepartureLocation": "11/222/3333",
"ScotEID.Movement.DestinationLocation": "44/555/6666",
"ScotEID.Movement.ArrivalDate": "2023-06-15T14:30:00Z",
"ScotEID.Destination.FlockNumber": "2001",
"ScotEID.Destination.Name": "Jane Doe",
"ScotEID.Destination.SlapMark": "XYZ",
"ScotEID.Movement.Transport.DriverName": "John Driver",
"ScotEID.Movement.Transport.HaulierName": "Transport Ltd",
"ScotEID.Movement.Transport.RegistrationNumber": "AB12CDE"
},
"animals": [
{
"RFID": "1 0 04 00 0 826 0543210 00600"
},
{
"RFID": "1 0 04 00 0 826 0543210 00601"
}
]
}
Move Off (Departure)
Records the departure of animals from a property. This transaction notifies the system that animals are leaving and have been scanned at the departure holding.
Request Structure: CreateCompleteLotRequest_Structure
Same XML structure as Move On, with MovementType set to 2.
Fields Required for Move Off
| Field Key | Required | Type | Notes |
|---|---|---|---|
ScotEID.Movement.LotNumber |
Yes | String | Unique batch identifier |
ScotEID.Movement.LotDate |
Yes | DateTime | Movement date |
ScotEID.Movement.MovementType |
Yes | Integer | Always 2 for Move Off |
ScotEID.Movement.Species |
Yes | Integer | 4=Sheep, 3=Pig, 44=Goats |
ScotEID.Movement.HeadCount |
Yes | Integer | Expected animal count |
ScotEID.Movement.DepartureLocation |
Yes | String | CPH (CC/PPP/HHHH) |
ScotEID.Movement.DepartureDate |
No | DateTime | When animals departed |
ScotEID.Departure.FlockNumber |
No | Integer | Departure flock ID |
ScotEID.Departure.Name |
No | String | Departure keeper name |
JSON Example
{
"transactionType": "MoveOff",
"speciesCode": "S",
"transactionDate": "2023-06-15T10:00:00Z",
"fields": {
"ScotEID.Movement.LotNumber": "0004",
"ScotEID.Movement.LotDate": "2023-06-15T10:00:00Z",
"ScotEID.Movement.MovementType": "2",
"ScotEID.Movement.Species": "4",
"ScotEID.Movement.HeadCount": "15",
"ScotEID.Movement.ReadCount": "15",
"ScotEID.Movement.DepartureLocation": "11/222/3333",
"ScotEID.Movement.DestinationLocation": "44/555/6666",
"ScotEID.Movement.DepartureDate": "2023-06-15T10:00:00Z",
"ScotEID.Departure.FlockNumber": "1001",
"ScotEID.Departure.Name": "John Smith",
"ScotEID.Departure.SlapMark": "ABC",
"ScotEID.Movement.Transport.DriverName": "Sarah Smith",
"ScotEID.Movement.Transport.HaulierName": "Fast Transport"
},
"animals": [
{ "RFID": "1 0 04 00 0 826 0543210 00610" },
{ "RFID": "1 0 04 00 0 826 0543210 00611" },
{ "RFID": "1 0 04 00 0 826 0543210 00612" }
]
}
Update Move On
Amend the details of a previously recorded animal arrival at a destination property.
Fields for Update Move On
| Field Key | Required | Type | Notes |
|---|---|---|---|
ScotEID.Movement.LotReference |
Yes | String | Reference from original Move On |
ScotEID.Movement.HeadCount |
No | Integer | Revised animal count |
ScotEID.Movement.ReadCount |
No | Integer | Updated read count |
ScotEID.Movement.DOACount |
No | Integer | Dead on arrival count |
JSON Example
{
"transactionType": "UpdateMoveOn",
"speciesCode": "S",
"fields": {
"ScotEID.Movement.LotReference": "201518",
"ScotEID.Movement.HeadCount": "3",
"ScotEID.Movement.ReadCount": "3",
"ScotEID.Movement.DOACount": "1"
}
}
Update Move Off
Amend the details of a previously recorded animal departure from a property.
Request Structure: UpdateCompleteLotRequest_Structure
Same as Update Move On structure.
Fields for Update Move Off
| Field Key | Required | Type | Notes |
|---|---|---|---|
ScotEID.Movement.LotReference |
Yes | String | Reference from original Move Off |
ScotEID.Movement.HeadCount |
No | Integer | Revised animal count |
ScotEID.Movement.ReadCount |
No | Integer | Updated read count |
JSON Example
{
"transactionType": "UpdateMoveOff",
"speciesCode": "S",
"fields": {
"ScotEID.Movement.LotReference": "201517",
"ScotEID.Movement.HeadCount": "16",
"ScotEID.Movement.ReadCount": "16"
}
}
Cancel Movement
Cancel a previously recorded movement transaction (either Move On or Move Off).
Fields Required for Cancel Movement
| Field Key | Required | Type | Notes |
|---|---|---|---|
ScotEID.Movement.LotReference |
Yes | String | Reference number to cancel |
JSON Example
{
"transactionType": "CancelMovement",
"fields": {
"ScotEID.Movement.LotReference": "0005"
}
}
Animals on Property Query
Query all animals currently recorded as being at a specific property.
Fields Required for Animals Query
| Field Key | Required | Type | Format | Notes |
|---|---|---|---|---|
ScotEID.Movement.HoldingNumber |
Yes | String | CC/PPP/HHHH | CPH to query |
Response Fields
| Field Key | Type | Description |
|---|---|---|
ScotEID.Movement.AnimalNumber |
String | Unique animal identification |
ScotEID.Movement.LastReadLocation |
String | CPH where animal was last recorded |
JSON Example
{
"transactionType": "GetAnimalsOnProperty",
"fields": {
"ScotEID.Movement.HoldingNumber": "11/222/3333"
}
}
JSON Response Example
{
"success": true,
"timestamp": "2023-06-15T17:00:00Z",
"animals": [
{
"ScotEID.Movement.AnimalNumber": "UK054321000100",
"ScotEID.Movement.LastReadLocation": "33/333/3333"
},
{
"ScotEID.Movement.AnimalNumber": "UK054321000101",
"ScotEID.Movement.LastReadLocation": "33/333/3333"
}
]
}
Historical Data Query
Query movement history and details for a specific date.
Fields Required for Historical Data Query
| Field Key | Required | Type | Format | Notes |
|---|---|---|---|---|
ScotEID.Movement.LotDate |
Yes | DateTime | yyyy-MM-dd | Date to query movements for |
Response Fields from Historical Query
| Field Key | Type | Description |
|---|---|---|
ScotEID.Movement.LotNumber |
String | Lot identification |
ScotEID.Movement.LotReference |
String | Lot reference number |
ScotEID.Movement.MovementType |
Integer | Type of movement (2=MoveOff, 4=MoveOn) |
ScotEID.Movement.Species |
Integer | Species code |
ScotEID.Movement.HeadCount |
Integer | Animal count |
ScotEID.Movement.DepartureLocation |
String | Origin CPH |
ScotEID.Movement.DestinationLocation |
String | Destination CPH |
JSON Example
{
"transactionType": "GetHistoricalData",
"fields": {
"ScotEID.Movement.LotDate": "2023-06-15"
}
}
Species Support
ScotEID supports the following species with their corresponding codes:
| Species | Code | Internal Code |
|---|---|---|
| Sheep | S | 4 |
| Goats | G | 44 |
| Pigs | P | 3 |
| Cattle | C | 2 |
| Deer | D | 60 |
Note: While the service supports cattle and deer, the primary focus is on sheep, goats, and pigs. The species code must be provided as an integer value in XML requests and as a string in JSON transactions.
Property Identifier Format
CPH (County-Parish-Holding)
ScotEID uses the CPH format for property identification in Scotland:
Format: CC/PPP/HHHH
- CC = County code (2 digits, 01-99)
- PPP = Parish code (3 digits, 001-999)
- HHHH = Holding code (4 digits, 0001-9999)
Examples:
11/222/3333- Valid CPH10/100/0001- Valid CPH33/333/3333- Valid CPH
Validation Rules
- Must be exactly 11 characters including slashes
- Each component must be numeric
- Separators are forward slashes (/)
- Leading zeros are required (e.g.,
01/001/0001)
Authentication
Required Credentials
ScotEID requires the following authentication credentials:
| Credential Type | Required | Description | Example |
|---|---|---|---|
| Program Name | Yes | Application/client name | “EasiTrace” |
| Program Version | Yes | Application version | “1.0.0” |
| Service Provider Password | Yes | Provider authentication key | See configuration |
| Property Username | Yes | Property/holding username | “1234567” |
| Property Password | Yes | Property/holding password | “password123” |
Property Validation
Before submitting transactions, ensure:
- CPH Format: Property identifier must be valid CPH format (CC/PPP/HHHH)
- Credentials: Username and password for the property are correct
- Access: Property credentials have access to the properties involved in the transaction
Configuration
Service Configuration
ScotEID requires the following configuration in appsettings:
{
"ScotEID": {
"WebServiceURL": "https://scoteid-service-url",
"MaxAttemptCount": 3,
"TimeoutSeconds": 30
}
}
Service Properties
| Property | Type | Required | Description |
|---|---|---|---|
| WebServiceUrl | String | Yes | SOAP endpoint URL for ScotEID service |
| MaxAttemptCount | Integer | No | Maximum retry attempts (default: 3) |
Error Responses
Common Error Codes and Messages
| Error Type | Code | Description | Resolution |
|---|---|---|---|
| Validation Error | 400 | Field validation failed | Check field values against requirements |
| Authentication Error | 401 | Credentials invalid | Verify username/password |
| Authorization Error | 403 | Access denied to property | Check property permissions |
| Not Found | 404 | Lot reference not found | Verify lot reference number |
| Conflict | 409 | Movement already exists | Check if duplicate submission |
| Server Error | 500 | ScotEID service error | Retry after delay |
Integration Notes
SOAP Web Service
- Protocol: SOAP 1.2 over HTTPS
- Encoding: UTF-8 XML
- Request Method: POST
- Content-Type: text/xml; charset=utf-8
Timestamp Format
All timestamps must be in ISO 8601 format with timezone:
- Format:
yyyy-MM-ddThh:mm:ss±hh:mm - Example:
2023-06-15T14:30:00+01:00
Animal Identification
RFID tag data format for TagReading:
- Format: ISO 24631 standard
- Pattern:
1 0 04 00 0 [Country] [Code] [ID] [Check] - Example:
1 0 04 00 0 826 0543210 00600
Rate Limiting and Quotas
- Concurrent Requests: 5 per property
- Daily Batch Limit: 1000 movements per property
- Query Timeout: 30 seconds
- Batch Size: Maximum 100 animals per submission
Additional Resources
Document Version: 1.0
Last Updated: June 2024
Service Status: Active