AgriWebb API
GraphQL/Inputs

PurchaseRecordInput

Creates one or more animals and records the purchase in a single operation. Triggers government integration transactions (e.g. BCMS/NLIS). Enforces uniqueness on vid/eid — errors if an animal already exists with those identifiers. The mapper emits one AnimalCreationRecord per animal plus a single PurchaseRecord for the group.

input PurchaseRecordInput {
  observationDate: Timestamp!
  species: Species!
  ownership: PurchaseOwnershipInput!
  transport: PurchaseTransportInput!
  outgoings: [PurchaseOutgoingInput!]
  pricePerHead: MonetaryAmountInput
  animals: [PurchaseAnimalInput!]!
}

Fields

PurchaseRecordInput.observationDate ● Timestamp!
non-null
scalar

Purchase date as Unix timestamp (ms). There is no separate purchaseDate field.

PurchaseRecordInput.species ● Species!
non-null
enum

Species of all animals in this purchase. Used to set session characteristics.

PurchaseRecordInput.ownership ● PurchaseOwnershipInput!
non-null
input

PurchaseRecordInput.transport ● PurchaseTransportInput!
non-null
input

PurchaseRecordInput.outgoings ● [PurchaseOutgoingInput!]
list
input

Shared cost lines for this purchase (e.g. transport, levy). Per-animal price goes on each animal.

PurchaseRecordInput.pricePerHead ● MonetaryAmountInput
input

Shared price applied uniformly per head to all animals. For per-animal pricing, use the price field on each PurchaseAnimalInput.

PurchaseRecordInput.animals ● [PurchaseAnimalInput!]!
non-null
input

One or more animals being purchased. Must contain at least one entry.

Member Of

RecordInput

input

On this page

FieldsPurchaseRecordInput.observationDate ● Timestamp!
non-null
scalar
PurchaseRecordInput.species ● Species!
non-null
enum
PurchaseRecordInput.ownership ● PurchaseOwnershipInput!
non-null
input
PurchaseRecordInput.transport ● PurchaseTransportInput!
non-null
input
PurchaseRecordInput.outgoings ● [PurchaseOutgoingInput!]
list
input
PurchaseRecordInput.pricePerHead ● MonetaryAmountInput
input
PurchaseRecordInput.animals ● [PurchaseAnimalInput!]!
non-null
input
Member Of