{ "openapi": "3.0.1", "info": { "title": "CLA API - Live V2", "description": "OData services for CLA. \n\nThis documentation is to be used in conjunction with the API User Guide (Word document).\n\n The API User Guide outlines important background information such as system concepts, OData features implemented, authentication, roles and permissions, use cases, known issues and contains additional information on some API endpoints.", "version": "2.0" }, "servers": [ { "url": "https://**baseurl**/2.0", "description": "api url details shared upon api access approval" } ], "paths": { "/v2/Breeds": { "get": { "tags": [ "Breeds", "External" ], "summary": "Get all animal breeds", "description": "Returns all breeds.\n* If you want to only get breeds for a specific species, using the speciesId from the [Species](#Species) endpoint\n * for example for sheep breeds, try Breeds?$filter=speciesId eq 1", "parameters": [ { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } }, { "name": "$filter", "in": "query", "description": "Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions. Only dates with a time part will be accepted.", "style": "form", "schema": { "type": "string" } }, { "name": "$orderby", "in": "query", "description": "Specifies the order in which items are returned. The maximum number of expressions is 5.", "style": "form", "schema": { "type": "string" } }, { "name": "$top", "in": "query", "description": "Limits the number of items returned from a collection.", "style": "form", "schema": { "type": "integer", "format": "int32" } }, { "name": "$skip", "in": "query", "description": "Excludes the specified number of items of the queried collection from the result.", "style": "form", "schema": { "type": "integer", "format": "int32" } }, { "name": "$count", "in": "query", "description": "Indicates whether the total count of items within a collection are returned in the result.", "style": "form", "schema": { "type": "boolean", "default": "False" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.BreedListResult" }, "example": { "value": [ { "speciesId": 3, "name": "Aberdeen Angus", "isPrimary": true, "bcmsBreedCode": "AA", "id": 1 }, { "speciesId": 3, "name": "Aberdeen Angus X", "isCrossBreed": true, "isPrimary": true, "bcmsBreedCode": "AAX", "id": 2 }, { "speciesId": 3, "name": "Angler Rotvieh", "isPrimary": true, "bcmsBreedCode": "AR", "id": 3 } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } } } } }, "/v2/Breeds({key})": { "get": { "tags": [ "Breeds", "External" ], "summary": "View an animal breed by id.", "description": "Returns a specific breed using its entity id.", "parameters": [ { "name": "key", "in": "path", "description": "record id", "required": true, "style": "simple", "schema": { "type": "integer", "format": "int32" } }, { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.Breed" }, "example": { "speciesId": 3, "name": "Aberdeen Angus", "isPrimary": true, "bcmsBreedCode": "AA", "id": 1 } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" } } } } } } }, "/v2/CorrectTransferRequests": { "post": { "tags": [ "CorrectTransferRequests", "External" ], "summary": "Correct an existing movement of animals", "description": "The CorrectTransferRequests allows you to edit an existing movement recorded by the [TransferRequests](#TransferRequests) endpoint.\n* The authenticated user must have originally created the transfer request being corrected (unless the authenticated user is an administrator)\n* The original and corrected movement must be for the same species.\n* The userHolding and movement direction cannot change (e.g. if userHolding was originally the sourceHolding, the corrected movement must have the same sourceHolding).\n* The system may not allow a transfer request to be corrected if other events have subsequently happened to animals involved in the original transfer request.\n* Use the `requestToBeUndone_ID` to specify the request id of the transfer request to be corrected. This can be obtained from the [TransferRequests](#TransferRequests) endpoint.\n* The content of the request must contain all the details of the movement that the original movement should be replaced with.\n* CorrectTransferRequests validation rules match [TransferRequests](#TransferRequests), see this for further information.", "parameters": [ { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.CorrectTransfer.CorrectTransfer" }, "examples": { "Correct cattle on movement": { "description": "Correct cattle on movement which had the original transfer request id of 12.", "value": { "content": { "requestToBeUndoneId": 12, "sourceHolding": "11/111/1111", "destinationHolding": "26/001/8033", "userHolding": "26/001/8033", "transferDate": "2022-06-11T17:20:00.0000000+01:00", "animalCount": 2, "species": "Cattle", "movementGroups": [ { "devices": [ { "tagNumber": "UK777777 200001" }, { "tagNumber": "UK777777 300002" } ] } ], "transportHaulierName": "Test Haulier", "transportVehicleRegistrationNo": "TEST 1", "processingFlags": [ ] } } }, "Correct sheep on movement with movement document": { "description": "Correct sheep on movement with movement document, some animals not FCI compliant, which had the original transfer request id of 13.", "value": { "content": { "requestToBeUndoneId": 13, "sourceHolding": "22/222/2222", "destinationHolding": "26/001/8033", "userHolding": "26/001/8033", "transferDate": "2022-06-11T17:20:00.0000000+01:00", "animalCount": 9, "species": "Sheep", "movementGroups": [ { "batches": [ { "animalTotal": 6, "batchNumber": "UK244220" } ], "devices": [ { "tagNumber": "UK0244220 00007" }, { "tagNumber": "UK0244220 00008" }, { "tagNumber": "UK0244220 00009" } ] } ], "movementDocument": { "departureDetail": { "animalTotal": 9, "departureDateTime": "2022-06-11T17:20:00.0000000+01:00", "departureKeeper": { "address1": "The Road", "county": "Somerset", "postCode": "", "propertyName": "The Farm", "town": "Towning", "firstName": "Departure", "lastName": "Farmer", "title": "Mr", "telephoneNumber": "01234 567890" }, "expectedDurationOfJourney": { "hours": 1, "minutes": 30 }, "loadingDateTime": "2022-06-11T16:50:00.0000000+01:00", "departureHoldingType": "PRODUCER" }, "destinationDetail": { "arrivalDateTime": "2022-06-11T20:20:00.0000000+01:00", "destinationKeeper": { "address1": "The Road", "postCode": "", "propertyName": "The Farm 2", "town": "Towning", "firstName": "Destination", "lastName": "Keeper", "title": "Mr" }, "destinationHoldingType": "PRODUCER", "hasKeeperChanged": true, "totalAnimalsReceived": 9, "unloadingDateTime": "2022-06-11T20:30:00.0000000+01:00" }, "transportDetail": { "transporter": { "firstName": "Destination", "lastName": "Keeper", "title": "Mr", "telephoneNumber": "01987 654321" }, "transporterType": "DEST", "transportVehicleRegistrationNo": "TEST" }, "fciDetail": { "metFCIWithdrawalPeriodCode": "WITHDRAWAL_NOT_MET", "isAllAnimalsFciCompliant": false, "nonCompliantReason": "Give extra dose of medicine", "nonCompliantDevices": [ { "tagNumber": "UK0244220 00007" } ] } }, "processingFlags": [ ] } } } } } } }, "responses": { "201": { "description": "The request was successfully queued.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.CorrectTransfer.CorrectTransfer" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } } } }, "get": { "tags": [ "CorrectTransferRequests", "External" ], "summary": "Gets all requests to correct an existing movement of animals", "description": "Returns all CorrectTransferRequests.\n* For most user roles only returns requests created by authenticated user.", "parameters": [ { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } }, { "name": "$filter", "in": "query", "description": "Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions. Only dates with a time part will be accepted.", "style": "form", "schema": { "type": "string" } }, { "name": "$orderby", "in": "query", "description": "Specifies the order in which items are returned. The maximum number of expressions is 5.", "style": "form", "schema": { "type": "string" } }, { "name": "$top", "in": "query", "description": "Limits the number of items returned from a collection.", "style": "form", "schema": { "type": "integer", "format": "int32" } }, { "name": "$skip", "in": "query", "description": "Excludes the specified number of items of the queried collection from the result.", "style": "form", "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.CorrectTransfer.CorrectTransferListResult" }, "example": { "value": [ { "requestId": 33, "requestStatus": "Success", "requestDate": "2022-06-21T17:15:00.0000000+01:00", "updatedDate": "2022-06-21T17:16:00.0000000+01:00", "undoSupported": true, "content": { "requestToBeUndoneId": 12, "sourceHolding": "11/111/1111", "destinationHolding": "26/001/8033", "userHolding": "26/001/8033", "transferDate": "2022-06-11T17:20:00.0000000+01:00", "animalCount": 2, "species": "Cattle", "movementGroups": [ { "devices": [ { "tagNumber": "UK777777 200001" }, { "tagNumber": "UK777777 300002" } ] } ], "transportHaulierName": "Test Haulier", "transportVehicleRegistrationNo": "TEST 1", "processingFlags": [ ] } }, { "requestId": 34, "requestStatus": "CompletedError", "requestDate": "2022-06-21T17:15:00.0000000+01:00", "updatedDate": "2022-06-21T17:16:00.0000000+01:00", "undoSupported": true, "errors": [ { "code": "14113", "message": "Unable to UNDO request, the animal UK0244220 00007 contains a subsequent movement (after) submitted by request 32." }, { "code": "4076", "message": "Could not edit the movement, due to errors undoing the original movement." } ], "content": { "requestToBeUndoneId": 13, "sourceHolding": "22/222/2222", "destinationHolding": "26/001/8033", "userHolding": "26/001/8033", "transferDate": "2022-06-11T17:20:00.0000000+01:00", "animalCount": 9, "species": "Sheep", "movementGroups": [ { "batches": [ { "animalTotal": 6, "batchNumber": "UK244220" } ], "devices": [ { "tagNumber": "UK0244220 00007" }, { "tagNumber": "UK0244220 00008" }, { "tagNumber": "UK0244220 00009" } ] } ], "movementDocument": { "departureDetail": { "animalTotal": 9, "departureDateTime": "2022-06-11T17:20:00.0000000+01:00", "departureKeeper": { "address1": "The Road", "county": "Somerset", "postCode": "", "propertyName": "The Farm", "town": "Towning", "firstName": "Departure", "lastName": "Farmer", "title": "Mr", "telephoneNumber": "01234 567890" }, "expectedDurationOfJourney": { "hours": 1, "minutes": 30 }, "loadingDateTime": "2022-06-11T16:50:00.0000000+01:00", "departureHoldingType": "PRODUCER" }, "destinationDetail": { "arrivalDateTime": "2022-06-11T20:20:00.0000000+01:00", "destinationKeeper": { "address1": "The Road", "postCode": "", "propertyName": "The Farm 2", "town": "Towning", "firstName": "Destination", "lastName": "Keeper", "title": "Mr" }, "destinationHoldingType": "PRODUCER", "hasKeeperChanged": true, "totalAnimalsReceived": 9, "unloadingDateTime": "2022-06-11T20:30:00.0000000+01:00" }, "transportDetail": { "transporter": { "firstName": "Destination", "lastName": "Keeper", "title": "Mr", "telephoneNumber": "01987 654321" }, "transporterType": "DEST", "transportVehicleRegistrationNo": "TEST" }, "fciDetail": { "metFCIWithdrawalPeriodCode": "WITHDRAWAL_NOT_MET", "isAllAnimalsFciCompliant": false, "nonCompliantReason": "Give extra dose of medicine", "nonCompliantDevices": [ { "tagNumber": "UK0244220 00007" } ] } }, "processingFlags": [ ] } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } } } } }, "/v2/CorrectTransferRequests({key})": { "get": { "tags": [ "CorrectTransferRequests", "External" ], "summary": "Get a specific request to correct an existing movement of animals", "description": "Returns a specific CorrectTransferRequest using its request id.\n* For most user roles, user only permitted to query for request id created by authenticated user.", "parameters": [ { "name": "key", "in": "path", "description": "Request id", "required": true, "style": "simple", "schema": { "type": "integer", "format": "int32" } }, { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.CorrectTransfer.CorrectTransfer" }, "examples": { "Get correct transfer request that was successful": { "description": "Get correct transfer request for cattle on movement that was successfully processed.", "value": { "requestId": 33, "requestStatus": "Success", "requestDate": "2022-06-21T17:15:00.0000000+01:00", "updatedDate": "2022-06-21T17:16:00.0000000+01:00", "undoSupported": true, "content": { "requestToBeUndoneId": 12, "sourceHolding": "11/111/1111", "destinationHolding": "26/001/8033", "userHolding": "26/001/8033", "transferDate": "2022-06-11T17:20:00.0000000+01:00", "animalCount": 2, "species": "Cattle", "movementGroups": [ { "devices": [ { "tagNumber": "UK777777 200001" }, { "tagNumber": "UK777777 300002" } ] } ], "transportHaulierName": "Test Haulier", "transportVehicleRegistrationNo": "TEST 1", "processingFlags": [ ] } } }, "Get correct transfer request that resulted in complete with errors status": { "description": "Get correct transfer request that resulted in complete with errors status. This error means movement wasn't corrected due to animal UK0244220 00007 having a subsequent movement.", "value": { "requestId": 34, "requestStatus": "CompletedError", "requestDate": "2022-06-21T17:15:00.0000000+01:00", "updatedDate": "2022-06-21T17:16:00.0000000+01:00", "undoSupported": true, "errors": [ { "code": "14113", "message": "Unable to UNDO request, the animal UK0244220 00007 contains a subsequent movement (after) submitted by request 32." }, { "code": "4076", "message": "Could not edit the movement, due to errors undoing the original movement." } ], "content": { "requestToBeUndoneId": 13, "sourceHolding": "22/222/2222", "destinationHolding": "26/001/8033", "userHolding": "26/001/8033", "transferDate": "2022-06-11T17:20:00.0000000+01:00", "animalCount": 9, "species": "Sheep", "movementGroups": [ { "batches": [ { "animalTotal": 6, "batchNumber": "UK244220" } ], "devices": [ { "tagNumber": "UK0244220 00007" }, { "tagNumber": "UK0244220 00008" }, { "tagNumber": "UK0244220 00009" } ] } ], "movementDocument": { "departureDetail": { "animalTotal": 9, "departureDateTime": "2022-06-11T17:20:00.0000000+01:00", "departureKeeper": { "address1": "The Road", "county": "Somerset", "postCode": "", "propertyName": "The Farm", "town": "Towning", "firstName": "Departure", "lastName": "Farmer", "title": "Mr", "telephoneNumber": "01234 567890" }, "expectedDurationOfJourney": { "hours": 1, "minutes": 30 }, "loadingDateTime": "2022-06-11T16:50:00.0000000+01:00", "departureHoldingType": "PRODUCER" }, "destinationDetail": { "arrivalDateTime": "2022-06-11T20:20:00.0000000+01:00", "destinationKeeper": { "address1": "The Road", "postCode": "", "propertyName": "The Farm 2", "town": "Towning", "firstName": "Destination", "lastName": "Keeper", "title": "Mr" }, "destinationHoldingType": "PRODUCER", "hasKeeperChanged": true, "totalAnimalsReceived": 9, "unloadingDateTime": "2022-06-11T20:30:00.0000000+01:00" }, "transportDetail": { "transporter": { "firstName": "Destination", "lastName": "Keeper", "title": "Mr", "telephoneNumber": "01987 654321" }, "transporterType": "DEST", "transportVehicleRegistrationNo": "TEST" }, "fciDetail": { "metFCIWithdrawalPeriodCode": "WITHDRAWAL_NOT_MET", "isAllAnimalsFciCompliant": false, "nonCompliantReason": "Give extra dose of medicine", "nonCompliantDevices": [ { "tagNumber": "UK0244220 00007" } ] } }, "processingFlags": [ ] } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" } } } } } } }, "/v2/Counties": { "get": { "tags": [ "Counties", "External" ], "summary": "Get all counties", "description": "Returns all counties.", "parameters": [ { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.CountyListResult" }, "example": { "value": [ { "id": 1, "name": "Aberdeenshire" }, { "id": 2, "name": "Angus" }, { "id": 3, "name": "Argyllshire" }, { "id": 4, "name": "Avon" } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } } } } }, "/v2/Counties({key})": { "get": { "tags": [ "Counties", "External" ], "summary": "View a county by id.", "description": "Returns a specific county using its entity id.", "parameters": [ { "name": "key", "in": "path", "description": "record id", "required": true, "style": "simple", "schema": { "type": "integer", "format": "int32" } }, { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.County" }, "example": { "id": 1, "name": "Aberdeenshire" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" } } } } } } }, "/v2/DocumentTypes": { "get": { "tags": [ "DocumentTypes", "External" ], "summary": "View the different types of document", "description": "Returns the different types of document.", "parameters": [ { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.Transfer.DocumentTypeListResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } } } } }, "/v2/DocumentTypes({key})": { "get": { "tags": [ "DocumentTypes", "External" ], "summary": "View a specific type of document by its Id.", "description": "Returns a document type.", "parameters": [ { "name": "key", "in": "path", "description": "record id", "required": true, "style": "simple", "schema": { "type": "integer", "format": "int32" } }, { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.Transfer.DocumentType" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" } } } } } } }, "/v2/Genders": { "get": { "tags": [ "Genders", "External" ], "summary": "Get all animal genders", "description": "Return all genders.\n* To get the genders supported for a particular species and the name that should be displayed to the end user, use the [GenderSpecies](#GenderSpecies) endpoint", "parameters": [ { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } }, { "name": "$filter", "in": "query", "description": "Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions. Only dates with a time part will be accepted.", "style": "form", "schema": { "type": "string" } }, { "name": "$orderby", "in": "query", "description": "Specifies the order in which items are returned. The maximum number of expressions is 5.", "style": "form", "schema": { "type": "string" } }, { "name": "$top", "in": "query", "description": "Limits the number of items returned from a collection.", "style": "form", "schema": { "type": "integer", "format": "int32" } }, { "name": "$skip", "in": "query", "description": "Excludes the specified number of items of the queried collection from the result.", "style": "form", "schema": { "type": "integer", "format": "int32" } }, { "name": "$count", "in": "query", "description": "Indicates whether the total count of items within a collection are returned in the result.", "style": "form", "schema": { "type": "boolean", "default": "False" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.GenderListResult" }, "example": { "value": [ { "name": "Female", "code": "F", "typeCode": "FEMALE", "id": 2 } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } } } } }, "/v2/Genders({key})": { "get": { "tags": [ "Genders", "External" ], "summary": "View an animal gender by id.", "description": "Returns a specific gender using its entity id.", "parameters": [ { "name": "key", "in": "path", "description": "record id", "required": true, "style": "simple", "schema": { "type": "integer", "format": "int32" } }, { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.Gender" }, "example": { "name": "Female", "code": "F", "typeCode": "FEMALE", "id": 2 } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" } } } } } } }, "/v2/HoldingMovementForReviews/GetReviewBatches(isPreMovement={isPreMovement},movementPendingId={movementPendingId},movementId={movementId})": { "get": { "tags": [ "HoldingMovementForReviews", "External" ], "summary": "Gets the list of batches for the specified ReviewHoldingMovementRequest.", "description": "Gets the list of batches for the specified ReviewHoldingMovementRequest.", "parameters": [ { "name": "isPreMovement", "in": "path", "required": true, "style": "simple", "schema": { "type": "boolean" } }, { "name": "movementPendingId", "in": "path", "required": true, "style": "simple", "schema": { "type": "integer", "format": "int32" } }, { "name": "movementId", "in": "path", "required": true, "style": "simple", "schema": { "type": "integer", "format": "int32" } }, { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.ReviewHoldingMovement.V2.ReviewBatchListResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" } } } } } } }, "/v2/HoldingMovementForReviews/GetReviewDevices(isPreMovement={isPreMovement},movementPendingId={movementPendingId},movementId={movementId})": { "get": { "tags": [ "HoldingMovementForReviews", "External" ], "summary": "Gets the list of devicesfor the specified ReviewHoldingMovementRequest.", "description": "Gets the list of devices for the specified ReviewHoldingMovementRequest.", "parameters": [ { "name": "isPreMovement", "in": "path", "required": true, "style": "simple", "schema": { "type": "boolean" } }, { "name": "movementPendingId", "in": "path", "required": true, "style": "simple", "schema": { "type": "integer", "format": "int32" } }, { "name": "movementId", "in": "path", "required": true, "style": "simple", "schema": { "type": "integer", "format": "int32" } }, { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } }, { "name": "$filter", "in": "query", "description": "Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions. Only dates with a time part will be accepted.", "style": "form", "schema": { "type": "string" } }, { "name": "$orderby", "in": "query", "description": "Specifies the order in which items are returned. The maximum number of expressions is 5.", "style": "form", "schema": { "type": "string" } }, { "name": "$top", "in": "query", "description": "Limits the number of items returned from a collection.", "style": "form", "schema": { "type": "integer", "format": "int32" } }, { "name": "$skip", "in": "query", "description": "Excludes the specified number of items of the queried collection from the result.", "style": "form", "schema": { "type": "integer", "format": "int32" } }, { "name": "$count", "in": "query", "description": "Indicates whether the total count of items within a collection are returned in the result.", "style": "form", "schema": { "type": "boolean", "default": "False" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.ReviewHoldingMovement.V2.ReviewDeviceListResult" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" } } } } } } }, "/v2/HoldingMovementForReviews/ReviewBySpecies(species='{species}',holding='{holding}')": { "get": { "tags": [ "HoldingMovementForReviews", "External" ], "summary": "Gets movements that require review.", "description": "Gets holding movements awaiting review by the authenticated user.\nIf holding parameter is specified, only movements where the departure or arrival holding equal the specified value will be returned where the movement still needs to be reviewed by the holding in question.\n \nThis includes:\n - Movements on or off holdings by other users not connected to it. An example of this is if a market records a movement off the market to a producer holding.\n - Movements where both ends recorded the same movement. Movements where this is the case are highlighted by the `isDuplicate` property.\n - Pre-movements onto holdings by other users not connected to it, where the intended movement date has passed and has not been converted into actual movements or withdrawn.\n \nFor most user roles the authenticated user will only be able to see movements on or off holdings the user is associated with.\n \nSee [ReviewHoldingMovementRequests](#ReviewHoldingMovementRequests) to review the movements returned by this endpoint.", "parameters": [ { "name": "species", "in": "path", "description": "*Necessity*: Required.\r\n *Validation*: Must be a valid species from the [Species](#Species) endpoint.", "required": true, "style": "simple", "schema": { "type": "string", "description": "*Necessity*: Required.\r\n *Validation*: Must be a valid species from the [Species](#Species) endpoint." } }, { "name": "holding", "in": "path", "description": "*Necessity*: Required for administration users, optional otherwise.\r\n *Validation*: Must be a valid holding CPH or MHS number that the user is associated with.", "required": true, "style": "simple", "schema": { "type": "string", "description": "*Necessity*: Required for administration users, optional otherwise.\r\n *Validation*: Must be a valid holding CPH or MHS number that the user is associated with.", "nullable": true } }, { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } }, { "name": "$filter", "in": "query", "description": "Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions. Only dates with a time part will be accepted.", "style": "form", "schema": { "type": "string" } }, { "name": "$orderby", "in": "query", "description": "Specifies the order in which items are returned. The maximum number of expressions is 5.", "style": "form", "schema": { "type": "string" } }, { "name": "$top", "in": "query", "description": "Limits the number of items returned from a collection.", "style": "form", "schema": { "type": "integer", "format": "int32" } }, { "name": "$skip", "in": "query", "description": "Excludes the specified number of items of the queried collection from the result.", "style": "form", "schema": { "type": "integer", "format": "int32" } }, { "name": "$count", "in": "query", "description": "Indicates whether the total count of items within a collection are returned in the result.", "style": "form", "schema": { "type": "boolean", "default": "False" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.ReviewHoldingMovement.V2.HoldingMovementForReviewListResult" }, "examples": { "Review movement made by another user": { "description": "A user moved both devices and batches of animals to the authenticated user's holding, 26/001/8033.", "value": { "value": [ { "requestId": 34, "species": "Sheep", "destinationHolding": "26/001/8033", "sourceHolding": "11/111/1111", "userHolding": "11/111/1111", "movementDate": "2022-06-21T17:20:00.0000000+01:00", "animalTotal": 11, "duplicateRequestIds": [ ], "movementId": 14 } ] } }, "Duplicate movements to review": { "description": "Two movements to review that have the same date, devices, source and destination holding. They differ on request Id and user holding. Both requests reference the other in the duplicate request Ids.", "value": { "value": [ { "requestId": 37, "species": "Sheep", "destinationHolding": "26/001/8033", "sourceHolding": "11/111/1111", "userHolding": "26/001/8033", "movementDate": "2022-06-21T17:20:00.0000000+01:00", "animalTotal": 3, "isDuplicate": true, "duplicateRequestIds": [ 41 ], "movementId": 27 }, { "requestId": 41, "species": "Sheep", "destinationHolding": "26/001/8033", "sourceHolding": "11/111/1111", "userHolding": "11/111/1111", "movementDate": "2022-06-21T17:20:00.0000000+01:00", "animalTotal": 3, "isDuplicate": true, "duplicateRequestIds": [ 37 ], "movementId": 24 } ] } }, "Review a pre-movement": { "description": "A user plans to move batches of animals to the authenticated user's holding, 26/001/8033.", "value": { "value": [ { "requestId": 43, "species": "Sheep", "destinationHolding": "26/001/8033", "sourceHolding": "11/111/1111", "userHolding": "11/111/1111", "movementDate": "2022-06-28T00:00:00.0000000+01:00", "animalTotal": 11, "duplicateRequestIds": [ ], "isPreMovement": true, "movementPendingId": 17 } ] } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" } } } } } } }, "/v2/HoldingTypes": { "get": { "tags": [ "HoldingTypes", "External" ], "summary": "Get data about valid types of holding", "description": "Returns all available valid types of holding.", "parameters": [ { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.HoldingTypeListResult" }, "example": { "value": [ { "id": 1, "name": "ABATTOIR", "fullName": "Abattoir" }, { "id": 4, "name": "KNACKERY", "fullName": "Knacker's Yard" } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } } } } }, "/v2/HoldingTypes({key})": { "get": { "tags": [ "HoldingTypes", "External" ], "summary": "Get data about valid types of holding", "description": "Returns a single valid type of holding.", "parameters": [ { "name": "key", "in": "path", "description": "record id", "required": true, "style": "simple", "schema": { "type": "integer", "format": "int32" } }, { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.HoldingType" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" } } } } } } }, "/v2/MetFCIWithdrawalPeriods": { "get": { "tags": [ "MetFCIWithdrawalPeriods", "External" ], "summary": "Get details about statuses related to FCI withdrawal periods", "description": "Returns details of all available statuses related to FCI withdrawal periods to explain whether those periods\nhave been met.", "parameters": [ { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.MetFCIWithdrawalPeriodListResult" }, "example": { "value": [ { "name": "Withdrawal periods have not been met", "code": "WITHDRAWAL_NOT_MET", "id": 3 } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } } } } }, "/v2/MetFCIWithdrawalPeriods({key})": { "get": { "tags": [ "MetFCIWithdrawalPeriods", "External" ], "summary": "Get details about a status related to FCI withdrawal periods", "description": "Returns details of a single available status related to FCI withdrawal periods by id to explain whether those\nperiods have been met.", "parameters": [ { "name": "key", "in": "path", "description": "record id", "required": true, "style": "simple", "schema": { "type": "integer", "format": "int32" } }, { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.MetFCIWithdrawalPeriod" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" } } } } } } }, "/v2/ApprovedMovements/ByTransferDateRange(speciesId={speciesId},startTransferDate={startTransferDate},endTransferDate={endTransferDate},departureHolding='{departureHolding}',destinationHolding='{destinationHolding}')": { "get": { "tags": [ "ApprovedMovements", "External" ], "summary": "Gets Approved Movements by TransferDate", "description": "For users linked to a holding, this returns all movements for holdings the authenticated user is associated with.\nThe movement must be non-system and have been recorded or reviewed and accepted by the authenticated user or other users associated with the holding.\n \nFor users not linked to a holding this returns all movements that are not system movements.\n \n A movement is returned twice if both:\n* It was recorded by departure keeper and destination has reviewed and accepted the movement.\n* The authenticated user is not linked to holdings, or is associated with both departure and destination holdings.\n \nThe recordedBy property is used to indicate if the Departure or Destination end of movement has either:\n * Recorded the movement\n * Reviewed and accepted the movement", "parameters": [ { "name": "speciesId", "in": "path", "description": "Id of species\r\n \r\n* *Necessity*: Required.", "required": true, "style": "simple", "schema": { "type": "integer", "description": "Id of species\r\n \r\n* *Necessity*: Required.", "format": "int32" } }, { "name": "startTransferDate", "in": "path", "description": "Start date of the transferDate range\r\n \r\n* *Necessity*: Required.", "required": true, "style": "simple", "schema": { "type": "string", "description": "Start date of the transferDate range\r\n \r\n* *Necessity*: Required.", "format": "date-time" } }, { "name": "endTransferDate", "in": "path", "description": "End date of the transferDate range\r\n \r\n* *Necessity*: Required.", "required": true, "style": "simple", "schema": { "type": "string", "description": "End date of the transferDate range\r\n \r\n* *Necessity*: Required.", "format": "date-time" } }, { "name": "departureHolding", "in": "path", "description": "CPH of departureHolding\r\n \r\n*Necessity*: Either departureHolding or DestinationHolding is required, but can be null or empty string for authenticated users associated with holdings.\r\n \r\n*Validation*: Must be a valid holding that exists. For most user roles authenticated user must be associated with it.", "required": true, "style": "simple", "schema": { "type": "string", "description": "CPH of departureHolding\r\n \r\n*Necessity*: Either departureHolding or DestinationHolding is required, but can be null or empty string for authenticated users associated with holdings.\r\n \r\n*Validation*: Must be a valid holding that exists. For most user roles authenticated user must be associated with it.", "nullable": true } }, { "name": "destinationHolding", "in": "path", "description": "CPH of destinationHolding\r\n \r\n*Necessity*: Either departureHolding or DestinationHolding is required, but can be null or empty string for authenticated users associated with holdings.\r\n \r\n*Validation*: Must be a valid holding that exists. For most user roles authenticated user must be associated with it.", "required": true, "style": "simple", "schema": { "type": "string", "description": "CPH of destinationHolding\r\n \r\n*Necessity*: Either departureHolding or DestinationHolding is required, but can be null or empty string for authenticated users associated with holdings.\r\n \r\n*Validation*: Must be a valid holding that exists. For most user roles authenticated user must be associated with it.", "nullable": true } }, { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 5.", "style": "form", "schema": { "type": "string" } }, { "name": "$filter", "in": "query", "description": "Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions. Only dates with a time part will be accepted.", "style": "form", "schema": { "type": "string" } }, { "name": "$orderby", "in": "query", "description": "Specifies the order in which items are returned. The maximum number of expressions is 5.", "style": "form", "schema": { "type": "string" } }, { "name": "$top", "in": "query", "description": "Limits the number of items returned from a collection.", "style": "form", "schema": { "type": "integer", "format": "int32" } }, { "name": "$skip", "in": "query", "description": "Excludes the specified number of items of the queried collection from the result.", "style": "form", "schema": { "type": "integer", "format": "int32" } }, { "name": "$count", "in": "query", "description": "Indicates whether the total count of items within a collection are returned in the result.", "style": "form", "schema": { "type": "boolean", "default": "False" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.ApprovedMovement.ApprovedMovementListResult" }, "examples": { "Duplicate movements retrieved by authenticated user not linked to a holding": { "description": "Notice that the two movements have the same `sourceHolding` and `destinationHolding`, but a different `recordedBy`", "value": { "value": [ { "id": 2, "sourceHolding": "26/001/8033", "destinationHolding": "12/345/6789", "speciesId": 1, "species": { "id": 1, "name": "Sheep" }, "animalTotal": 7, "transferDate": "2022-06-21T17:20:00.0000000+01:00", "transportHaulierName": "Fred's", "transportVehicleRegistrationNo": "AB09 URE", "devices": [ { "deviceLocationId": 5, "approvedMovementId": 2, "tagNumber": "UK0244220 00001", "rfid": "0826024422000001", "approvedMovementRecordedBy": "Departure" }, { "deviceLocationId": 6, "approvedMovementId": 2, "tagNumber": "UK0244220 00002", "rfid": "0826024422000002", "approvedMovementRecordedBy": "Departure" }, { "deviceLocationId": 7, "approvedMovementId": 2, "tagNumber": "UK0244220 00003", "rfid": "0826024422000003", "approvedMovementRecordedBy": "Departure" } ], "batches": [ { "batchMovementId": 2, "approvedMovementId": 2, "batchNumber": "UK222222", "idMark": "Red", "animalTotal": 4, "approvedMovementRecordedBy": "Departure" } ], "recordedBy": "Departure" }, { "id": 2, "sourceHolding": "26/001/8033", "destinationHolding": "12/345/6789", "speciesId": 1, "species": { "id": 1, "name": "Sheep" }, "animalTotal": 7, "transferDate": "2022-06-21T17:20:00.0000000+01:00", "transportHaulierName": "Fred's", "transportVehicleRegistrationNo": "AB09 URE", "devices": [ { "deviceLocationId": 5, "approvedMovementId": 2, "tagNumber": "UK0244220 00001", "rfid": "0826024422000001", "approvedMovementRecordedBy": "Destination" }, { "deviceLocationId": 6, "approvedMovementId": 2, "tagNumber": "UK0244220 00002", "rfid": "0826024422000002", "approvedMovementRecordedBy": "Destination" }, { "deviceLocationId": 7, "approvedMovementId": 2, "tagNumber": "UK0244220 00003", "rfid": "0826024422000003", "approvedMovementRecordedBy": "Destination" } ], "batches": [ { "batchMovementId": 2, "approvedMovementId": 2, "batchNumber": "UK222222", "idMark": "Red", "animalTotal": 4, "approvedMovementRecordedBy": "Destination" } ], "recordedBy": "Destination" } ] } }, "Movement retrieved by authenticated user who created it": { "description": "The same movement as the above example, but from the perspective of the authenticated user that created the Off Movement. Recorded by Departure.", "value": { "value": [ { "id": 2, "sourceHolding": "26/001/8033", "destinationHolding": "12/345/6789", "speciesId": 1, "species": { "id": 1, "name": "Sheep" }, "animalTotal": 7, "transferDate": "2022-06-21T17:20:00.0000000+01:00", "transportHaulierName": "Fred's", "transportVehicleRegistrationNo": "AB09 URE", "devices": [ { "deviceLocationId": 5, "approvedMovementId": 2, "tagNumber": "UK0244220 00001", "rfid": "0826024422000001", "approvedMovementRecordedBy": "Departure" }, { "deviceLocationId": 6, "approvedMovementId": 2, "tagNumber": "UK0244220 00002", "rfid": "0826024422000002", "approvedMovementRecordedBy": "Departure" }, { "deviceLocationId": 7, "approvedMovementId": 2, "tagNumber": "UK0244220 00003", "rfid": "0826024422000003", "approvedMovementRecordedBy": "Departure" } ], "batches": [ { "batchMovementId": 2, "approvedMovementId": 2, "batchNumber": "UK222222", "idMark": "Red", "animalTotal": 4, "approvedMovementRecordedBy": "Departure" } ], "recordedBy": "Departure" } ] } }, "Movement retrieved by authenticated user who accepted it": { "description": "The same movement as the above examples, but from the perspective of the authenticated user that accepted the movement with all devices and batches. Recorded by Destination.", "value": { "value": [ { "id": 2, "sourceHolding": "26/001/8033", "destinationHolding": "12/345/6789", "speciesId": 1, "species": { "id": 1, "name": "Sheep" }, "animalTotal": 7, "transferDate": "2022-06-21T17:20:00.0000000+01:00", "transportHaulierName": "Fred's", "transportVehicleRegistrationNo": "AB09 URE", "devices": [ { "deviceLocationId": 5, "approvedMovementId": 2, "tagNumber": "UK0244220 000001", "rfid": "0826024422000001", "approvedMovementRecordedBy": "Destination" }, { "deviceLocationId": 6, "approvedMovementId": 2, "tagNumber": "UK0244220 000002", "rfid": "0826024422000002", "approvedMovementRecordedBy": "Destination" }, { "deviceLocationId": 7, "approvedMovementId": 2, "tagNumber": "UK0244220 000003", "rfid": "0826024422000003", "approvedMovementRecordedBy": "Destination" } ], "batches": [ { "batchMovementId": 2, "approvedMovementId": 2, "batchNumber": "UK222222", "idMark": "Red", "animalTotal": 4, "approvedMovementRecordedBy": "Destination" } ], "recordedBy": "Destination" } ] } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } } } } }, "/v2/ApprovedMovements({keyId},'{keyRecordedBy}')": { "get": { "tags": [ "ApprovedMovements", "External" ], "summary": "Gets the details of the specified movement", "description": "The requested movement is only returned if either:\n * The user is not linked to any holdings and movement is non-system.\n * The user is associated with either the departure or destination holding, it is a non-system movement, and has been recorded or accepted by the user or other users associated with the holding.", "parameters": [ { "name": "keyId", "in": "path", "description": "approvedMovementId", "required": true, "style": "simple", "schema": { "type": "integer", "description": "approvedMovementId", "format": "int32" } }, { "name": "keyRecordedBy", "in": "path", "description": "The role of the holding that recorded the movement.\r\n* *Necessity*: Required\r\n* *Validation*: Accepted values are `Departure` or `Destination`", "required": true, "style": "simple", "schema": { "type": "string", "description": "The role of the holding that recorded the movement.\r\n* *Necessity*: Required\r\n* *Validation*: Accepted values are `Departure` or `Destination`", "nullable": true } }, { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 4.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.ApprovedMovement.ApprovedMovement" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" } } } } } } }, "/v2/ProcessingFlags": { "get": { "tags": [ "ProcessingFlags", "External" ], "summary": "Gets all processing flags.", "description": "Gets all processing flags.", "parameters": [ { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } }, { "name": "$filter", "in": "query", "description": "Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions. Only dates with a time part will be accepted.", "style": "form", "schema": { "type": "string" } }, { "name": "$orderby", "in": "query", "description": "Specifies the order in which items are returned. The maximum number of expressions is 5.", "style": "form", "schema": { "type": "string" } }, { "name": "$top", "in": "query", "description": "Limits the number of items returned from a collection.", "style": "form", "schema": { "type": "integer", "format": "int32" } }, { "name": "$skip", "in": "query", "description": "Excludes the specified number of items of the queried collection from the result.", "style": "form", "schema": { "type": "integer", "format": "int32" } }, { "name": "$count", "in": "query", "description": "Indicates whether the total count of items within a collection are returned in the result.", "style": "form", "schema": { "type": "boolean", "default": "False" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.ProcessingFlagListResult" }, "example": { "value": [ { "id": 3, "flagName": "DONT_CHANGE_RUNNING_TOTAL", "flagDescription": "The animals in request should not effect the running total.", "isSystem": true }, { "id": 6, "flagName": "Dedicated Slaughter", "flagDescription": "Dedicated Slaughter", "userQuestion": "Moving to or from a slaughter market/collection centre" }, { "id": 11, "flagName": "Pig Pyramid", "flagDescription": "Holdings are in an approved pig pyramid", "userQuestion": "Pig pyramid move?" } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } } } } }, "/v2/ProcessingFlags({key})": { "get": { "tags": [ "ProcessingFlags", "External" ], "summary": "Gets a specific processing flag by id", "description": "Gets a specific processing flag by id.", "parameters": [ { "name": "key", "in": "path", "description": "record id", "required": true, "style": "simple", "schema": { "type": "integer", "format": "int32" } }, { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.ProcessingFlag" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" } } } } } } }, "/v2/ReviewHoldingMovementRequests({key})": { "get": { "tags": [ "ReviewHoldingMovementRequests", "External" ], "summary": "Get a specific request to review the movement of animals", "description": "Returns a specific ReviewHoldingMovementRequests using its request id.\n* For most user roles, user only permitted to query for request id created by authenticated user.", "parameters": [ { "name": "key", "in": "path", "description": "Request id", "required": true, "style": "simple", "schema": { "type": "integer", "format": "int32" } }, { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.ReviewHoldingMovement.ReviewHoldingMovement" }, "examples": { "Get review holding movement request that was successful": { "description": "Get review holding movement that accepted the whole movement. The review movement request was successfully processed.", "value": { "requestId": 33, "requestStatus": "Success", "requestDate": "2022-06-21T17:15:00.0000000+01:00", "updatedDate": "2022-06-21T17:16:00.0000000+01:00", "undoSupported": true, "content": { "holding": "26/001/8033", "reviewMovement": { "requestId": 25, "isAccepted": true, "acceptedBatches": [ { "batchMovementId": 1001, "animalTotal": 4, "batchNumber": "UK244220" } ], "acceptedDevices": [ { "tagNumber": "UK0244220 00001" }, { "tagNumber": "UK0244220 00002" } ], "animalTotal": 6, "arrivalDate": "2022-06-20T17:20:00.0000000+01:00" } } } }, "Get review holding movement request that is pending processing": { "description": "Get review holding movement that rejected the whole movement. The review movement request is still pending processing .", "value": { "requestId": 34, "requestStatus": "Pending", "requestDate": "2022-06-21T17:15:00.0000000+01:00", "undoSupported": true, "content": { "holding": "26/001/8033", "reviewMovement": { "requestId": 27, "isAccepted": false, "rejectedBatches": [ { "batchMovementId": 1010, "animalTotal": 6, "batchNumber": "UK244220" } ], "rejectedDevices": [ { "tagNumber": "UK0244220 00021" }, { "tagNumber": "UK0244220 00022" } ] } } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" } } } } } } }, "/v2/ReviewHoldingMovementRequests": { "get": { "tags": [ "ReviewHoldingMovementRequests", "External" ], "summary": "Gets all requests to review movements of animals", "description": "Returns all ReviewHoldingMovementRequests.\n* For most user roles only returns requests created by authenticated user.", "parameters": [ { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } }, { "name": "$filter", "in": "query", "description": "Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions. Only dates with a time part will be accepted.", "style": "form", "schema": { "type": "string" } }, { "name": "$orderby", "in": "query", "description": "Specifies the order in which items are returned. The maximum number of expressions is 5.", "style": "form", "schema": { "type": "string" } }, { "name": "$top", "in": "query", "description": "Limits the number of items returned from a collection.", "style": "form", "schema": { "type": "integer", "format": "int32" } }, { "name": "$skip", "in": "query", "description": "Excludes the specified number of items of the queried collection from the result.", "style": "form", "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.ReviewHoldingMovement.ReviewHoldingMovementListResult" }, "example": { "value": [ { "requestId": 33, "requestStatus": "Success", "requestDate": "2022-06-21T17:15:00.0000000+01:00", "updatedDate": "2022-06-21T17:16:00.0000000+01:00", "undoSupported": true, "content": { "holding": "26/001/8033", "reviewMovement": { "requestId": 25, "isAccepted": true, "acceptedBatches": [ { "batchMovementId": 1001, "animalTotal": 4, "batchNumber": "UK244220" } ], "acceptedDevices": [ { "tagNumber": "UK0244220 00001" }, { "tagNumber": "UK0244220 00002" } ], "animalTotal": 6, "arrivalDate": "2022-06-20T17:20:00.0000000+01:00" } } }, { "requestId": 34, "requestStatus": "Pending", "requestDate": "2022-06-21T17:15:00.0000000+01:00", "undoSupported": true, "content": { "holding": "26/001/8033", "reviewMovement": { "requestId": 27, "isAccepted": false, "rejectedBatches": [ { "batchMovementId": 1010, "animalTotal": 6, "batchNumber": "UK244220" } ], "rejectedDevices": [ { "tagNumber": "UK0244220 00021" }, { "tagNumber": "UK0244220 00022" } ] } } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } } } }, "post": { "tags": [ "ReviewHoldingMovementRequests", "External" ], "summary": "Review the movement of animals", "description": "ReviewHoldingMovementRequests allows the authenticated user to review movements submitted by someone else on or off holdings that they are associated with.\n* Movements available for review can be obtained from the [HoldingMovementForReviews](#HoldingMovementForReviews) endpoint.\n* For a given movement available for review, either:\n * The whole movement can be accepted as entered by the other keeper.\n * Partially accepted for some individual or batch identified animals involved, with others rejected as not being included in the movement.\n * The whole movement can be rejected as not happening.\n* If there are any extra animals that moved but were not included in the movement for review, record a new movement using the [TransferRequests](#TransferRequests) endpoint for just the missing animals.\n* Any movements accepted or partially accepted will appear in the [Holding Register](#HoldingRegisters).", "parameters": [ { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.ReviewHoldingMovement.ReviewHoldingMovement" }, "examples": { "Fully accept movement": { "description": "Fully accept movement as recorded by the other keeper.", "value": { "content": { "holding": "26/001/8033", "reviewMovement": { "requestId": 25, "isAccepted": true, "acceptedBatches": [ { "batchMovementId": 1001, "animalTotal": 4, "batchNumber": "UK244220" } ], "acceptedDevices": [ { "tagNumber": "UK0244220 00001" }, { "tagNumber": "UK0244220 00002" } ], "animalTotal": 6, "arrivalDate": "2022-06-20T17:20:00.0000000+01:00" } } } }, "Partial accept movement": { "description": "Partial accept movement as happened, but animal with tag number UK0244220 00014 didn't move.", "value": { "content": { "holding": "26/001/8033", "reviewMovement": { "requestId": 26, "isAccepted": true, "acceptedDevices": [ { "tagNumber": "UK0244220 00012" }, { "tagNumber": "UK0244220 00013" } ], "rejectedDevices": [ { "tagNumber": "UK0244220 00014" } ], "animalTotal": 2, "arrivalDate": "2022-06-20T17:20:00.0000000+01:00" } } } }, "Reject movement": { "description": "Reject whole movement, this movement never happened.", "value": { "content": { "holding": "26/001/8033", "reviewMovement": { "requestId": 27, "isAccepted": false, "rejectedBatches": [ { "batchMovementId": 1010, "animalTotal": 6, "batchNumber": "UK244220" } ], "rejectedDevices": [ { "tagNumber": "UK0244220 00021" }, { "tagNumber": "UK0244220 00022" } ] } } } } } } } }, "responses": { "201": { "description": "The request was successfully queued.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.ReviewHoldingMovement.ReviewHoldingMovement" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } } } } }, "/v2/Species": { "get": { "tags": [ "Species", "External" ], "summary": "Get information about all supported species", "description": "Returns the name and id of all supported species.", "parameters": [ { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.SpeciesListResult" }, "example": { "value": [ { "id": 2, "name": "Goats" }, { "id": 3, "name": "Cattle" } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } } } } }, "/v2/Species({key})": { "get": { "tags": [ "Species", "External" ], "summary": "Get information about a supported species", "description": "Returns the name and id of a single supported species by id.", "parameters": [ { "name": "key", "in": "path", "description": "record id", "required": true, "style": "simple", "schema": { "type": "integer", "format": "int32" } }, { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.Species" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" } } } } } } }, "/v2/StockTypes": { "get": { "tags": [ "StockTypes", "External" ], "summary": "Get details of all available types of animal stock", "description": "Returns the id, name and species for all available types of animal stock.", "parameters": [ { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } }, { "name": "$filter", "in": "query", "description": "Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions. Only dates with a time part will be accepted.", "style": "form", "schema": { "type": "string" } }, { "name": "$orderby", "in": "query", "description": "Specifies the order in which items are returned. The maximum number of expressions is 5.", "style": "form", "schema": { "type": "string" } }, { "name": "$top", "in": "query", "description": "Limits the number of items returned from a collection.", "style": "form", "schema": { "type": "integer", "format": "int32" } }, { "name": "$skip", "in": "query", "description": "Excludes the specified number of items of the queried collection from the result.", "style": "form", "schema": { "type": "integer", "format": "int32" } }, { "name": "$count", "in": "query", "description": "Indicates whether the total count of items within a collection are returned in the result.", "style": "form", "schema": { "type": "boolean", "default": "False" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.StockTypeListResult" }, "example": { "value": [ { "speciesId": 1, "name": "Total Sheep", "id": 1 }, { "speciesId": 2, "name": "Total Goats", "id": 2 } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } } } } }, "/v2/StockTypes({key})": { "get": { "tags": [ "StockTypes", "External" ], "summary": "Get details of a single type of animal stock", "description": "Returns the id, name and species for a single type of animal stock.", "parameters": [ { "name": "key", "in": "path", "description": "record id", "required": true, "style": "simple", "schema": { "type": "integer", "format": "int32" } }, { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.StockType" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" } } } } } } }, "/v2/Titles": { "get": { "tags": [ "Titles", "External" ], "summary": "Gets all valid titles", "description": "Gets all titles and their ids that are valid for people described by the system.", "parameters": [ { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.TitleListResult" }, "example": { "value": [ { "id": 3, "name": "Miss" }, { "id": 4, "name": "Ms" } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } } } } }, "/v2/Titles({key})": { "get": { "tags": [ "Titles", "External" ], "summary": "Gets a single title", "description": "Gets a single title by id that is valid for people described by the system.", "parameters": [ { "name": "key", "in": "path", "description": "record id", "required": true, "style": "simple", "schema": { "type": "integer", "format": "int32" } }, { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.Title" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" } } } } } } }, "/v2/TransferRequests": { "post": { "tags": [ "TransferRequests", "External" ], "summary": "Register the movement of animals", "description": "TransferRequests register the movement of animals between two holdings.\n\nTransfers can be one of two types depending on the role of the author:\n* If the owner of the source holding submits the transfer then it is an 'OFF' Movement. \n* If the owner of the destination holding submits the transfer then it is an 'ON' Movement.\n\nTransfers:\n* Animals can be identified individually or by batch.\n* For most user roles, the authenticated user must be associated with either the `sourceHolding` or `destinationHolding`. The `userHolding` must equal the `destinationHolding` for ON or in-business movements or `sourceHolding` for movements OFF.\n* *Movement document*\n * For the species cattle `movementDocument` cannot be specified, for all other species its optional.\n * If it is an off movement, then the `departureDateTime` must be specified.\n * If it is an on movement, then the `departureDateTime` and `arrivalDateTime` must be specified.\n* *Market off movements* - if a market user is registering a movement off a market holding\n * `saleDate` and `saleId` must be specified giving details about the sale.\n * `movementGroups` should be used to group the animals by lot/pen and vendor holding. Each movement group should have these details specified in `fromSubLocation` and `vendorHolding` respectively.\n* *Registering identification / birth at same time as movement*\n * If off or in-business movement is being registered for animals that were born on the `sourceHolding` and the identification / birth hasn't been registered for all the animals involved in the movement then `deviceApplication` can be used to specify these details at the same time as registering the movement.\n * `deviceApplication` isn't supported for the species cattle.\n* *Exemptions*\n * Use `processingFlags` to specify any exemptions that apply to the movement such as 'Pig pyramid move' or 'Breeding bulls / rams / goats kept in an approved isolation facility'.\n * To get a full list of supported processing flags by species filter the [ProcessingFlags](#ProcessingFlags) endpoint by species and request type.", "parameters": [ { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.Transfer.Transfer" }, "examples": { "Cattle on movement": { "description": "Producer register cattle on movement.", "value": { "content": { "sourceHolding": "11/111/1111", "destinationHolding": "26/001/8033", "userHolding": "26/001/8033", "transferDate": "2022-06-11T17:20:00.0000000+01:00", "animalCount": 2, "species": "Cattle", "movementGroups": [ { "devices": [ { "tagNumber": "UK777777 200001" }, { "tagNumber": "UK777777 300002" } ] } ], "transportHaulierName": "Test Haulier", "transportVehicleRegistrationNo": "TEST 1", "processingFlags": [ ] } } }, "Cattle off movement": { "description": "Producer register cattle off movement.", "value": { "content": { "sourceHolding": "26/001/8033", "destinationHolding": "11/111/1111", "userHolding": "26/001/8033", "transferDate": "2022-06-17T17:20:00.0000000+01:00", "animalCount": 2, "species": "Cattle", "movementGroups": [ { "devices": [ { "tagNumber": "UK777777 200001" }, { "tagNumber": "UK777777 300002" } ] } ], "processingFlags": [ ] } } }, "Sheep off movement with device application with no movement document": { "description": "Producer register sheep off movement with identification / birth details but no movement document specified.", "value": { "content": { "sourceHolding": "26/001/8033", "destinationHolding": "11/111/1111", "userHolding": "26/001/8033", "transferDate": "2022-06-11T17:20:00.0000000+01:00", "animalCount": 9, "species": "Sheep", "movementGroups": [ { "batches": [ { "animalTotal": 6, "batchNumber": "UK244220" } ], "devices": [ { "tagNumber": "UK0244220 00001" }, { "tagNumber": "UK0244220 00002" }, { "tagNumber": "UK0244220 00003" } ] } ], "transportHaulierName": "Test Haulier", "transportVehicleRegistrationNo": "TEST 1", "deviceApplication": { "dateOfApplication": "2022-06-09T17:20:00.0000000+01:00", "beginBirthPeriod": "2022-03-01T00:00:00.0000000+00:00", "endBirthPeriod": "2022-03-31T00:00:00.0000000+01:00", "breed": "Texel" }, "processingFlags": [ ] } } }, "Sheep off movement with movement document": { "description": "Producer register sheep off movement with movement document, all animals FCI compliant.", "value": { "content": { "sourceHolding": "26/001/8033", "destinationHolding": "11/111/1111", "userHolding": "26/001/8033", "transferDate": "2022-06-11T17:20:00.0000000+01:00", "animalCount": 9, "species": "Sheep", "movementGroups": [ { "batches": [ { "animalTotal": 6, "batchNumber": "UK244220" } ], "devices": [ { "tagNumber": "UK0244220 00004" }, { "tagNumber": "UK0244220 00005" }, { "tagNumber": "UK0244220 00006" } ] } ], "movementDocument": { "departureDetail": { "animalTotal": 9, "departureDateTime": "2022-06-11T17:20:00.0000000+01:00", "departureKeeper": { "address1": "The Road", "county": "Somerset", "postCode": "", "propertyName": "The Farm", "town": "Towning", "firstName": "Departure", "lastName": "Farmer", "title": "Mr", "telephoneNumber": "01234 567890" }, "expectedDurationOfJourney": { "hours": 1, "minutes": 30 }, "loadingDateTime": "2022-06-11T16:50:00.0000000+01:00", "departureHoldingType": "PRODUCER" }, "destinationDetail": { "destinationKeeper": { "address1": "The Road", "postCode": "", "propertyName": "The Abattoir", "town": "Towning" }, "destinationHoldingType": "ABATTOIR" }, "transportDetail": { "transporter": { "firstName": "Test", "lastName": "Haulier", "title": "Mr", "telephoneNumber": "01987 654321" }, "transporterAuthNumber": "1234", "transporterType": "HAULIER", "transportHaulierName": "Test Haulier", "transportVehicleRegistrationNo": "TEST" }, "fciDetail": { "isAllAnimalsFciCompliant": true } }, "processingFlags": [ ] } } }, "Sheep on movement with movement document": { "description": "Producer register sheep on movement with movement document, some animals not FCI compliant.", "value": { "content": { "sourceHolding": "22/222/2222", "destinationHolding": "26/001/8033", "userHolding": "26/001/8033", "transferDate": "2022-06-11T17:20:00.0000000+01:00", "animalCount": 9, "species": "Sheep", "movementGroups": [ { "batches": [ { "animalTotal": 6, "batchNumber": "UK244220" } ], "devices": [ { "tagNumber": "UK0244220 00007" }, { "tagNumber": "UK0244220 00008" }, { "tagNumber": "UK0244220 00009" } ] } ], "movementDocument": { "departureDetail": { "animalTotal": 9, "departureDateTime": "2022-06-11T17:20:00.0000000+01:00", "departureKeeper": { "address1": "The Road", "county": "Somerset", "postCode": "", "propertyName": "The Farm", "town": "Towning", "firstName": "Departure", "lastName": "Farmer", "title": "Mr", "telephoneNumber": "01234 567890" }, "expectedDurationOfJourney": { "hours": 1, "minutes": 30 }, "loadingDateTime": "2022-06-11T16:50:00.0000000+01:00", "departureHoldingType": "PRODUCER" }, "destinationDetail": { "arrivalDateTime": "2022-06-11T20:20:00.0000000+01:00", "destinationKeeper": { "address1": "The Road", "postCode": "", "propertyName": "The Farm 2", "town": "Towning", "firstName": "Destination", "lastName": "Keeper", "title": "Mr" }, "destinationHoldingType": "PRODUCER", "hasKeeperChanged": true, "totalAnimalsReceived": 9, "unloadingDateTime": "2022-06-11T20:30:00.0000000+01:00" }, "transportDetail": { "transporter": { "firstName": "Destination", "lastName": "Keeper", "title": "Mr", "telephoneNumber": "01987 654321" }, "transporterType": "DEST", "transportVehicleRegistrationNo": "TEST" }, "fciDetail": { "metFCIWithdrawalPeriodCode": "WITHDRAWAL_NOT_MET", "isAllAnimalsFciCompliant": false, "nonCompliantReason": "Give extra dose of medicine", "nonCompliantDevices": [ { "tagNumber": "UK0244220 00007" } ] } }, "processingFlags": [ ] } } }, "Market sheep on movement ": { "description": "Market register sheep on movement without document.", "value": { "content": { "sourceHolding": "26/001/8033", "destinationHolding": "22/222/2222", "userHolding": "22/222/2222", "transferDate": "2022-06-11T17:20:00.0000000+01:00", "animalCount": 12, "species": "Sheep", "movementGroups": [ { "batches": [ { "animalTotal": 9, "batchNumber": "UK244220" } ], "devices": [ { "tagNumber": "UK0244220 00001" }, { "tagNumber": "UK0244220 00002" }, { "tagNumber": "UK0244220 00003" } ] } ], "processingFlags": [ ] } } }, "Market sheep off movement ": { "description": "Market register sheep off movement without document.", "value": { "content": { "sourceHolding": "22/222/2222", "destinationHolding": "11/111/1111", "userHolding": "22/222/2222", "transferDate": "2022-06-11T17:20:00.0000000+01:00", "animalCount": 5, "species": "Sheep", "movementGroups": [ { "fromSubLocation": "Lot1", "vendorHolding": "26/001/8033", "devices": [ { "tagNumber": "UK0244220 00001" }, { "tagNumber": "UK0244220 00002" }, { "tagNumber": "UK0244220 00003" } ] }, { "fromSubLocation": "Lot2", "vendorHolding": "33/333/3333", "devices": [ { "tagNumber": "UK0244220 00004" }, { "tagNumber": "UK0244220 00005" } ] } ], "saleDate": "2022-06-11T17:20:00.0000000+01:00", "saleId": "1234", "processingFlags": [ ] } } } } } } }, "responses": { "201": { "description": "The request was successfully queued.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.Transfer.Transfer" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } } } }, "get": { "tags": [ "TransferRequests", "External" ], "summary": "Gets all requests to register the movement of animals", "description": "Returns all TransferRequests.\n* For most user roles only returns requests created by authenticated user.", "parameters": [ { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } }, { "name": "$filter", "in": "query", "description": "Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions. Only dates with a time part will be accepted.", "style": "form", "schema": { "type": "string" } }, { "name": "$orderby", "in": "query", "description": "Specifies the order in which items are returned. The maximum number of expressions is 5.", "style": "form", "schema": { "type": "string" } }, { "name": "$top", "in": "query", "description": "Limits the number of items returned from a collection.", "style": "form", "schema": { "type": "integer", "format": "int32" } }, { "name": "$skip", "in": "query", "description": "Excludes the specified number of items of the queried collection from the result.", "style": "form", "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.Transfer.TransferListResult" }, "example": { "value": [ { "requestId": 33, "requestStatus": "Success", "requestDate": "2022-06-21T17:15:00.0000000+01:00", "updatedDate": "2022-06-21T17:16:00.0000000+01:00", "undoSupported": true, "content": { "sourceHolding": "11/111/1111", "destinationHolding": "26/001/8033", "userHolding": "26/001/8033", "transferDate": "2022-06-11T17:20:00.0000000+01:00", "animalCount": 2, "species": "Cattle", "movementGroups": [ { "devices": [ { "tagNumber": "UK777777 200001" }, { "tagNumber": "UK777777 300002" } ] } ], "transportHaulierName": "Test Haulier", "transportVehicleRegistrationNo": "TEST 1", "processingFlags": [ ] } }, { "requestId": 34, "requestStatus": "CompletedError", "requestDate": "2022-06-21T17:15:00.0000000+01:00", "updatedDate": "2022-06-21T17:16:00.0000000+01:00", "undoSupported": true, "errors": [ { "code": "4039", "message": "The system is unable to transfer animal UK0244220 00005; The transfer date is before the date the tag was despatched from the manufacturer. Please check and correct the transfer date.", "target": "content.movementGroups[0].devices[1]" } ], "content": { "sourceHolding": "26/001/8033", "destinationHolding": "11/111/1111", "userHolding": "26/001/8033", "transferDate": "2022-06-11T17:20:00.0000000+01:00", "animalCount": 9, "species": "Sheep", "movementGroups": [ { "batches": [ { "animalTotal": 6, "batchNumber": "UK244220" } ], "devices": [ { "tagNumber": "UK0244220 00004" }, { "tagNumber": "UK0244220 00005" }, { "tagNumber": "UK0244220 00006" } ] } ], "movementDocument": { "departureDetail": { "animalTotal": 9, "departureDateTime": "2022-06-11T17:20:00.0000000+01:00", "departureKeeper": { "address1": "The Road", "county": "Somerset", "postCode": "", "propertyName": "The Farm", "town": "Towning", "firstName": "Departure", "lastName": "Farmer", "title": "Mr", "telephoneNumber": "01234 567890" }, "expectedDurationOfJourney": { "hours": 1, "minutes": 30 }, "loadingDateTime": "2022-06-11T16:50:00.0000000+01:00", "departureHoldingType": "PRODUCER" }, "destinationDetail": { "destinationKeeper": { "address1": "The Road", "postCode": "", "propertyName": "The Abattoir", "town": "Towning" }, "destinationHoldingType": "ABATTOIR" }, "transportDetail": { "transporter": { "firstName": "Test", "lastName": "Haulier", "title": "Mr", "telephoneNumber": "01987 654321" }, "transporterAuthNumber": "1234", "transporterType": "HAULIER", "transportHaulierName": "Test Haulier", "transportVehicleRegistrationNo": "TEST" }, "fciDetail": { "isAllAnimalsFciCompliant": true } }, "processingFlags": [ ] } }, { "requestId": 35, "requestStatus": "Pending", "requestDate": "2022-06-21T17:15:00.0000000+01:00", "undoSupported": true, "content": { "sourceHolding": "22/222/2222", "destinationHolding": "26/001/8033", "userHolding": "26/001/8033", "transferDate": "2022-06-11T17:20:00.0000000+01:00", "animalCount": 9, "species": "Sheep", "movementGroups": [ { "batches": [ { "animalTotal": 6, "batchNumber": "UK244220" } ], "devices": [ { "tagNumber": "UK0244220 00007" }, { "tagNumber": "UK0244220 00008" }, { "tagNumber": "UK0244220 00009" } ] } ], "movementDocument": { "departureDetail": { "animalTotal": 9, "departureDateTime": "2022-06-11T17:20:00.0000000+01:00", "departureKeeper": { "address1": "The Road", "county": "Somerset", "postCode": "", "propertyName": "The Farm", "town": "Towning", "firstName": "Departure", "lastName": "Farmer", "title": "Mr", "telephoneNumber": "01234 567890" }, "expectedDurationOfJourney": { "hours": 1, "minutes": 30 }, "loadingDateTime": "2022-06-11T16:50:00.0000000+01:00", "departureHoldingType": "PRODUCER" }, "destinationDetail": { "arrivalDateTime": "2022-06-11T20:20:00.0000000+01:00", "destinationKeeper": { "address1": "The Road", "postCode": "", "propertyName": "The Farm 2", "town": "Towning", "firstName": "Destination", "lastName": "Keeper", "title": "Mr" }, "destinationHoldingType": "PRODUCER", "hasKeeperChanged": true, "totalAnimalsReceived": 9, "unloadingDateTime": "2022-06-11T20:30:00.0000000+01:00" }, "transportDetail": { "transporter": { "firstName": "Destination", "lastName": "Keeper", "title": "Mr", "telephoneNumber": "01987 654321" }, "transporterType": "DEST", "transportVehicleRegistrationNo": "TEST" }, "fciDetail": { "metFCIWithdrawalPeriodCode": "WITHDRAWAL_NOT_MET", "isAllAnimalsFciCompliant": false, "nonCompliantReason": "Give extra dose of medicine", "nonCompliantDevices": [ { "tagNumber": "UK0244220 00007" } ] } }, "processingFlags": [ ] } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } } } } }, "/v2/TransferRequests({key})": { "get": { "tags": [ "TransferRequests", "External" ], "summary": "Get a specific request to register the movement of animals", "description": "Returns a specific TransferRequest using its request id.\n* For most user roles, user only permitted to query for request id created by authenticated user.", "parameters": [ { "name": "key", "in": "path", "description": "Request id", "required": true, "style": "simple", "schema": { "type": "integer", "format": "int32" } }, { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.Transfer.Transfer" }, "examples": { "Get movement / transfer request that was successful": { "description": "Get movement / transfer of cattle that was successfully processed.", "value": { "requestId": 33, "requestStatus": "Success", "requestDate": "2022-06-21T17:15:00.0000000+01:00", "updatedDate": "2022-06-21T17:16:00.0000000+01:00", "undoSupported": true, "content": { "sourceHolding": "11/111/1111", "destinationHolding": "26/001/8033", "userHolding": "26/001/8033", "transferDate": "2022-06-11T17:20:00.0000000+01:00", "animalCount": 2, "species": "Cattle", "movementGroups": [ { "devices": [ { "tagNumber": "UK777777 200001" }, { "tagNumber": "UK777777 300002" } ] } ], "transportHaulierName": "Test Haulier", "transportVehicleRegistrationNo": "TEST 1", "processingFlags": [ ] } } }, "Get movement / transfer request that resulted in complete with errors status": { "description": "Get movement / transfer request that resulted in complete with errors status. This error means that movement of UK0244220 00004, UK0244220 00006 and batches was successfully recorded, but was not recorded for UK0244220 00005 due to the error; transfer date is before the date the tag was despatched from the manufacturer.", "value": { "requestId": 34, "requestStatus": "CompletedError", "requestDate": "2022-06-21T17:15:00.0000000+01:00", "updatedDate": "2022-06-21T17:16:00.0000000+01:00", "undoSupported": true, "errors": [ { "code": "4039", "message": "The system is unable to transfer animal UK0244220 00005; The transfer date is before the date the tag was despatched from the manufacturer. Please check and correct the transfer date.", "target": "content.movementGroups[0].devices[1]" } ], "content": { "sourceHolding": "26/001/8033", "destinationHolding": "11/111/1111", "userHolding": "26/001/8033", "transferDate": "2022-06-11T17:20:00.0000000+01:00", "animalCount": 9, "species": "Sheep", "movementGroups": [ { "batches": [ { "animalTotal": 6, "batchNumber": "UK244220" } ], "devices": [ { "tagNumber": "UK0244220 00004" }, { "tagNumber": "UK0244220 00005" }, { "tagNumber": "UK0244220 00006" } ] } ], "movementDocument": { "departureDetail": { "animalTotal": 9, "departureDateTime": "2022-06-11T17:20:00.0000000+01:00", "departureKeeper": { "address1": "The Road", "county": "Somerset", "postCode": "", "propertyName": "The Farm", "town": "Towning", "firstName": "Departure", "lastName": "Farmer", "title": "Mr", "telephoneNumber": "01234 567890" }, "expectedDurationOfJourney": { "hours": 1, "minutes": 30 }, "loadingDateTime": "2022-06-11T16:50:00.0000000+01:00", "departureHoldingType": "PRODUCER" }, "destinationDetail": { "destinationKeeper": { "address1": "The Road", "postCode": "", "propertyName": "The Abattoir", "town": "Towning" }, "destinationHoldingType": "ABATTOIR" }, "transportDetail": { "transporter": { "firstName": "Test", "lastName": "Haulier", "title": "Mr", "telephoneNumber": "01987 654321" }, "transporterAuthNumber": "1234", "transporterType": "HAULIER", "transportHaulierName": "Test Haulier", "transportVehicleRegistrationNo": "TEST" }, "fciDetail": { "isAllAnimalsFciCompliant": true } }, "processingFlags": [ ] } } }, "Get movement / transfer request that is pending processing": { "description": "Get movement / transfer of sheep that is still pending processing.", "value": { "requestId": 35, "requestStatus": "Pending", "requestDate": "2022-06-21T17:15:00.0000000+01:00", "undoSupported": true, "content": { "sourceHolding": "22/222/2222", "destinationHolding": "26/001/8033", "userHolding": "26/001/8033", "transferDate": "2022-06-11T17:20:00.0000000+01:00", "animalCount": 9, "species": "Sheep", "movementGroups": [ { "batches": [ { "animalTotal": 6, "batchNumber": "UK244220" } ], "devices": [ { "tagNumber": "UK0244220 00007" }, { "tagNumber": "UK0244220 00008" }, { "tagNumber": "UK0244220 00009" } ] } ], "movementDocument": { "departureDetail": { "animalTotal": 9, "departureDateTime": "2022-06-11T17:20:00.0000000+01:00", "departureKeeper": { "address1": "The Road", "county": "Somerset", "postCode": "", "propertyName": "The Farm", "town": "Towning", "firstName": "Departure", "lastName": "Farmer", "title": "Mr", "telephoneNumber": "01234 567890" }, "expectedDurationOfJourney": { "hours": 1, "minutes": 30 }, "loadingDateTime": "2022-06-11T16:50:00.0000000+01:00", "departureHoldingType": "PRODUCER" }, "destinationDetail": { "arrivalDateTime": "2022-06-11T20:20:00.0000000+01:00", "destinationKeeper": { "address1": "The Road", "postCode": "", "propertyName": "The Farm 2", "town": "Towning", "firstName": "Destination", "lastName": "Keeper", "title": "Mr" }, "destinationHoldingType": "PRODUCER", "hasKeeperChanged": true, "totalAnimalsReceived": 9, "unloadingDateTime": "2022-06-11T20:30:00.0000000+01:00" }, "transportDetail": { "transporter": { "firstName": "Destination", "lastName": "Keeper", "title": "Mr", "telephoneNumber": "01987 654321" }, "transporterType": "DEST", "transportVehicleRegistrationNo": "TEST" }, "fciDetail": { "metFCIWithdrawalPeriodCode": "WITHDRAWAL_NOT_MET", "isAllAnimalsFciCompliant": false, "nonCompliantReason": "Give extra dose of medicine", "nonCompliantDevices": [ { "tagNumber": "UK0244220 00007" } ] } }, "processingFlags": [ ] } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" } } } } } } }, "/v2/TransporterTypes": { "get": { "tags": [ "TransporterTypes", "External" ], "summary": "Get all valid types of transport", "description": "Returns details of all valid types of transport used to transfer animals.", "parameters": [ { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.Transfer.TransporterTypeListResult" }, "example": { "value": [ { "name": "Departure Keeper", "code": "DEP", "id": 1 }, { "name": "Haulier", "code": "HAULIER", "id": 3 } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } } } } }, "/v2/TransporterTypes({key})": { "get": { "tags": [ "TransporterTypes", "External" ], "summary": "Get a single type of transport", "description": "Returns details of a single type of transport used to transfer animals by id.", "parameters": [ { "name": "key", "in": "path", "description": "record id", "required": true, "style": "simple", "schema": { "type": "integer", "format": "int32" } }, { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.Transfer.TransporterType" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" } } } } } } }, "/v2/UndoPartialRequests": { "post": { "tags": [ "UndoPartialRequests", "External" ], "summary": "Partial undo / rollback the actions performed by an existing request for a few animals", "description": "UndoPartialRequests allows you to undo / rollback the actions performed by an existing request for just a few individual or batch identified animals that were in it. This will rollback any actions that the `undoPartialRequestId` request performed on the specified `devices` or `batches` such as moving animals or applying tags.\n* The authenticated user must have originally created the request being undone (unless the authenticated user is an administrator).\n* The type of the request being undone must support being undone. This can be verified by checking the [Requests](#Requests) endpoint if property `undoSupported` equals true.\n* The system may not allow the request to be undone if other events have subsequently happened to animals involved in the request.\n* See the API User Guide for details of which endpoints support undoing partial requests.", "parameters": [ { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.UndoRequest.UndoPartialRequest" }, "examples": { "Partially undo batches": { "description": "Undo the actions recorded by request ID 12, but just for the sheep batch UK244220 x 9.", "value": { "content": { "undoPartialRequestId": 12, "species": "Sheep", "batches": [ { "animalTotal": 9, "batchNumber": "UK244220" } ] } } }, "Partially undo devices": { "description": "Undo the actions recorded by request ID 13, but just for the sheep with tag numbers UK0244220 00001 and UK0244220 00007.", "value": { "content": { "undoPartialRequestId": 13, "species": "Sheep", "devices": [ { "tagNumber": "UK0244220 00001" }, { "tagNumber": "UK0244220 00007" } ] } } } } } } }, "responses": { "201": { "description": "The request was successfully queued.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.UndoRequest.UndoPartialRequest" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } } } }, "get": { "tags": [ "UndoPartialRequests", "External" ], "summary": "Gets all requests to partially undo / rollback a request previously recorded", "description": "Returns all UndoPartialRequests.\n* For most user roles only returns requests created by authenticated user.", "parameters": [ { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } }, { "name": "$filter", "in": "query", "description": "Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions. Only dates with a time part will be accepted.", "style": "form", "schema": { "type": "string" } }, { "name": "$orderby", "in": "query", "description": "Specifies the order in which items are returned. The maximum number of expressions is 5.", "style": "form", "schema": { "type": "string" } }, { "name": "$top", "in": "query", "description": "Limits the number of items returned from a collection.", "style": "form", "schema": { "type": "integer", "format": "int32" } }, { "name": "$skip", "in": "query", "description": "Excludes the specified number of items of the queried collection from the result.", "style": "form", "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.UndoRequest.UndoPartialRequestListResult" }, "example": { "value": [ { "requestId": 33, "requestStatus": "Success", "requestDate": "2022-06-21T17:15:00.0000000+01:00", "updatedDate": "2022-06-21T17:16:00.0000000+01:00", "undoSupported": true, "content": { "undoPartialRequestId": 12, "species": "Sheep", "batches": [ { "animalTotal": 9, "batchNumber": "UK244220" } ] } }, { "requestId": 34, "requestStatus": "CompletedError", "requestDate": "2022-06-21T17:15:00.0000000+01:00", "updatedDate": "2022-06-21T17:16:00.0000000+01:00", "undoSupported": true, "errors": [ { "code": "14113", "message": "Unable to UNDO request, the animal UK0244220 00007 contains a subsequent movement (after) submitted by request 32." } ], "content": { "undoPartialRequestId": 13, "species": "Sheep", "devices": [ { "tagNumber": "UK0244220 00001" }, { "tagNumber": "UK0244220 00007" } ] } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } } } } }, "/v2/UndoPartialRequests({key})": { "get": { "tags": [ "UndoPartialRequests", "External" ], "summary": "Get a specific request to partially undo / rollback a request previously recorded", "description": "Returns a specific UndoPartialRequests using its request id.\n* For most user roles, user only permitted to query for request id created by authenticated user.", "parameters": [ { "name": "key", "in": "path", "description": "Request id", "required": true, "style": "simple", "schema": { "type": "integer", "format": "int32" } }, { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.UndoRequest.UndoPartialRequest" }, "examples": { "Get partial undo request that was successful": { "description": "Get partial undo request that successfully rolled back the actions recorded by request id 12 for the batch UK244220 x 9.", "value": { "requestId": 33, "requestStatus": "Success", "requestDate": "2022-06-21T17:15:00.0000000+01:00", "updatedDate": "2022-06-21T17:16:00.0000000+01:00", "undoSupported": true, "content": { "undoPartialRequestId": 12, "species": "Sheep", "batches": [ { "animalTotal": 9, "batchNumber": "UK244220" } ] } } }, "Get partial undo request that resulted in complete with errors status": { "description": "Get partial undo request that resulted in complete with errors status. This error means request id 13 wasn't undone for any animals due to the error; the animal UK0244220 00007 contains a subsequent movement (after) submitted by request 32.", "value": { "requestId": 34, "requestStatus": "CompletedError", "requestDate": "2022-06-21T17:15:00.0000000+01:00", "updatedDate": "2022-06-21T17:16:00.0000000+01:00", "undoSupported": true, "errors": [ { "code": "14113", "message": "Unable to UNDO request, the animal UK0244220 00007 contains a subsequent movement (after) submitted by request 32." } ], "content": { "undoPartialRequestId": 13, "species": "Sheep", "devices": [ { "tagNumber": "UK0244220 00001" }, { "tagNumber": "UK0244220 00007" } ] } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" } } } } } } }, "/v2/UndoRequests": { "post": { "tags": [ "UndoRequests", "External" ], "summary": "Undo / rollback a request previously recorded", "description": "UndoRequests allows you to undo / rollback a request that has previously been submitted. This will rollback any actions that the `undoRequestId` request performed such as moving animals or applying tags.\n* The authenticated user must have originally created the request being undone (unless the authenticated user is an administrator).\n* The type of the request being undone must support being undone. This can be verified by checking the [Requests](#Requests) endpoint if property `undoSupported` equals true.\n* The system may not allow the request to be undone if other events have subsequently happened to animals involved in the request.", "parameters": [ { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.UndoRequest.UndoRequest" }, "examples": { "Undo request id 12": { "description": "Undo request which had the request ID 12.", "value": { "content": { "undoRequestId": 12 } } }, "Undo request id 13": { "description": "Undo request which had the request ID 13.", "value": { "content": { "undoRequestId": 13 } } } } } } }, "responses": { "201": { "description": "The request was successfully queued.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.UndoRequest.UndoRequest" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } } } }, "get": { "tags": [ "UndoRequests", "External" ], "summary": "Gets all requests to undo / rollback a request previously recorded", "description": "Returns all UndoRequests.\n* For most user roles only returns requests created by authenticated user.", "parameters": [ { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } }, { "name": "$filter", "in": "query", "description": "Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions. Only dates with a time part will be accepted.", "style": "form", "schema": { "type": "string" } }, { "name": "$orderby", "in": "query", "description": "Specifies the order in which items are returned. The maximum number of expressions is 5.", "style": "form", "schema": { "type": "string" } }, { "name": "$top", "in": "query", "description": "Limits the number of items returned from a collection.", "style": "form", "schema": { "type": "integer", "format": "int32" } }, { "name": "$skip", "in": "query", "description": "Excludes the specified number of items of the queried collection from the result.", "style": "form", "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.UndoRequest.UndoRequestListResult" }, "example": { "value": [ { "requestId": 33, "requestStatus": "Success", "requestDate": "2022-06-21T17:15:00.0000000+01:00", "updatedDate": "2022-06-21T17:16:00.0000000+01:00", "undoSupported": true, "content": { "undoRequestId": 12 } }, { "requestId": 34, "requestStatus": "CompletedError", "requestDate": "2022-06-21T17:15:00.0000000+01:00", "updatedDate": "2022-06-21T17:16:00.0000000+01:00", "undoSupported": true, "errors": [ { "code": "14113", "message": "Unable to UNDO request, the animal UK0244220 00007 contains a subsequent movement (after) submitted by request 32." } ], "content": { "undoRequestId": 13 } } ] } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } } } } }, "/v2/UndoRequests({key})": { "get": { "tags": [ "UndoRequests", "External" ], "summary": "Get a specific request to undo / rollback a request previously recorded", "description": "Returns a specific UndoRequests using its request id.\n* For most user roles, user only permitted to query for request id created by authenticated user.", "parameters": [ { "name": "key", "in": "path", "description": "Request id", "required": true, "style": "simple", "schema": { "type": "integer", "format": "int32" } }, { "name": "$select", "in": "query", "description": "Limits the properties returned in the result.", "style": "form", "schema": { "type": "string" } }, { "name": "$expand", "in": "query", "description": "Indicates the related entities to be represented inline. The maximum depth is 2.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Models.UndoRequest.UndoRequest" }, "examples": { "Get undo request that was successful": { "description": "Get undo request that successfully rolled back request id 12.", "value": { "requestId": 33, "requestStatus": "Success", "requestDate": "2022-06-21T17:15:00.0000000+01:00", "updatedDate": "2022-06-21T17:16:00.0000000+01:00", "undoSupported": true, "content": { "undoRequestId": 12 } } }, "Get undo request that resulted in complete with errors status": { "description": "Get undo request that resulted in complete with errors status. This error means request id 13 wasn't undone for any animals due to the error; the animal UK0244220 00007 contains a subsequent movement (after) submitted by request 32.", "value": { "requestId": 34, "requestStatus": "CompletedError", "requestDate": "2022-06-21T17:15:00.0000000+01:00", "updatedDate": "2022-06-21T17:16:00.0000000+01:00", "undoSupported": true, "errors": [ { "code": "14113", "message": "Unable to UNDO request, the animal UK0244220 00007 contains a subsequent movement (after) submitted by request 32." } ], "content": { "undoRequestId": 13 } } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse" } } } }, "404": { "description": "Not Found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" } } } } } } }, "/v2/UndoRequests/$count": { "get": { "tags": [ "UndoRequests", "External" ], "summary": "Gets the count of requests.", "description": "Gets the count of requests previously submitted. The authenticated user's system permissions will determine whether the count only includes requests created by the authenticated user.", "parameters": [ { "name": "$filter", "in": "query", "description": "Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "integer", "format": "int32" } } } } } } }, "/v2/UndoPartialRequests/$count": { "get": { "tags": [ "UndoPartialRequests", "External" ], "summary": "Gets the count of requests.", "description": "Gets the count of requests previously submitted. The authenticated user's system permissions will determine whether the count only includes requests created by the authenticated user.", "parameters": [ { "name": "$filter", "in": "query", "description": "Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "integer", "format": "int32" } } } } } } }, "/v2/TransferRequests/$count": { "get": { "tags": [ "TransferRequests", "External" ], "summary": "Gets the count of requests.", "description": "Gets the count of requests previously submitted. The authenticated user's system permissions will determine whether the count only includes requests created by the authenticated user.", "parameters": [ { "name": "$filter", "in": "query", "description": "Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "integer", "format": "int32" } } } } } } }, "/v2/ReviewHoldingMovementRequests/$count": { "get": { "tags": [ "ReviewHoldingMovementRequests", "External" ], "summary": "Gets the count of requests.", "description": "Gets the count of requests previously submitted. The authenticated user's system permissions will determine whether the count only includes requests created by the authenticated user.", "parameters": [ { "name": "$filter", "in": "query", "description": "Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "integer", "format": "int32" } } } } } } }, "/v2/CorrectTransferRequests/$count": { "get": { "tags": [ "CorrectTransferRequests", "External" ], "summary": "Gets the count of requests.", "description": "Gets the count of requests previously submitted. The authenticated user's system permissions will determine whether the count only includes requests created by the authenticated user.", "parameters": [ { "name": "$filter", "in": "query", "description": "Restricts the set of items returned. The maximum number of expressions is 100. The allowed functions are: allfunctions.", "style": "form", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "integer", "format": "int32" } } } } } } } }, "components": { "schemas": { "CLAOData.Models.RequestStatus": { "enum": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "type": "integer", "format": "int32" }, "CLAOData.Models.SingleError": { "type": "object", "properties": { "code": { "type": "string", "description": "The error code for the error.", "nullable": true }, "message": { "type": "string", "description": "A more detailed error message.", "nullable": true }, "target": { "type": "string", "description": "If populated, this is the JSON property path to the part of the request content that caused the error.", "nullable": true } }, "additionalProperties": false, "description": "Details of a single error." }, "Microsoft.OData.ODataErrorDetail": { "type": "object", "properties": { "errorCode": { "type": "string", "nullable": true }, "message": { "type": "string", "nullable": true }, "target": { "type": "string", "nullable": true } }, "additionalProperties": false }, "System.Collections.Generic.KeyValuePair__2____System.String____System.Private.CoreLib____Version__6.0.0.0____Culture__neutral____PublicKeyToken__7cec85d7bea7798e______Microsoft.OData.ODataValue____Microsoft.OData.Core____Version__7.12.2.0______Culture__neutral______PublicKeyToken__31bf3856ad364e35________": { "type": "object", "additionalProperties": false }, "Microsoft.OData.ODataInnerError": { "type": "object", "properties": { "properties": { "type": "array", "items": { "$ref": "#/components/schemas/System.Collections.Generic.KeyValuePair__2____System.String____System.Private.CoreLib____Version__6.0.0.0____Culture__neutral____PublicKeyToken__7cec85d7bea7798e______Microsoft.OData.ODataValue____Microsoft.OData.Core____Version__7.12.2.0______Culture__neutral______PublicKeyToken__31bf3856ad364e35________" }, "nullable": true }, "message": { "type": "string", "nullable": true }, "typeName": { "type": "string", "nullable": true }, "stackTrace": { "type": "string", "nullable": true }, "innerError": { "$ref": "#/components/schemas/Microsoft.OData.ODataInnerError" } }, "additionalProperties": false }, "Microsoft.OData.ODataTypeAnnotation": { "type": "object", "additionalProperties": false }, "Microsoft.OData.ODataInstanceAnnotation": { "type": "object", "properties": { "typeAnnotation": { "$ref": "#/components/schemas/Microsoft.OData.ODataTypeAnnotation" } }, "additionalProperties": false }, "Microsoft.OData.ODataError": { "type": "object", "properties": { "errorCode": { "type": "string", "nullable": true }, "message": { "type": "string", "nullable": true }, "target": { "type": "string", "nullable": true }, "details": { "type": "array", "items": { "$ref": "#/components/schemas/Microsoft.OData.ODataErrorDetail" }, "nullable": true }, "innerError": { "$ref": "#/components/schemas/Microsoft.OData.ODataInnerError" }, "instanceAnnotations": { "type": "array", "items": { "$ref": "#/components/schemas/Microsoft.OData.ODataInstanceAnnotation" }, "nullable": true }, "typeAnnotation": { "$ref": "#/components/schemas/Microsoft.OData.ODataTypeAnnotation" } }, "additionalProperties": false }, "CLAOData.Models.Device": { "type": "object", "properties": { "tagNumber": { "type": "string", "description": "Official visual tag number\r\n* *Necessity*: Either `tagNumber`, `rfid` or `freezebrand` must be specified\r\n* *Validation*: String is in the tag number format supported for the species (see API guide for supported tag number formats)\r\n* If `tagNumber` and `rfid` are both specified they should be equivalent values.", "nullable": true }, "rfid": { "type": "string", "description": "Radio Frequency Identifier (RFID) / Electronic Identification number (EID) of tag\r\n* *Necessity*: Either `tagNumber`, `rfid` or `freezebrand` must be specified\r\n* *Validation*: String containing Rfid in format; decimal, ISO Decimal, Hex or UK WYSIWYG (see API guide for supported Rfid formats)\r\n* If `rfid` and `tagNumber` are both specified they should be equivalent values.", "nullable": true }, "freezebrand": { "type": "string", "description": "Freezebrand of tag\r\n* *Necessity*: Either `tagNumber`, `rfid` or `freezebrand` must be specified", "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.DeviceWithDetail": { "type": "object", "properties": { "beginBirthPeriod": { "type": "string", "description": " Date of earliest possible birth date to apply to animal details. If not specified the existing birth period for animal won't be changed.\r\n* *Necessity*: Optional, required if `endBirthPeriod` is specified\r\n* *Validation*: Must not be in the future or after the date of the event being recorded. The number of days between `beginBirthPeriod` and `endBirthPeriod` must less then 1 day for species cattle or else 31 days for other species", "format": "date-time", "nullable": true }, "gender": { "type": "string", "description": "GenderName Or GenderSpecieName to apply to animal details. If not specified the existing gender for animal won't be changed.\r\n* *Necessity*: Optional\r\n* *Validation*: Only permits gender species name values returned by [GenderSpecies](#GenderSpecies) endpoint for species OR Only permits gender name values returned by [Genders](#Genders) endpoint", "nullable": true }, "endBirthPeriod": { "type": "string", "description": " Date of latest possible birth date to apply to animal details. If not specified the existing birth period for animal won't be changed.\r\n* *Necessity*: Optional, required if `beginBirthPeriod` is specified\r\n* *Validation*: Must not be in the future or after the date of the event being recorded. The number of days between `beginBirthPeriod` and `endBirthPeriod` must less then 1 day for species cattle or else 31 days for other species", "format": "date-time", "nullable": true }, "breed": { "type": "string", "description": " Breed name of breed to apply to animal details. If not specified the existing breed for animal won't be changed\r\n* *Necessity*: Optional\r\n* *Validation*: Only permits breed name values returned by [Breeds](#Breeds) endpoint for species", "nullable": true }, "device": { "$ref": "#/components/schemas/CLAOData.Models.Device" } }, "additionalProperties": false, "description": "A device along with animal details to set or update.\r\n* `device` must be specified and contain a valid `tagNumber`, `rfid` or `freezebrand`." }, "CLAOData.Models.RequestProcessingFlag": { "type": "object", "properties": { "name": { "type": "string", "description": "Processing flag name\r\n* *Necessity*: Required\r\n* *Validation*: Only permits processing flag name values returned by [ProcessingFlags](#ProcessingFlags) endpoint", "nullable": true }, "processingFlagId": { "type": "integer", "description": "Processing flag Id\r\n* *Necessity*: Optional", "format": "int32", "nullable": true } }, "additionalProperties": false }, "CLAOData.Infrastructure.ErrorHandling.CLAErrorDetails": { "type": "object", "properties": { "code": { "type": "string", "nullable": true }, "target": { "type": "string", "nullable": true }, "message": { "type": "string", "nullable": true } }, "additionalProperties": false }, "CLAOData.Infrastructure.ErrorHandling.CLAError": { "type": "object", "properties": { "code": { "type": "string", "nullable": true }, "message": { "type": "string", "nullable": true }, "target": { "type": "string", "nullable": true }, "details": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAErrorDetails" }, "nullable": true } }, "additionalProperties": false }, "CLAOData.Infrastructure.ErrorHandling.CLAErrorResponse": { "type": "object", "properties": { "error": { "$ref": "#/components/schemas/CLAOData.Infrastructure.ErrorHandling.CLAError" } }, "additionalProperties": false }, "Microsoft.AspNetCore.Mvc.ProblemDetails": { "type": "object", "properties": { "type": { "type": "string", "nullable": true }, "title": { "type": "string", "nullable": true }, "status": { "type": "integer", "format": "int32", "nullable": true }, "detail": { "type": "string", "nullable": true }, "instance": { "type": "string", "nullable": true } }, "additionalProperties": { } }, "CLAOData.Models.Species": { "type": "object", "properties": { "id": { "type": "integer", "description": "The id of the entity.", "format": "int32" }, "name": { "type": "string", "description": "Species name", "nullable": true, "example": "Sheep" } }, "additionalProperties": false, "description": "A supported species" }, "CLAOData.Models.Breed": { "required": [ "name" ], "type": "object", "properties": { "speciesId": { "type": "integer", "description": "The species id of the animal
Entity id for species to be specified for the POST/PUT supported methods.", "format": "int32", "nullable": true }, "name": { "maxLength": 50, "pattern": "^[A-Za-z0-9_\\. ]+$", "type": "string", "description": "The breed name\r\n* *Necessity* Required" }, "isCrossBreed": { "type": "boolean", "description": "Is the breed a crossbreed\r\n* *Necessity* Required\r\n* *Validation* true or false" }, "isPrimary": { "type": "boolean", "description": "Is the breed commonly used\r\n* *Necessity* Required\r\n* *Validation* true or false" }, "bcmsBreedCode": { "maxLength": 10, "pattern": "^[A-Za-z0-9_\\. ]*$", "type": "string", "description": "The BCMS Breed Code\r\n* *Necessity* Optional", "nullable": true }, "species": { "$ref": "#/components/schemas/CLAOData.Models.Species" }, "id": { "type": "integer", "description": "The id of the entity.", "format": "int32" } }, "additionalProperties": false, "description": "Breed information" }, "CLAOData.Models.GenderSpecies": { "type": "object", "properties": { "speciesId": { "type": "integer", "description": "The species id of the animal
Entity id for species to be specified for the POST/PUT supported methods.", "format": "int32" }, "species": { "$ref": "#/components/schemas/CLAOData.Models.Species" }, "genderId": { "type": "integer", "description": "
Entity id for gender to be specified for the POST/PUT supported methods.", "format": "int32" }, "gender": { "$ref": "#/components/schemas/CLAOData.Models.Gender" }, "name": { "type": "string", "description": "The gender species name\r\n* *Necessity* Required\r\n* *Validation* String, maximum length 20", "nullable": true } }, "additionalProperties": false, "description": "Gender Species information" }, "CLAOData.Models.Gender": { "type": "object", "properties": { "name": { "type": "string", "description": "Gender name\r\n* *Necessity* Required\r\n* *Validation* String, maximum length 30", "nullable": true }, "code": { "type": "string", "description": "Gender code\r\n* *Necessity* Required\r\n* *Validation* String, maximum length 1, Examples are F for female and M for male", "nullable": true }, "typeCode": { "type": "string", "description": "Short code to identify gender\r\n* *Necessity* Required\r\n* *Validation* String, maximum length 10", "nullable": true }, "genderSpecies": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.GenderSpecies" }, "nullable": true }, "id": { "type": "integer", "description": "The id of the entity.", "format": "int32" } }, "additionalProperties": false, "description": "Gender Information" }, "CLAOData.Models.Transfer.DocumentType": { "type": "object", "properties": { "name": { "type": "string", "nullable": true }, "id": { "type": "integer", "description": "The id of the entity.", "format": "int32" } }, "additionalProperties": false }, "CLAOData.Models.County": { "type": "object", "properties": { "id": { "type": "integer", "description": "The id of the entity.", "format": "int32" }, "name": { "type": "string", "description": "The county name\r\n* *Necessity* Required\r\n* *Validation* String, maximum length 50", "nullable": true } }, "additionalProperties": false, "description": "Counties" }, "CLAOData.Models.ApprovedMovement.ApprovedMovementContact": { "type": "object", "properties": { "address1": { "type": "string", "nullable": true }, "address2": { "type": "string", "nullable": true }, "countyId": { "type": "integer", "description": "
Entity id for county to be specified for the POST/PUT supported methods.", "format": "int32", "nullable": true }, "county": { "$ref": "#/components/schemas/CLAOData.Models.County" }, "postCode": { "type": "string", "nullable": true }, "propertyName": { "type": "string", "nullable": true }, "town": { "type": "string", "nullable": true }, "firstName": { "type": "string", "nullable": true }, "lastName": { "type": "string", "nullable": true }, "title": { "type": "string", "nullable": true }, "telephoneNumber": { "type": "string", "nullable": true }, "id": { "type": "integer", "description": "The id of the entity.", "format": "int32" } }, "additionalProperties": false }, "CLAOData.Models.Duration": { "type": "object", "properties": { "days": { "type": "integer", "format": "int32" }, "hours": { "type": "integer", "format": "int32" }, "minutes": { "type": "integer", "format": "int32" } }, "additionalProperties": false }, "CLAOData.Models.HoldingType": { "type": "object", "properties": { "id": { "type": "integer", "description": "The id of the entity.", "format": "int32" }, "name": { "type": "string", "description": "Holding type name", "nullable": true, "example": "PRODUCER" }, "fullName": { "type": "string", "description": "The friendly name that should be displayed to the end user.", "nullable": true, "example": "Agricultural Holding" } }, "additionalProperties": false }, "CLAOData.Models.ApprovedMovement.ApprovedMovementDocumentDepartureDetail": { "type": "object", "properties": { "animalCount": { "type": "integer", "format": "int32", "nullable": true }, "departureDateTime": { "type": "string", "format": "date-time", "nullable": true }, "departureKeeperId": { "type": "integer", "description": "
Entity id for departureKeeper to be specified for the POST/PUT supported methods.", "format": "int32", "nullable": true }, "departureKeeper": { "$ref": "#/components/schemas/CLAOData.Models.ApprovedMovement.ApprovedMovementContact" }, "departureOwnerId": { "type": "integer", "description": "
Entity id for departureOwner to be specified for the POST/PUT supported methods.", "format": "int32", "nullable": true }, "expectedDurationOfJourney": { "$ref": "#/components/schemas/CLAOData.Models.Duration" }, "loadingDateTime": { "type": "string", "format": "date-time", "nullable": true }, "departureHoldingTypeId": { "type": "integer", "description": "
Entity id for departureHoldingType to be specified for the POST/PUT supported methods.", "format": "int32", "nullable": true }, "departureHoldingType": { "$ref": "#/components/schemas/CLAOData.Models.HoldingType" }, "departureOwner": { "$ref": "#/components/schemas/CLAOData.Models.ApprovedMovement.ApprovedMovementContact" }, "id": { "type": "integer", "description": "The id of the entity.", "format": "int32" } }, "additionalProperties": false }, "CLAOData.Models.ApprovedMovement.ApprovedMovementDocumentDestinationDetail": { "type": "object", "properties": { "arrivalDateTime": { "type": "string", "format": "date-time", "nullable": true }, "destinationKeeperId": { "type": "integer", "description": "
Entity id for destinationKeeper to be specified for the POST/PUT supported methods.", "format": "int32", "nullable": true }, "destinationHoldingTypeId": { "type": "integer", "description": "
Entity id for destinationHoldingType to be specified for the POST/PUT supported methods.", "format": "int32", "nullable": true }, "hasKeeperChanged": { "type": "boolean", "nullable": true }, "totalAnimalsReceived": { "type": "integer", "format": "int32", "nullable": true }, "unloadingDateTime": { "type": "string", "format": "date-time", "nullable": true }, "destinationKeeper": { "$ref": "#/components/schemas/CLAOData.Models.ApprovedMovement.ApprovedMovementContact" }, "destinationHoldingType": { "$ref": "#/components/schemas/CLAOData.Models.HoldingType" }, "id": { "type": "integer", "description": "The id of the entity.", "format": "int32" } }, "additionalProperties": false }, "CLAOData.Models.Transfer.TransporterType": { "type": "object", "properties": { "name": { "type": "string", "description": "The full name of the type of transport", "nullable": true, "example": "Departure Keeper" }, "code": { "type": "string", "description": "The short code for the type of transport", "nullable": true, "example": "DEP" }, "id": { "type": "integer", "description": "The id of the entity.", "format": "int32" } }, "additionalProperties": false, "description": "A valid type of transport used to transfer animals" }, "CLAOData.Models.ApprovedMovement.ApprovedMovementDocumentTransportDetail": { "type": "object", "properties": { "transporterId": { "type": "integer", "description": "
Entity id for transporter to be specified for the POST/PUT supported methods.", "format": "int32", "nullable": true }, "transporterAuthNumber": { "type": "string", "nullable": true }, "transporterTypeId": { "type": "integer", "description": "
Entity id for transporterType to be specified for the POST/PUT supported methods.", "format": "int32", "nullable": true }, "transporterType": { "$ref": "#/components/schemas/CLAOData.Models.Transfer.TransporterType" }, "transportHaulierName": { "type": "string", "nullable": true }, "transportVehicleRegistrationNo": { "type": "string", "nullable": true }, "transporter": { "$ref": "#/components/schemas/CLAOData.Models.ApprovedMovement.ApprovedMovementContact" }, "id": { "type": "integer", "description": "The id of the entity.", "format": "int32" } }, "additionalProperties": false }, "CLAOData.Models.ApprovedMovement.ApprovedMovementDocumentFCIDetailNonCompliantDevice": { "type": "object", "properties": { "approvedMovementNonCompliantDeviceId": { "type": "integer", "format": "int32" }, "fciDetailId": { "type": "integer", "description": "
Entity id for fciDetail to be specified for the POST/PUT supported methods.", "format": "int32", "nullable": true }, "tagNumber": { "type": "string", "nullable": true }, "rfId": { "type": "string", "nullable": true }, "freezebrand": { "type": "string", "nullable": true }, "fciDetail": { "$ref": "#/components/schemas/CLAOData.Models.ApprovedMovement.ApprovedMovementDocumentFCIDetail" } }, "additionalProperties": false }, "CLAOData.Models.ApprovedMovement.ApprovedMovementDocumentFCIDetail": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "isAllAnimalsFCICompliant": { "type": "boolean", "nullable": true }, "nonCompliantReason": { "type": "string", "nullable": true }, "withdrawalPeriodObservedText": { "type": "string", "nullable": true }, "holdingRestrictions": { "type": "string", "nullable": true }, "withdrawalPeriodMetId": { "type": "integer", "format": "int32", "nullable": true }, "nonCompliantDevices": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.ApprovedMovement.ApprovedMovementDocumentFCIDetailNonCompliantDevice" }, "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.ApprovedMovement.ApprovedMovementDocument": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "documentTypeId": { "type": "integer", "description": "
Entity id for documentType to be specified for the POST/PUT supported methods.", "format": "int32" }, "movementDocumentRef": { "type": "string", "nullable": true }, "departureDetailId": { "type": "integer", "description": "
Entity id for departureDetail to be specified for the POST/PUT supported methods.", "format": "int32", "nullable": true }, "departureDetail": { "$ref": "#/components/schemas/CLAOData.Models.ApprovedMovement.ApprovedMovementDocumentDepartureDetail" }, "destinationDetailId": { "type": "integer", "description": "
Entity id for destinationDetail to be specified for the POST/PUT supported methods.", "format": "int32", "nullable": true }, "destinationDetail": { "$ref": "#/components/schemas/CLAOData.Models.ApprovedMovement.ApprovedMovementDocumentDestinationDetail" }, "transportDetailId": { "type": "integer", "description": "
Entity id for transportDetail to be specified for the POST/PUT supported methods.", "format": "int32", "nullable": true }, "transportDetail": { "$ref": "#/components/schemas/CLAOData.Models.ApprovedMovement.ApprovedMovementDocumentTransportDetail" }, "fciDetailId": { "type": "integer", "description": "
Entity id for fciDetail to be specified for the POST/PUT supported methods.", "format": "int32", "nullable": true }, "fciDetail": { "$ref": "#/components/schemas/CLAOData.Models.ApprovedMovement.ApprovedMovementDocumentFCIDetail" }, "documentType": { "$ref": "#/components/schemas/CLAOData.Models.Transfer.DocumentType" } }, "additionalProperties": false, "description": "This represents the movement document for an approved movement.\r\n\r\nThe model is analogous to the MovementDocument model. \r\nSee the MovementDocument schema for details." }, "CLAOData.Models.ApprovedMovement.ApprovedMovementDevice": { "type": "object", "properties": { "deviceLocationId": { "type": "integer", "format": "int64" }, "approvedMovementId": { "type": "integer", "description": "Movement Id
Entity id for approvedMovement to be specified for the POST/PUT supported methods.", "format": "int32" }, "tagNumber": { "type": "string", "description": "Official visual tag number", "nullable": true }, "rfid": { "type": "string", "description": "Radio Frequency Identifier (RFID) / Electronic Identification number (EID) of tag", "nullable": true }, "freezebrand": { "type": "string", "description": "Freezebrand of animal", "nullable": true }, "approvedMovementRecordedBy": { "type": "string", "description": "The role of the holding that recorded the movement.\r\n\r\nValues are `Departure` or `Destination`", "nullable": true }, "approvedMovement": { "$ref": "#/components/schemas/CLAOData.Models.ApprovedMovement.ApprovedMovement" } }, "additionalProperties": false }, "CLAOData.Models.ApprovedMovement.ApprovedMovementBatch": { "type": "object", "properties": { "batchMovementId": { "type": "integer", "format": "int32" }, "approvedMovementId": { "type": "integer", "description": "Id of the movement
Entity id for approvedMovement to be specified for the POST/PUT supported methods.", "format": "int32" }, "batchNumber": { "type": "string", "description": "Batch number of group of animals (i.e the herd or flock number)", "nullable": true }, "idMark": { "type": "string", "description": "Description of the batch of animals", "nullable": true }, "stockTypeId": { "type": "integer", "description": "Id of the batch stock type\r\n\r\nSee [StockTypes](#StockTypes)", "format": "int32", "nullable": true }, "stockType": { "type": "string", "description": "Stock type of the batch of animals\r\n\r\nSee [StockTypes](#StockTypes)", "nullable": true }, "animalTotal": { "type": "integer", "description": "Total animals in batch", "format": "int32" }, "approvedMovementRecordedBy": { "type": "string", "description": "The role of the holding that recorded the movement.\r\n\r\nValues are `Departure` or `Destination`", "nullable": true }, "approvedMovement": { "$ref": "#/components/schemas/CLAOData.Models.ApprovedMovement.ApprovedMovement" } }, "additionalProperties": false }, "CLAOData.Models.RequestTypeModel": { "type": "object", "properties": { "id": { "type": "integer", "description": "The id of the entity.", "format": "int32" }, "name": { "type": "string", "description": "The name of the request type.", "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.RequestTypeProcessingFlag": { "type": "object", "properties": { "id": { "type": "integer", "description": "The id of the entity.", "format": "int32" }, "processingFlagId": { "type": "integer", "description": "Processing Flag Id\r\nWill be generated when the processing flag is created\r\n* *Necessity*: Optional\r\n* *Validation*:
Entity id for processingFlag to be specified for the POST/PUT supported methods.", "format": "int32" }, "processingFlag": { "$ref": "#/components/schemas/CLAOData.Models.ProcessingFlag" }, "requestTypeId": { "type": "integer", "description": "Request Type\r\n* *Necessity*: Required\r\n* *Validation*: Only permits request type ids returned by the [RequestTypes](#RequestTypes) endpoint
Entity id for requestType to be specified for the POST/PUT supported methods.", "format": "int32" }, "requestType": { "$ref": "#/components/schemas/CLAOData.Models.RequestTypeModel" }, "speciesId": { "type": "integer", "description": "Species\r\n* *Necessity*: Optional\r\n* *Validation*: Only permits species ids returned by the [Species](#Species) endpoint
Entity id for species to be specified for the POST/PUT supported methods.", "format": "int32", "nullable": true }, "species": { "$ref": "#/components/schemas/CLAOData.Models.Species" } }, "additionalProperties": false }, "CLAOData.Models.ProcessingFlag": { "required": [ "flagDescription", "flagName" ], "type": "object", "properties": { "id": { "type": "integer", "description": "The id of the entity.", "format": "int32" }, "flagName": { "maxLength": 30, "pattern": "^[A-Za-z0-9\\s.\\(\\)_/,\\-]*$", "type": "string", "description": "Name of the processing flag\r\n* *Necessity*: Required\r\n* *Validation*: Must be unique" }, "flagDescription": { "maxLength": 70, "pattern": "^[A-Za-z0-9\\s.\\(\\)_/,\\-]*$", "type": "string", "description": "Description of the processing flag\r\n* *Necessity*: Required\r\n* *Validation*: Must only contain alphanumeric characters, and be shorter than 70 characters." }, "isSystem": { "type": "boolean", "description": "Whether this is a system flag.\r\n \r\nProcessing flags where isSystem equals true should not be displayed to end users in the user interface\r\n* *Necessity*: Required\r\n* *Validation*: Must be either True or False" }, "userQuestion": { "maxLength": 200, "pattern": "^[A-Za-z0-9\\s\\.\\(\\)_/,\\-]*$", "type": "string", "description": "A question that should be displayed to end users within the user interface when the processing flag is being used to signify an exemption code.\r\n \r\nTo determine the processing flags that can be used with a particular request type see [RequestTypeProcessingFlags](#RequestTypeProcessingFlags) endpoint.\r\n* *Necessity*: Optional\r\n* *Validation*: Must only contain alphanumeric characters, and be shorter than 200 characters.", "nullable": true }, "requestTypes": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.RequestTypeProcessingFlag" }, "description": "Request Types linked to the Processing flags\r\n \r\nThese can also be queried using the [RequestTypeProcessingFlags](#RequestTypeProcessingFlags) endpoint\r\n* *Necessity*: Optional\r\n* *Validation*: See [RequestTypeProcessingFlags](#RequestTypeProcessingFlags) endpoint for validation", "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.ApprovedMovement.ApprovedMovementProcessingFlag": { "type": "object", "properties": { "approvedMovementId": { "type": "integer", "description": "
Entity id for approvedMovement to be specified for the POST/PUT supported methods.", "format": "int32" }, "approvedMovementRecordedBy": { "type": "string", "description": "Indicates whether the 'Departure' or 'Destination' holding has either recorded the movement, or reviewed and accepted the movement.", "nullable": true }, "processingFlagId": { "type": "integer", "description": "
Entity id for processingFlag to be specified for the POST/PUT supported methods.", "format": "int32" }, "processingFlag": { "$ref": "#/components/schemas/CLAOData.Models.ProcessingFlag" }, "approvedMovement": { "$ref": "#/components/schemas/CLAOData.Models.ApprovedMovement.ApprovedMovement" } }, "additionalProperties": false }, "CLAOData.Models.ApprovedMovement.ApprovedMovement": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "sourceHolding": { "type": "string", "description": "The holding the animals were moved from", "nullable": true }, "destinationHolding": { "type": "string", "description": "The holding the animals were moved to", "nullable": true }, "speciesId": { "type": "integer", "description": "Species this movement concerns
Entity id for species to be specified for the POST/PUT supported methods.", "format": "int32" }, "animalTotal": { "type": "integer", "description": "The total number of animals in the movement.\r\n\r\nThis includes both batches and individual devices.", "format": "int32" }, "transferDate": { "type": "string", "description": "Date the animals were moved.", "format": "date-time" }, "transportHaulierName": { "type": "string", "description": "Name of the haulier that transported the animals.", "nullable": true }, "transportVehicleRegistrationNo": { "type": "string", "description": "Registration number of the vehicle that transported the animals.", "nullable": true }, "movementDocumentId": { "type": "integer", "description": "
Entity id for movementDocument to be specified for the POST/PUT supported methods.", "format": "int32", "nullable": true }, "movementDocument": { "$ref": "#/components/schemas/CLAOData.Models.ApprovedMovement.ApprovedMovementDocument" }, "devices": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.ApprovedMovement.ApprovedMovementDevice" }, "description": "Individual devices that were moved.", "nullable": true }, "batches": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.ApprovedMovement.ApprovedMovementBatch" }, "description": "Batches of animals that were moved.", "nullable": true }, "recordedBy": { "type": "string", "description": "Indicates whether the 'Departure' or 'Destination' holding has either recorded the movement, or reviewed and accepted the movement.", "nullable": true }, "approvedMovementProcessingFlags": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.ApprovedMovement.ApprovedMovementProcessingFlag" }, "description": "Flags that will indicate ApprovedMovement processing state.", "nullable": true }, "requestId": { "type": "integer", "description": "The id of the request which approved the movement.", "format": "int32" }, "species": { "$ref": "#/components/schemas/CLAOData.Models.Species" } }, "additionalProperties": false }, "CLAOData.Models.ApprovedMovement.ApprovedMovementListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.ApprovedMovement.ApprovedMovement" }, "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.Batch": { "type": "object", "properties": { "animalTotal": { "type": "integer", "description": "Total animals in batch\r\n* *Necessity*: Required\r\n* *Validation*: Integer greater than 0", "format": "int32" }, "batchNumber": { "type": "string", "description": "Batch number of group of animals (i.e the herd or flock number)\r\n* *Necessity*: Required\r\n* *Validation*: String is in the batch number format supported for the species (see API guide for supported batch number formats)", "nullable": true }, "idMark": { "maxLength": 50, "type": "string", "description": "Description of the batch of animals\r\n* *Necessity*: Optional\r\n* *Validation*: String maximum length 50", "nullable": true }, "stockType": { "type": "string", "description": "Stock type of the batch of animals\r\n* *Necessity*: Optional\r\n* *Validation*: Only permits stock type name values returned by [StockTypes](#StockTypes) endpoint for species", "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.BreedListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.Breed" }, "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.Transfer.MovementGroup": { "type": "object", "properties": { "fromSubLocation": { "type": "string", "description": "Pen or Lot or other identifier to indicate a location within a holding from which animals moved from. This should only be used by market to specify pen/lot.\r\n* *Necessity*: Only should be specified if a market holding type is recording an off movement\r\n* *Validation*:\r\n * Maximum length 32 characters\r\n * Must be empty if isn't a market recording an off movement", "nullable": true }, "toSubLocation": { "type": "string", "description": "Pen or Lot or other identifier to indicate a location within a holding where animals moved to such as an isolation unit\r\n* *Necessity*: Optional\r\n* *Validation*: Maximum length 32 characters", "nullable": true }, "vendorHolding": { "type": "string", "description": "Vendor holding CPH that the group of animals were purchased from\r\n* *Necessity*: Only should be specified if a market holding type is recording an off movement\r\n* *Validation*:\r\n * String is in valid holding CPH format (see API guide for supported holding number formats).\r\n * Must be empty if isn't a market recording an off movement", "nullable": true }, "batches": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.Batch" }, "description": "Collection of batch identified animals moved\r\n* *Necessity*: Either `devices`, `devicesWithDetail` or `batches` must contain one or more items", "nullable": true }, "devices": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.Device" }, "description": "Collection of individual identified animals moved\r\n* *Necessity*: Either `devices`, `devicesWithDetail` or `batches` must contain one or more items", "nullable": true }, "devicesWithDetail": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.DeviceWithDetail" }, "description": "Collection of individual identified animals moved along with animal details that should be set at the same time\r\n* *Necessity*: Either `devices`, `devicesWithDetail` or `batches` must contain one or more items", "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.Contact": { "type": "object", "properties": { "address1": { "type": "string", "description": "Address line 1\r\n* *Necessity*: Optional\r\n* *Validation*: Maximum length 128", "nullable": true }, "address2": { "type": "string", "description": "Address line 2\r\n* *Necessity*: Optional\r\n* *Validation*: Maximum length 128", "nullable": true }, "county": { "type": "string", "description": "Address County\r\n* *Necessity*: Optional\r\n* *Validation*: Only permits name values returned by [Counties](#Counties) endpoint", "nullable": true }, "postCode": { "type": "string", "description": "Address postcode\r\n* *Necessity*: Optional\r\n* *Validation*: Valid format UK postcode", "nullable": true }, "propertyName": { "type": "string", "description": "Address property name or street number\r\n* *Necessity*: Optional\r\n* *Validation*: Maximum length 32", "nullable": true }, "town": { "type": "string", "description": "Address town\r\n* *Necessity*: Optional\r\n* *Validation*: Maximum length 50", "nullable": true }, "firstName": { "type": "string", "description": "Person's first name or Christian name\r\n* *Necessity*: Optional\r\n* *Validation*: Maximum length 32", "nullable": true }, "lastName": { "type": "string", "description": "Person's last name or surname\r\n* *Necessity*: Optional\r\n* *Validation*: Maximum length 32", "nullable": true }, "title": { "type": "string", "description": "Person's name prefix\r\n* *Necessity*: Optional\r\n* *Validation*: Only permits name values returned by [Titles](#Titles) endpoint", "nullable": true }, "telephoneNumber": { "type": "string", "description": "Telephone number\r\n* *Necessity*: Optional\r\n* *Validation*:\r\n * Should only contain numbers and space characters\r\n * Maximum length 13", "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.Transfer.DepartureDetail": { "type": "object", "properties": { "animalTotal": { "type": "integer", "description": "Total animals that departed the departure holding\r\n* *Necessity*: Optional\r\n* *Validation*:\r\n * Value should be greater than 0\r\n * If movement is an off movement, value should equal the total number of individual and batch identified animals on the movement", "format": "int32", "nullable": true }, "departureDateTime": { "type": "string", "description": "Date/Time the animals departed from the departure holding\r\n* *Necessity*: Required", "format": "date-time", "nullable": true }, "loadingDateTime": { "type": "string", "description": "Date/time the animals were loaded on the transport\r\n* *Necessity*: Optional\r\n* *Validation*: Value should not be after the `departureDateTime`", "format": "date-time", "nullable": true }, "departureHoldingType": { "type": "string", "description": "Departure holding type\r\n* *Necessity*: Optional\r\n* *Validation*: Only permits name values returned by [HoldingTypes](#HoldingTypes) endpoint", "nullable": true }, "departureKeeper": { "$ref": "#/components/schemas/CLAOData.Models.Contact" }, "departureOwner": { "$ref": "#/components/schemas/CLAOData.Models.Contact" }, "expectedDurationOfJourney": { "$ref": "#/components/schemas/CLAOData.Models.Duration" } }, "additionalProperties": false, "description": "Departure details captured from the departure holding\r\n* `departureKeeper` - departure keeper details\r\n * *Necessity*: Optional\r\n* `departureOwner` - departure owner detail if different from keeper\r\n * *Necessity*: Optional\r\n* `expectedDurationOfJourney` - Expected duration animal will be in transport\r\n * *Necessity*: Optional\r\n * *Validation*: Total duration should not be greater than 2 days" }, "CLAOData.Models.Transfer.DestinationDetail": { "type": "object", "properties": { "arrivalDateTime": { "type": "string", "description": "Date/Time the animals arrived at the destination holding\r\n* *Necessity*: Optional\r\n* *Validation*: Value should not be before the `departureDetail.departureDateTime` or `departureDetail.loadingDateTime`", "format": "date-time", "nullable": true }, "destinationHoldingType": { "type": "string", "description": "Destination holding type\r\n* *Necessity*: Optional\r\n* *Validation*: Only permits name values returned by [HoldingTypes](#HoldingTypes) endpoint", "nullable": true }, "hasKeeperChanged": { "type": "boolean", "description": "Does the movement cause the keeper of the animals to change\r\n* *Necessity*: Optional", "nullable": true }, "totalAnimalsReceived": { "type": "integer", "description": "Total animals that were received\r\n* *Necessity*: Optional\r\n* *Validation*:\r\n * Value should greater than 0\r\n * If movement is an on movement, value should equal the total number of individual and batch identified animals on the movement", "format": "int32", "nullable": true }, "unloadingDateTime": { "type": "string", "description": "Date/Time the animals were unloaded at the destination holding\r\n* *Necessity*: Optional\r\n* *Validation*: Value should not be before the `departureDetail.departureDateTime`, `departureDetail.loadingDateTime` or `arrivalDateTime`", "format": "date-time", "nullable": true }, "destinationKeeper": { "$ref": "#/components/schemas/CLAOData.Models.Contact" } }, "additionalProperties": false, "description": "Destination details\r\n* `destinationKeeper` - details about destination keeper\r\n * *Necessity*: Optional" }, "CLAOData.Models.Transfer.TransportDetail": { "type": "object", "properties": { "transporterAuthNumber": { "type": "string", "description": "Transporter authorisation number (where journey is over 65km)\r\n* *Necessity*: Required if `transportType` = Haulier, optional otherwise\r\n* *Validation*: Maximum length 50 characters", "nullable": true }, "transporterType": { "type": "string", "description": "The transport type name or code \r\n* *Necessity*: Required\r\n* *Validation*: Only permits name or code values returned by [TransporterTypes](#TransporterTypes) endpoint", "nullable": true }, "transportHaulierName": { "type": "string", "description": "Name of haulage company\r\n* *Necessity*: Required if `transportType` = Haulier, optional otherwise\r\n* *Validation*: Maximum length 50 characters", "nullable": true }, "transportVehicleRegistrationNo": { "type": "string", "description": "Registration number of vehicle being used to transport animals\r\n* *Necessity*: Optional\r\n* *Validation*: If specified must be between 2 and 10 upper or lower case letters or numbers", "nullable": true }, "transporter": { "$ref": "#/components/schemas/CLAOData.Models.Contact" } }, "additionalProperties": false, "description": "Transport details\r\n* `transporter` - details about the person responsible for transporting the animals\r\n * *Necessity*: Optional" }, "CLAOData.Models.Transfer.FciDetail": { "type": "object", "properties": { "metFCIWithdrawalPeriodCode": { "type": "string", "description": "Indication if FCI withdrawal periods have been met\r\n* *Necessity*: Optional\r\n* *Validation*: Only permits code values returned by [MetFCIWithdrawalPeriods](#MetFCIWithdrawalPeriods) endpoint", "nullable": true }, "holdingRestrictions": { "type": "string", "description": "Information about holding restrictions\r\n* *Necessity*: Optional\r\n* *Validation*:\r\n * Maximum length 255 characters\r\n * Value should not be specified if animals are FCI compliant (`isAllAnimalsFciCompliant` equals true)", "nullable": true }, "isAllAnimalsFciCompliant": { "type": "boolean", "description": "Are all animals FCI compliant\r\n* *Necessity*: Optional", "nullable": true }, "nonCompliantReason": { "type": "string", "description": "Reasons for non FCI compliance\r\n* *Necessity*: Optional, required if `isAllAnimalsFciCompliant` equals false \r\n* *Validation*:\r\n * Maximum length 255 characters\r\n * Value should not be specified if animals are FCI compliant (`isAllAnimalsFciCompliant` equals true)", "nullable": true }, "withdrawalPeriodObservedText": { "type": "string", "description": "Information if FCI Withdrawal periods have been observed\r\n* *Necessity*: Optional\r\n* *Validation*:\r\n * Maximum length 255 characters\r\n * Value should not be specified if animals are FCI compliant (`isAllAnimalsFciCompliant` equals true)", "nullable": true, "deprecated": true }, "nonCompliantDevices": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.Device" }, "description": "List of non compliant devices\r\n* *Necessity*: Optional\r\n* *Validation*:\r\n * Should contain one or more devices if all animals are not FCI compliant (`isAllAnimalsFciCompliant` equals false)\r\n * Should not contain any devices if all animals are FCI compliant (`isAllAnimalsFciCompliant` equals true)", "nullable": true } }, "additionalProperties": false, "description": "Food Chain Information (FCI) details" }, "CLAOData.Models.Transfer.MovementDocument": { "type": "object", "properties": { "documentType": { "type": "string", "description": "Document type, used to indicate the type of movement document being specified\r\n* *Necessity*: Optional, should be specified if a `movementDocumentRef` is also specified\r\n* *Validation*: Only permits document type values returned by [DocumentTypes](#DocumentTypes) endpoint", "nullable": true }, "movementDocumentRef": { "type": "string", "description": "Movement document reference, used to indicate the movement document id that movement is part of. If editing or confirming pre-movement this is the movement document id of the existing pre-movement.\r\n* *Necessity*: Optional, should be specified if a `documentType` is also specified\r\n* *Validation*: Document exists and authenticated user is permitted to access it", "nullable": true }, "departureDetail": { "$ref": "#/components/schemas/CLAOData.Models.Transfer.DepartureDetail" }, "destinationDetail": { "$ref": "#/components/schemas/CLAOData.Models.Transfer.DestinationDetail" }, "transportDetail": { "$ref": "#/components/schemas/CLAOData.Models.Transfer.TransportDetail" }, "fciDetail": { "$ref": "#/components/schemas/CLAOData.Models.Transfer.FciDetail" } }, "additionalProperties": false, "description": "Movement document\r\n* `departureDetail` - details captured from the departure holding\r\n * *Necessity*: Required" }, "CLAOData.Models.DeviceApplicationDetails": { "type": "object", "properties": { "dateOfApplication": { "type": "string", "description": "Date tags were applied\r\n* *Necessity*: Required \r\n* *Validation*: Must not be in the future or after the date of the main event being recorded", "format": "date-time" }, "beginBirthPeriod": { "type": "string", "description": "Date of earliest possible birth date of animals tagged\r\n* *Necessity*: Optional, required if `endBirthPeriod` is specified.\r\n* *Validation*: Must not be in the future or after the `dateOfApplication`. The number of days between `beginBirthPeriod` and `endBirthPeriod` must less then 1 day for species cattle or else 31 days for other species.", "format": "date-time", "nullable": true }, "endBirthPeriod": { "type": "string", "description": "Date of latest possible birth date of animals tagged\r\n* *Necessity*: Optional, required if `beginBirthPeriod` is specified.\r\n* *Validation*: Must not be in the future or after the `dateOfApplication`. The number of days between `beginBirthPeriod` and `endBirthPeriod` must less then 1 day for species cattle or else 31 days for other species.", "format": "date-time", "nullable": true }, "breed": { "type": "string", "description": "Breed name of animals\r\n* *Necessity*: Optional\r\n* *Validation*: Only permits breed name values returned by [Breeds](#Breeds) endpoint for species", "nullable": true } }, "additionalProperties": false, "description": "Device application details if tag application should be automatically recorded" }, "CLAOData.Models.CorrectTransfer.CorrectTransferModel": { "required": [ "animalCount", "destinationHolding", "movementGroups", "sourceHolding", "transferDate", "userHolding" ], "type": "object", "properties": { "requestToBeUndoneId": { "type": "integer", "description": "Request id of the original transfer request to be corrected, this can be obtained from the [TransferRequests](#TransferRequests) endpoint.\r\n* *Necessity*: Required\r\n* *Validation*: The authenticated user must have originally created the transfer request being corrected (unless the authenticated user is an administrator).", "format": "int32" }, "sourceHolding": { "type": "string", "description": "Departure holding animals moved from\r\n* *Necessity*: Required\r\n* *Validation*:\r\n * String is in valid holding CPH format (see API guide for supported holding number formats).\r\n * If the departure holding isn't known or animal is found use the value `UNKNOWN`\r\n * For most user roles authenticated user must be associated with either the `sourceHolding` or `destinationHolding`." }, "destinationHolding": { "type": "string", "description": "Destination holding animals moved to\r\n* *Necessity*: Required\r\n* *Validation*:\r\n * String is in valid holding CPH or abattoir MHS number format (see API guide for supported holding number formats).\r\n * If destination holding isn't known or animal is lost use the value `UNKNOWN`.\r\n * For most user roles authenticated user must be associated with either the `sourceHolding` or `destinationHolding`." }, "userHolding": { "type": "string", "description": "A holding associated with the user. It must be equal to `destinationHolding` for movements ON or `sourceHolding` for movements OFF.\r\n* *Necessity*: Required\r\n* *Validation*:\r\n * String is in valid holding CPH format (see API guide for supported holding number formats).\r\n * If it is On movement or in-business movement the `userHolding` should equal `destinationHolding`\r\n * If it is Off movement the `userHolding` should equal `sourceHolding`\r\n * For most user roles authenticated user must be associated with the `userHolding`." }, "transferDate": { "type": "string", "description": "Date/time of the movement.\r\n* *Necessity*: Required", "format": "date-time" }, "animalCount": { "type": "integer", "description": "Total individual and batch identified animals moved\r\n* *Necessity*: Required\r\n* *Validation*:\r\n * Value is between 1 and 99999\r\n * Value equal the count of `movementGroups.devices` plus sum of `movementGroups.batches.animalTotal`", "format": "int32" }, "species": { "type": "string", "description": "The species name of animals moved\r\n* *Necessity*: Required\r\n* *Validation*: Only permits species name values returned by [Species](#Species) endpoint", "nullable": true }, "saleDate": { "type": "string", "description": "Sale date\r\n* *Necessity*: Only should be specified if a market holding type is recording an off movement\r\n* *Validation*:\r\n * Must be less then or equal to `transferDate`\r\n * Must be empty if isn't a market recording an off movement", "format": "date-time", "nullable": true }, "saleId": { "type": "string", "description": "Sale identifier, the internal identifier for the sale\r\n* *Necessity*: Optional\r\n* *Validation*:\r\n * Maximum length 32 characters", "nullable": true }, "transportHaulierName": { "type": "string", "description": "Name of person responsible for moving animals\r\n* *Necessity*: Optional\r\n* *Validation*: Maximum length 50 characters", "nullable": true }, "transportVehicleRegistrationNo": { "type": "string", "description": "Registration number of vehicle being used to transport animals\r\n* *Necessity*: Optional\r\n* *Validation*: If specified must be between 2 and 10 upper or lower case letters or numbers", "nullable": true }, "comment": { "maxLength": 125, "type": "string", "description": "Additional remarks about the movement\r\n* *Necessity*: Optional", "nullable": true }, "id": { "type": "integer", "format": "int32" }, "trackingId": { "type": "string", "description": "Client tracking ID used to prevent duplicates - When this field is supplied, the system will check for duplicate requests in cases of network and communication issues\r\n* *Necessity*: Optional\r\n* *Validation*: String, maximum length 36, it is recommended that this is populated with a Guid", "nullable": true }, "movementGroups": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.Transfer.MovementGroup" }, "description": "Collection of groups of animals moved\r\n* *Necessity*: Required\r\n* *Validation*: Collection must contain one or more items" }, "movementDocument": { "$ref": "#/components/schemas/CLAOData.Models.Transfer.MovementDocument" }, "deviceApplication": { "$ref": "#/components/schemas/CLAOData.Models.DeviceApplicationDetails" }, "processingFlags": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.RequestProcessingFlag" }, "description": "Collection of processing flags used to affect how a request is validated and processed\r\n* *Necessity*: Optional\r\n* *Validation*: If specified, only permits processing flag name values returned by [ProcessingFlags](#ProcessingFlags) endpoint for this request type and species", "nullable": true } }, "additionalProperties": false, "description": "Correct Transfer request content" }, "CLAOData.Models.CorrectTransfer.CorrectTransfer": { "type": "object", "properties": { "requestId": { "type": "integer", "description": "Identifier of request\r\n* *Necessity*: Should not be populated when POSTing a request", "format": "int32" }, "requestStatus": { "$ref": "#/components/schemas/CLAOData.Models.RequestStatus" }, "requestDate": { "type": "string", "description": "DateTime request was received\r\n* *Necessity*: Should not be populated when POSTing a request", "format": "date-time" }, "updatedDate": { "type": "string", "description": "DateTime request finished processing\r\n* *Necessity*: Should not be populated when POSTing a request", "format": "date-time", "nullable": true }, "isFullUndone": { "type": "boolean", "description": "Has the request been fully undone\r\n* *Necessity*: Should not be populated when POSTing a request" }, "undoSupported": { "type": "boolean", "description": "Does this request support being undone\r\n* *Necessity*: Should not be populated when POSTing a request" }, "userName": { "type": "string", "description": "UserName of the user who submitted the request\r\n* *Necessity*: Should not be populated when POSTing a request", "nullable": true }, "content": { "$ref": "#/components/schemas/CLAOData.Models.CorrectTransfer.CorrectTransferModel" }, "isContentPurged": { "type": "boolean", "description": "Has the `content` of the request been purged \r\n* *Necessity*: Should not be populated when POSTing a request" }, "errors": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.SingleError" }, "description": "Any errors that occurred during processing of the request.\r\n* *Necessity*: Should not be populated when POSTing a request", "nullable": true }, "warnings": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.SingleError" }, "description": "Any warnings that occurred during processing of the request\r\n* *Necessity*: Should not be populated when POSTing a request", "nullable": true }, "validationErrors": { "$ref": "#/components/schemas/Microsoft.OData.ODataError" } }, "additionalProperties": false }, "CLAOData.Models.CorrectTransfer.CorrectTransferListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.CorrectTransfer.CorrectTransfer" }, "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.CountyListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.County" }, "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.Transfer.DocumentTypeListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.Transfer.DocumentType" }, "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.GenderListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.Gender" }, "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.ReviewHoldingMovement.V2.ReviewBatch": { "type": "object", "properties": { "batchMovementId": { "type": "integer", "description": "The batch movement Id that this batch belongs to.\r\n* *Necessity*: Required\r\n* *Validation*: Must be a valid `reviewBatches.batchMovementId` returned from the [HoldingMovementForReviews](#HoldingMovementForReviews) endpoint for the movement `requestId` being reviewed.", "format": "int32" }, "isPreMovement": { "type": "boolean", "description": "Is this a pre-movement" }, "movementPendingId": { "type": "integer", "description": "The pending movement id if this is a pre-movement", "format": "int32" }, "movementId": { "type": "integer", "description": "The movement id", "format": "int32" }, "animalTotal": { "type": "integer", "description": "Total animals in batch\r\n* *Necessity*: Required\r\n* *Validation*: Integer greater than 0", "format": "int32" }, "batchNumber": { "type": "string", "description": "Batch number of group of animals (i.e the herd or flock number)\r\n* *Necessity*: Required\r\n* *Validation*: String is in the batch number format supported for the species (see API guide for supported batch number formats)", "nullable": true }, "idMark": { "maxLength": 50, "type": "string", "description": "Description of the batch of animals\r\n* *Necessity*: Optional\r\n* *Validation*: String maximum length 50", "nullable": true }, "stockType": { "type": "string", "description": "Stock type of the batch of animals\r\n* *Necessity*: Optional\r\n* *Validation*: Only permits stock type name values returned by [StockTypes](#StockTypes) endpoint for species", "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.ReviewHoldingMovement.V2.ReviewBatchListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.ReviewHoldingMovement.V2.ReviewBatch" }, "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.ReviewHoldingMovement.V2.ReviewDevice": { "type": "object", "properties": { "beginBirthPeriod": { "type": "string", "format": "date-time", "nullable": true }, "endBirthPeriod": { "type": "string", "description": "Date of latest possible birth date of animal\r\n* *Necessity*: Optional for species sheep, goats and pigs. Required if `beginBirthPeriod` is specified\r\n* *Validation*: Must not be in the future or after the tag was applied to animal. The number of days between `beginBirthPeriod` and `endBirthPeriod` must less then 1 day for species cattle or else 31 days for other species.", "format": "date-time", "nullable": true }, "breed": { "type": "string", "description": "The breed name of the animal.\r\n* *Necessity*: Required for species Cattle, optional for other species.\r\n* *Validation*: Only permits breed name values returned by [Breeds](#Breeds) endpoint for the species of the animal", "nullable": true }, "isPreMovement": { "type": "boolean", "description": "Is this a pre-movement" }, "movementPendingId": { "type": "integer", "description": "The pending movement id if this is a pre-movement", "format": "int32" }, "movementId": { "type": "integer", "description": "The movement id", "format": "int32" }, "tagNumber": { "type": "string", "description": "Official visual tag number\r\n* *Necessity*: Either `tagNumber`, `rfid` or `freezebrand` must be specified\r\n* *Validation*: String is in the tag number format supported for the species (see API guide for supported tag number formats)\r\n* If `tagNumber` and `rfid` are both specified they should be equivalent values.", "nullable": true }, "rfid": { "type": "string", "description": "Radio Frequency Identifier (RFID) / Electronic Identification number (EID) of tag\r\n* *Necessity*: Either `tagNumber`, `rfid` or `freezebrand` must be specified\r\n* *Validation*: String containing Rfid in format; decimal, ISO Decimal, Hex or UK WYSIWYG (see API guide for supported Rfid formats)\r\n* If `rfid` and `tagNumber` are both specified they should be equivalent values.", "nullable": true }, "freezebrand": { "type": "string", "description": "Freezebrand of tag\r\n* *Necessity*: Either `tagNumber`, `rfid` or `freezebrand` must be specified", "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.ReviewHoldingMovement.V2.ReviewDeviceListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.ReviewHoldingMovement.V2.ReviewDevice" }, "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.ReviewHoldingMovement.V2.HoldingMovementForReview": { "type": "object", "properties": { "requestId": { "type": "integer", "description": "Request Id of the movement to be reviewed", "format": "int32" }, "isAccepted": { "type": "boolean", "description": "Indication of whether the movement is accepted or rejected", "nullable": true }, "documentRef": { "type": "string", "description": "Reference of the movement document", "nullable": true }, "documentType": { "type": "string", "description": "Type of movement document", "nullable": true }, "species": { "type": "string", "description": "The species this movement concerns", "nullable": true }, "destinationHolding": { "type": "string", "description": "The holding the animals were moved to", "nullable": true }, "sourceHolding": { "type": "string", "description": "The holding the animals were moved from", "nullable": true }, "userHolding": { "type": "string", "description": "The main holding associated with the user that originally created the movement", "nullable": true }, "userHoldingDevolvedAreaId": { "type": "integer", "description": "The id of the devolved area for the holding", "format": "int32", "nullable": true }, "movementDate": { "type": "string", "description": "The date of the movement", "format": "date-time" }, "animalTotal": { "type": "integer", "description": "Total number of animals included in batches and devices that were moved", "format": "int32" }, "transportHaulierName": { "type": "string", "description": "The name of the transport haulier", "nullable": true }, "transportVehicleRegistrationNo": { "type": "string", "description": "The registration number of the transport vehicle", "nullable": true }, "isDuplicate": { "type": "boolean", "description": "Is this movement a duplicate of any other movements that need to be reviewed" }, "duplicateRequestIds": { "type": "array", "items": { "type": "integer", "format": "int32" }, "description": "List of request Ids for any movements that are a duplicate of this movement", "nullable": true }, "isPreMovement": { "type": "boolean", "description": "True if this is a pre-movement, false otherwise" }, "movementPendingId": { "type": "integer", "description": "The pending movement id if this is a pre-movement. Will be 0 if IsPreMovement is false.", "format": "int32" }, "movementId": { "type": "integer", "description": "The movement id. Will be 0 if IsPreMovement is true.", "format": "int32" }, "arrivalDateTime": { "type": "string", "description": "The arrival date time", "format": "date-time", "nullable": true }, "departureDateTime": { "type": "string", "description": "The departure date time", "format": "date-time", "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.ReviewHoldingMovement.V2.HoldingMovementForReviewListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.ReviewHoldingMovement.V2.HoldingMovementForReview" }, "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.StockType": { "type": "object", "properties": { "speciesId": { "type": "integer", "description": "The id of the species of which this StockType is a subset.
Entity id for species to be specified for the POST/PUT supported methods.", "format": "int32", "nullable": true, "example": 1 }, "name": { "type": "string", "description": "The name of the stock type e.g. 'Ewes'", "nullable": true, "example": "Ewes" }, "species": { "$ref": "#/components/schemas/CLAOData.Models.Species" }, "id": { "type": "integer", "description": "The id of the entity.", "format": "int32" } }, "additionalProperties": false, "description": "A type of animal stock, e.g. 'Total Sheep' or 'Ewes'" }, "CLAOData.Models.HoldingTypeListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.HoldingType" }, "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.MetFCIWithdrawalPeriod": { "type": "object", "properties": { "name": { "type": "string", "description": "Full name/description of whether the withdrawal period has been met.", "nullable": true, "example": "Withdrawal periods have been met" }, "code": { "type": "string", "description": "Short code of whether the withdrawal period has been met.", "nullable": true, "example": "WITHDRAWAL_MET" }, "id": { "type": "integer", "description": "The id of the entity.", "format": "int32" } }, "additionalProperties": false, "description": "A single possible status for whether Food Chain Information withdrawal periods have been met." }, "CLAOData.Models.MetFCIWithdrawalPeriodListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.MetFCIWithdrawalPeriod" }, "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.ProcessingFlagListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.ProcessingFlag" }, "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.ReviewHoldingMovement.ReviewBatch": { "type": "object", "properties": { "batchMovementId": { "type": "integer", "description": "The batch movement Id that this batch belongs to.\r\n* *Necessity*: Required\r\n* *Validation*: Must be a valid `reviewBatches.batchMovementId` returned from the [HoldingMovementForReviews](#HoldingMovementForReviews) endpoint for the movement `requestId` being reviewed.", "format": "int32" }, "animalTotal": { "type": "integer", "description": "Total animals in batch\r\n* *Necessity*: Required\r\n* *Validation*: Integer greater than 0", "format": "int32" }, "batchNumber": { "type": "string", "description": "Batch number of group of animals (i.e the herd or flock number)\r\n* *Necessity*: Required\r\n* *Validation*: String is in the batch number format supported for the species (see API guide for supported batch number formats)", "nullable": true }, "idMark": { "maxLength": 50, "type": "string", "description": "Description of the batch of animals\r\n* *Necessity*: Optional\r\n* *Validation*: String maximum length 50", "nullable": true }, "stockType": { "type": "string", "description": "Stock type of the batch of animals\r\n* *Necessity*: Optional\r\n* *Validation*: Only permits stock type name values returned by [StockTypes](#StockTypes) endpoint for species", "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.ReviewHoldingMovement.ReviewMovement": { "type": "object", "properties": { "requestId": { "type": "integer", "description": "Request Id of the movement that is being reviewed.\r\n* *Necessity*: Required\r\n* *Validation*: Must be the `requestId` of a movement available for review returned by the [HoldingMovementForReviews](#HoldingMovementForReviews) endpoint.", "format": "int32" }, "isAccepted": { "type": "boolean", "description": "Indication of whether the movement is accepted or rejected. If movement is being partially accepted this value should equal `true`.\r\n* *Necessity*: Required\r\n* *Validation*:\r\n * Must equal `true` if either `acceptedDevices` or `acceptedBatches` contains one or more items.\r\n * Must equal `false` if both `acceptedDevices` and `acceptedBatches` contains zero items.", "nullable": true }, "acceptedBatches": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.ReviewHoldingMovement.ReviewBatch" }, "description": "Batches of the movement being accepted. This being the batch identified animals that moved.\r\n* *Necessity*: Optional\r\n* *Validation*:\r\n * Must only contain `reviewBatches` items returned by the [HoldingMovementForReviews](#HoldingMovementForReviews) endpoint for the movement `requestId` being reviewed.\r\n * Either `acceptedBatches` or `rejectedBatches` must contain every item in `reviewBatches` returned by the [HoldingMovementForReviews](#HoldingMovementForReviews) endpoint for the movement `requestId` being reviewed.", "nullable": true }, "animalTotal": { "type": "integer", "description": "The total number of animals in the movement. This includes both batches and individual devices.\r\n* *Necessity*: Required for on movement. Do not include animal total when reviewing an off movement.\r\n* *Validation*: Greater than 0", "format": "int32", "example": 1 }, "arrivalDate": { "type": "string", "description": "The date the animals arrived at the holding.\r\n* *Necessity*: Required for on movement. Do not include arrival date when reviewing an off movement.\r\n* *Validation*:\r\n * Must be a valid date no more than a configurable number of days after the departure date (default 1).", "format": "date-time" }, "rejectedBatches": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.ReviewHoldingMovement.ReviewBatch" }, "description": "Batches of the movement being rejected. This being the batch identified animals that did not move.\r\n* *Necessity*: Optional\r\n* *Validation*:\r\n * Must only contain `reviewBatches` items returned by the [HoldingMovementForReviews](#HoldingMovementForReviews) endpoint for the movement `requestId` being reviewed.\r\n * Either `acceptedBatches` or `rejectedBatches` must contain every item in `reviewBatches` returned from the [HoldingMovementForReviews](#HoldingMovementForReviews) endpoint for the movement `requestId` being reviewed.", "nullable": true }, "acceptedDevices": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.Device" }, "description": "Devices of the movement being accepted. This being the individual identified animals that moved.\r\n* *Necessity*: Optional\r\n* *Validation*:\r\n * Must only contain `reviewDevices` items returned by the [HoldingMovementForReviews](#HoldingMovementForReviews) endpoint for the movement `requestId` being reviewed.\r\n * Either `acceptedDevices` or `rejectedDevices` must contain every item in `reviewDevices` returned from the [HoldingMovementForReviews](#HoldingMovementForReviews) endpoint for the movement `requestId` being reviewed.", "nullable": true }, "rejectedDevices": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.Device" }, "description": "Devices of the movement being rejected. This being the individual identified animals that did not move.\r\n* *Necessity*: Optional\r\n* *Validation*:\r\n * Must only contain `reviewDevices` items returned by the [HoldingMovementForReviews](#HoldingMovementForReviews) endpoint for the movement `requestId` being reviewed.\r\n * Either `acceptedDevices` or `rejectedDevices` must contain every `reviewDevices` returned from the [HoldingMovementForReviews](#HoldingMovementForReviews) endpoint for the movement `requestId` being reviewed.", "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.ReviewHoldingMovement.ReviewHoldingMovementModel": { "type": "object", "properties": { "holding": { "type": "string", "description": "Holding CPH movement is being reviewed for.\r\n* *Necessity*: Required\r\n* *Validation*:\r\n * String is in valid holding CPH format (see API guide for supported tag number formats).\r\n * For most user roles authenticated user must be associated with the holding.", "nullable": true }, "reviewMovement": { "$ref": "#/components/schemas/CLAOData.Models.ReviewHoldingMovement.ReviewMovement" }, "documentRef": { "type": "string", "description": "The document reference for the movement\r\n* *Necessity*: Not required. If POSTed, it will be ignored.", "nullable": true }, "id": { "type": "integer", "format": "int32" }, "trackingId": { "type": "string", "description": "Client tracking ID used to prevent duplicates - When this field is supplied, the system will check for duplicate requests in cases of network and communication issues\r\n* *Necessity*: Optional\r\n* *Validation*: String, maximum length 36, it is recommended that this is populated with a Guid", "nullable": true }, "processingFlags": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.RequestProcessingFlag" }, "description": "Collection of processing flags used to affect how a request is validated and processed\r\n* *Necessity*: Optional\r\n* *Validation*: If specified, only permits processing flag name values returned by [ProcessingFlags](#ProcessingFlags) endpoint for this request type and species", "nullable": true } }, "additionalProperties": false, "description": "Review movement request content\r\n* `holding` and `reviewMovement` must have a value specified." }, "CLAOData.Models.ReviewHoldingMovement.ReviewHoldingMovement": { "type": "object", "properties": { "requestId": { "type": "integer", "description": "Identifier of request\r\n* *Necessity*: Should not be populated when POSTing a request", "format": "int32" }, "requestStatus": { "$ref": "#/components/schemas/CLAOData.Models.RequestStatus" }, "requestDate": { "type": "string", "description": "DateTime request was received\r\n* *Necessity*: Should not be populated when POSTing a request", "format": "date-time" }, "updatedDate": { "type": "string", "description": "DateTime request finished processing\r\n* *Necessity*: Should not be populated when POSTing a request", "format": "date-time", "nullable": true }, "isFullUndone": { "type": "boolean", "description": "Has the request been fully undone\r\n* *Necessity*: Should not be populated when POSTing a request" }, "undoSupported": { "type": "boolean", "description": "Does this request support being undone\r\n* *Necessity*: Should not be populated when POSTing a request" }, "userName": { "type": "string", "description": "UserName of the user who submitted the request\r\n* *Necessity*: Should not be populated when POSTing a request", "nullable": true }, "content": { "$ref": "#/components/schemas/CLAOData.Models.ReviewHoldingMovement.ReviewHoldingMovementModel" }, "isContentPurged": { "type": "boolean", "description": "Has the `content` of the request been purged \r\n* *Necessity*: Should not be populated when POSTing a request" }, "errors": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.SingleError" }, "description": "Any errors that occurred during processing of the request.\r\n* *Necessity*: Should not be populated when POSTing a request", "nullable": true }, "warnings": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.SingleError" }, "description": "Any warnings that occurred during processing of the request\r\n* *Necessity*: Should not be populated when POSTing a request", "nullable": true }, "validationErrors": { "$ref": "#/components/schemas/Microsoft.OData.ODataError" } }, "additionalProperties": false, "description": "Review movement request" }, "CLAOData.Models.ReviewHoldingMovement.ReviewHoldingMovementListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.ReviewHoldingMovement.ReviewHoldingMovement" }, "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.SpeciesListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.Species" }, "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.StockTypeListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.StockType" }, "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.Title": { "type": "object", "properties": { "id": { "type": "integer", "description": "The id of the entity.", "format": "int32" }, "name": { "type": "string", "description": "The 'title' value as a string.", "nullable": true, "example": "Dr" } }, "additionalProperties": false, "description": "Represents a person's title." }, "CLAOData.Models.TitleListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.Title" }, "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.Transfer.TransferModel": { "required": [ "animalCount", "destinationHolding", "movementGroups", "sourceHolding", "transferDate", "userHolding" ], "type": "object", "properties": { "sourceHolding": { "type": "string", "description": "Departure holding animals moved from\r\n* *Necessity*: Required\r\n* *Validation*:\r\n * String is in valid holding CPH format (see API guide for supported holding number formats).\r\n * If the departure holding isn't known or animal is found use the value `UNKNOWN`\r\n * For most user roles authenticated user must be associated with either the `sourceHolding` or `destinationHolding`." }, "destinationHolding": { "type": "string", "description": "Destination holding animals moved to\r\n* *Necessity*: Required\r\n* *Validation*:\r\n * String is in valid holding CPH or abattoir MHS number format (see API guide for supported holding number formats).\r\n * If destination holding isn't known or animal is lost use the value `UNKNOWN`.\r\n * For most user roles authenticated user must be associated with either the `sourceHolding` or `destinationHolding`." }, "userHolding": { "type": "string", "description": "A holding associated with the user. It must be equal to `destinationHolding` for movements ON or `sourceHolding` for movements OFF.\r\n* *Necessity*: Required\r\n* *Validation*:\r\n * String is in valid holding CPH format (see API guide for supported holding number formats).\r\n * If it is On movement or in-business movement the `userHolding` should equal `destinationHolding`\r\n * If it is Off movement the `userHolding` should equal `sourceHolding`\r\n * For most user roles authenticated user must be associated with the `userHolding`." }, "transferDate": { "type": "string", "description": "Date/time of the movement.\r\n* *Necessity*: Required", "format": "date-time" }, "animalCount": { "type": "integer", "description": "Total individual and batch identified animals moved\r\n* *Necessity*: Required\r\n* *Validation*:\r\n * Value is between 1 and 99999\r\n * Value equal the count of `movementGroups.devices` plus sum of `movementGroups.batches.animalTotal`", "format": "int32" }, "species": { "type": "string", "description": "The species name of animals moved\r\n* *Necessity*: Required\r\n* *Validation*: Only permits species name values returned by [Species](#Species) endpoint", "nullable": true }, "saleDate": { "type": "string", "description": "Sale date\r\n* *Necessity*: Only should be specified if a market holding type is recording an off movement\r\n* *Validation*:\r\n * Must be less then or equal to `transferDate`\r\n * Must be empty if isn't a market recording an off movement", "format": "date-time", "nullable": true }, "saleId": { "type": "string", "description": "Sale identifier, the internal identifier for the sale\r\n* *Necessity*: Optional\r\n* *Validation*:\r\n * Maximum length 32 characters", "nullable": true }, "transportHaulierName": { "type": "string", "description": "Name of person responsible for moving animals\r\n* *Necessity*: Optional\r\n* *Validation*: Maximum length 50 characters", "nullable": true }, "transportVehicleRegistrationNo": { "type": "string", "description": "Registration number of vehicle being used to transport animals\r\n* *Necessity*: Optional\r\n* *Validation*: If specified must be between 2 and 10 upper or lower case letters or numbers", "nullable": true }, "comment": { "maxLength": 125, "type": "string", "description": "Additional remarks about the movement\r\n* *Necessity*: Optional", "nullable": true }, "id": { "type": "integer", "format": "int32" }, "trackingId": { "type": "string", "description": "Client tracking ID used to prevent duplicates - When this field is supplied, the system will check for duplicate requests in cases of network and communication issues\r\n* *Necessity*: Optional\r\n* *Validation*: String, maximum length 36, it is recommended that this is populated with a Guid", "nullable": true }, "movementGroups": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.Transfer.MovementGroup" }, "description": "Collection of groups of animals moved\r\n* *Necessity*: Required\r\n* *Validation*: Collection must contain one or more items" }, "movementDocument": { "$ref": "#/components/schemas/CLAOData.Models.Transfer.MovementDocument" }, "deviceApplication": { "$ref": "#/components/schemas/CLAOData.Models.DeviceApplicationDetails" }, "processingFlags": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.RequestProcessingFlag" }, "description": "Collection of processing flags used to affect how a request is validated and processed\r\n* *Necessity*: Optional\r\n* *Validation*: If specified, only permits processing flag name values returned by [ProcessingFlags](#ProcessingFlags) endpoint for this request type and species", "nullable": true } }, "additionalProperties": false, "description": "OData transfer request model" }, "CLAOData.Models.Transfer.Transfer": { "type": "object", "properties": { "requestId": { "type": "integer", "description": "Identifier of request\r\n* *Necessity*: Should not be populated when POSTing a request", "format": "int32" }, "requestStatus": { "$ref": "#/components/schemas/CLAOData.Models.RequestStatus" }, "requestDate": { "type": "string", "description": "DateTime request was received\r\n* *Necessity*: Should not be populated when POSTing a request", "format": "date-time" }, "updatedDate": { "type": "string", "description": "DateTime request finished processing\r\n* *Necessity*: Should not be populated when POSTing a request", "format": "date-time", "nullable": true }, "isFullUndone": { "type": "boolean", "description": "Has the request been fully undone\r\n* *Necessity*: Should not be populated when POSTing a request" }, "undoSupported": { "type": "boolean", "description": "Does this request support being undone\r\n* *Necessity*: Should not be populated when POSTing a request" }, "userName": { "type": "string", "description": "UserName of the user who submitted the request\r\n* *Necessity*: Should not be populated when POSTing a request", "nullable": true }, "isContentPurged": { "type": "boolean", "description": "Has the `content` of the request been purged \r\n* *Necessity*: Should not be populated when POSTing a request" }, "errors": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.SingleError" }, "description": "Any errors that occurred during processing of the request.\r\n* *Necessity*: Should not be populated when POSTing a request", "nullable": true }, "warnings": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.SingleError" }, "description": "Any warnings that occurred during processing of the request\r\n* *Necessity*: Should not be populated when POSTing a request", "nullable": true }, "validationErrors": { "$ref": "#/components/schemas/Microsoft.OData.ODataError" }, "content": { "$ref": "#/components/schemas/CLAOData.Models.Transfer.TransferModel" } }, "additionalProperties": false, "description": "Transfer request" }, "CLAOData.Models.Transfer.TransferListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.Transfer.Transfer" }, "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.Transfer.TransporterTypeListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.Transfer.TransporterType" }, "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.UndoRequest.UndoPartialRequestModel": { "type": "object", "properties": { "undoPartialRequestId": { "type": "integer", "description": "The request id of the request to be partially undone. The request id can be obtained from the [Requests](#Requests) endpoint.\r\n* *Necessity*: Required\r\n* *Validation*: \r\n * The authenticated user must have originally created the request being undone (unless they are an administrator).\r\n * The type of the request must support being undone. This can be verified by checking the [Requests](#Requests) endpoint if property `undoSupported` equals true.", "format": "int32" }, "species": { "type": "string", "description": "The species name of animals to be undone.\r\n* *Necessity*: Required\r\n* *Validation*:\r\n * Only permits species name values returned by [Species](#Species) endpoint.\r\n * Species must match the species of the animals in the original request being undone.", "nullable": true }, "id": { "type": "integer", "format": "int32" }, "trackingId": { "type": "string", "description": "Client tracking ID used to prevent duplicates - When this field is supplied, the system will check for duplicate requests in cases of network and communication issues\r\n* *Necessity*: Optional\r\n* *Validation*: String, maximum length 36, it is recommended that this is populated with a Guid", "nullable": true }, "batches": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.Batch" }, "description": "Collection of batch identified animals to have request actions undone for.\r\n* *Necessity*: Either `devices` or `batches` must contain one or more items.\r\n* *Validation*: combination of `batchNumber` and `animalTotal` must be in the original request being undone.", "nullable": true }, "devices": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.Device" }, "description": "Collection of individual identified animals to have request actions undone for.\r\n* *Necessity*: Either `devices` or `batches` must contain one or more items.\r\n* *Validation*: Animal identifiers must be in the original request being undone.", "nullable": true }, "processingFlags": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.RequestProcessingFlag" }, "description": "Collection of processing flags used to affect how a request is validated and processed\r\n* *Necessity*: Optional\r\n* *Validation*: If specified, only permits processing flag name values returned by [ProcessingFlags](#ProcessingFlags) endpoint for this request type and species", "nullable": true } }, "additionalProperties": false, "description": "Partial undo request content" }, "CLAOData.Models.UndoRequest.UndoPartialRequest": { "type": "object", "properties": { "requestId": { "type": "integer", "description": "Identifier of request\r\n* *Necessity*: Should not be populated when POSTing a request", "format": "int32" }, "requestStatus": { "$ref": "#/components/schemas/CLAOData.Models.RequestStatus" }, "requestDate": { "type": "string", "description": "DateTime request was received\r\n* *Necessity*: Should not be populated when POSTing a request", "format": "date-time" }, "updatedDate": { "type": "string", "description": "DateTime request finished processing\r\n* *Necessity*: Should not be populated when POSTing a request", "format": "date-time", "nullable": true }, "isFullUndone": { "type": "boolean", "description": "Has the request been fully undone\r\n* *Necessity*: Should not be populated when POSTing a request" }, "undoSupported": { "type": "boolean", "description": "Does this request support being undone\r\n* *Necessity*: Should not be populated when POSTing a request" }, "userName": { "type": "string", "description": "UserName of the user who submitted the request\r\n* *Necessity*: Should not be populated when POSTing a request", "nullable": true }, "content": { "$ref": "#/components/schemas/CLAOData.Models.UndoRequest.UndoPartialRequestModel" }, "isContentPurged": { "type": "boolean", "description": "Has the `content` of the request been purged \r\n* *Necessity*: Should not be populated when POSTing a request" }, "errors": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.SingleError" }, "description": "Any errors that occurred during processing of the request.\r\n* *Necessity*: Should not be populated when POSTing a request", "nullable": true }, "warnings": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.SingleError" }, "description": "Any warnings that occurred during processing of the request\r\n* *Necessity*: Should not be populated when POSTing a request", "nullable": true }, "validationErrors": { "$ref": "#/components/schemas/Microsoft.OData.ODataError" } }, "additionalProperties": false, "description": "Partial undo request" }, "CLAOData.Models.UndoRequest.UndoPartialRequestListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.UndoRequest.UndoPartialRequest" }, "nullable": true } }, "additionalProperties": false }, "CLAOData.Models.UndoRequest.UndoRequestModel": { "type": "object", "properties": { "undoRequestId": { "type": "integer", "description": "The request id of the request to be undone. The request id can be obtained from the [Requests](#Requests) endpoint.\r\n* *Necessity*: Required\r\n* *Validation*: \r\n * The authenticated user must have originally created the request being undone (unless they are an administrator).\r\n * The type of the request must support being undone. This can be verified by checking the [Requests](#Requests) endpoint if property `undoSupported` equals true.", "format": "int32" }, "id": { "type": "integer", "format": "int32" }, "trackingId": { "type": "string", "description": "Client tracking ID used to prevent duplicates - When this field is supplied, the system will check for duplicate requests in cases of network and communication issues\r\n* *Necessity*: Optional\r\n* *Validation*: String, maximum length 36, it is recommended that this is populated with a Guid", "nullable": true }, "processingFlags": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.RequestProcessingFlag" }, "description": "Collection of processing flags used to affect how a request is validated and processed\r\n* *Necessity*: Optional\r\n* *Validation*: If specified, only permits processing flag name values returned by [ProcessingFlags](#ProcessingFlags) endpoint for this request type and species", "nullable": true } }, "additionalProperties": false, "description": "Undo request content" }, "CLAOData.Models.UndoRequest.UndoRequest": { "type": "object", "properties": { "requestId": { "type": "integer", "description": "Identifier of request\r\n* *Necessity*: Should not be populated when POSTing a request", "format": "int32" }, "requestStatus": { "$ref": "#/components/schemas/CLAOData.Models.RequestStatus" }, "requestDate": { "type": "string", "description": "DateTime request was received\r\n* *Necessity*: Should not be populated when POSTing a request", "format": "date-time" }, "updatedDate": { "type": "string", "description": "DateTime request finished processing\r\n* *Necessity*: Should not be populated when POSTing a request", "format": "date-time", "nullable": true }, "isFullUndone": { "type": "boolean", "description": "Has the request been fully undone\r\n* *Necessity*: Should not be populated when POSTing a request" }, "undoSupported": { "type": "boolean", "description": "Does this request support being undone\r\n* *Necessity*: Should not be populated when POSTing a request" }, "userName": { "type": "string", "description": "UserName of the user who submitted the request\r\n* *Necessity*: Should not be populated when POSTing a request", "nullable": true }, "content": { "$ref": "#/components/schemas/CLAOData.Models.UndoRequest.UndoRequestModel" }, "isContentPurged": { "type": "boolean", "description": "Has the `content` of the request been purged \r\n* *Necessity*: Should not be populated when POSTing a request" }, "errors": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.SingleError" }, "description": "Any errors that occurred during processing of the request.\r\n* *Necessity*: Should not be populated when POSTing a request", "nullable": true }, "warnings": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.SingleError" }, "description": "Any warnings that occurred during processing of the request\r\n* *Necessity*: Should not be populated when POSTing a request", "nullable": true }, "validationErrors": { "$ref": "#/components/schemas/Microsoft.OData.ODataError" } }, "additionalProperties": false, "description": "Undo request" }, "CLAOData.Models.UndoRequest.UndoRequestListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/components/schemas/CLAOData.Models.UndoRequest.UndoRequest" }, "nullable": true } }, "additionalProperties": false } } }, "tags": [ { "name": "ApprovedMovements", "description": "Retrieves details of animal movements\r\n" }, { "name": "Breeds", "description": "Manage / View animal breeds. Breeds are linked to their [Species](#Species). Breeds can be identified by their Id.\r\n" }, { "name": "CorrectTransferRequests", "description": "Correct an existing movement of animals\r\n" }, { "name": "Counties", "description": "View counties. Counties can be identified by their Id.\r\n" }, { "name": "DocumentTypes", "description": "View the different types of document that can be used with the system.\r\n" }, { "name": "Genders", "description": "View animal genders e.g. Female. Genders can be identified by their Id.\r\n" }, { "name": "HoldingMovementForReviews", "description": "Retrieve details of movements that require review.\r\n" }, { "name": "HoldingTypes", "description": "Data about available types of holding\r\n" }, { "name": "MetFCIWithdrawalPeriods", "description": "Information about Food Chain Information periods\r\n" }, { "name": "ProcessingFlags", "description": "Maintain Processing Flags\r\n" }, { "name": "ReviewHoldingMovementRequests", "description": "Review the movement of animals\r\n" }, { "name": "Species", "description": "Information about species\r\n" }, { "name": "StockTypes", "description": "Information about types of animal stock\r\n" }, { "name": "Titles", "description": "Valid titles for use before a person's name\r\n" }, { "name": "TransferRequests", "description": "Register the movement of animals\r\n" }, { "name": "TransporterTypes", "description": "Information about types of transport for movements\r\n" }, { "name": "UndoPartialRequests", "description": "Partially undo / rollback a request\r\n" }, { "name": "UndoRequests", "description": "Undo / rollback a request\r\n" } ] }