Crops Passports API

This API gives access to crop passport documents registered against Red Tractor Crops members. New passports may be created via this API, and pre-filled proforma documentation downloaded for all existing passports.

Other API Endpoints

EndpointDescription
https://api.redtractor.org.uk/v1/passports/{shortcode}Gets the details of a previously created crops passport document

Create or list crops passport documents for Red Tractor Crops members

Create Passport POST

Creates a new crops passport for the specified Red Tractor Crops membership and site

Parameters

Request Parameters
ParameterDescription
MembershipGUID StringThe unique identifier for the crops membership the passport is being created forRequired
SiteGUID StringThe unique identifier of the assured site to be used for the collection addressRequired
StoreGUID StringThe unique identifier of the assured grain store used for the collection point
CropType StringThe crop type to be shown in section 1 of the passport document
Variety StringThe crop variety to be shown in section 1 of the passport document
StoreOrBinName StringThe store or bin name to be shown in section 1 of the passport document
LoadingDate Date / TimeThe loading date to be shown in section 1 of the passport document
HarvestYear StringThe harvest year to be shown in section 1 of the passport document
HaulierCompanyName StringThe company name of the haulier to be shown in section 1 of the passport document
VehicleRegistration StringThe vehicle registration of the haulier collecting the load to be shown in section 1 of the passport document
TrailerNumber StringThe number of the trailer used to transport the load to be shown in section 1 of the passport document
HaulierCollectionTicketNo StringThe ticket number given by the hauler for the collection to be shown in section 1 of the passport document
PostHarvestTreatmentOption EnumerationThe post harvest treatment option to be indicated in section 4 of the passport document
PostHarvestTreatmentDate Date / TimeThe date of post-harvest treatment to be shown in section 4 of the passport document
PostHarvestTreatmentProduct StringThe product used for post-harvest treatment to be shown in section 4 of the passport document
DONRiskAssessmentResult NumberThe risk assessment score to be shown in section 5 of the passport document
DONTestDate Date / TimeThe date of test to be shown in section 5 of the passport document
DONTestResult StringThe result to be shown in section 5 of the passport document
ZONTestDate Date / TimeThe date of test to be shown in section 5 of the passport document
ZONTestResult StringThe result to be shown in section 5 of the passport document
Response Parameters
ParameterDescription
ShortCode StringThe unique reference number assigned to the passport
MembershipGUID StringThe unique identifier for the crops membership the passport belongs to
SiteGUID StringThe unique identifier of the assured site used for the collection address
StoreGUID StringThe unique identifier of the assured grain store to be used for the collection pointOptional
BusinessName StringThe business name shown on the passport document
CollectionAddress StringThe collection address shown on the passport document
CropType StringThe crop type shown on the passport documentOptional
Variety StringThe crop variety shown on the passport documentOptional
StoreOrBinName StringThe store or bin name shown on the passport documentOptional
LoadingDate Date / TimeThe loading date shown on the passport documentOptional
HarvestYear StringThe harvest year shown on the passport documentOptional
HaulierCompanyName StringThe company name of the haulier shown on the passport documentOptional
VehicleRegistration StringThe vehicle registration number of the haulier as shown on the passport documentOptional
TrailerNumber StringThe trailer number shown on the passport documentOptional
HaulierCollectionTicketNo StringThe number of the trailer used to transport the load as shown on the passport document Optional
CertifierName StringThe name of the certification body shown for the assurance claim included on the passport document
MembershipNumber StringThe Red Tractor membership number for the assurance claim included on the passport document
CheckDate Date / TimeThe date the assurance claim included on the passport document was validated
Status StringThe validated status of the assurance claim included on the passport document
ExpiryDate Date / TimeThe certificate expiry date for the assurance claim included on the passport document
Enterprises StringComma-delimited list of the certified enterprises shown for the assurance claim included on the passport document
PostHarvestTreatmentOption EnumerationThe post harvest treatment option indicated in section 4 of the passport documentOptional
PostHarvestTreatmentDate Date / TimeThe date of post-harvest treatment shown in section 4 of the passport documentOptional
PostHarvestTreatmentProduct StringThe product used for post-harvest treatment shown in section 4 of the passport documentOptional
DONRiskAssessmentResult NumberThe risk assessment score to be shown in section 5 of the passport documentOptional
DONTestDate Date / TimeThe date of test shown in section 5 of the passport document Optional
DONTestResult StringThe result shown in section 5 of the passport documentOptional
ZONTestDate Date / TimeThe date of test shown in section 5 of the passport documentOptional
ZONTestResult StringThe result to be shown in section 5 of the passport document Optional
GrainStoreName StringName of grain store used as collection pointOptional
GrainStoreLatitude StringGrain store latitude Optional
GrainStoreLongitude StringGrain store longitudeOptional

