Table of Contents

pfIcarInventoryTransactionResource

Description

Generic inventory transaction resource. Some product families have specific transaction resources (e.g. medicines, feeds).

The pfIcarInventoryTransactionResource schema inherits from icarInventoryTransactionResource.

Properties

Name Description Required Type
Product The product in this inventory transaction. Yes icarProductReferenceType
TransactionKind Identifies the transaction kind. Yes icarInventoryTransactionKindType
Quantity The overall volume, weight or count of the product in the transaction in the units defined. Yes Number
Units The units of the quantity specified. Where applicable it is recommended that uncefact mass and volume units are used. Yes string
SupplierName The supplier of the product in this transaction. This is particularly relevant if the transaction is a receipt No string
ExpiryDate The expiry date of the product supplied in the transaction. No date-time
TotalCost Total cost applied to this transaction No Number
Currency The currency of the cost expressed using the ISO 4217 3-character code such as AUD, GBP, USD, NZD. No string
PackSize The volume or weight of the product in a pack in the units defined. Especially relevant for Vet Medicines. No Number
NumberOfPacks The number of packs of the product in the transaction. Especially relevant for Vet Medicines. Could be a decimal number for a part-pack. No Number
Id Unique identifier in the source system for this event. No string
EventDateTime RFC3339 UTC date and time (see https://ijmacd.github.io/rfc3339-iso8601/). No date-time
TraitLabel If the event represents a formal trait, identifies the recording system and trait. No icarIdentifierType
Responsible Use if an observation is manually recorded, or an event is carried out or authorised by a person. SHOULD be a person object. No string
ContemporaryGroup For manually recorded events, record any contemporary group code that would affect statistical analysis. No string
Remark A comment or remark field for additional user-specified information about the event. No string
Self Uniform resource identifier (URI) of the resource (rel=self). No string
Meta Meta-data for the resource. Mandatory if you wish to support synchronisation. No icarMetaDataType
Location Unique location scheme and identifier combination. No icarIdentifierType

Examples

Example 1

{
  "resourceType": "/inventory/inventory-transaction",
  "id": "3e1b7c79-ff5c-49c6-bbf8-104a72a19b54",
  "@self": "https://api.purefarming.com/data/inventory/inventory-transaction/eeef8e09-59a6-44c0-845a-bdccd9d38860",
  "location": {
    "scheme": "uk.cph",
    "id": "08/675/0020"
  },
  "meta": {
    "source": "uk.springrise.semen",
    "sourceId": "19a3b5fe-1690-45f8-a819-1471c1a121a3",
    "modified": "2023-02-10T09:00:00Z",
    "created": "2023-02-10T09:00:00Z",
    "isDeleted": false,
    "creator": "don.wilson@springrise.co.uk",
    "validFrom": "2023-02-10T09:00:00Z",
    "validTo": "2023-12-10T09:00:00Z"
  },
  "eventDateTime": "2023-01-28T08:00:00Z",
  "responsible": "Matt Henry",
  "remark": "Semen from Destiny Chancellor",
  "transactionKind": "Receipt",
  "quantity": 100,
  "units": "straws",
  "supplierName": "BlackHawk",
  "expiryDate": "2023-03-28T08:00:00Z",
  "totalCost": 1324,
  "currency": "GBP",
  "product": {
    "identifier": {
      "scheme": "uk.co.genus",
      "id": "KY123412341234"
    },
    "href": "https://www.genus.co.uk/products/artificial-breeding/bull/54321",
    "identifiers": [
      {
        "scheme": "uk.springrise.productcode",
        "id": "BH467"
      }
    ],
    "family": "Animal Reproductive Products",
    "name": "Semen - Destiny Chancellor",
    "gtin": "012345678905",
    "unspc": "11131609"
  }
}

Example 2

{
  "resourceType": "/inventory/inventory-transaction",
  "dataPointKey": "sample-inventory-transaction-f",
  "id": "08c35256-388a-4b31-9f70-aee5a3c4585a",
  "@self": "https://api.purefarming.com/data/inventory/inventory-transaction/cf90ec5a-a745-40a2-8721-da0186de1299",
  "location": {
    "scheme": "nz.nait.pica-location",
    "id": "12345"
  },
  "meta": {
    "source": "nz.co.kjhfarmsupplies",
    "sourceId": "efc3da28-cc4b-4733-b5bf-2dd0b3a4beb6",
    "modified": "2023-04-05T09:00:00Z",
    "created": "2023-04-05T09:00:00Z",
    "isDeleted": false,
    "creator": "don.wilson@kjhfarmsupplies.co.nz",
    "validFrom": "2023-04-05T09:00:00Z",
    "validTo": "2024-02-05T09:00:00Z"
  },
  "eventDateTime": "2023-03-28T08:00:00Z",
  "responsible": "Tom Wilson",
  "remark": "Milking plant consumables replaced",
  "transactionKind": "Use",
  "quantity": 64,
  "units": "liners",
  "supplierName": "KJH Farm Supplies Ltd",
  "expiryDate": "2025-06-28T00:00:00Z",
  "totalCost": 2500,
  "currency": "NZD",
  "packSize": 4,
  "numberOfPacks": 16,
  "product": {
    "identifier": {
      "scheme": "nz.co.rubberproducts",
      "id": "RPL1111"
    },
    "href": "https://www.rubberproducts.co.nz/products/dairy/milk-liners/1111",
    "identifiers": [
      {
        "scheme": "nz.co.kjhfarmsupplies.productcode",
        "id": "LK4/678"
      }
    ],
    "family": "Milking Supplies",
    "name": "Rubber Products Premium Square Barrelled RIX1248 Milking Liner",
    "gtin": "012345678977",
    "unspc": "21101916"
  }
}