GET /v#/Tags
API Specification
| API Component | Details |
|---|
| API Name | Tags |
| Description and suggested purpose | Return Tag Details |
| Interface Type and expected response rate | RESTful, NEAR realtime |
| HTTP method | GET |
| URL | https://luispublic-web.azurewebsites.net/Api/Tags |
| Direction | 2-Way |
| Frequency of Interaction | Ad hoc |
| Request Definition | See below |
Request Definition
| Field | Mandatory | Type | Description | Example |
|---|
| | | | |
Response Example
{
"Printed_Tag": "string",
"Link_Tag": "string",
"Visual_Tag": "string",
"CPH": "string",
"Animal_No": 0,
"Country": "string",
"Herd_Ref": "string",
"Species_Id": "string",
"HasEID": true,
"HasGBTag": true,
"HasGBSuffix": true,
"Order_Status": "string",
"HasInternal": true,
"ExpectedOrderStatus": "string",
"Tags": [
{
"Replica_Count": 0,
"Tag_Name": "string",
"Tag_EID": true,
"Tag_Primary": true,
"Manufacturers_Code": "string",
"Tag_Slaughter": true,
"Tag_Class": "string"
}
]
}
Response Definition
| Field | Type | Description | Example |
|---|
| Printed_Tag | string | The printed representation of the tag | "UK160131100033" |
| Link_Tag | string | Linked tag identifier, if applicable | "UK160131100034" |
| Visual_Tag | string | Visual tag representation | "UK160131100035" |
| CPH | string | County/Parish/Holding reference | "08/205/8000" |
| Animal_No | integer | Internal animal number | 0 |
| Country | string | Country code or name | "" |
| Herd_Ref | string | Herd reference number | "666666" |
| Species_Id | string | Species identifier (e.g., C for cattle) | "C" |
| HasEID | boolean | Indicates if the tag has EID | true |
| HasGBTag | boolean | Indicates if the tag includes a GB identifier | true |
| HasGBSuffix | boolean | Indicates if the tag includes a GB suffix | true |
| Order_Status | string | Current order status for the tag | "" |
| HasInternal | boolean | Indicates if the tag is internal | true |
| ExpectedOrderStatus | string | Expected order status | "" |
| Tags | array of objects | List of tag details | [...] |
Tags[] Object
| Field | Type | Description | Example |
|---|
| Replica_Count | integer | Number of replicas for this tag | 0 |
| Tag_Name | string | Name of the tag | "Vis Flex 1" |
| Tag_EID | boolean | Indicates if the tag is an EID tag | true |
| Tag_Primary | boolean | Indicates if the tag is a primary tag | true |
| Manufacturers_Code | string | Manufacturer's code for the tag | "14" |
| Tag_Slaughter | boolean | Indicates if the tag is for slaughter animals | true |
| Tag_Class | string | Classification of the tag | "Visual" |
Error Codes
| Error Code | Description | Comments |
|---|
| 200 | Success | |
| 400 | Bad Request | |
| 404 | Not Found | |
Comments: None
GET /v#/Tags/next-allocated/{c}/{p}/{h}/{herd}/{species}
API Specification
| API Component | Details |
|---|
| API Name | Next Allocated Tag (with Species) |
| Description and suggested purpose | Returns the next allocated tag for a given keeper, herd, and species. |
| Interface Type and expected response rate | RESTful, NEAR realtime |
| HTTP method | GET |
| URL | https://luispublic-web.azurewebsites.net/Api/Tags/next-allocated/{c}/{p}/{h}/{herd}/{species} |
| Direction | 2-Way |
| Frequency of Interaction | Ad hoc |
| Request Definition | See below |
Request Definition
| Field | Mandatory | Type | Description | Example |
|---|
| c | M | string | County reference number | 06 |
| p | M | string | Parish reference number | 036 |
| h | M | string | Holding reference number | 0006 |
| herd | M | string | Herd Reference | 160131 |
| species | M | string | Species code | C |
| quantity | | int | | 10 |
| hasEid | | string | | True |
Response Example
{
"AllocatedTags": [
{
"StartTag": {
"AnimalNumber": 1,
"HasEid": false,
"PrintedTag": "",
"Species": "S"
},
"EndTag": {
"AnimalNumber": 10,
"HasEid": false,
"PrintedTag": "",
"Species": "S"
},
"TagCount": 10,
"Range": "1 - 10",
"Species": "S",
"Source": "New",
"HasEid": false
}
],
"HerdReference": "561766",
"Species": "S",
"TagCount": 10,
"Range": "1 - 10"
}
Response Definition
| Field | Type | Description | Example |
|---|
| StartTag | object | Start of the tag range | ... |
| StartTag.AnimalNumber | integer | Starting animal number in the range | 1 |
| StartTag.HasEid | boolean | Indicates if the starting tag has EID | false |
| StartTag.PrintedTag | string | Printed representation of the starting tag | "" |
| StartTag.Species | string | Species identifier | "S" |
| EndTag | object | End of the tag range | ... |
| EndTag.AnimalNumber | integer | Ending animal number in the range | 10 |
| EndTag.HasEid | boolean | Indicates if the ending tag has EID | false |
| EndTag.PrintedTag | string | Printed representation of the ending tag | "" |
| EndTag.Species | string | Species identifier | "S" |
| TagCount | integer | Number of tags in the allocated range | 10 |
| Range | string | Animal number range as a string | "1 - 10" |
| Species | string | Species identifier | "S" |
| Source | string | Source of the tag allocation | "New" |
| HasEid | boolean | Indicates if tags in the range have EID | false |
| HerdReference | string | Herd reference number | "561766" |
| TagCount | integer | Total number of tags allocated | 10 |
| Range | string | Overall animal number range | "1 - 10" |
Error Codes
| Error Code | Description | Comments |
|---|
| 200 | Success | |
| 400 | Bad Request | |
| 404 | Not Found | |
| 500 | Internal Server Error | |
Comments: None
GET /v#/Tags/next-allocated/{c}/{p}/{h}/{herd}
API Specification
| API Component | Details |
|---|
| API Name | Next Allocated Tag (without Species) |
| Description and suggested purpose | Returns the next allocated tag for a given keeper and herd (species not specified). |
| Interface Type and expected response rate | RESTful, NEAR realtime |
| HTTP method | GET |
| URL | https://luispublic-web.azurewebsites.net/Api/Tags/next-allocated/{c}/{p}/{h}/{herd} |
| Direction | 2-Way |
| Frequency of Interaction | Ad hoc |
| Request Definition | See below |
Request Definition
| Field | Mandatory | Type | Description | Example |
|---|
| c | M | string | County reference number | 06 |
| p | M | string | Parish reference number | 036 |
| h | M | string | Holding reference number | 0006 |
| herd | M | string | Herd Reference | 160131 |
Response Example
[
{
"HerdReference": "561766",
"NextTag": 20241,
"OrderType": "EID",
"Species": "S"
}
]
Response Definition
| Field | Type | Description | Example |
|---|
| HerdReference | string | Herd reference number | "561766" |
| NextTag | integer | The next available tag number for the herd | 20241 |
| OrderType | string | Type of tag order (e.g., EID, Conventional) | "EID" |
| Species | string | Species identifier (e.g., S for sheep) | "S" |
Error Codes
| Error Code | Description | Comments |
|---|
| 200 | Success | |
| 400 | Bad Request | |
| 404 | Not Found | |
| 500 | Internal Server Error | |
Comments: None