Enumerations

Post-Harvest Treatment Option (Request)
ValueDescription
None Indicated
AOption A
BOption B
COption C
Post-Harvest Treatment Option (Response)
ValueDescription
None Indicated
AOption A
BOption B
COption C

XML

Request Schema
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:element name="CreatePassportRequest">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="MembershipGUID" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The unique identifier for the crops membership the passport is being created for</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="SiteGUID" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The unique identifier of the assured site to be used for the collection address</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="StoreGUID" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The unique identifier of the assured grain store used for the collection point</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="CropType" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The crop type to be shown in section 1 of the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="Variety" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The crop variety to be shown in section 1 of the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="StoreOrBinName" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The store or bin name to be shown in section 1 of the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="LoadingDate" minOccurs="0" type="xsd:dateTime">
          <xsd:annotation>
            <xsd:documentation>The loading date to be shown in section 1 of the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="HarvestYear" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The harvest year to be shown in section 1 of the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="HaulierCompanyName" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The company name of the haulier to be shown in section 1 of the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="VehicleRegistration" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The vehicle registration of the haulier collecting the load to be shown in section 1 of the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="TrailerNumber" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The number of the trailer used to transport the load to be shown in section 1 of the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="HaulierCollectionTicketNo" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The ticket number given by the hauler for the collection to be shown in section 1 of the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="PostHarvestTreatmentOption" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>The post harvest treatment option to be indicated in section 4 of the passport document</xsd:documentation>
          </xsd:annotation>
          <xsd:simpleType>
            <xsd:restriction base="xsd:string">
              <xsd:enumeration value="">
                <xsd:annotation>
                  <xsd:documentation>None Indicated</xsd:documentation>
                </xsd:annotation>
              </xsd:enumeration>
              <xsd:enumeration value="A">
                <xsd:annotation>
                  <xsd:documentation>Option A</xsd:documentation>
                </xsd:annotation>
              </xsd:enumeration>
              <xsd:enumeration value="B">
                <xsd:annotation>
                  <xsd:documentation>Option B</xsd:documentation>
                </xsd:annotation>
              </xsd:enumeration>
              <xsd:enumeration value="C">
                <xsd:annotation>
                  <xsd:documentation>Option C</xsd:documentation>
                </xsd:annotation>
              </xsd:enumeration>
            </xsd:restriction>
          </xsd:simpleType>
        </xsd:element>
        <xsd:element name="PostHarvestTreatmentDate" minOccurs="0" type="xsd:dateTime">
          <xsd:annotation>
            <xsd:documentation>The date of post-harvest treatment to be shown in section 4 of the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="PostHarvestTreatmentProduct" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The product used for post-harvest treatment to be shown in section 4 of the passport document
</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="DONRiskAssessmentResult" minOccurs="0" type="xsd:double">
          <xsd:annotation>
            <xsd:documentation>The risk assessment score to be shown in section 5 of the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="DONTestDate" minOccurs="0" type="xsd:dateTime">
          <xsd:annotation>
            <xsd:documentation>The date of test to be shown in section 5 of the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="DONTestResult" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The result to be shown in section 5 of the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="ZONTestDate" minOccurs="0" type="xsd:dateTime">
          <xsd:annotation>
            <xsd:documentation>The date of test to be shown in section 5 of the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="ZONTestResult" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The result to be shown in section 5 of the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>
Example Request
POST https://api.redtractor.org.uk/v1/passports.eb HTTP/1.1
Accept: text/xml
Content-Type: text/xml; charset=utf-8

			<?xml version="1.0" encoding="utf-8"?>
<CreatePassportRequest>
  <MembershipGUID>xsd:string</MembershipGUID>
  <SiteGUID>xsd:string</SiteGUID>
  <StoreGUID>xsd:string</StoreGUID>
  <CropType>xsd:string</CropType>
  <Variety>xsd:string</Variety>
  <StoreOrBinName>xsd:string</StoreOrBinName>
  <LoadingDate>xsd:dateTime</LoadingDate>
  <HarvestYear>xsd:string</HarvestYear>
  <HaulierCompanyName>xsd:string</HaulierCompanyName>
  <VehicleRegistration>xsd:string</VehicleRegistration>
  <TrailerNumber>xsd:string</TrailerNumber>
  <HaulierCollectionTicketNo>xsd:string</HaulierCollectionTicketNo>
  <PostHarvestTreatmentOption>xsd:string</PostHarvestTreatmentOption>
  <PostHarvestTreatmentDate>xsd:dateTime</PostHarvestTreatmentDate>
  <PostHarvestTreatmentProduct>xsd:string</PostHarvestTreatmentProduct>
  <DONRiskAssessmentResult>xsd:double</DONRiskAssessmentResult>
  <DONTestDate>xsd:dateTime</DONTestDate>
  <DONTestResult>xsd:string</DONTestResult>
  <ZONTestDate>xsd:dateTime</ZONTestDate>
  <ZONTestResult>xsd:string</ZONTestResult>
</CreatePassportRequest>
Response Schema
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:element name="CropPassport">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="ShortCode" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The unique reference number assigned to the passport </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="MembershipGUID" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The unique identifier for the crops membership the passport belongs to</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="SiteGUID" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The unique identifier of the assured site used for the collection address </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="StoreGUID" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The unique identifier of the assured grain store to be used for the collection point</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="BusinessName" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The business name shown on the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="CollectionAddress" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The collection address shown on the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="CropType" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The crop type shown on the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="Variety" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The crop variety shown on the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="StoreOrBinName" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The store or bin name shown on the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="LoadingDate" minOccurs="0" type="xsd:dateTime">
          <xsd:annotation>
            <xsd:documentation>The loading date shown on the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="HarvestYear" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The harvest year shown on the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="HaulierCompanyName" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The company name of the haulier shown on the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="VehicleRegistration" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The vehicle registration number of the haulier as shown on the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="TrailerNumber" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The trailer number shown on the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="HaulierCollectionTicketNo" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The number of the trailer used to transport the load as shown on the passport document </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="CertifierName" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The name of the certification body shown for the assurance claim included on the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="MembershipNumber" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The Red Tractor membership number for the assurance claim included on the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="CheckDate" type="xsd:dateTime">
          <xsd:annotation>
            <xsd:documentation>The date the assurance claim included on the passport document was validated</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="Status" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The validated status of the assurance claim included on the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="ExpiryDate" type="xsd:dateTime">
          <xsd:annotation>
            <xsd:documentation>The certificate expiry date for the assurance claim included on the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="Enterprises" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Comma-delimited list of the certified enterprises shown for the assurance claim included on the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="PostHarvestTreatmentOption" minOccurs="0">
          <xsd:annotation>
            <xsd:documentation>The post harvest treatment option indicated in section 4 of the passport document</xsd:documentation>
          </xsd:annotation>
          <xsd:simpleType>
            <xsd:restriction base="xsd:string">
              <xsd:enumeration value="">
                <xsd:annotation>
                  <xsd:documentation>None Indicated</xsd:documentation>
                </xsd:annotation>
              </xsd:enumeration>
              <xsd:enumeration value="A">
                <xsd:annotation>
                  <xsd:documentation>Option A</xsd:documentation>
                </xsd:annotation>
              </xsd:enumeration>
              <xsd:enumeration value="B">
                <xsd:annotation>
                  <xsd:documentation>Option B</xsd:documentation>
                </xsd:annotation>
              </xsd:enumeration>
              <xsd:enumeration value="C">
                <xsd:annotation>
                  <xsd:documentation>Option C</xsd:documentation>
                </xsd:annotation>
              </xsd:enumeration>
            </xsd:restriction>
          </xsd:simpleType>
        </xsd:element>
        <xsd:element name="PostHarvestTreatmentDate" minOccurs="0" type="xsd:dateTime">
          <xsd:annotation>
            <xsd:documentation>The date of post-harvest treatment shown in section 4 of the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="PostHarvestTreatmentProduct" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The product used for post-harvest treatment shown in section 4 of the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="DONRiskAssessmentResult" minOccurs="0" type="xsd:double">
          <xsd:annotation>
            <xsd:documentation>The risk assessment score to be shown in section 5 of the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="DONTestDate" minOccurs="0" type="xsd:dateTime">
          <xsd:annotation>
            <xsd:documentation>The date of test shown in section 5 of the passport document </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="DONTestResult" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The result shown in section 5 of the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="ZONTestDate" minOccurs="0" type="xsd:dateTime">
          <xsd:annotation>
            <xsd:documentation>The date of test shown in section 5 of the passport document</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="ZONTestResult" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>The result to be shown in section 5 of the passport document </xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="GrainStoreName" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Name of grain store used as collection point</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="GrainStoreLatitude" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Grain store latitude
</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="GrainStoreLongitude" minOccurs="0" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Grain store longitude</xsd:documentation>
          </xsd:annotation>
        </xsd:element>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>
Example Response
HTTP/1.1 200 OK
Content-Type: text/xml

<?xml version="1.0" encoding="utf-8"?>
<CropPassport>
  <ShortCode>xsd:string</ShortCode>
  <MembershipGUID>xsd:string</MembershipGUID>
  <SiteGUID>xsd:string</SiteGUID>
  <StoreGUID>xsd:string</StoreGUID>
  <BusinessName>xsd:string</BusinessName>
  <CollectionAddress>xsd:string</CollectionAddress>
  <CropType>xsd:string</CropType>
  <Variety>xsd:string</Variety>
  <StoreOrBinName>xsd:string</StoreOrBinName>
  <LoadingDate>xsd:dateTime</LoadingDate>
  <HarvestYear>xsd:string</HarvestYear>
  <HaulierCompanyName>xsd:string</HaulierCompanyName>
  <VehicleRegistration>xsd:string</VehicleRegistration>
  <TrailerNumber>xsd:string</TrailerNumber>
  <HaulierCollectionTicketNo>xsd:string</HaulierCollectionTicketNo>
  <CertifierName>xsd:string</CertifierName>
  <MembershipNumber>xsd:string</MembershipNumber>
  <CheckDate>xsd:dateTime</CheckDate>
  <Status>xsd:string</Status>
  <ExpiryDate>xsd:dateTime</ExpiryDate>
  <Enterprises>xsd:string</Enterprises>
  <PostHarvestTreatmentOption>xsd:string</PostHarvestTreatmentOption>
  <PostHarvestTreatmentDate>xsd:dateTime</PostHarvestTreatmentDate>
  <PostHarvestTreatmentProduct>xsd:string</PostHarvestTreatmentProduct>
  <DONRiskAssessmentResult>xsd:double</DONRiskAssessmentResult>
  <DONTestDate>xsd:dateTime</DONTestDate>
  <DONTestResult>xsd:string</DONTestResult>
  <ZONTestDate>xsd:dateTime</ZONTestDate>
  <ZONTestResult>xsd:string</ZONTestResult>
  <GrainStoreName>xsd:string</GrainStoreName>
  <GrainStoreLatitude>xsd:string</GrainStoreLatitude>
  <GrainStoreLongitude>xsd:string</GrainStoreLongitude>
</CropPassport>

JSON

Example Request
POST https://api.redtractor.org.uk/v1/passports.eb HTTP/1.1
Accept: application/json
Content-Type: application/json; charset=utf-8

			{"MembershipGUID":String,
  "SiteGUID":String,
  "StoreGUID":String,
  "CropType":String,
  "Variety":String,
  "StoreOrBinName":String,
  "LoadingDate":String,
  "HarvestYear":String,
  "HaulierCompanyName":String,
  "VehicleRegistration":String,
  "TrailerNumber":String,
  "HaulierCollectionTicketNo":String,
  "PostHarvestTreatmentOption":String,
  "PostHarvestTreatmentDate":String,
  "PostHarvestTreatmentProduct":String,
  "DONRiskAssessmentResult":Number,
  "DONTestDate":String,
  "DONTestResult":String,
  "ZONTestDate":String,
  "ZONTestResult":String}
Example Response
HTTP/1.1 200 OK
Content-Type: application/json

{"ShortCode":String,
  "MembershipGUID":String,
  "SiteGUID":String,
  "StoreGUID":String,
  "BusinessName":String,
  "CollectionAddress":String,
  "CropType":String,
  "Variety":String,
  "StoreOrBinName":String,
  "LoadingDate":String,
  "HarvestYear":String,
  "HaulierCompanyName":String,
  "VehicleRegistration":String,
  "TrailerNumber":String,
  "HaulierCollectionTicketNo":String,
  "CertifierName":String,
  "MembershipNumber":String,
  "CheckDate":String,
  "Status":String,
  "ExpiryDate":String,
  "Enterprises":String,
  "PostHarvestTreatmentOption":String,
  "PostHarvestTreatmentDate":String,
  "PostHarvestTreatmentProduct":String,
  "DONRiskAssessmentResult":Number,
  "DONTestDate":String,
  "DONTestResult":String,
  "ZONTestDate":String,
  "ZONTestResult":String,
  "GrainStoreName":String,
  "GrainStoreLatitude":String,
  "GrainStoreLongitude":String}

PDF

Example Request
POST https://api.redtractor.org.uk/v1/passports.eb HTTP/1.1
Accept: application/pdf
Content-Type: application/pdf

			
Example Response
HTTP/1.1 200 OK
Content-Type: application/pdf

...

Status Codes

Status and Error Codes
HTTP StatusError Code and Description
200
400

DataError:LoadingDate:ExpressionRule

Loading date must be today or in the future

400

DataError:MembershipGUID:RequiredRule

400

DataError:SiteGUID:RequiredRule

400

DataError:StatusNotValid

Test

The unique identifier for the crops membership the passport is being created for
The unique identifier of the assured site to be used for the collection address
The unique identifier of the assured grain store used for the collection point
The crop type to be shown in section 1 of the passport document
The crop variety to be shown in section 1 of the passport document
The store or bin name to be shown in section 1 of the passport document
The loading date to be shown in section 1 of the passport document
The harvest year to be shown in section 1 of the passport document
The company name of the haulier to be shown in section 1 of the passport document
The vehicle registration of the haulier collecting the load to be shown in section 1 of the passport document
The number of the trailer used to transport the load to be shown in section 1 of the passport document
The ticket number given by the hauler for the collection to be shown in section 1 of the passport document
The post harvest treatment option to be indicated in section 4 of the passport document
The date of post-harvest treatment to be shown in section 4 of the passport document
The product used for post-harvest treatment to be shown in section 4 of the passport document
The risk assessment score to be shown in section 5 of the passport document
The date of test to be shown in section 5 of the passport document
The result to be shown in section 5 of the passport document
The date of test to be shown in section 5 of the passport document
The result to be shown in section 5 of the passport document

To create a new passport, as a minimum you must specify the membership and site to be associated with the passport.

The site determines the collection address shown on the resulting passport. The user requesting the passport must be a registered contact for the membership. To discover all memberships and sites usable by the current user, call the authorisation API method.

You can also provide information to pre-populate section 1 of the passport documentation. All of these values are optional, but if not provided, will need to be compled by hand prior to the collection of the load.

Obtaining a completed passport PDF document

To have the passport document returned in PDF format, specify "application/pdf" as the MIME type in the HTTP Accept header you include with your request.