Lược đồ dữ liệu
Mọi đối tượng API nhận hoặc trả về, theo tên.
- AccountLinkAccept
- AccountLinkCreated
- AccountLinkInfo
- AccountLinkToken
- AddressToCode
- AdminHealth
- AdminInvitationCreate
- AdminUnitCommune
- AdminUnitCommunes
- AdminUnitProvince
- AdminUnitProvinces
- AdminUnitSource
- Agronomist
- AgronomistCreate
- AgronomistPage
- AgronomistSuspend
- AgronomistVerify
- AgronomyAdvisory
- AgronomyEt0
- AgronomyFallbackRule
- AgronomyHome
- AgronomyLocalizedText
- AgronomyPhotoperiod
- AgronomySalinity
- AgronomySheet
- AgronomySheetAttestation
- AgronomySheetBody
- AgronomySheetCreate
- AgronomySheetDocument
- AgronomySheetPage
- AgronomySheetRevoke
- AgronomySheetSign
- AgronomySheetSummary
- AgronomySheetUpdate
- AgronomyStage
- AgronomyStressWindow
- AgronomyTodayProgram
- AlarmAck
- AlarmCounts
- AlarmDetail
- AlarmEvent
- AlarmPage
- AlarmShelve
- AlarmView
- Alert
- AlertResolution
- AnchorEvidenceRecord
- AnchorInclusionProof
- AnchorSealRecord
- Announcement
- AnnouncementCreate
- AnnouncementPage
- ApiToken
- ApiTokenCreate
- ApiTokenCreated
- ApiTokenPage
- ApiTokenRevoke
- ApprovalRequest
- ApprovalRequestApproved
- ApprovalRequestCreate
- ApprovalRequestPage
- ApprovalRequestRejection
- AreaMassBalance
- AttachmentPeaks
- AttachmentStored
- AuditEntry
- AuditPage
- AuthSession
- BackupCodes
- BatchCount
- BatchItemError
- BoundaryWalk
- BoundaryWalkCreate
- BoundaryWalkPage
- BoundaryWalkResult
- BoundaryWalkSummary
- BrokerAuthzRequest
- BrokerAuthzResult
- Calibration
- CalibrationCertificate
- CalibrationCreate
- Calibrations
- CapturedEvent
- CapturedEventPage
- Carton
- CartonBatchResult
- CartonContents
- CartonContentsBatch
- CartonContentsBatchItem
- CartonContentsBatchResult
- CartonCreate
- CartonDetail
- CartonPage
- CertificateStatus
- Certification
- CertificationCreate
- CertificationPage
- CockpitDay
- Command
- CommandIssued
- CommandKey
- CommandKeys
- CommandPage
- CommandRequest
- CommuneVerdictCounts
- CompanyApiCallDay
- CompanyExport
- CompanyExportList
- CompanyLogo
- CompanyLogoStored
- CompanyOffboarding
- CompanyOffboardingStart
- CompanyOverview
- CompanyOverviewAlerts
- CompanyOverviewApiDay
- CompanyOverviewApprovals
- CompanyOverviewCertifications
- CompanyOverviewEmail
- CompanyOverviewFleet
- CompanyOverviewIntegrations
- CompanyOverviewLots
- CompanyOverviewQuarantine
- CompanyOverviewRecalls
- CompanyOverviewRequests
- CompanyOverviewShipments
- CompanyOverviewTeam
- CompanyOverviewToday
- CompanyOverviewUsage
- CompanyPersonalDataRequest
- CompanyPersonalDataRequestPage
- CompanyProducer
- CompanyProfile
- CompanyProfileUpdate
- CompanyPublicIdentity
- CompanyPublicIdentityUpdate
- CompanySecurity
- CompanySecurityUpdate
- CompanyUsage
- CompanyUsageLimit
- CompanyUsageQuotas
- CompanyUsageStored
- Consignee
- ConsigneeInput
- ConsoleHome
- ConsoleHomeDevices
- ConsoleHomeReview
- ConsoleHomeSessions
- ConsoleHomeShipments
- ConsoleHomeTask
- ConsoleHomeToday
- ConsoleHomeWork
- ControlAdvisory
- ControlAdvisorySheet
- ControlAreaToday
- ControlBudgetDay
- ControlBudgetPage
- ControlCommandToday
- ControlControllerDay
- ControlControllerToday
- ControlDay
- ControlEt0Day
- ControlEt0Page
- ControlFleetArea
- ControlFleetAreas
- ControlFleetAttention
- ControlFleetControllers
- ControlFleetState
- ControlGateDecision
- ControlHome
- ControlLink
- ControlPreview
- ControlProbeHealth
- ControlProgram
- ControlProgramPage
- ControlProgramReject
- ControlProgramStep
- ControlProgramSummary
- ControlProgramToday
- ControlRule
- ControlRuleApproval
- ControlRuleCreate
- ControlRulePage
- ControlRuleUpdate
- ControlSensorHealth
- ControlStepToday
- ControlZone
- ControlZoneBand
- ControlZoneCreate
- ControlZoneHistory
- ControlZoneHistoryDay
- ControlZonePage
- ControlZoneRun
- ControlZoneToday
- ControlZoneUpdate
- Crop
- CropCreate
- CropDetail
- CropGradingRule
- CropGradingRulePut
- CropList
- CropMarketRule
- CropMarketRulePut
- CropNames
- CropSampling
- CropUpdate
- Device
- DeviceApproval
- DeviceApprovalItem
- DeviceApprovalPage
- DeviceCreate
- DeviceMetadata
- DevicePage
- DevicePlacement
- DevicePlacementCreate
- DevicePlacementRemoval
- DevicePlacements
- DeviceRejection
- DeviceUpdate
- DidDocument
- EatingWindow
- EatingWindowRow
- EmailSettings
- EmailSettingsUpdate
- EmailUnsubscribe
- EmailUnsubscribed
- Envelope
- EnvelopeDetail
- EnvelopePage
- EnvelopeSummary
- EpcisCaptureReport
- EpcisCaptureResult
- EpcisDocument
- Error
- ExportLabel
- ExportLabelCarton
- ExportLabelCodeField
- ExportLabelFieldTemplate
- ExportLabelPrint
- ExportLabelPrintCreate
- ExportLabelTemplate
- ExportLabelTemplateList
- ExportLabelTemplateView
- ExportLabelText
- Facility
- FacilityCertification
- FacilityCertificationCreate
- FacilityCertificationEnd
- FacilityCertificationList
- FacilityCreate
- FacilityGln
- FacilityPage
- FacilityProposal
- FacilityProposalApproval
- FacilityProposalCreate
- FacilityProposalPage
- FacilityProposalRejected
- FacilityProposalRejection
- FacilityUpdate
- FourEyesState
- FourEyesUpdate
- Fruit
- FruitActionCommand
- FruitActionRequest
- FruitActionResult
- FruitAllocate
- FruitAllocated
- FruitBatchItem
- FruitBatchResult
- FruitLabel
- FruitPage
- FsmaRow
- Gateway
- GatewayCreate
- GatewayHeartbeat
- GatewayHeartbeatStatus
- GatewayLink
- GatewayPage
- GatewayPeripheral
- GatewayStatusBucket
- GatewayStatusSample
- GatewayStatusSeries
- GatewayStatusStat
- GeofenceVerdict
- GeoJsonPolygon
- GlnChange
- GradingRule
- GradingRuleHistory
- GradingRulePage
- GradingRules
- GradingRuleVersion
- Grower
- GrowerBatch
- GrowerBatchResult
- GrowerConsent
- GrowerConsentCreate
- GrowerConsentPage
- GrowerCreate
- GrowerDataRequest
- GrowerDataRequestCreate
- GrowerDataRequestHandle
- GrowerDataRequestPage
- GrowerPage
- GrowerUpdate
- GrowingArea
- GrowingAreaCreate
- GrowingAreaGln
- GrowingAreaPage
- GrowingAreaUpdate
- GrowingAreaVolume
- HarvestBatch
- HarvestBatchItem
- HarvestBatchResult
- HarvestDeclaration
- HarvestDeclarationCreate
- HarvestDeclarationPage
- HarvestKey
- HarvestKeyPage
- HarvestKeyRegister
- Health
- Help
- IdentityProvider
- IdentityProviderState
- IdentityProviderUpdate
- IngestResult
- IntegrityAnchor
- IntegrityAnchorPage
- IntegrityAnchorTimestamp
- Invitation
- InvitationCreate
- InvitationList
- InvitationRevoked
- IssuerKey
- IssuerKeyList
- IssuerKeyRevoke
- JudgedPosition
- Key
- KeyCreate
- KeyPage
- KeyRevoke
- Lab
- LabApproval
- LabApprovalCreate
- LabApprovalList
- LabApprovalUpdate
- LabAssignment
- LabAssignmentDetail
- LabAssignmentPage
- LabCompany
- LabCompanyList
- LabCreate
- LabHome
- LabHomePdfMissing
- LabHomeSent
- LabHomeWaiting
- LabInvitationCreate
- LabKey
- LabKeyCreate
- LabKeyPage
- LabLogins
- LabOriginResult
- LabOriginResultSubmission
- LabPage
- LabPortalEntry
- LabPortalKeyCreate
- LabReport
- LabReportResult
- LabReportResultSubmission
- LabReportSubmission
- LabResultAnalyte
- LabUpdate
- LandCertificate
- LandCertificateCheck
- LandCertificateCheckResult
- LandCertificateCreate
- LandCertificatePage
- LandCertificateSummary
- LandCertificateWalkComparison
- LiveAnnouncement
- LocationCheck
- LoggerCheck
- LoggerSeries
- LoginRequest
- Lot
- LotApplication
- LotApplications
- LotCartonBalance
- LotCloseCheck
- LotCloseRequest
- LotCodeSuggestion
- LotCreate
- LotGs1Carton
- LotGs1Labels
- LotGs1Pallet
- LotMergeInput
- LotMergeRequest
- LotPacking
- LotPage
- LotRecall
- LotRecallRequest
- LotSampling
- LotSamplingRead
- LotSeal
- LotSummary
- LotTrace
- LotTransformation
- LotTransformations
- LotTrust
- LotUpdate
- MapPoint
- MarketLimit
- MarketLimitCreate
- MarketLimitPage
- Me
- MeasurementSession
- MeasurementSessionList
- MeasurementSessionOpen
- MeasurementSessionOpened
- Member
- MemberList
- MemberSessionsRevoke
- MemberSessionsRevoked
- Membership
- MemberUnlockResult
- MemberUpdate
- NationalPortalFiling
- Notification
- NotificationKind
- NotificationPage
- NotificationParams
- NotificationsMarkedRead
- NotificationUnreadCount
- OAuthClient
- OAuthClientAllowedIps
- OAuthClientCreate
- OAuthClientCreated
- OAuthClientDetail
- OAuthClientDetailPage
- OAuthClientPage
- OAuthClientRenew
- OAuthClientRevoke
- OAuthError
- OAuthRevokeRequest
- OAuthToken
- OAuthTokenRequest
- OidcCallback
- OidcStart
- OidcStarted
- Onboarding
- OnboardingStep
- OnboardingUpdate
- OutboundBacklog
- OutboundTarget
- OverviewSectionUnavailable
- Pallet
- PalletCarton
- PalletCartons
- PalletCreate
- PalletPage
- PalletSummary
- Passkey
- PasskeyCreationOptions
- PasskeyList
- PasskeyLogin
- PasskeyRegistration
- PasskeyRename
- PasskeyRequestOptions
- PasswordChanged
- PasswordChangeRequest
- PasswordRecovered
- PasswordRecoveryRequest
- PersonalData
- PersonalDataRequest
- PersonalDataRequestCreate
- PersonalDataRequestPage
- PlatformOverview
- PlatformOverviewCompanies
- PlatformOverviewCompany
- PlatformOverviewHealth
- PlatformOverviewIngest
- PlatformOverviewIrrigation
- PlatformOverviewQueues
- PlatformOverviewSecurity
- PlatformOverviewTraffic
- PlatformOverviewWaiting
- PlatformSupportRequest
- PlatformSupportRequestPage
- PolygonHistory
- PolygonProposal
- PolygonProposalApproval
- PolygonProposalPage
- PolygonProposalQueueItem
- PolygonProposalRejected
- PolygonProposalRejection
- PolygonVersion
- PositionCommune
- ProductGtin
- ProductGtinCreate
- ProductGtinList
- ProgramHoldRelease
- ProgramWithdrawal
- ProgramWithdrawalRequest
- PublicAnalyte
- PublicCode
- PublicCommuneMap
- PublicConformityCredential
- PublicCorrections
- PublicCredential
- PublicCurrentStatus
- PublicCustomsDossier
- PublicDeviceApproval
- PublicDownloads
- PublicEpcisDocument
- PublicEvidenceSource
- PublicFruit
- PublicFruitJourneyStep
- PublicIsoDate
- PublicIsoDateTime
- PublicIssuer
- PublicJwk
- PublicLabLimit
- PublicLabMarketApproval
- PublicLabResult
- PublicLinkset
- PublicLinkTarget
- PublicLot
- PublicLotDownloads
- PublicLotFruit
- PublicLotFruitPage
- PublicLotJourneyStep
- PublicMarket
- PublicPeak
- PublicPeriod
- PublicResolution
- PublicSameOriginPath
- PublicSatelliteCheck
- PublicStatus
- PublicText
- PublicTrustTier
- QuarantinedEnvelope
- ReauthRequest
- RecallExport
- RecallList
- RecallReason
- RecordsExport
- RecordsExportRange
- RecordsExportRow
- RecoveryLinkCreate
- RegistryList
- RegistryListDetail
- RegistryListEntry
- RegistryListEntryPage
- RegistryListImport
- RegistryListPage
- RegistryListRetire
- RegistryMatch
- RegistryMatchPage
- RegistrySourceStored
- Rejection
- RejectionPage
- Report
- ReportCategory
- ReportChallenge
- ReportDetail
- ReportPage
- ReportReceipt
- ReportResolution
- ReportSubmission
- ResidueCertificate
- ResidueCertificateAnalyte
- ReviewRequest
- ReviewResult
- SampleAnalyte
- SampleItem
- SandboxAccount
- SandboxAccountCreate
- SatelliteCheck
- SatelliteCheckCreate
- SatelliteCheckPage
- SealRequest
- SecondFactorChallenge
- SecondFactorLogin
- SecondFactorSession
- SensorSeries
- SensorSeriesBucket
- SensorSeriesDepth
- SeqGap
- SeqGapPage
- ServerEpoch
- SessionCommand
- SessionFeed
- SessionFeedItem
- SessionsRevoked
- Shipment
- ShipmentAmendment
- ShipmentConsigneeSet
- ShipmentCreate
- ShipmentDepart
- ShipmentDocument
- ShipmentDocumentInput
- ShipmentDocumentsSet
- ShipmentLot
- ShipmentLotLink
- ShipmentPaperwork
- ShipmentSscc
- SignedInSession
- SignedInSessionList
- SignedInSessionRevoked
- SprayRecord
- SprayRecordCreate
- SprayRecordPage
- SsccChange
- StationActionRecord
- StationActionResult
- StationClaim
- StationClaimRequest
- StationDelegation
- StationDelegationList
- StationLabel
- StationSignature
- StationSignIn
- StationSignInRequest
- StationSync
- StationSyncRequest
- StoredEnvelope
- SupportRequest
- SupportRequestCreate
- SupportRequestPage
- SupportRequestUpdate
- SupportRequestUser
- Tenant
- TenantAdmin
- TenantAdminList
- TenantCreate
- TenantPage
- TrustReason
- TrustTier
- TwoFactorCode
- TwoFactorDisable
- TwoFactorReset
- TwoFactorResetResult
- TwoFactorSetup
- TwoFactorState
- UiTelemetryBeacon
- User
- VerdictCounts
- VerdictMap
- VerdictMapDevice
- VerdictMapPlacement
- Volume
- WebhookDelivery
- WebhookDeliveryPage
- WebhookEventLabResultRecorded
- WebhookEventLotRecalled
- WebhookEventLotSealed
- WebhookEventLotTrustTierChanged
- WebhookEventLotWithdrawn
- WebhookEventReportFiled
- WebhookEventShipmentDeparted
- WebhookEventType
- WebhookLabResultRecordedData
- WebhookLotRecalledData
- WebhookLotSealedData
- WebhookReportFiledData
- WebhookSecret
- WebhookShipmentDepartedData
- WebhookSubscription
- WebhookSubscriptionCreate
- WebhookSubscriptionList
- WebhookSubscriptionUpdate
- WebhookTrustTierChangedData
AccountLinkAccept
object
| Tên | Kiểu | Mô tả |
|---|---|---|
tokenbắt buộc | string | |
passwordbắt buộc | string | A new account's or a reset's new password (12 to 1,024 characters); for an email that already has an account, that account's password. |
display_namekhông bắt buộc | string | null | A new account's name; ignored for an existing account. |
AccountLinkCreated
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
linkbắt buộc | string | The link, shown this once: the token is in the URL fragment ( |
expires_atbắt buộc | number | Unix seconds: 72 hours after creation for an invitation, 24 hours for a recovery link. |
emailedbắt buộc | boolean | #270. Whether CropPath queued this link's email to its person. False when this server sends no email, or when it cannot email this address (one SMTP cannot carry): the link must then be passed on by hand. |
AccountLinkInfo
object
| Tên | Kiểu | Mô tả |
|---|---|---|
purposebắt buộc | "invite" | "reset" | "admin_recovery" | |
companybắt buộc | string | The company's name. |
rolebắt buộc | "tenant_admin" | "operator" | "auditor" | "lab" | "agronomist" | |
emailbắt buộc | string | The account's email; it cannot be changed on the page. |
expires_atbắt buộc | number | Unix seconds. |
account_existsbắt buộc | boolean | Whether the email already has a CropPath account: the invitee then signs in with that account's password instead of choosing one. |
AccountLinkToken
object
| Tên | Kiểu | Mô tả |
|---|---|---|
tokenbắt buộc | string | The token from the link's fragment. |
AddressToCode
object
A record whose address is not coded by official administrative unit codes yet (#273, D5): the lot's packing house (facility), its growing area (growing_area) or the company profile (company_profile, in Viet Nam; code null, a company has one).
| Tên | Kiểu | Mô tả |
|---|---|---|
kindbắt buộc | "facility" | "growing_area" | "company_profile" | |
codebắt buộc | string | null | The facility or growing-area code; null for the company profile. |
AdminHealth
Health & object
What /healthz reports (Health) plus the database, the external timestamp authority and the issuer key store, for the admin health page. Each certificate's not_after is written in UTC with Z (e.g. 2030-01-02T03:04:05Z).
AdminInvitationCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
emailbắt buộc | string | The first admin's email: their sign-in name, not checked by any email. |
display_namekhông bắt buộc | string | null | Proposed as the new account's name; the invitee may change it. |
reasonkhông bắt buộc | string | null | Why (one line). Required when the company already has an admin (admin recovery); written to the company's activity log. |
AdminUnitCommune
object
A commune-level unit: a commune (xã), a ward (phường) or a special zone (đặc khu).
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | Its 5-digit official code. |
namebắt buộc | string | Its official name, with its unit word ("Xã", "Phường", "Đặc khu"), in Vietnamese. |
kindbắt buộc | "xã" | "phường" | "đặc khu" |
AdminUnitCommunes
object
One province of a catalog version and its communes, by code.
| Tên | Kiểu | Mô tả |
|---|---|---|
versionbắt buộc | string | The catalog version: |
valid_frombắt buộc | string (date) | The day from which this version is the one for new input: the effective date of the newest resolution it reflects. |
sourcebắt buộc | AdminUnitSource | |
provincebắt buộc | AdminUnitProvince | |
communesbắt buộc | array<AdminUnitCommune> |
AdminUnitProvince
object
A province-level unit: a province (tỉnh) or a centrally governed city (thành phố trung ương).
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | Its 2-digit official code. |
namebắt buộc | string | Its official name, with its unit word ("Tỉnh", "Thành phố"), in Vietnamese. |
kindbắt buộc | "tỉnh" | "thành phố trung ương" |
AdminUnitProvinces
object
The provinces of one catalog version, by code.
| Tên | Kiểu | Mô tả |
|---|---|---|
versionbắt buộc | string | The catalog version: |
valid_frombắt buộc | string (date) | The day from which this version is the one for new input: the effective date of the newest resolution it reflects. |
sourcebắt buộc | AdminUnitSource | |
provincesbắt buộc | array<AdminUnitProvince> |
AdminUnitSource
object
Who publishes the official list, credited with it.
| Tên | Kiểu | Mô tả |
|---|---|---|
publisherbắt buộc | string | |
urlbắt buộc | string (uri) |
Agronomist
object
#351: a row of the platform's agronomist registry (control/agronomists.py). Personal data: a platform admin reads every row, the person their own; never on a public read.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
user_idbắt buộc | integer | The account. |
emailbắt buộc | string | |
legal_namebắt buộc | string | The name a signature names (snapshotted into each attestation). |
organisationbắt buộc | string | |
qualificationbắt buộc | string | null | |
contactbắt buộc | string | null | |
notebắt buộc | string | null | |
statusbắt buộc | "pending" | "verified" | "suspended" |
|
created_atbắt buộc | number | |
updated_atbắt buộc | number | |
verified_bybắt buộc | string | null | |
verified_atbắt buộc | number | null | |
suspended_bybắt buộc | string | null | |
suspended_atbắt buộc | number | null | |
suspend_reasonbắt buộc | string | null |
AgronomistCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
emailbắt buộc | string | The account's email (the account must exist). |
legal_namebắt buộc | string | |
organisationbắt buộc | string | |
qualificationkhông bắt buộc | string | null | |
contactkhông bắt buộc | string | null | |
notekhông bắt buộc | string | null |
AgronomistPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<Agronomist> | |
next_beforebắt buộc | integer | null | Pass as |
AgronomistSuspend
object
| Tên | Kiểu | Mô tả |
|---|---|---|
reasonbắt buộc | string |
AgronomistVerify
object
| Tên | Kiểu | Mô tả |
|---|---|---|
notekhông bắt buộc | string | null |
AgronomyAdvisory
object
#351: advice in words only: no digit (amounts and formulas come from a lab test).
| Tên | Kiểu | Mô tả |
|---|---|---|
textkhông bắt buộc | AgronomyLocalizedText | |
attachment_sha256không bắt buộc | string | |
requires_lab_testkhông bắt buộc | true |
AgronomyEt0
object
| Tên | Kiểu | Mô tả |
|---|---|---|
krskhông bắt buộc | number | FAO-56 eq. 50 adjustment coefficient. Sanity bounds only: the value is the agronomist's, never a CropPath default. |
effective_rain_fractionkhông bắt buộc | number | Share of the rain counted as effective. Sanity bounds only: the value is the agronomist's, never a CropPath default. |
AgronomyFallbackRule
object
| Tên | Kiểu | Mô tả |
|---|---|---|
rule_idbắt buộc | integer | |
rule_namebắt buộc | string | |
device_idbắt buộc | string | |
zonesbắt buộc | array<integer> | |
reasonbắt buộc | string | null |
AgronomyHome
object
#351: the agronomist's home in the selected company.
| Tên | Kiểu | Mô tả |
|---|---|---|
generated_atbắt buộc | number | |
nowbắt buộc | object | The drafts waiting for a signature, oldest first (at most 20). |
todaybắt buộc | object | #352: today's control work resting on sheets the caller signed: the programs composed for today that cite one (newest first, at most 20) and the rules bound to one whose zones are on their fallback schedule. |
statusbắt buộc | object |
AgronomyLocalizedText
object
#351: a text in each language of the console (all three are needed to sign).
| Tên | Kiểu | Mô tả |
|---|---|---|
vikhông bắt buộc | string | |
enkhông bắt buộc | string | |
zh-Hanskhông bắt buộc | string |
AgronomyPhotoperiod
object
| Tên | Kiểu | Mô tả |
|---|---|---|
startkhông bắt buộc | string (date) | |
endkhông bắt buộc | string (date) | |
night_start_localkhông bắt buộc | string | |
duration_hkhông bắt buộc | number | Lamp hours a night. Sanity bounds only: the value is the agronomist's, never a CropPath default. |
min_confirmed_hkhông bắt buộc | number | Confirmed hours needed, at most the duration. Sanity bounds only: the value is the agronomist's, never a CropPath default. |
AgronomySalinity
object
#351: electrical conductivity in mS/cm only. A member named g_per_l (anywhere in the body) is refused: g/L is never used or converted.
| Tên | Kiểu | Mô tả |
|---|---|---|
water_ec_limit_ms_cmkhông bắt buộc | number | Irrigation water EC limit, mS/cm. Sanity bounds only: the value is the agronomist's, never a CropPath default. |
soil_ec_limit_ms_cmkhông bắt buộc | number | Soil EC limit, mS/cm. Sanity bounds only: the value is the agronomist's, never a CropPath default. |
soil_ec_basiskhông bắt buộc | "bulk" | "pore" | |
actionkhông bắt buộc | "block" | "alert" |
AgronomySheet
object
#351: an agronomic input sheet of the company (control/sheets.py).
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
series_keybắt buộc | string |
|
cropbắt buộc | string | A code of the crop registry. |
varietybắt buộc | string | |
province_codebắt buộc | string | |
versionbắt buộc | integer | |
statusbắt buộc | "draft" | "signed" | "superseded" | "revoked" | |
valid_frombắt buộc | string (date) | null (date) | |
valid_tobắt buộc | string (date) | null (date) | |
body_sha256bắt buộc | string | The SHA-256 of the sheet's JCS document (GET .../document): what a signature covers. |
created_bybắt buộc | string | |
created_atbắt buộc | number | |
updated_bybắt buộc | string | null | |
updated_atbắt buộc | number | |
copied_from_idbắt buộc | integer | null | |
supersedes_idbắt buộc | integer | null | |
superseded_by_idbắt buộc | integer | null | |
signed_atbắt buộc | number | null | |
superseded_atbắt buộc | number | null | |
revoked_atbắt buộc | number | null | |
revoked_bybắt buộc | string | null | |
revoke_reasonbắt buộc | string | null | |
bodybắt buộc | AgronomySheetBody | |
attestationbắt buộc | AgronomySheetAttestation | null |
AgronomySheetAttestation
object
#351: a signature (append-only): who signed (snapshots of the registry row), the statement agreed to and the hash signed. An in-app attestation recorded by CropPath, not a detached digital signature (ADR 0014).
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
agronomist_idbắt buộc | integer | |
user_idbắt buộc | integer | |
legal_namebắt buộc | string | |
organisationbắt buộc | string | |
statement_versionbắt buộc | string | |
statement_text_sha256bắt buộc | string | |
body_sha256bắt buộc | string | |
signed_atbắt buộc | number | |
second_factor_atbắt buộc | number | When the session last proved a second factor. |
AgronomySheetBody
object
#351: the agritrace.agronomy-sheet/1 body (control/sheets.py). Every value is optional in a draft and none has a default: CropPath ships no agronomic number.
| Tên | Kiểu | Mô tả |
|---|---|---|
stageskhông bắt buộc | array<AgronomyStage> | |
stress_windowskhông bắt buộc | array<AgronomyStressWindow> | |
salinitykhông bắt buộc | AgronomySalinity | |
et0không bắt buộc | AgronomyEt0 | |
lightingkhông bắt buộc | object | |
advisorykhông bắt buộc | object | |
referenceskhông bắt buộc | array<object> |
AgronomySheetCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
cropbắt buộc | string | |
varietykhông bắt buộc | string |
|
province_codekhông bắt buộc | string |
|
valid_fromkhông bắt buộc | string (date) | null (date) | |
valid_tokhông bắt buộc | string (date) | null (date) | |
bodykhông bắt buộc | AgronomySheetBody |
AgronomySheetDocument
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
specbắt buộc | "agritrace.agronomy-sheet/1" | |
documentbắt buộc | string | The RFC 8785 (JCS) text of {spec, tenant, series_key, version, valid_from, valid_to, body}: hash its UTF-8 bytes to check |
sha256bắt buộc | string | |
statementbắt buộc | object |
AgronomySheetPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<AgronomySheetSummary> | |
next_beforebắt buộc | integer | null |
AgronomySheetRevoke
object
| Tên | Kiểu | Mô tả |
|---|---|---|
reasonbắt buộc | string |
AgronomySheetSign
object
| Tên | Kiểu | Mô tả |
|---|---|---|
body_sha256bắt buộc | string | |
statement_versionbắt buộc | string |
AgronomySheetSummary
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
series_keybắt buộc | string |
|
cropbắt buộc | string | A code of the crop registry. |
varietybắt buộc | string | |
province_codebắt buộc | string | |
versionbắt buộc | integer | |
statusbắt buộc | "draft" | "signed" | "superseded" | "revoked" | |
valid_frombắt buộc | string (date) | null (date) | |
valid_tobắt buộc | string (date) | null (date) | |
body_sha256bắt buộc | string | The SHA-256 of the sheet's JCS document (GET .../document): what a signature covers. |
created_atbắt buộc | number | |
updated_atbắt buộc | number | |
signed_atbắt buộc | number | null | |
superseded_atbắt buộc | number | null | |
revoked_atbắt buộc | number | null | |
signed_bybắt buộc | string | null | The signer's legal name. |
AgronomySheetUpdate
object
Each member given replaces the draft's; one left out stays.
| Tên | Kiểu | Mô tả |
|---|---|---|
valid_fromkhông bắt buộc | string (date) | null (date) | |
valid_tokhông bắt buộc | string (date) | null (date) | |
bodykhông bắt buộc | AgronomySheetBody |
AgronomyStage
object
#351: a crop stage. Every member is optional in a draft; signing needs code, name, start and end, and a value given in one stage given in every stage.
| Tên | Kiểu | Mô tả |
|---|---|---|
codekhông bắt buộc | string | |
namekhông bắt buộc | AgronomyLocalizedText | |
startkhông bắt buộc | string (date) | |
endkhông bắt buộc | string (date) | |
kckhông bắt buộc | number | Crop coefficient. Sanity bounds only: the value is the agronomist's, never a CropPath default. |
p_depletionkhông bắt buộc | number | FAO-56 depletion fraction p. Sanity bounds only: the value is the agronomist's, never a CropPath default. |
root_depth_mkhông bắt buộc | number | Effective root depth, metres. Sanity bounds only: the value is the agronomist's, never a CropPath default. |
schedule_mm_per_daykhông bắt buộc | number | Scheduled irrigation depth, mm per day. Sanity bounds only: the value is the agronomist's, never a CropPath default. |
moisture_lower_pctkhông bắt buộc | number | Soil moisture band, lower edge (%), below the upper. Sanity bounds only: the value is the agronomist's, never a CropPath default. |
moisture_upper_pctkhông bắt buộc | number | Soil moisture band, upper edge (%). Sanity bounds only: the value is the agronomist's, never a CropPath default. |
moisture_basiskhông bắt buộc | object | What the band is read on. |
AgronomyStressWindow
object
| Tên | Kiểu | Mô tả |
|---|---|---|
startkhông bắt buộc | string (date) | |
endkhông bắt buộc | string (date) | |
actionkhông bắt buộc | "no_irrigation" | "cap_fraction" | "max_mm_per_day" | |
fractionkhông bắt buộc | number | With |
max_mm_per_daykhông bắt buộc | number | With |
notekhông bắt buộc | string |
AgronomyTodayProgram
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
device_idbắt buộc | string | |
statusbắt buộc | "proposed" | "approved" | "rejected" | "dispatched" | "superseded" | "failed" | "blocked" | "expired" | "withdrawn" | |
proposed_atbắt buộc | number | |
sheetsbắt buộc | array<object> |
AlarmAck
object
| Tên | Kiểu | Mô tả |
|---|---|---|
notekhông bắt buộc | string | Optional: what the person did or will do. |
AlarmCounts
object
#361: how many open alarms the caller may read, over every page: urgent, warning and notice count the ones not shelved, shelved the shelved ones of every priority.
| Tên | Kiểu | Mô tả |
|---|---|---|
urgentbắt buộc | integer | |
warningbắt buộc | integer | |
noticebắt buộc | integer | |
shelvedbắt buộc | integer |
AlarmDetail
object
#361: an alarm (AlarmView) with its history: events, oldest first, at most the 100 newest (events_truncated when older ones exist).
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
kindbắt buộc | string | The catalog kind (catalog v1: command_refused_security, controller_fault, delivered_over_limit, sheet_hash_mismatch, controller_offline, program_not_installed, command_refused_site, run_no_water, step_missed, rule_blocked, salinity_block, rule_on_fallback, probe_stale_in_use, moisture_outside_band). The catalog grows under management of change (the philosophy), so a client words an unknown kind by its token. |
catalog_versionbắt buộc | integer | The catalog version the alarm was raised under. |
prioritybắt buộc | "urgent" | "warning" | "notice" | |
statebắt buộc | "active_unacked" | "active_acked" | "cleared_unacked" | "shelved" | "closed" | |
raised_atbắt buộc | string (date-time) | When the condition was first raised (after its on-delay). |
last_active_atbắt buộc | string (date-time) | When the condition was last seen true. |
cleared_atbắt buộc | string (date-time) | null (date-time) | When the condition returned to normal (after its clear-delay); null while active. A re-raise within 30 minutes of clearing (not closed) reuses the alarm and empties it again. |
closed_atbắt buộc | string (date-time) | null (date-time) | |
occurrencesbắt buộc | integer | How many times the condition was raised on this alarm (chatter control). |
ackedbắt buộc | object | null | |
shelvedbắt buộc | object | null | The current shelving, null when the alarm is not shelved (or its shelving ended). |
subjectbắt buộc | object | |
detailbắt buộc | object | Facts the platform observed (the command id and its refusal reason, the measured litres and the command's max_volume_l, the controller's faults, when its gateway was last heard), at most 2 KB, never coordinates. |
response_anchorbắt buộc | string | The anchor of the alarm's documented response in the alarm philosophy (the kind). |
underbắt buộc | integer | null | Suppression by design, computed when read: the id of the open |
eventsbắt buộc | array<AlarmEvent> | |
events_truncatedbắt buộc | boolean |
AlarmEvent
object
#361: one change of an alarm's state (alarm_events, append-only).
| Tên | Kiểu | Mô tả |
|---|---|---|
atbắt buộc | string (date-time) | |
eventbắt buộc | "raised" | "reraised" | "cleared" | "acked" | "shelved" | "unshelved" | "shelve_expired" | "closed" | |
actorbắt buộc | string | null | The person (display name, or sign-in when they have none), or |
reasonbắt buộc | string | null | A code only: for |
AlarmPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<AlarmView> | |
next_cursorbắt buộc | string | null | The next page's |
countsbắt buộc | AlarmCounts | null | With |
AlarmShelve
object
| Tên | Kiểu | Mô tả |
|---|---|---|
untilbắt buộc | string (date-time) | When the shelving ends: in the future, and at most 12 hours ahead for an urgent alarm, 72 hours for a warning or a notice. |
reasonbắt buộc | "maintenance" | "technician_called" | "known_issue" | "equipment_off" | "other" | |
notekhông bắt buộc | string | Free text; required when |
AlarmView
object
#361 (ADR 0015, the alarm philosophy): one alarm of the company, a condition with a lifecycle (control/cockpit/alarms). Its state is derived from the stored times: closed once closed (cleared and acknowledged, or a notice cleared), else shelved while shelved.until is ahead, else active_unacked, active_acked or cleared_unacked. Times are RFC 3339 UTC.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
kindbắt buộc | string | The catalog kind (catalog v1: command_refused_security, controller_fault, delivered_over_limit, sheet_hash_mismatch, controller_offline, program_not_installed, command_refused_site, run_no_water, step_missed, rule_blocked, salinity_block, rule_on_fallback, probe_stale_in_use, moisture_outside_band). The catalog grows under management of change (the philosophy), so a client words an unknown kind by its token. |
catalog_versionbắt buộc | integer | The catalog version the alarm was raised under. |
prioritybắt buộc | "urgent" | "warning" | "notice" | |
statebắt buộc | "active_unacked" | "active_acked" | "cleared_unacked" | "shelved" | "closed" | |
raised_atbắt buộc | string (date-time) | When the condition was first raised (after its on-delay). |
last_active_atbắt buộc | string (date-time) | When the condition was last seen true. |
cleared_atbắt buộc | string (date-time) | null (date-time) | When the condition returned to normal (after its clear-delay); null while active. A re-raise within 30 minutes of clearing (not closed) reuses the alarm and empties it again. |
closed_atbắt buộc | string (date-time) | null (date-time) | |
occurrencesbắt buộc | integer | How many times the condition was raised on this alarm (chatter control). |
ackedbắt buộc | object | null | |
shelvedbắt buộc | object | null | The current shelving, null when the alarm is not shelved (or its shelving ended). |
subjectbắt buộc | object | |
detailbắt buộc | object | Facts the platform observed (the command id and its refusal reason, the measured litres and the command's max_volume_l, the controller's faults, when its gateway was last heard), at most 2 KB, never coordinates. |
response_anchorbắt buộc | string | The anchor of the alarm's documented response in the alarm philosophy (the kind). |
underbắt buộc | integer | null | Suppression by design, computed when read: the id of the open |
Alert
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
tenantbắt buộc | string | null | |
kindbắt buộc | string | |
severitybắt buộc | string | |
device_idbắt buộc | string | null | |
envelope_idbắt buộc | string | null | |
detailbắt buộc | object | Shape depends on |
created_atbắt buộc | number | Unix seconds. |
resolved_atbắt buộc | number | null | Unix seconds; null while open. |
AlertResolution
object
| Tên | Kiểu | Mô tả |
|---|---|---|
notekhông bắt buộc | string | null | Why the alert is resolved, at most 500 characters (after trimming). Kept in the audit row of the request, not on the alert. |
AnchorEvidenceRecord
object
INTEGRITY-2 (#202): an evidence envelope's record in its day's evidence tree, fields in encoding order. It names no device: the SHA-256 of the stored body commits to the device and its sequence number.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | The envelope id (the EPCIS eventID without |
received_atbắt buộc | number | Reception time, Unix seconds (encoded as binary64). |
payload_sha256bắt buộc | string | SHA-256 of the stored envelope body as UTF-8. |
AnchorInclusionProof
object
INTEGRITY-2 (#202): the inclusion proof of one record in its day's anchor. Recompute the leaf from record (the canonical encoding of /developers/downloads/integrity-anchors.md), follow path (RFC 9162 section 2.1.3.2, leaf side first) to the anchor's root of kind (seal_root or evidence_root), then the anchor from its roots; compare the anchor with the one GET /v1/public/anchors publishes for day (/developers/downloads/verify_anchors.py proof does all of it). included is false when the record as stored today is not among the anchored ones (it was changed after its day was anchored); path is then empty.
| Tên | Kiểu | Mô tả |
|---|---|---|
kindbắt buộc | "seal" | "evidence" | |
daybắt buộc | string | |
recordbắt buộc | AnchorSealRecord | AnchorEvidenceRecord | The record's fields in encoding order: an AnchorSealRecord for |
leaf_hashbắt buộc | string | |
includedbắt buộc | boolean | |
leaf_indexbắt buộc | integer | null | |
tree_sizebắt buộc | integer | |
pathbắt buộc | array<string> | |
anchorbắt buộc | IntegrityAnchor |
AnchorSealRecord
object
INTEGRITY-2 (#202): a lot seal's record in its day's seal tree, fields in encoding order.
| Tên | Kiểu | Mô tả |
|---|---|---|
manifest_sha256bắt buộc | string | The seal's manifest hash, as the public lot record shows it. |
sealed_atbắt buộc | number | Seal time, Unix seconds (encoded as binary64). |
fruit_countbắt buộc | integer | |
event_countbắt buộc | integer |
Announcement
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
textbắt buộc | string | Plain text, one line. |
levelbắt buộc | "info" | "warning" | |
starts_atbắt buộc | number | Shown from this time (seconds since 1970, UTC). |
ends_atbắt buộc | number | null | Shown until this time; null until expired. |
statebắt buộc | "live" | "scheduled" | "ended" |
|
created_atbắt buộc | number | |
created_bybắt buộc | string | |
expired_atbắt buộc | number | null | |
expired_bybắt buộc | string | null |
AnnouncementCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
textbắt buộc | string | 1 to 500 characters after trimming, one line, plain text. |
levelkhông bắt buộc | "info" | "warning" | |
starts_atkhông bắt buộc | number | null | When it starts showing (default now; a past time means now); at most a year ahead. |
ends_atkhông bắt buộc | number | null | When it stops showing: later than the start and at most a year after it; null shows it until expired. |
AnnouncementPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<Announcement> | |
next_cursorbắt buộc | string | null | The next page's |
ApiToken
object
A machine API token of the tenant as the admin console lists it: never the token itself, never its hash (only its SHA-256 is stored; the token is shown once, by POST /v1/api-tokens). Unix seconds.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
namebắt buộc | string | The operator's label (not unique). |
rolebắt buộc | "platform_admin" | "tenant_admin" | "operator" | "lab" | "auditor" | The role the token acts with (tokens made with the users CLI may hold any role). |
created_bybắt buộc | string | null | Who created it: a user's email, or |
created_atbắt buộc | number | |
last_used_atbắt buộc | number | null | The last authenticated use, to the minute; null: never. |
expires_atbắt buộc | number | null | null: never expires. |
revoked_atbắt buộc | number | null | |
revoke_reasonbắt buộc | string | null | |
revoked_bybắt buộc | string | null | |
statusbắt buộc | "active" | "expired" | "revoked" | At the server clock: revoked, else expired once |
ApiTokenCreate
object
role: operator, auditor or tenant_admin (platform_admin and lab tokens are made with the users CLI only). expires_in_days: whole days from 1 to 3650; absent or null, the token never expires.
| Tên | Kiểu | Mô tả |
|---|---|---|
namebắt buộc | string | |
rolebắt buộc | "tenant_admin" | "operator" | "auditor" | |
expires_in_dayskhông bắt buộc | integer | null |
ApiTokenCreated
object
The new token and, in secret, the token itself: this response is the only place it ever appears (Authorization: Bearer <secret>). Store it now; a lost token is revoked and replaced.
| Tên | Kiểu | Mô tả |
|---|---|---|
tokenbắt buộc | ApiToken | |
secretbắt buộc | string |
ApiTokenPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<ApiToken> | |
next_cursorbắt buộc | string | null | The next page's |
ApiTokenRevoke
object
| Tên | Kiểu | Mô tả |
|---|---|---|
reasonbắt buộc | string | Why it is revoked, one line (e.g. leaked, no longer used). |
ApprovalRequest
object
INTEGRITY-3 (#203). A critical action one admin asked for, waiting for (or decided by) another admin of the company. body is the action's JSON body (public keys, grading rules or a yes/no: never a secret). status expired: it was not decided within 72 hours and can no longer be.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
actionbắt buộc | string | The action's audit action, e.g. |
methodbắt buộc | "POST" | "PUT" | |
pathbắt buộc | string | The path the action calls. |
bodybắt buộc | object | The action's JSON body. |
statusbắt buộc | "pending" | "approved" | "rejected" | "expired" | |
requested_bybắt buộc | string | Who asked (their sign-in email). |
requested_by_user_idbắt buộc | integer | |
requested_atbắt buộc | number | Unix seconds. |
expires_atbắt buộc | number | Unix seconds: a pending request can be decided until then. |
decided_bybắt buộc | string | null | |
decided_asbắt buộc | "company_admin" | "platform_support" | null |
|
decided_atbắt buộc | number | null | |
reasonbắt buộc | string | null | A rejection's reason. |
ApprovalRequestApproved
object
| Tên | Kiểu | Mô tả |
|---|---|---|
requestbắt buộc | ApprovalRequest | |
resultbắt buộc | object | The action's own answer, as if it had been called directly. |
ApprovalRequestCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
methodbắt buộc | "POST" | "PUT" | |
pathbắt buộc | string | The critical action's path, without a query. |
bodykhông bắt buộc | object | The action's JSON body (default |
ApprovalRequestPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<ApprovalRequest> | |
next_cursorbắt buộc | string | null | The next page's |
ApprovalRequestRejection
object
| Tên | Kiểu | Mô tả |
|---|---|---|
reasonkhông bắt buộc | string |
AreaMassBalance
object
Harvested against shipped kg of a growing area in a season, across all tenants (aggregates only).
| Tên | Kiểu | Mô tả |
|---|---|---|
growing_areabắt buộc | string | |
seasonbắt buộc | string | |
harvested_kgbắt buộc | number | Accepted harvest and receive envelopes (as the volume) plus the self-declared harvest declarations of the season. |
declared_kgbắt buộc | number | Of which tenant-entered harvest declarations (source self_declared). |
shipped_kgbắt buộc | number | Packed net mass of the area's packed lots of the season. |
packed_lotsbắt buộc | integer | |
violationbắt buộc | "harvest_not_declared" | "shipped_exceeds_harvest" | null | harvest_not_declared: nothing declared; shipped_exceeds_harvest: more packed than harvested; null when the balance holds. |
AttachmentPeaks
object
Waveform peaks: n buckets of [min, max] (normalised to -1..1) over all channels.
| Tên | Kiểu | Mô tả |
|---|---|---|
sha256bắt buộc | string | |
nbắt buộc | integer | Buckets returned. |
channelsbắt buộc | integer | |
sample_ratebắt buộc | integer | |
framesbắt buộc | integer | |
duration_sbắt buộc | number | |
peaksbắt buộc | array<array<number>> |
AttachmentStored
object
An uploaded blob as stored for its owner.
| Tên | Kiểu | Mô tả |
|---|---|---|
sha256bắt buộc | string | |
media_typebắt buộc | "application/pdf" | "audio/wav" | "image/jpeg" | "image/png" | |
sizebắt buộc | integer |
AuditEntry
object
One append-only audit row. No column ever holds a password, a session, API or CSRF token, a cookie or a raw IP address.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | Increasing row id; the list is ordered by it, newest first. |
atbắt buộc | number | Unix seconds. |
actorbắt buộc | string | null | The principal's user (email, |
tenantbắt buộc | string | null | |
actionbắt buộc | string | For example |
entitybắt buộc | string |
|
entity_idbắt buộc | string | null | The record's id; for a failed login an HMAC of the normalized email, never the email. |
before_hashbắt buộc | string | null | SHA-256 hex of the canonical JSON (sorted keys, compact) of the changed fields' prior state; null when no existing record changed or the request failed. |
afterbắt buộc | object | null | Outcome: the HTTP status, plus the error code on failure or a short summary on success. A row the server's command line ( |
request_idbắt buộc | string | null | The request's X-Request-Id. |
ip_hashbắt buộc | string | null | HMAC-SHA256 of the client IP. |
actor_kindbắt buộc | "member" | "support" | "api_token" | "api_client" | "server" | "other" | Who the actor is (SELF-1-7, #188): |
actor_namebắt buộc | string | null | A member's current display name, an API token's name or the API client's name; null when there is none (support staff are named by their email in |
AuditPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<AuditEntry> | |
next_cursorbắt buộc | string | null | Pass as |
AuthSession
object
| Tên | Kiểu | Mô tả |
|---|---|---|
userbắt buộc | User | |
membershipsbắt buộc | array<Membership> | |
csrf_tokenbắt buộc | string | |
two_factorkhông bắt buộc | TwoFactorState |
BackupCodes
object
SELF-1-6 (#187). Ten single-use backup codes (80 random bits each, base32, grouped by four for reading aloud), in this response only; CropPath keeps only slow hashes of them.
| Tên | Kiểu | Mô tả |
|---|---|---|
backup_codesbắt buộc | array<string> |
BatchCount
object
| Tên | Kiểu | Mô tả |
|---|---|---|
countbắt buộc | integer | How many records to create (at most 1,000). |
BatchItemError
object
One failed item of a batch request.
| Tên | Kiểu | Mô tả |
|---|---|---|
indexbắt buộc | integer | The item's position in the request (from 0). |
statusbắt buộc | integer | The status the single-item route answers for this item. |
errorbắt buộc | string | |
codebắt buộc | string |
BoundaryWalk
object
#248: one walk with its outline and its raw track.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | The walk's id. |
growing_areabắt buộc | string | |
client_walk_idbắt buộc | string (uuid) | |
submitted_bybắt buộc | string | null | Who sent the walk. |
submitted_atbắt buộc | number | Unix seconds when the walk was received. |
started_atbắt buộc | number | Unix seconds when the walk started (the phone's clock). |
finished_atbắt buộc | number | Unix seconds when the walk finished (the phone's clock). |
accuracy_threshold_mbắt buộc | number | The accuracy threshold of the walk in metres. |
polygon_sha256bắt buộc | string | SHA-256 (hex) of the outline's canonical GeoJSON text (compact, sorted keys, UTF-8): the SHA-256 of the boundary proposal the walk made, and of the version it becomes once a platform admin approves it. |
area_habắt buộc | number | The walked area in hectares: the ring area on a sphere of the WGS 84 equatorial radius, as the admin console computes a boundary's area. |
registered_area_habắt buộc | number | null | The growing area's registered |
area_difference_ratiobắt buộc | number | null | (area_ha - registered_area_ha) / registered_area_ha: negative when the walk found less than registered; null without a registered size. |
points_totalbắt buộc | integer | Fixes in the raw track. |
points_keptbắt buộc | integer | Fixes whose accuracy is within the walk's threshold (they may back the outline). |
points_droppedbắt buộc | integer | Fixes less precise than the threshold (kept in the track, never in the outline). |
supersededbắt buộc | boolean | Whether the walk replaced a boundary proposal that was waiting. |
polygonbắt buộc | GeoJsonPolygon | |
pointsbắt buộc | array<array<number>> | The raw track: every fix taken during the walk, the imprecise ones included, at most 20000 (and the whole body at most 1 MiB). |
BoundaryWalkCreate
object
#248: a walk around a growing area: the simplified outline and the raw track it came from.
| Tên | Kiểu | Mô tả |
|---|---|---|
client_walk_idbắt buộc | string (uuid) | A UUID in lower case chosen by the phone for this walk: sending the same walk again with it is safe. |
polygonbắt buộc | GeoJsonPolygon | The outline: a Polygon of exactly one closed ring, at most 1000 positions, at least 3 different corners, not crossing itself, at least 0.01 ha, each corner one of |
accuracy_threshold_mbắt buộc | number | Fixes less precise than this (metres) were not used for the outline. |
started_atbắt buộc | number | Unix seconds when the walk started; at most 300 s ahead of the server. |
finished_atbắt buộc | number | Unix seconds when the walk finished; not before |
pointsbắt buộc | array<array<number>> | The raw track: every fix taken during the walk, the imprecise ones included, at most 20000 (and the whole body at most 1 MiB). |
BoundaryWalkPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<BoundaryWalkSummary> | Newest first. |
next_cursorbắt buộc | string | null |
BoundaryWalkResult
object
#248: what a submitted walk answers; the same walk sent again answers the same.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | The walk's id. |
polygon_sha256bắt buộc | string | SHA-256 (hex) of the outline's canonical GeoJSON text (compact, sorted keys, UTF-8): the SHA-256 of the boundary proposal the walk made, and of the version it becomes once a platform admin approves it. |
area_habắt buộc | number | The walked area in hectares: the ring area on a sphere of the WGS 84 equatorial radius, as the admin console computes a boundary's area. |
registered_area_habắt buộc | number | null | The growing area's registered |
area_difference_ratiobắt buộc | number | null | (area_ha - registered_area_ha) / registered_area_ha: negative when the walk found less than registered; null without a registered size. |
points_totalbắt buộc | integer | Fixes in the raw track. |
points_keptbắt buộc | integer | Fixes whose accuracy is within the walk's threshold (they may back the outline). |
points_droppedbắt buộc | integer | Fixes less precise than the threshold (kept in the track, never in the outline). |
supersededbắt buộc | boolean | Whether the walk replaced a boundary proposal that was waiting. |
BoundaryWalkSummary
object
#248: a walk kept as the evidence of a boundary proposal, without its track. It is the evidence of the proposal and of the boundary version with the same polygon_sha256.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | The walk's id. |
growing_areabắt buộc | string | |
client_walk_idbắt buộc | string (uuid) | |
submitted_bybắt buộc | string | null | Who sent the walk. |
submitted_atbắt buộc | number | Unix seconds when the walk was received. |
started_atbắt buộc | number | Unix seconds when the walk started (the phone's clock). |
finished_atbắt buộc | number | Unix seconds when the walk finished (the phone's clock). |
accuracy_threshold_mbắt buộc | number | The accuracy threshold of the walk in metres. |
polygon_sha256bắt buộc | string | SHA-256 (hex) of the outline's canonical GeoJSON text (compact, sorted keys, UTF-8): the SHA-256 of the boundary proposal the walk made, and of the version it becomes once a platform admin approves it. |
area_habắt buộc | number | The walked area in hectares: the ring area on a sphere of the WGS 84 equatorial radius, as the admin console computes a boundary's area. |
registered_area_habắt buộc | number | null | The growing area's registered |
area_difference_ratiobắt buộc | number | null | (area_ha - registered_area_ha) / registered_area_ha: negative when the walk found less than registered; null without a registered size. |
points_totalbắt buộc | integer | Fixes in the raw track. |
points_keptbắt buộc | integer | Fixes whose accuracy is within the walk's threshold (they may back the outline). |
points_droppedbắt buộc | integer | Fixes less precise than the threshold (kept in the track, never in the outline). |
supersededbắt buộc | boolean | Whether the walk replaced a boundary proposal that was waiting. |
BrokerAuthzRequest
object
Missing fields are treated as empty strings (and denied).
| Tên | Kiểu | Mô tả |
|---|---|---|
usernamekhông bắt buộc | string | |
actionkhông bắt buộc | string | |
topickhông bắt buộc | string |
BrokerAuthzResult
object
| Tên | Kiểu | Mô tả |
|---|---|---|
resultbắt buộc | "allow" | "deny" |
Calibration
object
SENS-B1d (#234): a calibration record of a device, never changed once recorded. Ingest links each reading of the device to the calibration in force at its time (calibration_id of the reading record): the latest not superseded, made at or before the reading, covering the reading's capability or every capability of the device; when its valid_until is before the reading, the reading is flagged suspect (QC flag 3, reason calibration_expired).
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
device_idbắt buộc | string | |
sensor_serialbắt buộc | string | null | |
capabilitybắt buộc | string | null | The capability covered; null: every capability of the device. |
calibrated_atbắt buộc | number | |
methodbắt buộc | "ph_buffers" | "ec_reference" | "lab_correlation" | "factory" | "other" | |
reference_valuesbắt buộc | object | array<any> | null | |
coefficientsbắt buộc | object | array<any> | null | |
performerbắt buộc | string | |
accreditationbắt buộc | "iso17025_lab" | "in_house" | "manufacturer" | |
certificate_sha256bắt buộc | string | null | SHA-256 of the certificate, readable with GET /v1/attachments/{sha256}. |
valid_untilbắt buộc | number | |
supersedesbắt buộc | integer | null | The calibration this one corrects. |
created_atbắt buộc | number | |
created_bykhông bắt buộc | string | Who recorded it; present for platform admins only. |
superseded_bybắt buộc | integer | null | The calibration that corrects this one; null while it is not corrected. |
CalibrationCertificate
object
SENS-B1d (#234): a calibration certificate sent with the calibration. Its bytes must hash to the calibration's certificate_sha256; it is then kept as an upload of the company, as one sent with PUT /v1/attachments/{sha256} would be.
| Tên | Kiểu | Mô tả |
|---|---|---|
media_typebắt buộc | "application/pdf" | "image/jpeg" | "image/png" | |
content_base64bắt buộc | string | The certificate's bytes, standard base64 (RFC 4648 §4, with padding), at most 1 MiB decoded (and within the 1 MiB request body). |
CalibrationCreate
object
SENS-B1d (#234): a calibration of a device of the company (GLOBALG.A.P. IFA v6 FV-GFS 13.01: measuring equipment calibrated at least yearly, traceably). Times are Unix seconds: calibrated_at from 2020-01-01 and at most 300 s ahead of the server clock, valid_until after it and at most about five years (5 × 366 days) later. The certificate is either uploaded first with PUT /v1/attachments/{sha256} for the same company (a PDF, JPEG or PNG) and named by certificate_sha256, or sent in certificate with certificate_sha256, which its bytes must hash to. A correction is a new calibration naming the one it corrects in supersedes; nothing is ever edited.
| Tên | Kiểu | Mô tả |
|---|---|---|
sensor_serialkhông bắt buộc | string | The serial of the probe calibrated, when the device carries several. |
capabilitykhông bắt buộc | string | The capability the calibration covers: one of the vocabulary's, or an |
calibrated_atbắt buộc | number | When the calibration was done. |
methodbắt buộc | "ph_buffers" | "ec_reference" | "lab_correlation" | "factory" | "other" |
|
reference_valueskhông bắt buộc | object | array<any> | The reference values used (e.g. the buffers' pH): a JSON object or array of at most 4096 bytes, nested at most 4 deep, finite numbers only, strings of at most 200 characters. |
coefficientskhông bắt buộc | object | array<any> | The coefficients found (e.g. slope and offset), with the same bounds as |
performerbắt buộc | string | Who calibrated: a laboratory, a technician or the manufacturer. |
accreditationbắt buộc | "iso17025_lab" | "in_house" | "manufacturer" |
|
certificate_sha256không bắt buộc | string | SHA-256 of the calibration certificate (PDF, JPEG or PNG). |
certificatekhông bắt buộc | CalibrationCertificate | |
valid_untilbắt buộc | number | Until when the calibration is valid: after |
supersedeskhông bắt buộc | integer | The id of a calibration of the same device that this one corrects; a calibration is superseded once at most. |
Calibrations
object
SENS-B1d (#234): a device's calibrations, newest first (by calibrated_at, then id), at most 1000.
| Tên | Kiểu | Mô tả |
|---|---|---|
device_idbắt buộc | string | |
itemsbắt buộc | array<Calibration> |
CapturedEvent
object
An EPCIS event a partner captured: its statement, Self-declared.
| Tên | Kiểu | Mô tả |
|---|---|---|
event_idbắt buộc | string | The EPCIS eventID. |
capture_idbắt buộc | integer | The capture that stored it. |
event_typebắt buộc | "ObjectEvent" | "AggregationEvent" | "TransformationEvent" | |
biz_stepbắt buộc | "commissioning" | "receiving" | "packing" | "shipping" | "sensor_reporting" | The CBV business step (bare term). |
stepbắt buộc | "harvest" | "receive" | "pack" | "ship" | "observe" | The journey step the event records: commissioning is the harvest, receiving, packing, shipping; sensor_reporting (#238) is an observation ( |
actionbắt buộc | "ADD" | "OBSERVE" | null | The EPCIS action; null for a TransformationEvent. |
event_timebắt buộc | string | eventTime as sent (RFC 3339). |
event_time_zone_offsetbắt buộc | string | eventTimeZoneOffset as sent. |
read_pointbắt buộc | string | null | readPoint.id as sent. |
biz_locationbắt buộc | string | null | bizLocation.id as sent. |
sourcebắt buộc | "partner_capture" | |
tierbắt buộc | "self_declared" | |
captured_bybắt buộc | string | Opaque operator id of the capturing principal. |
captured_atbắt buộc | number | Capture time, Unix seconds. |
referencesbắt buộc | array<object> | The tenant's records the event names. |
CapturedEventPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
lotbắt buộc | string | The lot code. |
itemsbắt buộc | array<CapturedEvent> | |
next_cursorbắt buộc | string | null | Cursor of the next page; null on the last. |
Carton
object
A carton of one lot (issue #37); its contents are fruits of that lot.
| Tên | Kiểu | Mô tả |
|---|---|---|
tenantbắt buộc | string | |
codebắt buộc | string |
|
lotbắt buộc | string | Code of the carton's lot. |
carton_nobắt buộc | integer | Number within the lot. |
public_idbắt buộc | string | 128 random bits as hex. |
qr_urlbắt buộc | string | What the carton label's QR code carries (ADR 0004): a GS1 Digital Link |
net_mass_kgbắt buộc | number | null | Weighed net mass; null until the contents are set. |
fruit_countbắt buộc | integer | |
fruit_mass_kgbắt buộc | number | Sum of the measured (scale) weights of its fruits, 3 decimals. |
labels_printed_atbắt buộc | number | Unix seconds: the carton label's print time (creation). |
created_bybắt buộc | string | |
created_atbắt buộc | number | Unix seconds. |
updated_atbắt buộc | number | Unix seconds. |
CartonBatchResult
object
The cartons a batch created, by number.
| Tên | Kiểu | Mô tả |
|---|---|---|
batch_idbắt buộc | integer | The stored batch request's id. |
countbắt buộc | integer | |
itemsbắt buộc | array<CartonDetail> | In request order. |
CartonContents
object
What the carton holds, replacing its previous contents.
| Tên | Kiểu | Mô tả |
|---|---|---|
fruitsbắt buộc | array<string> | Codes of packable fruits of the carton's lot (status recorded or overridden, grade A or B), each in no other carton. |
net_mass_kgbắt buộc | number | The carton's weighed net mass. |
CartonContentsBatch
object
Up to 1,000 cartons of the lot, applied in order.
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<CartonContentsBatchItem> |
CartonContentsBatchItem
object
One carton's new contents, replacing its previous ones.
| Tên | Kiểu | Mô tả |
|---|---|---|
cartonbắt buộc | string | A carton of the path's lot; at most once per batch. |
fruitsbắt buộc | array<string> | Codes of packable fruits of the carton's lot (status recorded or overridden, grade A or B), each in no other carton. |
net_mass_kgbắt buộc | number | The carton's weighed net mass. |
CartonContentsBatchResult
object
The cartons as a batch left them, in request order.
| Tên | Kiểu | Mô tả |
|---|---|---|
batch_idbắt buộc | integer | The stored batch request's id. |
countbắt buộc | integer | |
itemsbắt buộc | array<CartonDetail> | In request order. |
CartonCreate
object
No fields: the number, code and ids are the server's; the contents come with PUT .../fruits.
CartonDetail
object
A carton with the codes of its fruits (by fruit number).
| Tên | Kiểu | Mô tả |
|---|---|---|
tenantbắt buộc | string | |
codebắt buộc | string |
|
lotbắt buộc | string | Code of the carton's lot. |
carton_nobắt buộc | integer | Number within the lot. |
public_idbắt buộc | string | 128 random bits as hex. |
qr_urlbắt buộc | string | What the carton label's QR code carries (ADR 0004): a GS1 Digital Link |
net_mass_kgbắt buộc | number | null | Weighed net mass; null until the contents are set. |
fruit_countbắt buộc | integer | |
fruit_mass_kgbắt buộc | number | Sum of the measured (scale) weights of its fruits, 3 decimals. |
labels_printed_atbắt buộc | number | Unix seconds: the carton label's print time (creation). |
created_bybắt buộc | string | |
created_atbắt buộc | number | Unix seconds. |
updated_atbắt buộc | number | Unix seconds. |
fruitsbắt buộc | array<string> |
CartonPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<Carton> | |
next_cursorbắt buộc | string | null | Pass as |
CertificateStatus
object
| Tên | Kiểu | Mô tả |
|---|---|---|
pathbắt buộc | string | |
subjectbắt buộc | string | |
not_afterbắt buộc | string (date-time) | |
remaining_sbắt buộc | integer | |
remaining_fractionbắt buộc | number | |
expiredbắt buộc | boolean |
Certification
object
A certification of a growing area (e.g. VietGAP). It is verified when its scheme is one of the fixed list (see CertificationCreate), it has an issuer and an evidence_sha256, and a GLOBALG.A.P. number is a GGN; otherwise (e.g. a record written before #156, or sent without them) it is unverified and never counts towards a lot's trust tier.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
growing_areabắt buộc | string | |
schemebắt buộc | string | |
numberbắt buộc | string | |
issuerbắt buộc | string | null | |
valid_frombắt buộc | string (date) | |
valid_tobắt buộc | string (date) | |
evidence_sha256bắt buộc | string | null | |
created_atbắt buộc | number | Unix seconds. |
statusbắt buộc | "valid" | "expired" | "not_yet_valid" | Against today's UTC date. |
verifiedkhông bắt buộc | boolean | #269 review, with listCertifications |
CertificationCreate
object
#156: a certification is verified when it names its scheme from the fixed list, its certifier (issuer) and the SHA-256 of the certificate document (evidence_sha256), and, for GLOBALG.A.P., a number that is the producer's GGN; the console always sends that shape. A request without them (as released clients send it: any scheme text, no certifier, no hash) is accepted and stored as sent, unverified: an unverified certification never counts towards a lot's trust tier (the harvest step's certification check counts verified certifications only).
| Tên | Kiểu | Mô tả |
|---|---|---|
schemebắt buộc | string | The certification scheme. A verified certification names one of VietGAP, GLOBALG.A.P., Organic JAS, Organic EU, Organic USDA, ISO 22000, FSSC 22000, BRCGS, IFS and HACCP (compared exactly), as the console sends it; any other text is accepted and stored, and the certification is unverified. ISO 22000, FSSC 22000, BRCGS and IFS certify a packing house (#269): record new ones on the facility (createFacilityCertification). A growing-area certification of these schemes is still accepted and stored as sent, but one recorded from this change on is unverified whatever it holds (it never counts towards a lot's trust tier); one recorded before is judged as before. |
numberbắt buộc | string | The certificate number. For a verified GLOBALG.A.P. certification, the producer's GLOBALG.A.P. Number (GGN): its 13 digits without the "GGN" prefix, the last being the GS1 mod-10 check digit of the others. |
issuerkhông bắt buộc | string | null | The certifier (certification body) that issued the certificate. Optional; without it the certification is unverified. |
valid_frombắt buộc | string (date) | |
valid_tobắt buộc | string (date) | Not before valid_from. |
evidence_sha256không bắt buộc | string | null | The SHA-256 of the certificate document, e.g. the PDF uploaded with PUT /v1/attachments/{sha256}. Optional; without it the certification is unverified. |
CertificationPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<Certification> | |
next_cursorbắt buộc | string | null | Pass as |
CockpitDay
object
#365: the farm day (Asia/Ho_Chi_Minh) an answer of the cockpit was computed in (common/farm_day.py).
| Tên | Kiểu | Mô tả |
|---|---|---|
datebắt buộc | string | Its farm date. |
starts_atbắt buộc | string (date-time) | Its local midnight, in UTC. |
time_zonebắt buộc | "Asia/Ho_Chi_Minh" |
Command
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | |
tenantbắt buộc | string | |
sitebắt buộc | string | |
device_idbắt buộc | string | |
namebắt buộc | string | |
paramsbắt buộc | object | |
issued_bybắt buộc | string | |
issued_atbắt buộc | number | Unix seconds. |
statusbắt buộc | "pending" | "sent" | "succeeded" | "failed" | "accepted" | "rejected" | "completed" | "aborted" | "expired" | |
resultbắt buộc | object | null | The device reply or the dispatch error; null until settled. |
completed_atbắt buộc | number | null | Unix seconds; null until settled. |
kindkhông bắt buộc | "config" | "actuation" | #242, with getCommand or listDeviceCommands |
expires_atkhông bắt buộc | number | null | #242, with getCommand or listDeviceCommands |
reasonkhông bắt buộc | string | null | #242, with getCommand or listDeviceCommands |
accepted_atkhông bắt buộc | number | null | #242, with getCommand or listDeviceCommands |
CommandIssued
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string |
CommandKey
object
#242: one platform command key's public part.
| Tên | Kiểu | Mô tả |
|---|---|---|
kidbắt buộc | string |
|
algbắt buộc | "ES256" | |
jwkbắt buộc | object | The public key as an RFC 7517 JWK. |
CommandKeys
object
| Tên | Kiểu | Mô tả |
|---|---|---|
keysbắt buộc | array<CommandKey> | Empty when the server has no command key. |
CommandPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<Command> | |
next_cursorbắt buộc | string | null | Pass as |
CommandRequest
object
| Tên | Kiểu | Mô tả |
|---|---|---|
namebắt buộc | string | |
paramskhông bắt buộc | object | Defaults to an empty object. |
CommuneVerdictCounts
object
How many of the company's positions of the area in the range got each commune verdict (#247).
| Tên | Kiểu | Mô tả |
|---|---|---|
commune_matchbắt buộc | integer | |
commune_mismatchbắt buộc | integer | |
commune_unknownbắt buộc | integer |
CompanyApiCallDay
object
SELF-2-5 (#194). A company's API calls on one UTC day.
| Tên | Kiểu | Mô tả |
|---|---|---|
daybắt buộc | string (date) | The UTC day, YYYY-MM-DD. |
callsbắt buộc | integer |
CompanyExport
object
SELF-2-3 (#192). One request for the selected company's full data archive and its state. The archive layout (files, columns, encoding, times) is documented at /developers/downloads/company-export.md.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
statusbắt buộc | "queued" | "running" | "ready" | "failed" | "expired" |
|
requested_bybắt buộc | string | Who asked for it (the signed-in user's email). |
requested_atbắt buộc | number | Unix seconds. |
started_atbắt buộc | number | null | Unix seconds when the job started building it. |
finished_atbắt buộc | number | null | Unix seconds when the build ended (ready or failed). |
expires_atbắt buộc | number | null | While ready: Unix seconds after which the download is refused (24 hours after the archive was ready); null otherwise. |
sizebắt buộc | integer | null | While ready: the archive's size in bytes. |
sha256bắt buộc | string | null | While ready: the SHA-256 of the archive, to check the downloaded file. |
file_namebắt buộc | string | null | While ready: the file name the download is saved under (croppath-export-<company>-<request time, UTC>.zip). |
errorbắt buộc | string | null | Why the build failed: |
CompanyExportList
object
SELF-2-3 (#192). The selected company's 20 newest export requests, newest first, and the limits.
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<CompanyExport> | |
max_per_daybắt buộc | integer | How many exports the company may request in any 24 hours. |
download_hoursbắt buộc | integer | How long a ready archive can be downloaded. |
CompanyLogo
object
The logo as stored: a PNG or JPEG the company uploaded (an attachment of the company).
| Tên | Kiểu | Mô tả |
|---|---|---|
sha256bắt buộc | string | |
media_typebắt buộc | "image/png" | "image/jpeg" | |
sizebắt buộc | integer |
CompanyLogoStored
object
| Tên | Kiểu | Mô tả |
|---|---|---|
sha256bắt buộc | string | |
media_typebắt buộc | "image/png" | "image/jpeg" | |
sizebắt buộc | integer | |
widthbắt buộc | integer | |
heightbắt buộc | integer |
CompanyOffboarding
object
SELF-2-4 (#193): whether a company is leaving CropPath. active: no departure. leaving: the read-only window (30 days from started_at to window_ends_at) in which its people still sign in, read and download the full data export, but nothing of the company may change. left: sign-in stopped at left_at; the job then revokes the company's credentials and removes its people's names and emails (steps_done of 3). Sealed lot records, evidence and public lot pages stay until retention_ends_at: the latest seal (or the end of the window when later) plus retention_years, which CropPath sets for each company (no default).
| Tên | Kiểu | Mô tả |
|---|---|---|
statusbắt buộc | "active" | "leaving" | "left" | |
retention_yearsbắt buộc | integer | null | Years the sealed lot records are kept, counted from each lot's seal. |
started_atbắt buộc | number | null | Unix seconds; null while the company is active. |
window_ends_atbắt buộc | number | null | Unix seconds; null while the company is active. |
left_atbắt buộc | number | null | Unix seconds; when sign-in stopped (status left). |
retention_ends_atbắt buộc | number | null | Unix seconds; null while the company is active. |
steps_donebắt buộc | integer | The job's steps done: 1 members off, 2 credentials revoked, 3 personal data removed. |
CompanyOffboardingStart
object
| Tên | Kiểu | Mô tả |
|---|---|---|
retention_yearsbắt buộc | integer | How many years the company's sealed lot records, evidence and public lot pages are kept, counted from each lot's seal (owner decision D-S4: no default; CropPath sets it for each company). |
CompanyOverview
object
#274. The selected company's overview for the admin home: what needs attention, today's work, its lots and shipments, its devices and gateways, its people and its usage; counts and the company's own codes only. view admin: every section; view auditor (a caller who is no admin): without approvals, team, integrations, email and requests.personal_data_open (absent, not zero). Each section has state: ok with its figures, or unavailable (OverviewSectionUnavailable) when it could not be read.
| Tên | Kiểu | Mô tả |
|---|---|---|
tenantbắt buộc | string | The selected company. |
generated_atbắt buộc | string (date-time) | When the answer was computed (the server serves it for up to |
max_age_sbắt buộc | integer | Seconds the server serves one answer. |
daybắt buộc | object | The day |
viewbắt buộc | "admin" | "auditor" | |
sectionsbắt buộc | object |
CompanyOverviewAlerts
object | OverviewSectionUnavailable
#274. The company's open alerts.
CompanyOverviewApiDay
object
#274. The company's daily API call quota and today's calls (UTC day) against it.
| Tên | Kiểu | Mô tả |
|---|---|---|
api_per_daybắt buộc | integer | API calls a UTC day. |
api_calls_todaybắt buộc | integer | API calls counted this UTC day. |
api_day_warningbắt buộc | boolean |
|
api_day_reachedbắt buộc | boolean |
|
CompanyOverviewApprovals
object | OverviewSectionUnavailable
#274. Changes waiting for a second admin (admin view only).
CompanyOverviewCertifications
object | OverviewSectionUnavailable
#274. The growing areas' certifications (the latest of each area and scheme: a renewal replaces the older one).
CompanyOverviewEmail
object | OverviewSectionUnavailable
#274. Emails of the company that could not be sent (admin view only).
CompanyOverviewFleet
object | OverviewSectionUnavailable
#274. The company's devices and gateways.
CompanyOverviewIntegrations
object | OverviewSectionUnavailable
#274. The company's webhooks (admin view only).
CompanyOverviewLots
object | OverviewSectionUnavailable
#274. The company's lots per status.
CompanyOverviewQuarantine
object | OverviewSectionUnavailable
#274. Device messages waiting for review (quarantined).
CompanyOverviewRecalls
object | OverviewSectionUnavailable
#274. Recalled and withdrawn lots and the recall notices not yet delivered.
CompanyOverviewRequests
object | OverviewSectionUnavailable
#274. Requests waiting for the company. personal_data_open is in the admin view only.
CompanyOverviewShipments
object | OverviewSectionUnavailable
#274. The company's shipments.
CompanyOverviewTeam
object | OverviewSectionUnavailable
#274. The company's people (admin view only).
CompanyOverviewToday
object | OverviewSectionUnavailable
#274. Today's work, day of the answer (the Vietnam calendar day).
CompanyOverviewUsage
object | OverviewSectionUnavailable
#274. The company's limits, its daily API call quota and its API calls per day, as getCompanyUsage counts them (without what it stores).
CompanyPersonalDataRequest
object
SELF-2-9 (#198). A member's request about their personal data, as the company's admins see it.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
kindbắt buộc | "access" | "correction" |
|
textbắt buộc | string | Plain text, as typed (trimmed): never HTML or markdown; line breaks are kept. |
statusbắt buộc | "open" | "handled" |
|
created_atbắt buộc | number | Seconds since 1970 (UTC). |
handled_atbắt buộc | number | null | When a company admin marked it handled, or null. |
userbắt buộc | SupportRequestUser | |
handled_bybắt buộc | string | null | Who marked it handled (an email), or null. |
CompanyPersonalDataRequestPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<CompanyPersonalDataRequest> | |
next_cursorbắt buộc | string | null | The next page's |
CompanyProducer
object
#186 (SELF-1-5): the lot's producer as its company profile names it now: the legal name and the address lines, never the trading name, tax number, contacts or website. Read when the label or dossier is built, so it is not part of any seal.
| Tên | Kiểu | Mô tả |
|---|---|---|
legal_namebắt buộc | string | |
addressbắt buộc | string | null | |
districtbắt buộc | string | null | District or commune. |
provincebắt buộc | string | null | |
countrybắt buộc | string | ISO 3166-1 alpha-2; VN until set. |
communekhông bắt buộc | string | null | #273: the company's commune (official name) when its profile is coded; null otherwise, and null for a household business that has not opted in to its full address. Only with |
CompanyProfile
object
The selected company's legal identity. Every field is null until set (country: VN). Changing it never changes a sealed lot: sealed facts and signed credentials keep what they recorded.
| Tên | Kiểu | Mô tả |
|---|---|---|
tenantbắt buộc | string | The company's id (X-Tenant). |
namebắt buộc | string | The company's short display name (tenants.name), unchanged by the profile. |
legal_namebắt buộc | string | null | |
trading_namebắt buộc | string | null | |
addressbắt buộc | string | null | |
provincebắt buộc | string | null | |
districtbắt buộc | string | null | |
countrybắt buộc | string | VN until set. |
tax_idbắt buộc | string | null | |
contact_namebắt buộc | string | null | |
contact_phonebắt buộc | string | null | |
contact_emailbắt buộc | string | null | |
websitebắt buộc | string | null | |
logobắt buộc | CompanyLogo | null | |
updated_atbắt buộc | number | null | Seconds since the epoch; null until the profile is first saved. |
updated_bybắt buộc | string | null | Who saved it last; null until then. |
communekhông bắt buộc | string | null | The commune's official name (xã, phường or đặc khu) when the record is coded; else null. Only with |
province_codekhông bắt buộc | string | null | The province's official 2-digit code, in the list |
commune_codekhông bắt buộc | string | null | The commune's official 5-digit code, in the list |
admin_units_versionkhông bắt buộc | string | null | The version of the official list the codes were taken from (for example |
address_before_reformkhông bắt buộc | object | null | The province, district and commune text the record held before it was coded, or the text a request gave through the deprecated text path; kept for good once set. Null for a record entered with codes. Only with |
address_statuskhông bắt buộc | "coded" | "choose_commune" | "needs_commune" | "outside_vietnam" | null |
|
address_candidateskhông bắt buộc | array<string> | null | For |
CompanyProfileUpdate
object
The whole profile (a PUT replaces it: a field left out, null or blank is cleared). Text is trimmed and may not hold control characters. The logo is set with PUT /v1/company/logo.
| Tên | Kiểu | Mô tả |
|---|---|---|
legal_namebắt buộc | string | As on the business registration. Required; trimmed, not blank. |
trading_namekhông bắt buộc | string | null | |
addresskhông bắt buộc | string | null | |
provincekhông bắt buộc | string | null | In Viet Nam ( |
districtkhông bắt buộc | string | null | District or commune. In Viet Nam ( |
province_codekhông bắt buộc | string | null | #273: the province (tỉnh or thành phố trực thuộc trung ương) by its official 2-digit code in the administrative units list in force ( |
commune_codekhông bắt buộc | string | null | #273: the commune (xã, phường or đặc khu) by its official 5-digit code in the administrative units list in force ( |
countrykhông bắt buộc | string | null | ISO 3166-1 alpha-2 code in capital letters; null or absent: VN. |
tax_idkhông bắt buộc | string | null | Tax or business registration number. At most 32 characters for every country; the Vietnamese format is not checked yet (the exact rule awaits the owner's confirmation, #186). |
contact_namekhông bắt buộc | string | null | |
contact_phonekhông bắt buộc | string | null | Digits, spaces and + ( ) . - only, starting with + or a digit. |
contact_emailkhông bắt buộc | string | null | An email address (name@domain.tld). |
websitekhông bắt buộc | string | null | An https:// address with a DNS host name; no user name or password. |
CompanyPublicIdentity
object
#208: how the company is named on public outputs (today the lot's public customs file).
| Tên | Kiểu | Mô tả |
|---|---|---|
household_businessbắt buộc | boolean | The company is a household business (hộ kinh doanh). Its public customs file then names it by its trading name (or 'Hộ kinh doanh' alone when it has no trading name, never its tax number) and shows its province only, unless it opts in below. False for a company. |
public_full_addressbắt buộc | boolean | A household business shows its full address (address and district too) on its public customs file. Always false for a company. |
public_legal_namebắt buộc | boolean | A household business shows its legal name (a person's name) on its public customs file instead of its trading name. Always false for a company. |
public_producerbắt buộc | CompanyProducer | null | The producer as the lot's public customs file shows it now: for a company its legal name and full address; for a household business its trading name (or 'Hộ kinh doanh' alone, never its tax number) in |
CompanyPublicIdentityUpdate
object
#208: every flag, true or false. The opt-ins are stored false unless household_business is true.
| Tên | Kiểu | Mô tả |
|---|---|---|
household_businessbắt buộc | boolean | The company is a household business (hộ kinh doanh). Its public customs file then names it by its trading name (or 'Hộ kinh doanh' alone when it has no trading name, never its tax number) and shows its province only, unless it opts in below. False for a company. |
public_full_addressbắt buộc | boolean | A household business shows its full address (address and district too) on its public customs file. Always false for a company. |
public_legal_namebắt buộc | boolean | A household business shows its legal name (a person's name) on its public customs file instead of its trading name. Always false for a company. |
CompanySecurity
object
SELF-1-6 (#187). The selected company's sign-in rule and how many of its active members have two-step sign-in on.
| Tên | Kiểu | Mô tả |
|---|---|---|
require_two_factorbắt buộc | boolean | Every member must use two-step sign-in to act for this company. |
membersbắt buộc | integer | Active members (active membership and account). |
members_with_two_factorbắt buộc | integer | |
admin_deadlinebắt buộc | number | Unix seconds from which every company admin must use two-step sign-in (60 days after the release that shipped it). |
updated_atbắt buộc | number | null | |
updated_bybắt buộc | string | null |
CompanySecurityUpdate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
require_two_factorbắt buộc | boolean |
CompanyUsage
object
SELF-2-5 (#194). The selected company's usage of its limits, its API calls per day, its quotas and what it stores (#134), counts only.
| Tên | Kiểu | Mô tả |
|---|---|---|
tenantbắt buộc | string | |
warn_percentbắt buộc | integer | An entry warns from this percentage of its limit. |
limitsbắt buộc | array<CompanyUsageLimit> | Every limit, in a fixed order. |
api_callsbắt buộc | array<CompanyApiCallDay> | The last 14 UTC days, newest first, today included (0 for a day without calls). |
quotasbắt buộc | CompanyUsageQuotas | |
storedbắt buộc | CompanyUsageStored |
CompanyUsageLimit
object
SELF-2-5 (#194). One per-company limit: what the company uses of it.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | "members" | "pending_links" | "devices" | "api_tokens" | "api_clients" | "webhooks" | members: active members plus pending invitations (limit 200). pending_links: pending one-time links of every purpose, invitations and new-password links (limit 50). devices: active devices (no limit is enforced: |
usedbắt buộc | integer | |
limitbắt buộc | integer | null | The limit the backend enforces; null when there is none. |
warningbắt buộc | boolean |
|
reachedbắt buộc | boolean |
|
CompanyUsageQuotas
object
#134. The company's quotas: its API calls per minute and per UTC day (requests made with its API tokens or API clients; over either, 429 with Retry-After), with today's calls, and its device messages per second with a burst (over them the MQTT ingest keeps its messages in its ingest backlog and stores them at that rate; the HTTP ingest answers 429), with the messages waiting in that backlog.
| Tên | Kiểu | Mô tả |
|---|---|---|
api_per_minutebắt buộc | integer | API calls a minute; over it, 429 with |
api_per_daybắt buộc | integer | API calls a UTC day; once reached, 429 until the next UTC midnight. |
api_calls_todaybắt buộc | integer | API calls counted this UTC day (as |
api_day_warningbắt buộc | boolean |
|
api_day_reachedbắt buộc | boolean |
|
ingest_per_secondbắt buộc | integer | Device messages a second the ingest stores as they arrive. |
ingest_burstbắt buộc | integer | Device messages the ingest stores at once above that rate after a quiet period. |
ingest_backlogbắt buộc | integer | Device messages waiting in the company's ingest backlog. |
CompanyUsageStored
object
#134. What the company keeps, counts only (no quota applies to them): its device messages stored, the public scans of its fruits still kept, and its stored files (attachments uploaded for its devices' envelopes and documents its users uploaded) with their total size. Files are content-addressed and shared, so a file two companies hold counts for each; database rows are not counted in storage_bytes.
| Tên | Kiểu | Mô tả |
|---|---|---|
envelopesbắt buộc | integer | Device messages (envelopes) stored for the company, of every status. |
scansbắt buộc | integer | Public scans of the company's fruits still kept (each fruit's scan counter, which keeps its count after the raw scan rows expire). |
attachmentsbắt buộc | integer | Files stored: device attachments uploaded for the company's envelopes plus documents its users uploaded. |
storage_bytesbắt buộc | integer | The total size of those files, in bytes. |
Consignee
object
The immediate subsequent recipient of a shipment (#153; Circular 17/2021 Art. 6, Regulation (EC) 178/2002 Art. 18, FSMA 204). Staff-only: never on a public page or document.
| Tên | Kiểu | Mô tả |
|---|---|---|
namebắt buộc | string | Legal name. |
addressbắt buộc | string | Postal address; line breaks allowed. |
countrybắt buộc | string | ISO 3166-1 alpha-2 (an assigned code). |
glnbắt buộc | string | null | GS1 Global Location Number with a valid check digit. |
registration_idbắt buộc | string | null | Tax or importer registration id. |
ConsigneeInput
object
A consignee as written: gln and registration_id are optional.
| Tên | Kiểu | Mô tả |
|---|---|---|
namebắt buộc | string | Legal name. |
addressbắt buộc | string | Postal address; line breaks allowed. |
countrybắt buộc | string | ISO 3166-1 alpha-2 (an assigned code). |
glnkhông bắt buộc | string | null | GS1 Global Location Number with a valid check digit. |
registration_idkhông bắt buộc | string | null | Tax or importer registration id. |
ConsoleHome
object
#286. The console's work home for the selected company within the caller's packing houses (every packing house of the company for a company admin): what is measuring now, the work by next action, open shipments, messages waiting for review, the devices and stations, and today's counts. Codes and counts of the company only, and the names of its packing houses. Each section has state: ok with its figures, or unavailable (OverviewSectionUnavailable) when it could not be read.
| Tên | Kiểu | Mô tả |
|---|---|---|
tenantbắt buộc | string | The selected company. |
generated_atbắt buộc | string (date-time) | When the answer was computed (the server serves it for up to |
max_age_sbắt buộc | integer | Seconds the server serves one answer. |
daybắt buộc | object | The day |
scopebắt buộc | object | Whose work the answer counts. |
sectionsbắt buộc | object |
ConsoleHomeDevices
object | OverviewSectionUnavailable
#286. The active devices and stations (gateways) of the scope's packing houses. A device belongs to a packing house, not to a line.
ConsoleHomeReview
object | OverviewSectionUnavailable
#286. Device messages of the scope waiting for a company admin's review (quarantined); a lot with such messages cannot be closed until they are reviewed.
ConsoleHomeSessions
object | OverviewSectionUnavailable
#286. The measurement sessions open or paused now, one per busy line, newest first.
ConsoleHomeShipments
object | OverviewSectionUnavailable
#286. Shipments not departed, oldest first (a shipment has no planned departure); #283: and the shipments departed in the last 30 days whose temperature logger readings are missing or incomplete.
ConsoleHomeTask
object
| Tên | Kiểu | Mô tả |
|---|---|---|
countbắt buộc | integer | Lots of the window that need this action. |
oldestbắt buộc | array<object> | The 5 oldest of them, oldest first (by the time of the step the action follows; a lot whose step time is unknown comes last). |
ConsoleHomeToday
object | OverviewSectionUnavailable
#286. Today so far, day of the answer (the Vietnam calendar day); lot counts among the newest 1,000 lots of each packing house.
ConsoleHomeWork
object | OverviewSectionUnavailable
#286. The work by next action, read among the newest 1,000 lots of each packing house in scope (of the company for a company-wide answer). A lot may need several actions.
ControlAdvisory
object
#354: the lime and fertiliser advisory view (control/advisory.py): the advice of the signed sheets whose validity covers today and whose signature still holds, by series and version. No amount and no formula: a lab test is required.
| Tên | Kiểu | Mô tả |
|---|---|---|
generated_atbắt buộc | number | |
todaybắt buộc | string | |
itemsbắt buộc | array<ControlAdvisorySheet> | |
draftsbắt buộc | integer | The company's draft sheets (never listed). |
withheldbắt buộc | integer | #354 review M5: the company's signed sheets in force today that are not listed because their signature can no longer be checked (the stored document no longer hashes to what was signed, or the signer is no longer verified); a count only, no detail. |
ControlAdvisorySheet
object
#354: a signed sheet in force today, with its lime and fertiliser advice as signed.
| Tên | Kiểu | Mô tả |
|---|---|---|
sheet_idbắt buộc | integer | |
series_keybắt buộc | string | |
cropbắt buộc | string | |
versionbắt buộc | integer | |
valid_frombắt buộc | string | |
valid_tobắt buộc | string | |
body_sha256bắt buộc | string | |
signed_bybắt buộc | string | null | The signer's legal name as the attestation recorded it. |
signed_atbắt buộc | number | null | When the attestation was signed. |
advisorybắt buộc | object | null | The body's advisory section exactly as signed; null when the sheet has none. |
referencesbắt buộc | array<object> | The body's references, as signed ([] when none). |
growing_areasbắt buộc | array<string> | The codes of the company's growing areas whose crop is the sheet's crop; [] for a caller who may not read the growing areas (an agronomist holding no role of growing_area_read). |
ControlAreaToday
object
#363. The day of the irrigation controllers placed in one growing area.
| Tên | Kiểu | Mô tả |
|---|---|---|
generated_atbắt buộc | string (date-time) | When the answer was computed (the server serves it for up to |
max_age_sbắt buộc | integer | |
poll_hint_sbắt buộc | 15 | 60 | 15 while a run is open, a step is scheduled now or a command waits for its controller, else 60. |
daybắt buộc | ControlDay | |
areabắt buộc | object | |
controllersbắt buộc | array<ControlControllerToday> | |
truncatedbắt buộc | boolean | A cap left something out (50 controllers, 48 steps, the reads' row caps). |
ControlBudgetDay
object
#353: a zone's water on a local date: what the program in force of the day planned for it (the engine's holding rule over a day, control/in_force.py, shared with the zone history) and what the controller reported delivered (control/budget.py). A refused or failed command never reads as planned water. Null where the source holds nothing, never a filled-in 0.
| Tên | Kiểu | Mô tả |
|---|---|---|
device_idbắt buộc | string | |
zonebắt buộc | integer | |
namebắt buộc | string | |
growing_areabắt buộc | string | |
local_datebắt buộc | string | |
planbắt buộc | "dispatched" | "withdrawn" | "replaced" | "refused" | "none" | "proposed" | "approved" | "rejected" | "superseded" | "failed" | "blocked" | "expired" |
|
program_idbắt buộc | integer | null | |
rule_idbắt buộc | integer | null | |
modebắt buộc | string | null | |
planned_mmbắt buộc | number | null |
|
planned_lbắt buộc | number | null | The planned litres of the program in force; null without one. |
clampsbắt buộc | array<string> | |
et0bắt buộc | object | null | An et0_budget zone's trace: the station day, its ET0 and krs, the estimated inputs, Kc and its stage, the rain and its effective fraction, ETc, the net depth, the trim and the bucket. |
applied_lbắt buộc | number | null | The litres the controller reported; null when it reported nothing. |
applied_mmbắt buộc | number | null |
|
ControlBudgetPage
object
#353: planned and applied water per zone and local date (at most 2000 items).
| Tên | Kiểu | Mô tả |
|---|---|---|
frombắt buộc | string | |
tobắt buộc | string | |
itemsbắt buộc | array<ControlBudgetDay> | |
truncatedbắt buộc | boolean | A cap was reached (the items, or one of the reads behind them: zones, program rows, step runs): the answer is not whole. |
ControlCommandToday
object
#363. One of a controller's newest actuation commands.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | |
namebắt buộc | string | |
statusbắt buộc | "pending" | "sent" | "accepted" | "completed" | "aborted" | "rejected" | "expired" | "failed" | |
issued_bybắt buộc | string | null | The person's display name ( |
issued_atbắt buộc | string (date-time) | |
paramsbắt buộc | object | |
expires_atbắt buộc | string (date-time) | null (date-time) | |
reasonbắt buộc | string | null | |
measuredbắt buộc | object | null |
ControlControllerDay
object
#363. One irrigation controller's day.
| Tên | Kiểu | Mô tả |
|---|---|---|
generated_atbắt buộc | string (date-time) | When the answer was computed (the server serves it for up to |
max_age_sbắt buộc | integer | |
poll_hint_sbắt buộc | 15 | 60 | 15 while a run is open, a step is scheduled now or a command waits for its controller, else 60. |
daybắt buộc | ControlDay | |
device_idbắt buộc | string | |
namebắt buộc | string | null | |
linkbắt buộc | ControlLink | |
hold_untilbắt buộc | string (date-time) | null (date-time) | #367 cross-review M2: the end of the controller's hold in force (a person withdrew today's program; the engine sends nothing automatic until then), or null. |
programbắt buộc | ControlProgramToday | |
zonesbắt buộc | array<ControlZoneToday> | |
stepsbắt buộc | array<ControlStepToday> | |
commandsbắt buộc | array<ControlCommandToday> | |
areabắt buộc | null | object | |
limitsbắt buộc | object | The controller profile's run_zone bounds (minima since #371): installation facts, never an irrigation amount. |
truncatedbắt buộc | boolean |
ControlControllerToday
object
#363. One controller of an area's day.
| Tên | Kiểu | Mô tả |
|---|---|---|
device_idbắt buộc | string | |
namebắt buộc | string | null | |
linkbắt buộc | ControlLink | |
hold_untilbắt buộc | string (date-time) | null (date-time) | #367 cross-review M2: the end of the controller's hold in force (a person withdrew today's program; the engine sends nothing automatic until then), or null. |
programbắt buộc | ControlProgramToday | |
zonesbắt buộc | array<ControlZoneToday> | |
stepsbắt buộc | array<ControlStepToday> | |
commandsbắt buộc | array<ControlCommandToday> |
ControlDay
object
#363. The farm-local day an answer describes (the backend owns the day).
| Tên | Kiểu | Mô tả |
|---|---|---|
datebắt buộc | string (date) | The farm-local date (Asia/Ho_Chi_Minh). |
starts_atbắt buộc | string (date-time) | Its local midnight, in UTC (17:00:00Z of the day before). |
time_zonebắt buộc | "Asia/Ho_Chi_Minh" | The farm time zone every time of the answer is shown in. |
ControlEt0Day
object
#353: the latest stored version (seq) of the reference ET0 (FAO-56 Penman-Monteith, meteorology only: no sheet value) of a weather station's local day (control/et0_inputs.py, et0_daily). A compose appends a version only when the latest was refused or needed the krs and the day now reads differently, a capability's coverage grew, or a plausibility verdict arrived; programs cite the version they used.
| Tên | Kiểu | Mô tả |
|---|---|---|
device_idbắt buộc | string | The weather station. |
local_datebắt buộc | string | The local day (Asia/Ho_Chi_Minh, midnight to midnight). |
seqbắt buộc | integer | The version of the station day (1, 2, ...): the latest is listed. |
wind_height_mbắt buộc | number | The anemometer's height the zone gives (eq. 47). |
elevation_mbắt buộc | number | The station's elevation the zone gives (eqs. 7 and 37). |
statusbắt buộc | "ok" | "needs_krs" | "refused" |
|
reasonbắt buộc | string | null | Why not |
et0_mmbắt buộc | number | null | mm/day; null unless ok. |
inputsbắt buộc | object | The daily inputs and how each was found: latitude_deg (the placement's), day_of_year, g (0, eq. 42), coverage (per capability: readings, coverage_h of the 24 local hours, truncated), rain {mm, method, estimated}, tmax and tmin (degC), ea {value kPa, method dew_point|rh_max_min|rh_mean|tdew_tmin, estimated}, u2 {value m/s, method measured|default_2_m_s, estimated}, pressure {value kPa, method measured|elevation}, rs {value MJ m-2 day-1 or null, method measured|eq50_krs, estimated}. Also |
tracebắt buộc | map<string, number> | Every intermediate of the equations (tmean, pressure_kpa, gamma, delta, es, ea, vpd, ra, rs, rso, rns, rnl, rn, g, u2, et0_mm) and hargreaves_mm, the paper's cross-check only (eq. 52). |
computed_atbắt buộc | number | |
estimatedbắt buộc | array<"ea" | "u2" | "rs" | "rain"> | The inputs that are estimated. |
ControlEt0Page
object
#353: the stored ET0 days of a span of local dates, by station and date (at most 2000).
| Tên | Kiểu | Mô tả |
|---|---|---|
frombắt buộc | string | |
tobắt buộc | string | |
itemsbắt buộc | array<ControlEt0Day> | |
truncatedbắt buộc | boolean | A cap was reached (the items, or one of the reads behind them: zones, program rows, step runs): the answer is not whole. |
ControlFleetArea
object
#363. A growing area holding an irrigation controller.
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | |
namebắt buộc | string | null | |
controllersbắt buộc | object | |
zonesbắt buộc | object | |
water_todaybắt buộc | object | |
sensorsbắt buộc | object | |
alarmsbắt buộc | object |
ControlFleetAreas
object | OverviewSectionUnavailable
#363. The areas, at most 200 by code.
ControlFleetAttention
object | OverviewSectionUnavailable
#363. What needs attention: exact counts of the open alarms the caller may read, and at most 20 items (alarms not shelved, urgent then warning then notice, the oldest first; then today's programs waiting for approval).
ControlFleetControllers
object | OverviewSectionUnavailable
#363. The controllers, at most 500 by device id.
ControlFleetState
object
#363. The company's water today at a glance. Each section has state: ok with its figures, or unavailable (OverviewSectionUnavailable) when one of its reads failed.
| Tên | Kiểu | Mô tả |
|---|---|---|
tenantbắt buộc | string | |
generated_atbắt buộc | string (date-time) | When the answer was computed (the server serves it for up to |
max_age_sbắt buộc | integer | |
poll_hint_sbắt buộc | 15 | 60 | 15 while a run is open, a step is scheduled now or a command waits for its controller, else 60. |
daybắt buộc | ControlDay | |
viewbắt buộc | string | |
attentionbắt buộc | ControlFleetAttention | |
areasbắt buộc | ControlFleetAreas | |
controllersbắt buộc | ControlFleetControllers |
ControlGateDecision
object
| Tên | Kiểu | Mô tả |
|---|---|---|
zonebắt buộc | integer | |
rule_idbắt buộc | integer | |
decided_atbắt buộc | number | |
verdictbắt buộc | "healthy" | "fallback" | "blocked" | |
reasonbắt buộc | string | null | |
detailbắt buộc | object | Every probe's reading and status, the basis and the peer check (control/health_gate.py). |
ControlHome
object
#354: the irrigation control home (control/home.py): what needs a person today, for the controllers in scope.
| Tên | Kiểu | Mô tả |
|---|---|---|
generated_atbắt buộc | number | |
controllersbắt buộc | integer | The company's controllers with a control zone in scope. |
programs_waitingbắt buộc | object | The programs still |
rulesbắt buộc | object | The company's rules in scope by what they need. |
salinitybắt buộc | object | The open alerts of a controller in scope whose zone's water or soil EC (mS/cm) passed its signed sheet's limit: |
et0bắt buộc | object | Per weather station a zone in scope names, its latest stored reference ET0 day (meteorology only, as GET /v1/control/et0 answers it), by station. |
ControlLink
object
#363. How a controller is reached, as its gateway reported it.
| Tên | Kiểu | Mô tả |
|---|---|---|
statebắt buộc | "online" | "stale" | "offline" | "unknown" | Through a gateway: |
viabắt buộc | "gateway" | "direct" | |
gatewaybắt buộc | string | null | The gateway of the freshest heartbeat. |
heard_atbắt buộc | string (date-time) | null (date-time) | When the server received that heartbeat. |
expected_sbắt buộc | integer | null | The gateway's heartbeat interval; null for a direct link. |
readybắt buộc | boolean | null | Whether the heartbeat lists the controller ready (null when not measured). |
ControlPreview
object
#352: a dry run of a rule's controller as if the rule were enabled; nothing written or sent.
| Tên | Kiểu | Mô tả |
|---|---|---|
generated_atbắt buộc | number | |
rule_idbắt buộc | integer | |
device_idbắt buộc | string | |
provenancebắt buộc | object | As a program's provenance. A zone's record may carry |
gatebắt buộc | array<object> | |
paramsbắt buộc | object | null | The set_program params: as sent once dispatched (with the program_version CropPath assigned), else as they would be sent now. |
blocked_zonesbắt buộc | array<integer> |
ControlProbeHealth
object
#365: one probe of the area at one depth.
| Tên | Kiểu | Mô tả |
|---|---|---|
device_idbắt buộc | string | |
profilebắt buộc | string | |
depth_cmbắt buộc | number | null | |
capabilitybắt buộc | string | null | The series judged: soil.moisture for a probe a zone names (the series the health gate reads); for a field sensor no zone names, soil.moisture when its profile produces it, else its first capability. |
linkbắt buộc | object | The health gate's freshness rule (decision D11): fresh up to 2 poll intervals (at most 1800 s) after the latest reading of any area (which has a value), stale up to 10 poll intervals, offline past that or without a reading. |
coverage_30d_pctbắt buộc | number | Whole hours of the last 720 holding a usable reading (QC pass or not evaluated, a value, Device-recorded), by the reading's own time. |
qc_30dbắt buộc | object | |
used_bybắt buộc | array<object> |
ControlProgram
object
#352: a program the engine composed (control/programs.py), with the #242 command it became.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
device_idbắt buộc | string | |
local_datebắt buộc | string | |
statusbắt buộc | "proposed" | "approved" | "rejected" | "dispatched" | "superseded" | "failed" | "blocked" | "expired" | "withdrawn" | |
causebắt buộc | "daily" | "threshold" | "recompose" | |
proposed_atbắt buộc | number | |
expires_atbắt buộc | number | |
decided_bybắt buộc | string | null | |
decided_atbắt buộc | number | null | |
dispatched_atbắt buộc | number | null | |
command_idbắt buộc | string | null | |
program_versionbắt buộc | integer | null | |
errorbắt buộc | string | null | |
stepsbắt buộc | integer | |
litresbắt buộc | number | |
rulesbắt buộc | array<object> | |
sheetsbắt buộc | array<object> | Every sheet the program cites: its id, version, series and SHA-256. |
withdrewbắt buộc | boolean | The controller's earlier program was withdrawn with this row. |
paramsbắt buộc | object | null | The set_program params: as sent once dispatched (with the program_version CropPath assigned), else as they would be sent now. |
provenancebắt buộc | object | What composed it: the rules and how each applied, every sheet cited (id, version, SHA-256, attestation id), each zone's decision, budget and clamps, the day's placed steps ( |
decision_notebắt buộc | string | null | |
withdrawalbắt buộc | object | null | #367: who withdrew the program from the controller (null to an agronomist), when (RFC 3339 UTC) and why ( |
gate_decisionsbắt buộc | array<ControlGateDecision> | |
commandbắt buộc | object | null |
ControlProgramPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<ControlProgramSummary> | |
next_beforebắt buộc | integer | null |
ControlProgramReject
object
| Tên | Kiểu | Mô tả |
|---|---|---|
reasonkhông bắt buộc | string |
ControlProgramStep
object
| Tên | Kiểu | Mô tả |
|---|---|---|
zonebắt buộc | integer | |
start_sbắt buộc | integer | |
duration_sbắt buộc | integer | |
max_volume_lbắt buộc | number |
ControlProgramSummary
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
device_idbắt buộc | string | |
local_datebắt buộc | string | |
statusbắt buộc | "proposed" | "approved" | "rejected" | "dispatched" | "superseded" | "failed" | "blocked" | "expired" | "withdrawn" | |
causebắt buộc | "daily" | "threshold" | "recompose" | |
proposed_atbắt buộc | number | |
expires_atbắt buộc | number | |
decided_bybắt buộc | string | null | |
decided_atbắt buộc | number | null | |
dispatched_atbắt buộc | number | null | |
command_idbắt buộc | string | null | |
program_versionbắt buộc | integer | null | |
errorbắt buộc | string | null | |
stepsbắt buộc | integer | |
litresbắt buộc | number | |
rulesbắt buộc | array<object> | |
sheetsbắt buộc | array<object> | Every sheet the program cites: its id, version, series and SHA-256. |
withdrewbắt buộc | boolean | The controller's earlier program was withdrawn with this row. |
ControlProgramToday
object
#363. Today's program of a controller.
| Tên | Kiểu | Mô tả |
|---|---|---|
statebắt buộc | "none" | "sending" | "installed" | "refused" | "not_installed" | "ended" | The day's newest set_program as the controller reported it. |
command_idbắt buộc | string | null | |
program_versionbắt buộc | integer | null | |
control_program_idbắt buộc | integer | null | The #352 program row that sent it (null: not the rules'). |
valid_untilbắt buộc | string (date-time) | null (date-time) | The end of its lease. |
withdrawablebắt buộc | boolean | Whether a withdrawal (POST /v1/devices/{id}/program-withdrawal) would be accepted now: a lease in force, a set_program waiting for the controller, or a rule or proposal to hold (#371: before, a lease in force only). |
withdraw_effectbắt buộc | "stop_installed" | "stop_sending" | "hold" | "already_held" | null | #371: what a withdrawal would do now: |
lease_versionbắt buộc | integer | null | #371: the program_version of the program the controller holds now (its lease in force), which the day's newest set_program may not be; null when none is installed. |
lease_command_idbắt buộc | string | null | #371: the set_program command of that program; null when none is installed. |
lease_control_program_idbắt buộc | integer | null | #371: the #352 program row that sent that program (null: none installed, or not the rules'). |
withdrawalbắt buộc | null | object | #367 cross-review M2: the withdrawal of the controller's program asked for since its lease was accepted (today when it has none); null when there is none. |
ControlRule
object
#352: an irrigation rule (control/rules.py): its kind, controller and zones, the exact signed sheet it reads, its windows, approval and the state the engine last left it in.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
kindbắt buộc | "schedule" | "threshold" | "et0_budget" | "lighting" | schedule (the stage's daily depth), threshold (soil moisture against the stage's band, falling back to a schedule rule) or et0_budget (#353: Kc x yesterday's ET0 of the zones' weather station less the rain that counts, falling back to a schedule rule); lighting is recorded but never enabled. |
device_idbắt buộc | string | |
namebắt buộc | string | |
zonesbắt buộc | array<integer> | |
sheet_idbắt buộc | integer | null | A signed agronomic input sheet of the company. |
windowsbắt buộc | array<object> | |
fallback_rule_idbắt buộc | integer | null | A threshold or et0_budget rule's fallback (required to enable one): a disabled schedule rule of the same controller and zones. |
eval_interval_sbắt buộc | integer | |
min_interval_sbắt buộc | integer | |
peer_tolerance_pctbắt buộc | number | null | The health gate's peer tolerance (percentage points): required by a threshold rule; an et0_budget rule takes it with min_probes or neither (with them its probes trim the depth and measure the bucket). |
min_probesbắt buộc | integer | null | The health gate's minimum of usable probes: required by a threshold rule; an et0_budget rule takes it with peer_tolerance_pct or neither. |
approvalbắt buộc | "required" | "auto" | |
enabledbắt buộc | boolean | |
statebắt buộc | "disabled" | "ok" | "blocked" | "fallback" | |
state_reasonbắt buộc | string | null | Why blocked or on fallback, e.g. |
state_atbắt buộc | number | null | |
next_run_atbắt buộc | number | null | |
last_run_atbắt buộc | number | null | |
created_bybắt buộc | string | |
created_atbắt buộc | number | |
updated_bybắt buộc | string | null | |
updated_atbắt buộc | number | |
enabled_bybắt buộc | string | null | |
enabled_atbắt buộc | number | null | |
auto_approval_bybắt buộc | string | null | |
auto_approval_atbắt buộc | number | null | |
hold_untilbắt buộc | string (date-time) | null (date-time) | #367: the end of the hold on the rule's controller (RFC 3339 UTC): until then the engine proposes and sends nothing automatic for it (a withdrawal holds it until the next farm-local midnight). Null when the controller is not held or its hold has ended. |
sheetbắt buộc | object | null | |
sheet_gatebắt buộc | string | null | #354: the reason the rule's sheet would block it today (the sheet gate the engine runs on every compose, on today's local date): |
resumed_command_idbắt buộc | string | null | The person's own set_program an admin resumed the controller's rules over (POST .../resume), or null. |
ControlRuleApproval
object
| Tên | Kiểu | Mô tả |
|---|---|---|
approvalbắt buộc | "required" | "auto" |
ControlRuleCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
kindbắt buộc | "schedule" | "threshold" | "et0_budget" | "lighting" | schedule (the stage's daily depth), threshold (soil moisture against the stage's band, falling back to a schedule rule) or et0_budget (#353: Kc x yesterday's ET0 of the zones' weather station less the rain that counts, falling back to a schedule rule); lighting is recorded but never enabled. |
device_idbắt buộc | string | |
namebắt buộc | string | |
zonesbắt buộc | array<integer> | |
sheet_idkhông bắt buộc | integer | null | A signed agronomic input sheet of the company. |
windowsbắt buộc | array<object> | |
fallback_rule_idkhông bắt buộc | integer | null | A threshold or et0_budget rule's fallback (required to enable one): a disabled schedule rule of the same controller and zones. |
eval_interval_skhông bắt buộc | integer | |
min_interval_skhông bắt buộc | integer | |
peer_tolerance_pctkhông bắt buộc | number | null | The health gate's peer tolerance (percentage points): required by a threshold rule; an et0_budget rule takes it with min_probes or neither (with them its probes trim the depth and measure the bucket). |
min_probeskhông bắt buộc | integer | null | The health gate's minimum of usable probes: required by a threshold rule; an et0_budget rule takes it with peer_tolerance_pct or neither. |
ControlRulePage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<ControlRule> | |
next_beforebắt buộc | integer | null |
ControlRuleUpdate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
namekhông bắt buộc | string | |
zoneskhông bắt buộc | array<integer> | |
sheet_idkhông bắt buộc | integer | null | A signed agronomic input sheet of the company. |
windowskhông bắt buộc | array<object> | |
fallback_rule_idkhông bắt buộc | integer | null | A threshold or et0_budget rule's fallback (required to enable one): a disabled schedule rule of the same controller and zones. |
eval_interval_skhông bắt buộc | integer | |
min_interval_skhông bắt buộc | integer | |
peer_tolerance_pctkhông bắt buộc | number | null | The health gate's peer tolerance (percentage points): required by a threshold rule; an et0_budget rule takes it with min_probes or neither (with them its probes trim the depth and measure the bucket). |
min_probeskhông bắt buộc | integer | null | The health gate's minimum of usable probes: required by a threshold rule; an et0_budget rule takes it with peer_tolerance_pct or neither. |
ControlSensorHealth
object
#365 (CP-5): a growing area's probes, the rules that read them and today's gate decisions (control/cockpit/sensor_health.py).
| Tên | Kiểu | Mô tả |
|---|---|---|
generated_atbắt buộc | string (date-time) | When the answer was computed (the server serves it from its cache for |
max_age_sbắt buộc | integer | How long the server serves this answer from its cache. |
poll_hint_sbắt buộc | integer | How often a screen may ask again. |
daybắt buộc | CockpitDay | |
areabắt buộc | string | |
probesbắt buộc | array<ControlProbeHealth> | |
gate_decisions_todaybắt buộc | array<object> | Newest first. |
truncatedbắt buộc | boolean | True when more than 200 probes, or more than 200 of the caller's gate decisions of today, were left out. |
ControlStepToday
object
#363. A step of the controller's lease today, with what was observed of it.
| Tên | Kiểu | Mô tả |
|---|---|---|
zonebắt buộc | integer | |
start_sbắt buộc | integer | Seconds after local midnight. |
duration_sbắt buộc | integer | |
max_volume_lbắt buộc | number | null | |
planned_lbắt buộc | number | null | |
actualbắt buộc | object |
ControlZone
object
#352: an irrigation zone of a controller, with its installation facts (control/zones.py).
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
device_idbắt buộc | string | |
zonebắt buộc | integer | |
growing_areabắt buộc | string | |
namebắt buộc | string | |
irrigated_area_m2bắt buộc | number | |
nominal_flow_lpmbắt buộc | number | |
efficiencybắt buộc | number | |
max_daily_lbắt buộc | number | |
probesbắt buộc | array<object> | The soil moisture probes that watch the zone: devices of the company whose profile produces soil.moisture (#365). |
weather_stationbắt buộc | object | null | |
controller_utc_offsetbắt buộc | string | |
field_capacity_pctbắt buộc | number | null | #353: the zone soil's volumetric water content at field capacity (%), a measurement of the site, never a default; given with wilting_point_pct (above it) or not at all. The et0_budget rule's root-zone bucket needs both. |
wilting_point_pctbắt buộc | number | null | #353: the zone soil's volumetric water content at the permanent wilting point (%), below field_capacity_pct; given with it or not at all. |
offset_okbắt buộc | boolean | Whether the controller is on Viet Nam time (+07:00): a zone that is not blocks the rules watering it. |
created_bybắt buộc | string | |
created_atbắt buộc | number | |
updated_bybắt buộc | string | null | |
updated_atbắt buộc | number |
ControlZoneBand
object
#365 (decision D3): a moisture target band of a stage of a signed sheet, clipped to the range and the sheet's validity. Only from a sheet signed now; never a default.
| Tên | Kiểu | Mô tả |
|---|---|---|
frombắt buộc | string | |
tobắt buộc | string | |
lower_pctbắt buộc | number | |
upper_pctbắt buộc | number | |
depth_cmbắt buộc | number | The band's basis depth. |
probe_profilebắt buộc | string | null | The probe profile the band was set for. |
stagebắt buộc | string | null | The stage's code. |
stage_namebắt buộc | AgronomyLocalizedText | null | #372: the stage's name as the sheet words it (vi, en, zh-Hans); null when the stage has none. |
sheetbắt buộc | object |
ControlZoneCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
device_idbắt buộc | string | |
zonebắt buộc | integer | |
namebắt buộc | string | |
irrigated_area_m2bắt buộc | number | |
nominal_flow_lpmbắt buộc | number | |
efficiencybắt buộc | number | |
max_daily_lbắt buộc | number | |
probeskhông bắt buộc | array<object> | |
weather_stationkhông bắt buộc | object | null | |
controller_utc_offsetbắt buộc | string | |
field_capacity_pctkhông bắt buộc | number | null | #353: the zone soil's volumetric water content at field capacity (%), a measurement of the site, never a default; given with wilting_point_pct (above it) or not at all. The et0_budget rule's root-zone bucket needs both. |
wilting_point_pctkhông bắt buộc | number | null | #353: the zone soil's volumetric water content at the permanent wilting point (%), below field_capacity_pct; given with it or not at all. |
ControlZoneHistory
object
#365 (CP-5): a zone's water per farm day, its runs and the target bands of its signed sheets (control/cockpit/zone_history.py).
| Tên | Kiểu | Mô tả |
|---|---|---|
generated_atbắt buộc | string (date-time) | When the answer was computed (the server serves it from its cache for |
max_age_sbắt buộc | integer | How long the server serves this answer from its cache. |
poll_hint_sbắt buộc | integer | How often a screen may ask again. |
daybắt buộc | CockpitDay | |
frombắt buộc | string | |
tobắt buộc | string | |
zonebắt buộc | object | |
daysbắt buộc | array<ControlZoneHistoryDay> | |
runsbắt buộc | array<ControlZoneRun> | Newest first. |
moisture_seriesbắt buộc | object | null | What the moisture chart reads from getSensorSeries for the zone's area; null when the zone has neither a band nor a probe. |
moisturebắt buộc | object | null | #372: the soil moisture of the zone's own probes (its |
bandsbắt buộc | array<ControlZoneBand> | |
truncatedbắt buộc | boolean | True when older runs than the 500 newest, or more than 5000 set_program commands of the range, were left out. |
ControlZoneHistoryDay
object
#365: one farm day of a zone. Every value is null when its source is absent; none is ever filled in.
| Tên | Kiểu | Mô tả |
|---|---|---|
datebắt buộc | string | |
planned_lbắt buộc | number | null | The litres the program in force planned for the zone from its dispatch on: the day's newest program that became a command, did not fail and whose command was not refused, unless the controller no longer ran it (a later row records its withdrawal, a person withdrew it, a withdrawal was asked for after its dispatch, or the controller reported it replaced or cancelled) or a person's own set_program (sent outside the engine, a higher version, not refused nor ended, not withdrawn since) was issued before the day ended (the engine's |
applied_lbắt buộc | number | null | Litres the controller reported delivered to the zone that day (water.volume_delivered with meta.zone); null when it reported nothing, never 0 for no data. |
planned_mmbắt buộc | number | null |
|
applied_mmbắt buộc | number | null |
|
et0_mmbắt buộc | number | null | Reference evapotranspiration of the day at the zone's weather station (FAO-56, #353): the latest stored version of the station day in et0_daily; null unless its status is |
et0_statusbắt buộc | "ok" | "needs_krs" | "refused" | null | That station day's status: |
kc_stagebắt buộc | number | null | The crop coefficient (Kc) the engine applied to the day's ET0: an et0_budget zone's record in a program of the next day, which sizes that day from this one (the Kc control_water_balance's ETc of the day was booked with); null without one. |
rain_mmbắt buộc | number | null | The rain the station's inputs summed for the day (a partial day is a lower bound); null without a station or a stored day. |
rulebắt buộc | object | null | How the newest program row of the day decided the zone; null without one. |
programbắt buộc | object | null | The newest program row of the day for the controller. |
ControlZonePage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<ControlZone> |
ControlZoneRun
object
#365: one delivery the controller reported for the zone (it reports a run's water when the run ends).
| Tên | Kiểu | Mô tả |
|---|---|---|
started_atbắt buộc | string (date-time) | null (date-time) | When the controller's |
ended_atbắt buộc | string (date-time) | The delivered-volume reading's time. |
litresbắt buộc | number | |
sourcebắt buộc | "manual" | "program_step" |
|
command_idbắt buộc | string | null | The run_zone, or the set_program the controller accepted last before the reading, its lease not ended and not withdrawn since; null when none is known. |
ControlZoneToday
object
#363. A zone of a controller today.
| Tên | Kiểu | Mô tả |
|---|---|---|
zonebắt buộc | integer | |
namebắt buộc | string | null | |
statebắt buộc | "idle" | "requested" | "running" | "scheduled_now" | "ended" | "refused" | "fault" | From the reports only: a request waiting for the controller is |
sourcebắt buộc | "run_zone_reply" | "step_water" | "program_reply" | null | |
sincebắt buộc | string (date-time) | null (date-time) | |
expected_endbắt buộc | string (date-time) | null (date-time) | |
reasonbắt buộc | string | null | The refusal or fault reason token. |
todaybắt buộc | object | |
moisturebắt buộc | object | |
sheetkhông bắt buộc | null | object | #373: the sheet the zone's enabled rule is bound to, whatever today's band, the rule's state or the sheet's status; null when no enabled rule binds a sheet. |
nominal_flow_lpmkhông bắt buộc | number | null | Controller today only: the installation's nominal flow (#352 control_zones). |
max_daily_lkhông bắt buộc | number | null | Controller today only: the zone's daily cap (#352 control_zones). |
ControlZoneUpdate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
namekhông bắt buộc | string | |
irrigated_area_m2không bắt buộc | number | |
nominal_flow_lpmkhông bắt buộc | number | |
efficiencykhông bắt buộc | number | |
max_daily_lkhông bắt buộc | number | |
probeskhông bắt buộc | array<object> | |
weather_stationkhông bắt buộc | object | null | |
controller_utc_offsetkhông bắt buộc | string | |
field_capacity_pctkhông bắt buộc | number | null | #353: the zone soil's volumetric water content at field capacity (%), a measurement of the site, never a default; given with wilting_point_pct (above it) or not at all. The et0_budget rule's root-zone bucket needs both. |
wilting_point_pctkhông bắt buộc | number | null | #353: the zone soil's volumetric water content at the permanent wilting point (%), below field_capacity_pct; given with it or not at all. |
Crop
object
A crop of the platform's crop registry.
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | The crop code that lots ( |
namesbắt buộc | CropNames | |
ripeness_scalebắt buộc | "levels_1_to_4" | null | The crop's ripeness scale: |
created_atbắt buộc | number | Unix seconds (0 for the crop the platform started with). |
updated_atbắt buộc | number | Unix seconds of the last change. |
CropCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | The crop code that lots ( |
namesbắt buộc | CropNames | |
ripeness_scalekhông bắt buộc | "levels_1_to_4" | null | The crop's ripeness scale: |
CropDetail
object
A crop of the registry with its rules per destination market and its grading rules.
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | The crop code that lots ( |
namesbắt buộc | CropNames | |
ripeness_scalebắt buộc | "levels_1_to_4" | null | The crop's ripeness scale: |
created_atbắt buộc | number | Unix seconds (0 for the crop the platform started with). |
updated_atbắt buộc | number | Unix seconds of the last change. |
marketsbắt buộc | array<CropMarketRule> | |
grading_rulesbắt buộc | array<CropGradingRule> |
CropGradingRule
object
The platform's grading rules for one variety of a crop, or for every variety of it (variety null). They apply to a lot whose company has no grading rules of its own for the lot's variety.
| Tên | Kiểu | Mô tả |
|---|---|---|
cropbắt buộc | string | |
varietybắt buộc | string | null | |
rulesbắt buộc | GradingRules | |
created_atbắt buộc | number | |
updated_atbắt buộc | number |
CropGradingRulePut
object
| Tên | Kiểu | Mô tả |
|---|---|---|
varietybắt buộc | string | null | A variety of the crop; null for every variety of it. |
rulesbắt buộc | GradingRules |
CropList
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<Crop> | Every crop of the registry, by code (at most 200). |
configuredbắt buộc | array<string> | The deployment's configured crops (the crops a published code list may name) that have no registry entry: lots and growing areas may name them too, without a sampling rule, a registration protocol or grading rules of their own. |
CropMarketRule
object
A crop's rules for one destination market.
| Tên | Kiểu | Mô tả |
|---|---|---|
cropbắt buộc | string | |
marketbắt buộc | string | ISO 3166-1 alpha-2. |
registration_protocolbắt buộc | boolean | Whether the market's registration protocol applies to the crop: the public lot page then names the protocol for a lot of the crop whose growing area grows it and has a GACC growing-area code. |
samplingbắt buộc | CropSampling | null | The market's sampling rule; null when it sets none (a lot of the crop for this market is then not sampled). |
created_atbắt buộc | number | |
updated_atbắt buộc | number |
CropMarketRulePut
object
| Tên | Kiểu | Mô tả |
|---|---|---|
registration_protocolbắt buộc | boolean | |
samplingbắt buộc | CropSampling | null |
CropNames
object
The crop's name in Vietnamese, English and Simplified Chinese (each 1 to 100 characters).
| Tên | Kiểu | Mô tả |
|---|---|---|
vibắt buộc | string | |
enbắt buộc | string | |
zh-Hansbắt buộc | string |
CropSampling
object
A market's sampling rule for the crop: the share of a lot's export fruits sampled, the lower share once the growing area went clean_days without a failed sample, and the analytes a lab tests.
| Tên | Kiểu | Mô tả |
|---|---|---|
rulebắt buộc | string | The rule's id, unique across crops and markets; every sampling records it. |
rule_sourcebắt buộc | string | The http(s) address of the published rule. |
base_ratebắt buộc | number | 0.02 is 2%. |
clean_ratebắt buộc | number | |
clean_daysbắt buộc | integer | |
analytesbắt buộc | array<string> | |
analytes_sourcekhông bắt buộc | string | null | The http(s) address that requires these tests; optional. |
CropUpdate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
nameskhông bắt buộc | CropNames | |
ripeness_scalekhông bắt buộc | "levels_1_to_4" | null | The crop's ripeness scale: |
Device
object
A device and its status read model. last_seen, max_seq and last_model come from the device's ingest state (null before its first message); firmware is device.fw of its newest stored envelope that carries one, and battery_pct / battery_v the newest device.battery / device.battery_voltage reading of a status or event envelope, each among its latest 32 stored (accepted or quarantined) envelopes; last_calibrated_at is when its latest succeeded calibrate command completed. ready is true when the device is active, has an active key that may sign for it (its own, or one of an active gateway at its tenant and site) and was last seen within 24 hours.
| Tên | Kiểu | Mô tả |
|---|---|---|
device_idbắt buộc | string | |
tenantbắt buộc | string | |
sitebắt buộc | string | The site segment of the device's ingest route and MQTT topics. |
facilitybắt buộc | string | null | Facility code; null for a device registered before facilities, whose site then stands in for the facility in operator scope. |
profilebắt buộc | string | Device profile id (without version). |
statusbắt buộc | string | Only |
display_namebắt buộc | string | null | |
vendor_modelbắt buộc | string | null | |
serialbắt buộc | string | null | |
created_atbắt buộc | number | Unix seconds. |
commandsbắt buộc | array<string> | The downlink commands the device's profile declares, sorted by name: the only names |
last_seenbắt buộc | number | null | Unix seconds (server time of the last message). |
max_seqbắt buộc | integer | null | |
last_modelbắt buộc | string | null | |
firmwarebắt buộc | string | null | |
battery_pctbắt buộc | number | null | |
battery_vbắt buộc | number | null | |
last_calibrated_atbắt buộc | number | null | Unix seconds. |
readybắt buộc | boolean | |
approvalbắt buộc | "pending" | "approved" | "rejected" | Platform approval (#201): |
approval_reasonbắt buộc | string | null | The reason of a rejection; null otherwise. |
approval_atbắt buộc | number | null | Unix seconds of the last approval decision. |
DeviceApproval
object
| Tên | Kiểu | Mô tả |
|---|---|---|
keysbắt buộc | array<string> | The kids of the identity's waiting keys the platform admin saw in the queue ( |
DeviceApprovalItem
object
A device or gateway of any company in the platform's approval queue (#201). The pending queue also lists an approved one with an active key no platform admin approved yet.
| Tên | Kiểu | Mô tả |
|---|---|---|
kindbắt buộc | "device" | "gateway" | |
idbắt buộc | string | The device or gateway id (one namespace). |
tenantbắt buộc | string | The company that registered it. |
tenant_namebắt buộc | string | null | |
sitebắt buộc | string | |
facilitybắt buộc | string | null | |
profilebắt buộc | string | null | The device profile; null for a gateway. |
display_namebắt buộc | string | null | |
registered_bybắt buộc | string | null | Who registered it (null before #201, or when the platform provisioned it). |
registered_atbắt buộc | number | null | Unix seconds; null for an older gateway. |
approvalbắt buộc | "pending" | "approved" | "rejected" | |
approval_reasonbắt buộc | string | null | |
approval_atbắt buộc | number | null | Unix seconds of the last decision. |
approval_bybắt buộc | string | null | Who decided last: a platform admin, |
keysbắt buộc | array<object> | Its active signing keys (never the public key itself), each with its own approval: a key a company registers after the device or gateway was approved waits for the platform; an approval lists the waiting keys it approves (DeviceApproval). |
DeviceApprovalPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<DeviceApprovalItem> | |
next_cursorbắt buộc | string | null | Pass as |
DeviceCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
device_idbắt buộc | string | Unique across every tenant's devices and gateways. An id starting with |
profilebắt buộc | string | The id of a device profile the server knows; any other id is refused. The profiles, each served as a file: |
sitebắt buộc | string | |
facilitybắt buộc | string | A facility code of the caller's tenant. |
display_namekhông bắt buộc | string | null | |
vendor_modelkhông bắt buộc | string | null | |
serialkhông bắt buộc | string | null |
DeviceMetadata
object
SENS-B1d (#234): what a device's readings can be judged by: the placement version in force (#225) and the calibrations not superseded. This is the document an EPCIS deviceMetadata link of the device's readings can name: https://txng.theio.vn/v1/devices/{id}/metadata (on this deployment's origin); readable only by the device's company and CropPath, never public. EPCIS exports do not link it yet.
| Tên | Kiểu | Mô tả |
|---|---|---|
device_idbắt buộc | string | |
placementbắt buộc | DevicePlacement | null | The placement version in force at |
calibrationsbắt buộc | array<Calibration> | The calibrations not superseded, newest first, at most 1000. |
as_ofbắt buộc | number | The server time the placement in force was read at. |
DevicePage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<Device> | |
next_cursorbắt buộc | string | null | Pass as |
DevicePlacement
object
SENS-A2 (#225): one placement version of a device, never changed once recorded: an installation, or a removal (removed_at set, no binding). A version is in force from installed_at (for a removal removed_at, else recorded_at) until valid_until, when the next version starts (null for the current one). Ingest holds an envelope as growing_area_mismatch when the version in force at its time is fixed and bound to another growing area than the one the envelope claims; an envelope timed before the first version is checked against the first version. While a removal is in force, an envelope claiming a growing area raises a device_removed alert and, when the ended installation was fixed, is held (growing_area_mismatch for another area than that installation's, else device_removed).
| Tên | Kiểu | Mô tả |
|---|---|---|
device_idbắt buộc | string | |
versionbắt buộc | integer | 1 for the first placement, then 2, 3, ... |
mobilitybắt buộc | "fixed" | "mobile" | |
key_protectionbắt buộc | "hardware" | "software" | |
gnssbắt buộc | boolean | |
growing_areabắt buộc | string | null | |
latbắt buộc | number | null | |
lonbắt buộc | number | null | |
accuracy_mbắt buộc | number | null | |
fix_atbắt buộc | number | null | |
installed_atbắt buộc | number | null | |
installerbắt buộc | string | null | |
photo_sha256bắt buộc | string | null | |
depth_cmbắt buộc | number | null | |
sensor_serialbắt buộc | string | null | |
notebắt buộc | string | null | |
removed_atbắt buộc | number | null | Set on a removal version: when the device was taken out. |
recorded_bykhông bắt buộc | string | The CropPath platform admin who recorded it; present for platform admins only. |
recorded_atbắt buộc | number | |
valid_untilbắt buộc | number | null | When the next version starts; null for the current version. |
DevicePlacementCreate
object
SENS-A2 (#225): a new placement version of a device, recorded by a platform admin acting for the device's company (X-Tenant). mobility and key_protection are required. A fixed placement must also give the growing area it is bound to (one of the company's), the surveyed install point (lat, lon, accuracy_m) and the commissioning record: photo_sha256 (a JPEG or PNG the company's records hold, uploaded first with PUT /v1/attachments/{sha256} for the same company), fix_at, installed_at and installer. A mobile placement may leave them out. Times are Unix seconds, from 2020-01-01 and at most 300 s ahead of the server clock; fix_at is at most 7 days before installed_at and never after it (300 s of clock drift allowed).
| Tên | Kiểu | Mô tả |
|---|---|---|
mobilitybắt buộc | "fixed" | "mobile" |
|
key_protectionbắt buộc | "hardware" | "software" | The platform admin's statement of where the device keeps its signing key: |
gnsskhông bắt buộc | boolean | The device has its own GNSS receiver. Default false. |
growing_areakhông bắt buộc | string | Code of a growing area of the device's company; required for |
latkhông bắt buộc | number | Install point latitude, WGS84. |
lonkhông bắt buộc | number | Install point longitude, WGS84. |
accuracy_mkhông bắt buộc | number | Accuracy of the install point fix in metres. |
fix_atkhông bắt buộc | number | When the GPS fix of the install point was taken: at most 7 days before |
installed_atkhông bắt buộc | number | When the device was installed there: the version is in force from then (from when it was recorded when absent), and may not start before the current version. |
installerkhông bắt buộc | string | Who installed it. |
photo_sha256không bắt buộc | string | SHA-256 of the installer's photo of the installed device (JPEG or PNG). |
depth_cmkhông bắt buộc | number | Probe depth in centimetres. |
sensor_serialkhông bắt buộc | string | Probe serial number. |
notekhông bắt buộc | string | Why it was placed or moved. |
DevicePlacementRemoval
object
SENS-A2 (#225): the device was taken out. A new placement version that ends the binding of the installation in force (it keeps that version's mobility, key_protection and gnss; growing area, install point and commissioning record are null). Only a device whose current version is an installation can be removed; a later installation is a new version again. While a removal is in force, an envelope of the device that claims a growing area raises a device_removed alert; when the installation the removal ended was fixed, the envelope is also held: as growing_area_mismatch when it claims another growing area than that installation's, else as device_removed.
| Tên | Kiểu | Mô tả |
|---|---|---|
removed_atbắt buộc | number | When the device was taken out, Unix seconds: from 2020-01-01, at most 300 s ahead of the server clock, and not before the current version starts. |
notekhông bắt buộc | string | Why it was taken out. |
DevicePlacements
object
SENS-A2 (#225): a device's placement versions, newest first (at most 1000).
| Tên | Kiểu | Mô tả |
|---|---|---|
device_idbắt buộc | string | |
registered_before_placementsbắt buộc | boolean | The device existed before placements were introduced (owner decision Q3, #223): its location claims stay Self-declared until it is replaced, whatever its placement says. |
itemsbắt buộc | array<DevicePlacement> |
DeviceRejection
object
| Tên | Kiểu | Mô tả |
|---|---|---|
reasonbắt buộc | string | Shown to the company. |
DeviceUpdate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
statuskhông bắt buộc | "active" | "inactive" | |
display_namekhông bắt buộc | string | null | |
vendor_modelkhông bắt buộc | string | null | |
serialkhông bắt buộc | string | null |
DidDocument
object
A DID document (W3C DID Core 1.0) of the did:web method: every active and retired key of the facility as a JsonWebKey2020 verification method, each also an assertion method; a revoked key is left out.
| Tên | Kiểu | Mô tả |
|---|---|---|
@contextbắt buộc | array<string> | |
idbắt buộc | string | |
verificationMethodbắt buộc | array<object> | |
assertionMethodbắt buộc | array<string> |
EatingWindow
object
When the fruit is expected to be good to eat, counted from the measurement day in Asia/Ho_Chi_Minh; the row of the eating-window table for the effective level, the whole days since the lot's harvest date and the lot's storage band.
| Tên | Kiểu | Mô tả |
|---|---|---|
start_daysbắt buộc | integer | |
end_daysbắt buộc | integer | |
from_datebắt buộc | string (date) | |
to_datebắt buộc | string (date) | |
bandbắt buộc | "ambient" | "10-13C" | "14-18C" | Storage temperature band of the lot. |
warningbắt buộc | "immature" | "eat_soon" | "overripe" | null |
EatingWindowRow
object
| Tên | Kiểu | Mô tả |
|---|---|---|
levelbắt buộc | integer | |
min_daysbắt buộc | integer | |
max_daysbắt buộc | integer | |
bandbắt buộc | "ambient" | "10-13C" | "14-18C" | |
start_daysbắt buộc | integer | |
end_daysbắt buộc | integer | |
warningbắt buộc | "immature" | "eat_soon" | "overripe" | null |
EmailSettings
object
| Tên | Kiểu | Mô tả |
|---|---|---|
notificationsbắt buộc | boolean | Whether the person gets the notification, alert and recall emails (on until they turn it off). Invitation and password emails are always sent. |
languagebắt buộc | "vi" | "en" | "zh-Hans" | null | The language of the person's emails; null: not known, an email then carries Vietnamese, English and Simplified Chinese. |
deliverybắt buộc | boolean | Whether this server sends email at all (SMTP configured). When false, one-time links are passed on by hand; when true, each one-time link is also emailed to its person. |
EmailSettingsUpdate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
notificationsbắt buộc | boolean | |
languagekhông bắt buộc | "vi" | "en" | "zh-Hans" | null | Omitted or null: not known. |
EmailUnsubscribe
object
| Tên | Kiểu | Mô tả |
|---|---|---|
tokenbắt buộc | string | The token of the email's link ( |
EmailUnsubscribed
object
| Tên | Kiểu | Mô tả |
|---|---|---|
notificationsbắt buộc | false |
Envelope
object
A signed envelope (envelope version 1, spec agritrace.iot/1.0). The server applies the envelope's full schema, served at /developers/downloads/envelope-v1.schema.json; it is deliberately not duplicated here, so this schema is open. An event envelope's eventType and the context keys it requires are those of /developers/downloads/event-types-v1.json; each reading's capability, unit and range are those of /developers/downloads/capabilities-v1.json; device.profile is <profile id>@<profile version> of a device profile below /developers/downloads/profiles/ (see DeviceCreate.profile).
EnvelopeDetail
object
One stored envelope with its signed payload as stored and its signature checked again.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | Envelope id. |
device_idbắt buộc | string | |
sitebắt buộc | string | Site of the ingest route. |
facilitybắt buộc | string | null | The envelope context's facility, null when it names none. |
seqbắt buộc | integer | The device's sequence number. |
kindbắt buộc | "telemetry" | "event" | "status" | |
event_typebắt buộc | string | null | Event type; null for telemetry and status. |
event_timebắt buộc | string | The device's time, as sent. |
received_atbắt buộc | number | Server receive time, epoch seconds. |
statusbắt buộc | "accepted" | "quarantined" | "rejected_after_review" | |
reasonsbắt buộc | array<string> | Why ingest quarantined it; empty when accepted on arrival. |
lotbắt buộc | string | null | The envelope context's lot. |
growing_areabắt buộc | string | null | The envelope context's growing area. |
payloadbắt buộc | object | The signed envelope exactly as stored (spec envelope v1). |
signaturebắt buộc | object |
|
EnvelopePage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<EnvelopeSummary> | |
next_cursorbắt buộc | string | null | Pass as |
EnvelopeSummary
object
One stored envelope of the device message log (#117): routing and outcome columns only.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | Envelope id. |
device_idbắt buộc | string | |
sitebắt buộc | string | Site of the ingest route. |
facilitybắt buộc | string | null | The envelope context's facility, null when it names none. |
seqbắt buộc | integer | The device's sequence number. |
kindbắt buộc | "telemetry" | "event" | "status" | |
event_typebắt buộc | string | null | Event type; null for telemetry and status. |
event_timebắt buộc | string | The device's time, as sent. |
received_atbắt buộc | number | Server receive time, epoch seconds. |
statusbắt buộc | "accepted" | "quarantined" | "rejected_after_review" | |
reasonsbắt buộc | array<string> | Why ingest quarantined it; empty when accepted on arrival. |
lotbắt buộc | string | null | The envelope context's lot. |
EpcisCaptureReport
object
The outcome of one capture, one result per event in document order.
| Tên | Kiểu | Mô tả |
|---|---|---|
capture_idbắt buộc | integer | The capture's id (the audit row's entity id). |
eventsbắt buộc | integer | Events in the document. |
acceptedbắt buộc | integer | Events stored by this capture. |
duplicatesbắt buộc | integer | Events already held with the same content. |
rejectedbắt buộc | integer | Events refused (nothing written for them). |
sourcebắt buộc | "partner_capture" | Provenance of captured events. |
tierbắt buộc | "self_declared" | Trust tier of captured events (ADR 0001): always Self-declared. |
resultsbắt buộc | array<EpcisCaptureResult> |
EpcisCaptureResult
object
One event's outcome. step and references only when accepted; code (and usually detail) only when rejected.
| Tên | Kiểu | Mô tả |
|---|---|---|
indexbắt buộc | integer | The event's position in eventList. |
event_idbắt buộc | string | null | The event's eventID; null when it sent none usable. |
statusbắt buộc | "accepted" | "duplicate" | "rejected" | |
stepkhông bắt buộc | "harvest" | "receive" | "pack" | "ship" | "observe" | The journey step the event records: commissioning is the harvest, receiving, packing, shipping; sensor_reporting (#238) is an observation ( |
referenceskhông bắt buộc | array<object> | The tenant's records the event names. |
codekhông bắt buộc | "invalid_event" | "unsupported_event_type" | "missing_event_id" | "unsupported_action" | "unsupported_error_declaration" | "unsupported_biz_step" | "event_too_large" | "event_too_deep" | "event_id_conflict" | "no_reference" | "unknown_reference" | Why the event was rejected. |
detailkhông bắt buộc | string | The member or the identifier at fault (machine text, not translated). |
EpcisDocument
object
An EPCIS 2.0 JSON-LD document; its shape is defined by the EPCIS standard, so the schema is open.
Error
object
Every error body. code is the message head reduced to lower-case snake case.
| Tên | Kiểu | Mô tả |
|---|---|---|
errorbắt buộc | string | |
codebắt buộc | string | |
itemskhông bắt buộc | array<BatchItemError> | A batch request (#170) only: the items that failed, by index. Every invalid item on a 400 |
detailskhông bắt buộc | array<AddressToCode> | A seal refused with |
ExportLabel
object
What a lot's export carton and pallet labels print for a market, and why they are not ready for export (problems, empty when ready).
| Tên | Kiểu | Mô tả |
|---|---|---|
lotbắt buộc | string | |
marketbắt buộc | string | |
lot_statusbắt buộc | string | |
template_versionbắt buộc | integer | |
templatebắt buộc | ExportLabelTemplate | |
fieldsbắt buộc | object | |
palletbắt buộc | object | The selected cartons' totals (the pallet label) and the lot's public URL. |
cartonsbắt buộc | array<ExportLabelCarton> | |
problemsbắt buộc | array<"lot_not_packed" | "lot_recalled" | "shipment_market_mismatch" | "fruit_missing" | "origin_missing" | "export_country_missing" | "orchard_missing" | "packing_house_missing" | "producer_missing" | "packing_date_missing" | "address_not_coded" | "orchard_code_not_cross_checked" | "packing_house_code_not_cross_checked" | "no_cartons"> | |
readybắt buộc | boolean | |
next_cursorbắt buộc | string | null |
ExportLabelCarton
object
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | |
carton_nobắt buộc | integer | |
net_mass_kgbắt buộc | number | null | |
fruit_countbắt buộc | integer | |
qr_urlbắt buộc | string (uri) | The carton's public URL: a GS1 Digital Link with the lot's GTIN, else |
label_codekhông bắt buộc | string | #288, with |
ExportLabelCodeField
object
The orchard (growing area, PUC code) or the packing house (facility, PHC code).
| Tên | Kiểu | Mô tả |
|---|---|---|
namebắt buộc | string | null | |
codebắt buộc | string | null | The registration code, only when cross-checked; null otherwise (never printed unchecked). |
checkbắt buộc | "matched" | "no_code" | "no_list" | "not_found" | "mismatch" | "suspended" | "revoked" | "expired" | The code against the published code lists (#150): |
cross_checkedbắt buộc | boolean | Matched on a list that is not stale. |
ExportLabelFieldTemplate
object
A field's caption in Chinese and English and whether the label is refused without a value.
| Tên | Kiểu | Mô tả |
|---|---|---|
zhbắt buộc | string | |
enbắt buộc | string | |
requiredbắt buộc | boolean |
ExportLabelPrint
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
lotbắt buộc | string | |
marketbắt buộc | string | |
kindbắt buộc | "carton" | "pallet" | |
frombắt buộc | integer | |
tobắt buộc | integer | |
cartonsbắt buộc | integer | |
template_versionbắt buộc | integer | |
printed_bybắt buộc | string | |
printed_atbắt buộc | number |
ExportLabelPrintCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
marketbắt buộc | string | |
kindbắt buộc | "carton" | "pallet" | |
fromkhông bắt buộc | integer | |
tokhông bắt buộc | integer | |
template_versionbắt buộc | integer | The template version of the label the console read and prints (ExportLabel.template_version); 409 label_changed when another version is in force. |
cartonsbắt buộc | integer | The selection's carton count the console read (ExportLabel.pallet.cartons); 409 label_changed when the selection now holds another count. |
ExportLabelTemplate
object
A destination market's label template, text only: the mark on every package and pallet, the export country, the fruit name of each lot product, each field's captions and whether it is required, whether the PUC and PHC codes must be cross-checked, and the rule it follows. Texts are 1 to 120 characters on one line.
| Tên | Kiểu | Mô tả |
|---|---|---|
markbắt buộc | ExportLabelText | |
export_countrybắt buộc | ExportLabelText | |
productsbắt buộc | map<string, ExportLabelText> | The fruit name per lot product ( |
fieldsbắt buộc | object | |
require_cross_checked_codesbắt buộc | boolean | When true, a label whose PUC or PHC code is not cross-checked against the published code lists is not ready for export. |
sourcebắt buộc | string |
ExportLabelTemplateList
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<ExportLabelTemplateView> |
ExportLabelTemplateView
object
A market's template in force: version 0 is the built-in default (no edit yet).
| Tên | Kiểu | Mô tả |
|---|---|---|
marketbắt buộc | string | |
versionbắt buộc | integer | |
templatebắt buộc | ExportLabelTemplate | |
updated_atbắt buộc | number | null | |
updated_bybắt buộc | string | null |
ExportLabelText
object
A text of the label in Chinese (zh) and English (en).
| Tên | Kiểu | Mô tả |
|---|---|---|
zhbắt buộc | string | |
enbắt buộc | string |
Facility
object
A facility (packing house) of one tenant. Codes created through the API look like VN-TGPH-021; codes from the migration backfill keep their original spelling.
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | |
tenantbắt buộc | string | |
namebắt buộc | string | |
addressbắt buộc | string | null | |
provincebắt buộc | string | null | |
districtbắt buộc | string | null | |
gacc_phc_codebắt buộc | string | null | GACC registration of the packing house. |
linesbắt buộc | array<string> | |
sourcebắt buộc | "manual" | "backfill" | |
approved_atbắt buộc | number | null | Unix seconds; null until approved. |
slugbắt buộc | string | |
created_atbắt buộc | number | Unix seconds. |
updated_atbắt buộc | number | Unix seconds. |
proposed_atbắt buộc | number | null | SELF-2-8 (#197): Unix seconds when a company admin proposed the facility (POST /v1/facility-proposals); null for a facility the platform created. A proposal with approved_at null waits for CropPath: no lot, shipment, device, gateway, harvest app key or signing key may name it. |
communekhông bắt buộc | string | null | The commune's official name (xã, phường or đặc khu) when the record is coded; else null. Only with |
province_codekhông bắt buộc | string | null | The province's official 2-digit code, in the list |
commune_codekhông bắt buộc | string | null | The commune's official 5-digit code, in the list |
admin_units_versionkhông bắt buộc | string | null | The version of the official list the codes were taken from (for example |
address_before_reformkhông bắt buộc | object | null | The province, district and commune text the record held before it was coded, or the text a request gave through the deprecated text path; kept for good once set. Null for a record entered with codes. Only with |
address_statuskhông bắt buộc | "coded" | "choose_commune" | "needs_commune" | "outside_vietnam" | null |
|
address_candidateskhông bắt buộc | array<string> | null | For |
FacilityCertification
object
#269: a packing-house certification of a facility. Shown to the company's staff only: no trust tier and no public page uses them (architect decision on #269; ADR 0001).
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
facilitybắt buộc | string | |
schemebắt buộc | "ISO 22000" | "FSSC 22000" | "BRCGS" | "IFS" | The packing-house certification scheme, compared exactly. |
numberbắt buộc | string | The certificate number. |
issuerbắt buộc | string | The certifier (certification body) that issued the certificate. |
valid_frombắt buộc | string (date) | The first valid day. |
valid_tobắt buộc | string (date) | The last valid day, not before valid_from. |
evidence_sha256bắt buộc | string | The SHA-256 of the certificate document, a company upload (GET /v1/attachments/{sha256} for the facility's readers; never public). |
created_atbắt buộc | number | When it was recorded (Unix seconds). |
ended_onbắt buộc | string (date) | null (date) | The day it stopped being in force (withdrawn, suspended or replaced), from valid_from to valid_to; null while it was not ended. |
end_reasonbắt buộc | string | null | Why it was ended; null while not. |
ended_atbắt buộc | number | null | When it was ended (Unix seconds); null while not. |
statusbắt buộc | "valid" | "expired" | "not_yet_valid" | "ended" | On today's date in Viet Nam: |
FacilityCertificationCreate
object
#269: a packing-house certification to record on a facility.
| Tên | Kiểu | Mô tả |
|---|---|---|
schemebắt buộc | "ISO 22000" | "FSSC 22000" | "BRCGS" | "IFS" | The packing-house certification scheme, compared exactly. |
numberbắt buộc | string | The certificate number. |
issuerbắt buộc | string | The certifier. |
valid_frombắt buộc | string (date) | |
valid_tobắt buộc | string (date) | Not before valid_from. |
evidence_sha256bắt buộc | string | The SHA-256 of the certificate document the company uploaded first with PUT /v1/attachments/{sha256}. |
FacilityCertificationEnd
object
#269: the end of a facility's certification.
| Tên | Kiểu | Mô tả |
|---|---|---|
ended_onbắt buộc | string (date) | The day it stopped being in force, from valid_from to valid_to. |
reasonbắt buộc | string | Why it was ended. |
FacilityCertificationList
object
#269: every certification of a facility (at most 100), newest valid_from first.
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<FacilityCertification> |
FacilityCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | |
namebắt buộc | string | |
addresskhông bắt buộc | string | null | |
provincekhông bắt buộc | string | null | Deprecated (#273), sunset 1 May 2027: the province as free text. Send |
districtkhông bắt buộc | string | null | Deprecated (#273), sunset 1 May 2027: Viet Nam has had no district level since 1 July 2025. Send |
province_codekhông bắt buộc | string | null | #273: the province (tỉnh or thành phố trực thuộc trung ương) by its official 2-digit code in the administrative units list in force ( |
commune_codekhông bắt buộc | string | null | #273: the commune (xã, phường or đặc khu) by its official 5-digit code in the administrative units list in force ( |
gacc_phc_codekhông bắt buộc | string | null | |
lineskhông bắt buộc | array<string> | |
slugkhông bắt buộc | string |
FacilityGln
object
#161: a facility's GLN (EPCIS read point and business location of its events).
| Tên | Kiểu | Mô tả |
|---|---|---|
facilitybắt buộc | string | |
glnbắt buộc | string | null | GS1 Global Location Number: 13 digits, the last the GS1 mod-10 check digit; null when none. |
FacilityPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<Facility> | |
next_cursorbắt buộc | string | null | Pass as |
FacilityProposal
object
SELF-2-8 (#197): a company's facility proposal waiting for CropPath, in the platform's queue.
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | |
tenantbắt buộc | string | |
tenant_namebắt buộc | string | The proposing company's name. |
namebắt buộc | string | |
addressbắt buộc | string | null | |
provincebắt buộc | string | null | |
districtbắt buộc | string | null | |
linesbắt buộc | array<string> | |
slugbắt buộc | string | The default slug of the code; the approval may set another. |
proposed_atbắt buộc | number | Unix seconds. |
proposed_bybắt buộc | string | null | Who proposed it (the account's email). |
FacilityProposalApproval
object
SELF-2-8 (#197): what CropPath sets when it approves a proposal (both optional; the slug is the facility's did:web path).
| Tên | Kiểu | Mô tả |
|---|---|---|
slugkhông bắt buộc | string | |
gacc_phc_codekhông bắt buộc | string | null |
FacilityProposalCreate
object
SELF-2-8 (#197): what a company admin gives when proposing a facility. Never the slug or the GACC PHC code: CropPath sets both when it approves the proposal.
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | |
namebắt buộc | string | |
addresskhông bắt buộc | string | null | |
provincekhông bắt buộc | string | null | Deprecated (#273), sunset 1 May 2027: the province as free text. Send |
districtkhông bắt buộc | string | null | Deprecated (#273), sunset 1 May 2027: Viet Nam has had no district level since 1 July 2025. Send |
province_codekhông bắt buộc | string | null | #273: the province (tỉnh or thành phố trực thuộc trung ương) by its official 2-digit code in the administrative units list in force ( |
commune_codekhông bắt buộc | string | null | #273: the commune (xã, phường or đặc khu) by its official 5-digit code in the administrative units list in force ( |
lineskhông bắt buộc | array<string> |
FacilityProposalPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<FacilityProposal> | |
next_cursorbắt buộc | string | null |
FacilityProposalRejected
object
SELF-2-8 (#197): the proposal CropPath rejected (it is deleted, so its code is free again).
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | |
tenantbắt buộc | string | |
namebắt buộc | string | |
reasonbắt buộc | string |
FacilityProposalRejection
object
| Tên | Kiểu | Mô tả |
|---|---|---|
reasonbắt buộc | string | Shown to the company in its activity log. |
FacilityUpdate
object
gacc_phc_code and slug: platform_admin only.
| Tên | Kiểu | Mô tả |
|---|---|---|
namekhông bắt buộc | string | |
addresskhông bắt buộc | string | null | |
provincekhông bắt buộc | string | null | Deprecated (#273), sunset 1 May 2027: the province as free text. Send |
districtkhông bắt buộc | string | null | Deprecated (#273), sunset 1 May 2027: Viet Nam has had no district level since 1 July 2025. Send |
province_codekhông bắt buộc | string | null | #273: the province (tỉnh or thành phố trực thuộc trung ương) by its official 2-digit code in the administrative units list in force ( |
commune_codekhông bắt buộc | string | null | #273: the commune (xã, phường or đặc khu) by its official 5-digit code in the administrative units list in force ( |
gacc_phc_codekhông bắt buộc | string | null | |
lineskhông bắt buộc | array<string> | |
slugkhông bắt buộc | string |
FourEyesState
object
INTEGRITY-3 (#203). The selected company's second admin approval: whether its critical actions wait for a second admin, how many active company admins it has (fewer than 2: CropPath support is the second approver), how many requests wait for a decision, and how long a request may wait.
| Tên | Kiểu | Mô tả |
|---|---|---|
require_second_adminbắt buộc | boolean | |
adminsbắt buộc | integer | Active company admins (active membership and account). |
pendingbắt buộc | integer | Requests waiting for a decision (not expired). |
expires_after_sbắt buộc | integer | Seconds a request may wait (72 hours). |
FourEyesUpdate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
require_second_adminbắt buộc | boolean |
Fruit
object
A fruit record: identity, label fields and the measurements bound to it (L3).
| Tên | Kiểu | Mô tả |
|---|---|---|
tenantbắt buộc | string | |
codebắt buộc | string | Fruit code |
nbắt buộc | integer | Position of the fruit in its lot: 1, 2, ... without gaps. |
public_idbắt buộc | string | 128 random bits (hex); the public handle of the fruit, never derived from code or n. |
lotbắt buộc | string | Lot code. |
sessionbắt buộc | string | Measurement session id. |
linebắt buộc | string | The session's line. |
operatorbắt buộc | string | null | Opaque operator id |
statusbắt buộc | "awaiting_device" | "recorded" | "overridden" | "rejected" | "remeasured" | Fruit record state; allocation starts at awaiting_device. |
labels_printed_atbắt buộc | number | null | Unix seconds the label was printed (allocation). |
created_atbắt buộc | number | Unix seconds. |
updated_atbắt buộc | number | Unix seconds. |
qr_urlbắt buộc | string (uri) | The QR content: a GS1 Digital Link |
levelbắt buộc | integer | null | Effective ripeness level (1 Non, 2 Gia, 3 Chin toi, 4 Chin ruc): level_sensory while an override is bound, else level_pred. |
level_predbắt buộc | integer | null | The level the knocker sent ( |
maturity_classbắt buộc | "immature" | "mature" | "overripe" | "defect" | "unknown" | null | The knocker's |
confidencebắt buộc | number | null | Model confidence 0-1. |
modelbắt buộc | string | null | Model version that made the prediction. |
measured_atbắt buộc | number | null | Unix seconds of the knock (device event time). |
weight_kgbắt buộc | number | null | Net mass from the bound scale reading. |
level_sensorybắt buộc | integer | null | The operator's sensory override (keys 1-4), if bound. |
overridebắt buộc | boolean | A sensory override is bound. |
pending_reviewbắt buộc | boolean | Overlay: a bound envelope is quarantined and waits for review. |
gradebắt buộc | "A" | "B" | "reject" | null | Grade under the tenant's rules for the lot's variety (else the platform default), derived when the fruit was last bound or reviewed; null until a signed knock, a level and a weight are known (a defect or a reject level grades reject at once). |
eating_windowbắt buộc | EatingWindow | null | |
record_tierbắt buộc | "self_declared" | "device_recorded" | "cross_checked" | "lab_verified" | null | Trust tier of the fruit's own record, derived at read time; null until a knock is bound. Cross-checked needs the per-fruit volume quota, not reconciled yet. |
knock_envelope_idbắt buộc | string | null | The bound knock envelope. |
scale_envelope_idbắt buộc | string | null | The bound scale envelope. |
override_envelope_idbắt buộc | string | null | The bound sensory-override envelope. |
FruitActionCommand
object
The re-measure's set_session outcome for one device of the fruit's session, as on allocation (SessionCommand), plus skipped with reason session_not_open when the session is not open (nothing is sent).
| Tên | Kiểu | Mô tả |
|---|---|---|
device_idbắt buộc | string | |
command_idbắt buộc | string | null | |
statusbắt buộc | "pending" | "sent" | "failed" | "refused" | "skipped" | |
reasonbắt buộc | "not_declared" | "dispatch_failed" | "device_not_found" | "device_not_approved" | "invalid_command" | "session_not_open" | null |
FruitActionRequest
object
An operator action on a fruit (L4).
| Tên | Kiểu | Mô tả |
|---|---|---|
typebắt buộc | "accept" | "remeasure" | "reject" | "override" | |
levelkhông bắt buộc | integer | The sensory ripeness level (keys 1-4); required for override, refused otherwise. |
reasonkhông bắt buộc | string | null | Optional free text without control characters (U+0000-U+001F, U+007F-U+009F) and with at least one character outside ECMA-262 whitespace (U+FEFF included), stored with the action only (never returned or audited). The pattern is ECMA-262 and ASCII only ( |
idempotency_keybắt buộc | string | Client-chosen key, unique per tenant (a UUID fits). |
client_tsbắt buộc | string | When the operator acted, ISO 8601 with a zone offset; stored as given. |
FruitActionResult
object
The stored outcome of an action: the same body for the first request and every replay.
| Tên | Kiểu | Mô tả |
|---|---|---|
actionbắt buộc | object | |
fruitbắt buộc | Fruit | |
accepted_atbắt buộc | number | null | Unix seconds the fruit was first accepted into the lot (this round); null again once the bound measurement changes. |
measurement_roundbắt buộc | integer | Re-measures so far: 0 for the first measurement. |
commandsbắt buộc | array<FruitActionCommand> | set_session per device of the session (re-measure only; empty otherwise). |
FruitAllocate
object
No fields: the operator is the caller, the line and lot are the session's.
FruitAllocated
object
The new fruit, its label payload and the set_session outcome per device of the session.
| Tên | Kiểu | Mô tả |
|---|---|---|
tenantbắt buộc | string | |
codebắt buộc | string | Fruit code |
nbắt buộc | integer | Position of the fruit in its lot: 1, 2, ... without gaps. |
public_idbắt buộc | string | 128 random bits (hex); the public handle of the fruit, never derived from code or n. |
lotbắt buộc | string | Lot code. |
sessionbắt buộc | string | Measurement session id. |
linebắt buộc | string | The session's line. |
operatorbắt buộc | string | null | Opaque operator id |
statusbắt buộc | "awaiting_device" | "recorded" | "overridden" | "rejected" | "remeasured" | Fruit record state; allocation starts at awaiting_device. |
labels_printed_atbắt buộc | number | null | Unix seconds the label was printed (allocation). |
created_atbắt buộc | number | Unix seconds. |
updated_atbắt buộc | number | Unix seconds. |
qr_urlbắt buộc | string (uri) | The QR content: a GS1 Digital Link |
labelbắt buộc | FruitLabel | |
commandsbắt buộc | array<SessionCommand> | The set_session outcome per device of the session. |
levelbắt buộc | integer | null | Effective ripeness level (1 Non, 2 Gia, 3 Chin toi, 4 Chin ruc): level_sensory while an override is bound, else level_pred. |
level_predbắt buộc | integer | null | The level the knocker sent ( |
maturity_classbắt buộc | "immature" | "mature" | "overripe" | "defect" | "unknown" | null | The knocker's |
confidencebắt buộc | number | null | Model confidence 0-1. |
modelbắt buộc | string | null | Model version that made the prediction. |
measured_atbắt buộc | number | null | Unix seconds of the knock (device event time). |
weight_kgbắt buộc | number | null | Net mass from the bound scale reading. |
level_sensorybắt buộc | integer | null | The operator's sensory override (keys 1-4), if bound. |
overridebắt buộc | boolean | A sensory override is bound. |
pending_reviewbắt buộc | boolean | Overlay: a bound envelope is quarantined and waits for review. |
gradebắt buộc | "A" | "B" | "reject" | null | Grade under the tenant's rules for the lot's variety (else the platform default), derived when the fruit was last bound or reviewed; null until a signed knock, a level and a weight are known (a defect or a reject level grades reject at once). |
eating_windowbắt buộc | EatingWindow | null | |
record_tierbắt buộc | "self_declared" | "device_recorded" | "cross_checked" | "lab_verified" | null | Trust tier of the fruit's own record, derived at read time; null until a knock is bound. Cross-checked needs the per-fruit volume quota, not reconciled yet. |
knock_envelope_idbắt buộc | string | null | The bound knock envelope. |
scale_envelope_idbắt buộc | string | null | The bound scale envelope. |
override_envelope_idbắt buộc | string | null | The bound sensory-override envelope. |
FruitBatchItem
object
A fruit allocated by a batch with its label payload; a batch issues no device command.
| Tên | Kiểu | Mô tả |
|---|---|---|
tenantbắt buộc | string | |
codebắt buộc | string | Fruit code |
nbắt buộc | integer | Position of the fruit in its lot: 1, 2, ... without gaps. |
public_idbắt buộc | string | 128 random bits (hex); the public handle of the fruit, never derived from code or n. |
lotbắt buộc | string | Lot code. |
sessionbắt buộc | string | Measurement session id. |
linebắt buộc | string | The session's line. |
operatorbắt buộc | string | null | Opaque operator id |
statusbắt buộc | "awaiting_device" | "recorded" | "overridden" | "rejected" | "remeasured" | Fruit record state; allocation starts at awaiting_device. |
labels_printed_atbắt buộc | number | null | Unix seconds the label was printed (allocation). |
created_atbắt buộc | number | Unix seconds. |
updated_atbắt buộc | number | Unix seconds. |
qr_urlbắt buộc | string (uri) | The QR content: a GS1 Digital Link |
labelbắt buộc | FruitLabel | |
levelbắt buộc | integer | null | Effective ripeness level (1 Non, 2 Gia, 3 Chin toi, 4 Chin ruc): level_sensory while an override is bound, else level_pred. |
level_predbắt buộc | integer | null | The level the knocker sent ( |
maturity_classbắt buộc | "immature" | "mature" | "overripe" | "defect" | "unknown" | null | The knocker's |
confidencebắt buộc | number | null | Model confidence 0-1. |
modelbắt buộc | string | null | Model version that made the prediction. |
measured_atbắt buộc | number | null | Unix seconds of the knock (device event time). |
weight_kgbắt buộc | number | null | Net mass from the bound scale reading. |
level_sensorybắt buộc | integer | null | The operator's sensory override (keys 1-4), if bound. |
overridebắt buộc | boolean | A sensory override is bound. |
pending_reviewbắt buộc | boolean | Overlay: a bound envelope is quarantined and waits for review. |
gradebắt buộc | "A" | "B" | "reject" | null | Grade under the tenant's rules for the lot's variety (else the platform default), derived when the fruit was last bound or reviewed; null until a signed knock, a level and a weight are known (a defect or a reject level grades reject at once). |
eating_windowbắt buộc | EatingWindow | null | |
record_tierbắt buộc | "self_declared" | "device_recorded" | "cross_checked" | "lab_verified" | null | Trust tier of the fruit's own record, derived at read time; null until a knock is bound. Cross-checked needs the per-fruit volume quota, not reconciled yet. |
knock_envelope_idbắt buộc | string | null | The bound knock envelope. |
scale_envelope_idbắt buộc | string | null | The bound scale envelope. |
override_envelope_idbắt buộc | string | null | The bound sensory-override envelope. |
FruitBatchResult
object
The fruits a batch allocated, by n.
| Tên | Kiểu | Mô tả |
|---|---|---|
batch_idbắt buộc | integer | The stored batch request's id. |
countbắt buộc | integer | |
itemsbắt buộc | array<FruitBatchItem> | In request order. |
FruitLabel
object
What the label printer prints for the fruit.
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | |
lotbắt buộc | string | |
nbắt buộc | integer | |
linebắt buộc | string | |
operatorbắt buộc | string | null | |
printed_atbắt buộc | number | null | Unix seconds. |
qr_urlbắt buộc | string (uri) | |
label_codekhông bắt buộc | string | #326, in the fruit batch's answer with |
FruitPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<Fruit> | |
next_cursorbắt buộc | string | null | Pass as |
FsmaRow
object
One row of the FSMA 204 sortable spreadsheet (GET /v1/fsma.csv, GET /v1/lots/{lot}/fsma.csv; #158): every column on every row, in this order, an empty cell an empty string. One row per critical tracking event, sorted by time. The key data elements of 21 CFR 1 Subpart S, checked column by column against FDA's sortable spreadsheet template.
| Tên | Kiểu | Mô tả |
|---|---|---|
traceability_lot_codebắt buộc | string | The traceability lot code: the lot's code. On a transformation row, the NEW lot's code (the lot the merge produced, #91). |
critical_tracking_eventbắt buộc | "harvesting" | "receiving" | "cooling" | "initial_packing" | "shipping" | "transformation" | The FSMA 204 critical tracking event: harvesting, receiving, cooling and initial_packing from a signed device event (/developers/downloads/event-types-v1.json), shipping from a signed device event or a departed shipment, transformation from a lot merge (#91). |
event_datebắt buộc | string (date) | The event's date, YYYY-MM-DD: in the offset the device signed for a device event, in Asia/Ho_Chi_Minh (+07:00) for a departure or a merge. |
event_timebắt buộc | string | The event's time with its offset, whole seconds, hh:mm:ss+hh:mm (the same offset as event_date). |
locationbắt buộc | string | The code of the facility (or growing area) where the event happened: the device event's facility, the shipment's departure facility, the merge's facility. |
quantitybắt buộc | number | "" | The quantity: the mass.net reading of a device event, the kilograms of the lot's cartons on a departed shipment, or the kilograms the merge produced (transformation); empty without one. |
unit_of_measurebắt buộc | string | The quantity's unit: the reading's unit for a device event, kg for a departure or a merge; empty without a quantity. |
growing_areabắt buộc | string | The growing area code: the device event's, or the lot's for a departure or a merge; empty without one. |
parcelbắt buộc | string | The parcel the device event names; empty otherwise. |
producerbắt buộc | string | The producer the device event names; empty otherwise. |
device_idbắt buộc | string | The id of the device that signed the event; empty on a row the platform recorded (a departure, a merge). |
event_idbắt buộc | string | The signed device event's envelope id, or the merge's event id on a transformation row (the eventID of its EPCIS TransformationEvent without urn:uuid:); empty on a departure. |
commoditybắt buộc | string | The lot's product (for example durian); empty when the lot code is not one of the company's lots. |
varietybắt buộc | string | The lot's variety (for example Ri6); empty without one. |
field_namebắt buộc | string | The name the grower uses for the row's growing area (FSMA 204: the name of the field or other growing area the food was harvested from); empty when the area has no name. The area's code is in growing_area. |
traceability_lot_code_sourcebắt buộc | string | Where the traceability lot code was assigned: the lot's facility, its name and address (street, district, province); empty when the lot code is not one of the company's lots. #273: a facility coded by official administrative unit codes has its commune and province instead (Viet Nam has had no district level since 2025-07-01). |
traceability_lot_code_source_referencebắt buộc | string | The GS1 GLN of that facility (#161), a reference that may be given instead of the location description; empty without a GLN. |
shipper_location_namebắt buộc | string | Where the food came from. Shipping: the name of the facility it was shipped from. Receiving: the growing area's name (the farm it came from). Empty on other rows. |
shipper_location_addressbắt buộc | string | That location's address: the facility's street, district and province, or the growing area's commune, district and province. #273: a facility or growing area coded by official administrative unit codes has its commune and province instead (Viet Nam has had no district level since 2025-07-01). |
shipper_location_glnbắt buộc | string | That location's GS1 GLN (#161); empty without one. |
recipient_location_namebắt buộc | string | Where the food went. Shipping from a departed shipment: the consignee's legal name (the immediate subsequent recipient, #153). Receiving: the name of the facility that received it. Empty on other rows. |
recipient_location_addressbắt buộc | string | That location's address: the consignee's postal address and country (ISO 3166-1 alpha-2), or the facility's street, district and province. #273: a facility coded by official administrative unit codes has its commune and province instead (Viet Nam has had no district level since 2025-07-01). |
recipient_location_glnbắt buộc | string | That location's GS1 GLN: the consignee's (#153) or the facility's (#161); empty without one. |
reference_document_typebắt buộc | string | The types of the departed shipment's documents (#153: phytosanitary_certificate, certificate_of_origin, commercial_invoice, packing_list, customs_declaration, bill_of_lading, air_waybill, test_report, other), sorted, separated by "; "; empty on other rows. |
reference_document_numberbắt buộc | string | The numbers of those documents, in the same order, separated by "; ". |
containerbắt buộc | string | The ISO 6346 container number of the departed shipment; empty otherwise. |
input_traceability_lot_codebắt buộc | string | Transformation row: the code of the lot the merge used (one row per lot used); empty on other rows. |
input_quantitybắt buộc | number | "" | Transformation row: the kilograms the merge took from that lot (unit_of_measure kg); empty on other rows. |
Gateway
object
| Tên | Kiểu | Mô tả |
|---|---|---|
gateway_idbắt buộc | string | |
tenantbắt buộc | string | |
sitebắt buộc | string | |
facilitybắt buộc | string | null | |
display_namebắt buộc | string | null | |
statusbắt buộc | string | |
approvalbắt buộc | "pending" | "approved" | "rejected" | Platform approval (#201): |
approval_reasonbắt buộc | string | null | The reason of a rejection; null otherwise. |
approval_atbắt buộc | number | null | Unix seconds of the last approval decision. |
GatewayCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
gateway_idbắt buộc | string | Unique across every tenant's gateways and devices. An id starting with |
sitebắt buộc | string | |
facilitykhông bắt buộc | string | null | A facility code of the caller's tenant. |
display_namekhông bắt buộc | string | null |
GatewayHeartbeat
object
| Tên | Kiểu | Mô tả |
|---|---|---|
received_atbắt buộc | number | Unix seconds when the server received it. |
timebắt buộc | string | The gateway's own time of the heartbeat (ISO 8601 with its UTC offset). |
seqbắt buộc | integer | The gateway's sequence number of the heartbeat. |
signedbắt buộc | boolean | Signed with one of the gateway's own keys (false only where the server accepts unsigned envelopes). |
outbox_depthbắt buộc | integer | null |
|
dead_letter_countbắt buộc | integer | null |
|
linkbắt buộc | GatewayLink | null |
|
peripherals_readybắt buộc | array<GatewayPeripheral> | null |
|
GatewayHeartbeatStatus
object
| Tên | Kiểu | Mô tả |
|---|---|---|
gateway_idbắt buộc | string | |
heartbeatbắt buộc | GatewayHeartbeat | null | The newest heartbeat; null until the gateway sent one. |
GatewayLink
object
| Tên | Kiểu | Mô tả |
|---|---|---|
statebắt buộc | "connected" | "disconnected" | "unknown" | |
last_errorkhông bắt buộc | string | The text of the gateway's last uplink error. |
GatewayPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<Gateway> | |
next_cursorbắt buộc | string | null | Pass as |
GatewayPeripheral
object
| Tên | Kiểu | Mô tả |
|---|---|---|
devicebắt buộc | string | |
readybắt buộc | boolean |
GatewayStatusBucket
object
An hourly rollup, or a day's hourly rollups merged.
| Tên | Kiểu | Mô tả |
|---|---|---|
bucket_startbắt buộc | number | Start of the UTC hour or day, Unix seconds. |
samplesbắt buộc | integer | |
outbox_depthbắt buộc | GatewayStatusStat | |
dead_letter_countbắt buộc | GatewayStatusStat | |
peripherals_readybắt buộc | GatewayStatusStat | The devices the gateway listed as ready. |
peripherals_totalbắt buộc | GatewayStatusStat | The devices the gateway listed. |
linkbắt buộc | object | The samples per uplink state (a sample without one is in none). |
GatewayStatusSample
object
The heartbeat stored for one UTC minute. A value the heartbeat did not carry is null.
| Tên | Kiểu | Mô tả |
|---|---|---|
minutebắt buộc | number | Start of the UTC minute of reception, Unix seconds. |
received_atbắt buộc | number | When the server received it, Unix seconds. |
timebắt buộc | string | The gateway's own time of the heartbeat. |
seqbắt buộc | integer | |
signedbắt buộc | boolean | |
outbox_depthbắt buộc | integer | null | |
dead_letter_countbắt buộc | integer | null | |
link_statebắt buộc | "connected" | "disconnected" | "unknown" | null | |
peripherals_readybắt buộc | integer | null | The devices listed as ready. |
peripherals_totalbắt buộc | integer | null | The devices listed. |
GatewayStatusSeries
object
#128: a gateway's status series: samples (grain minute) or rollups (hourly, daily), oldest first.
| Tên | Kiểu | Mô tả |
|---|---|---|
gateway_idbắt buộc | string | |
grainbắt buộc | "minute" | "hourly" | "daily" | |
bucket_sbắt buộc | number | Bucket width in seconds: 60, 3600 or 86400. |
frombắt buộc | number | Start of the range read, Unix seconds: aligned down to the grain and clipped to what is kept. |
tobắt buộc | number | End of the range (excluded), Unix seconds. |
itemsbắt buộc | array<GatewayStatusSample | GatewayStatusBucket> | Samples for grain minute, rollups otherwise. |
GatewayStatusStat
object
One value over a bucket's samples that carried it.
| Tên | Kiểu | Mô tả |
|---|---|---|
minbắt buộc | integer | null | |
maxbắt buộc | integer | null | |
meanbắt buộc | number | null | Null when no sample carried the value. |
countbắt buộc | integer | The samples that carried the value. |
GeofenceVerdict
"inside" | "near" | "outside" | "ambiguous" | "unverifiable" | "no_position" | "no_polygon"
SENS-B1e (#235): a geofence verdict of a position against a growing area's boundary.
GeoJsonPolygon
object
A GeoJSON Polygon or MultiPolygon in WGS 84. Never public: only the owning tenant_admin and platform_admin see it.
| Tên | Kiểu | Mô tả |
|---|---|---|
typebắt buộc | "Polygon" | "MultiPolygon" | |
coordinatesbắt buộc | array<any> | Polygon: closed rings of [longitude, latitude] (at least 4 positions each, first equals last); MultiPolygon: 1 to 64 such polygons. At most 5000 positions and 256 KiB in all. |
GlnChange
object | object
Set the GLN (13 digits with its check digit, a number of the company's own GS1 membership, not under the platform's prefix), clear it (null), or allocate the next GLN of the platform's GS1 company prefix (allocate: true).
GradingRule
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | Server id (the audit entity id). |
tenantbắt buộc | string | |
varietybắt buộc | string | The lot variety these rules apply to. |
rulesbắt buộc | GradingRules | |
updated_atbắt buộc | number | Unix seconds. |
updated_bybắt buộc | string | The principal that last wrote them. |
GradingRuleHistory
object
| Tên | Kiểu | Mô tả |
|---|---|---|
varietybắt buộc | string | |
itemsbắt buộc | array<GradingRuleVersion> | |
next_cursorbắt buộc | string | null | The next page's |
GradingRulePage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<GradingRule> | |
next_cursorbắt buộc | string | null | Pass as |
platform_defaultbắt buộc | GradingRules | The platform default rules, normalized: what a variety without rules of its own (and a lot without a variety) is graded with. An editor starts a new variety from it. |
GradingRules
object
Grading rules of one variety. Grade: reject for a defect or a level in reject_levels; otherwise none until a level and a weight are known; A for a level in a_levels with the weight in an A band (inclusive), confidence at least a_min_confidence, nothing pending review and no sensory override conflict; else B. A level cannot be in both lists. The platform default (used for a variety without rules) is A levels [2, 3], reject levels [1, 4], A band 2.0-5.0 kg and confidence 0.8: placeholders until the buyer bands are known.
| Tên | Kiểu | Mô tả |
|---|---|---|
a_levelsbắt buộc | array<integer> | |
reject_levelsbắt buộc | array<integer> | |
a_weight_kgbắt buộc | array<array<number>> | [min, max] kg bands, 0 < min < max <= 100, strictly non-overlapping. |
a_min_confidencebắt buộc | number | |
eating_windowbắt buộc | array<EatingWindowRow> | Rows of level x days since cut (min_days..max_days, inclusive) x band; rows of one level and band do not overlap. |
GradingRuleVersion
object
One version of a variety's rules: numbered 1, 2, ... per rule, as each PUT wrote it.
| Tên | Kiểu | Mô tả |
|---|---|---|
versionbắt buộc | integer | |
rulesbắt buộc | GradingRules | |
updated_atbắt buộc | number | Unix seconds. |
updated_bybắt buộc | string | Who wrote this version. |
Grower
object
A grower (personal data) of one tenant, as the caller may see it.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
tenantbắt buộc | string | |
namekhông bắt buộc | string | Present only for the owning tenant_admin and platform_admin, or for other readers when public_consent is on. |
display_namebắt buộc | string | The name with public consent, otherwise |
cooperativebắt buộc | string | null | |
public_consentbắt buộc | boolean | Explicit consent to show the grower's name publicly. |
consent_atbắt buộc | number | null | Unix seconds consent was given; null without consent. |
consent_datebắt buộc | string (date) | null (date) | The day the grower gave the consent (YYYY-MM-DD, not after today); null without consent. Staff only, never on a public route. |
consent_scopebắt buộc | string | null | What the consent covers, as recorded from the consent form (staff-only text); null without consent or when not recorded. Never on a public route. |
created_atbắt buộc | number | Unix seconds. |
updated_atbắt buộc | number | Unix seconds. |
GrowerBatch
object
Up to 1,000 growers.
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<GrowerCreate> |
GrowerBatchResult
object
The growers a batch created, in request order.
| Tên | Kiểu | Mô tả |
|---|---|---|
batch_idbắt buộc | integer | The stored batch request's id. |
countbắt buộc | integer | |
itemsbắt buộc | array<Grower> | In request order. |
GrowerConsent
object
#163. One decision of a grower about one purpose and market (append-only); the latest of a (purpose, market) is the one in force.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
grower_idbắt buộc | integer | |
purposebắt buộc | "public_name" | "orchard_position" |
|
marketbắt buộc | string | null | ISO 3166-1 alpha-2 market the decision is for; null: every market. |
decisionbắt buộc | "granted" | "withdrawn" | |
channelbắt buộc | "paper" | "electronic" | "in_person" | "record_edit" | "migrated" | "data_request" | How the decision reached the company: a signed |
evidence_sha256bắt buộc | string | null | SHA-256 of the evidence (the scanned form or the message), or null. |
consent_datebắt buộc | string (date) | null (date) | The day on the form (YYYY-MM-DD), or null. |
scopebắt buộc | string | null | What the decision covers (staff-only text), or null. |
request_idbắt buộc | integer | null | The grower data request handled with this withdrawal ( |
recorded_atbắt buộc | number | Seconds since 1970 (UTC). |
recorded_bybắt buộc | string | Who recorded it: an opaque operator id ( |
GrowerConsentCreate
object
#163. A grower's decision as staff record it. A grant needs written evidence: channel paper or electronic and evidence_sha256; a withdrawal is accepted however the grower made it.
| Tên | Kiểu | Mô tả |
|---|---|---|
purposebắt buộc | "public_name" | "orchard_position" |
|
marketkhông bắt buộc | string | null | ISO 3166-1 alpha-2 market the decision is for; null: every market. |
decisionbắt buộc | "granted" | "withdrawn" | |
channelbắt buộc | "paper" | "electronic" | "in_person" | |
evidence_sha256không bắt buộc | string | null | SHA-256 of the evidence (64 lowercase hex digits); required for a grant. |
consent_datekhông bắt buộc | string (date) | null (date) | The day on the form (YYYY-MM-DD), from 2000-01-01, not after today. |
scopekhông bắt buộc | string | null | What it covers: one line of at most 200 characters (staff-only). |
GrowerConsentPage
object
#163. A grower's consents in force and one page of its consent records, newest first.
| Tên | Kiểu | Mô tả |
|---|---|---|
grower_idbắt buộc | integer | |
in_forcebắt buộc | array<object> | Every (purpose, market) whose latest decision is a grant. The public fruit page names the grower with |
itemsbắt buộc | array<GrowerConsent> | |
next_cursorbắt buộc | string | null | The next page's |
GrowerCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
namebắt buộc | string | |
cooperativekhông bắt buộc | string | null | |
public_consentkhông bắt buộc | boolean | |
consent_datekhông bắt buộc | string (date) | null (date) | The day the grower gave the consent (YYYY-MM-DD, not after today). Accepted only when public_consent is (or becomes) true; withdrawing the consent clears it. |
consent_scopekhông bắt buộc | string | null | What the consent covers (staff-only text). Accepted only when public_consent is (or becomes) true; withdrawing the consent clears it. |
GrowerDataRequest
object
#163. A grower's request about their personal data, as the company received it.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
growerbắt buộc | object | |
kindbắt buộc | "access" | "rectification" | "erasure" | "objection" | |
channelbắt buộc | "paper" | "electronic" | "in_person" | |
textbắt buộc | string | The grower's request as received: plain text, never HTML or markdown. |
received_onbắt buộc | string (date) | |
due_onbắt buộc | string (date) | The day the answer is due: 30 days after |
overduebắt buộc | boolean | Open and past |
statusbắt buộc | "open" | "handled" | |
created_atbắt buộc | number | Seconds since 1970 (UTC). |
created_bybắt buộc | string | Who entered it: an opaque operator id, never an email. |
handled_atbắt buộc | number | null | |
handled_bybắt buộc | string | null | An opaque operator id, or null. |
answerbắt buộc | string | null | The answer given to the grower (plain text), or null while open. |
withdrawnbắt buộc | array<object> | null | The consents withdrawn when the request was handled (empty: none), or null while open. |
GrowerDataRequestCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
grower_idbắt buộc | integer | |
kindbắt buộc | "access" | "rectification" | "erasure" | "objection" | |
channelbắt buộc | "paper" | "electronic" | "in_person" | |
received_onbắt buộc | string (date) | The day the company received it (YYYY-MM-DD), from 2000-01-01, not after today. |
textbắt buộc | string | 1 to 2000 characters after trimming; line breaks and tabs allowed, no other control characters. Stored and shown as plain text. |
GrowerDataRequestHandle
object
| Tên | Kiểu | Mô tả |
|---|---|---|
answerbắt buộc | string | The answer given to the grower, as plain text (1 to 2000 characters after trimming). |
withdraw_publickhông bắt buộc | boolean | Erasure or objection only: also withdraw every consent in force (each recorded as a |
GrowerDataRequestPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<GrowerDataRequest> | |
next_cursorbắt buộc | string | null | The next page's |
GrowerPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<Grower> | |
next_cursorbắt buộc | string | null | Pass as |
GrowerUpdate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
namekhông bắt buộc | string | |
cooperativekhông bắt buộc | string | null | |
public_consentkhông bắt buộc | boolean | |
consent_datekhông bắt buộc | string (date) | null (date) | The day the grower gave the consent (YYYY-MM-DD, not after today). Accepted only when public_consent is (or becomes) true; withdrawing the consent clears it. |
consent_scopekhông bắt buộc | string | null | What the consent covers (staff-only text). Accepted only when public_consent is (or becomes) true; withdrawing the consent clears it. |
GrowingArea
object
A growing area. The cap is area_ha times yield_kg_per_ha.
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | |
tenantbắt buộc | string | null | Owning tenant; null for an area registered before migration 7 or by seed/provisioning (readable by every tenant, writable by platform_admin only). |
namebắt buộc | string | null | |
cropbắt buộc | string | null | |
varietybắt buộc | string | null | |
provincebắt buộc | string | null | |
districtbắt buộc | string | null | |
communebắt buộc | string | null | |
area_habắt buộc | number | |
yield_kg_per_habắt buộc | number | |
treesbắt buộc | integer | null | |
planted_yearbắt buộc | integer | null | |
grower_idbắt buộc | integer | null | |
gacc_puc_codebắt buộc | string | null | GACC registration of the production unit. |
sourcebắt buộc | "seed" | "manual" | |
approved_atbắt buộc | number | null | Unix seconds; null until a platform admin approves. |
created_atbắt buộc | number | null | Unix seconds; null for a seeded (legacy) area. |
updated_atbắt buộc | number | null | Unix seconds; null for a seeded (legacy) area. |
registry_changed_atbắt buộc | number | null | Unix seconds of the last change of the crop or variety (L8 #33); an approval older than it no longer covers the record. |
cap_kgbắt buộc | number | The volume cap in kg: area_ha times yield_kg_per_ha, recomputed on every read (an edit of either input changes it, and its audit row records the cap before and after). Never public. |
approval_currentbắt buộc | boolean | Whether a platform approval covers the record as it is now: given, and newer than registry_changed_at (L8 #33). False until approved, and again after a crop or variety edit until re-approved. A seeded area (source seed) is never approved. Never public. |
growerbắt buộc | Grower | null | |
polygonkhông bắt buộc | GeoJsonPolygon | null | Present only for the owning tenant_admin and platform_admin. |
province_codekhông bắt buộc | string | null | The province's official 2-digit code, in the list |
commune_codekhông bắt buộc | string | null | The commune's official 5-digit code, in the list |
admin_units_versionkhông bắt buộc | string | null | The version of the official list the codes were taken from (for example |
address_before_reformkhông bắt buộc | object | null | The province, district and commune text the record held before it was coded, or the text a request gave through the deprecated text path; kept for good once set. Null for a record entered with codes. Only with |
address_statuskhông bắt buộc | "coded" | "choose_commune" | "needs_commune" | "outside_vietnam" | null |
|
address_candidateskhông bắt buộc | array<string> | null | For |
GrowingAreaCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | |
area_habắt buộc | number | |
yield_kg_per_habắt buộc | number | |
gacc_puc_codekhông bắt buộc | string | null | |
namekhông bắt buộc | string | null | |
cropkhông bắt buộc | string | null | |
varietykhông bắt buộc | string | null | |
provincekhông bắt buộc | string | null | Deprecated (#273), sunset 1 May 2027: the province as free text. Send |
districtkhông bắt buộc | string | null | Deprecated (#273), sunset 1 May 2027: Viet Nam has had no district level since 1 July 2025. Send |
communekhông bắt buộc | string | null | Deprecated (#273), sunset 1 May 2027: the commune as free text. Send |
province_codekhông bắt buộc | string | null | #273: the province (tỉnh or thành phố trực thuộc trung ương) by its official 2-digit code in the administrative units list in force ( |
commune_codekhông bắt buộc | string | null | #273: the commune (xã, phường or đặc khu) by its official 5-digit code in the administrative units list in force ( |
polygonkhông bắt buộc | GeoJsonPolygon | null | |
treeskhông bắt buộc | integer | null | |
planted_yearkhông bắt buộc | integer | null | |
grower_idkhông bắt buộc | integer | null | A grower of the area's owning tenant. |
GrowingAreaGln
object
#161: a growing area's GLN (EPCIS read point of its events in staff documents; never in a public document).
| Tên | Kiểu | Mô tả |
|---|---|---|
growing_areabắt buộc | string | |
glnbắt buộc | string | null | GS1 Global Location Number: 13 digits, the last the GS1 mod-10 check digit; null when none. |
GrowingAreaPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<GrowingArea> | |
next_cursorbắt buộc | string | null | Pass as |
GrowingAreaUpdate
object
A tenant_admin of the owner may change name, crop, variety, the address (province_code and commune_code, or the deprecated province, district and commune text), polygon, trees, planted_year and grower_id; a platform_admin also area_ha, yield_kg_per_ha, gacc_puc_code and (once, on an unowned area) tenant.
| Tên | Kiểu | Mô tả |
|---|---|---|
namekhông bắt buộc | string | null | |
cropkhông bắt buộc | string | null | |
varietykhông bắt buộc | string | null | |
provincekhông bắt buộc | string | null | Deprecated (#273), sunset 1 May 2027: the province as free text. Send |
districtkhông bắt buộc | string | null | Deprecated (#273), sunset 1 May 2027: Viet Nam has had no district level since 1 July 2025. Send |
communekhông bắt buộc | string | null | Deprecated (#273), sunset 1 May 2027: the commune as free text. Send |
province_codekhông bắt buộc | string | null | #273: the province (tỉnh or thành phố trực thuộc trung ương) by its official 2-digit code in the administrative units list in force ( |
commune_codekhông bắt buộc | string | null | #273: the commune (xã, phường or đặc khu) by its official 5-digit code in the administrative units list in force ( |
polygonkhông bắt buộc | GeoJsonPolygon | null | |
treeskhông bắt buộc | integer | null | |
planted_yearkhông bắt buộc | integer | null | |
grower_idkhông bắt buộc | integer | null | A grower of the area's owning tenant. |
area_hakhông bắt buộc | number | |
yield_kg_per_hakhông bắt buộc | number | |
gacc_puc_codekhông bắt buộc | string | null | |
tenantkhông bắt buộc | string | platform_admin only: claim an unowned area for a registered tenant (once). |
GrowingAreaVolume
object
Volume.cap_kg, declared_kg (summed across all tenants) and the headroom left.
| Tên | Kiểu | Mô tả |
|---|---|---|
growing_areabắt buộc | string | |
seasonbắt buộc | string | |
declared_kgbắt buộc | number | |
cap_kgbắt buộc | number | null | area_ha times yield_kg_per_ha; null when the growing area is unknown or is a tenant-created area not yet approved by a platform admin. |
headroom_kgbắt buộc | number | null | cap_kg minus declared_kg (negative when over the cap); null when cap_kg is null. |
HarvestBatch
object
Up to 1,000 harvest declarations across the tenant's areas.
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<HarvestBatchItem> |
HarvestBatchItem
object
One declaration; an area and date at most once per batch.
| Tên | Kiểu | Mô tả |
|---|---|---|
growing_areabắt buộc | string | Code of a growing area the caller may write. |
harvest_datebắt buộc | string (date) | The harvest date; not later than today. |
kgbắt buộc | number | Mass harvested on that date. |
HarvestBatchResult
object
The declarations a batch stored, in request order.
| Tên | Kiểu | Mô tả |
|---|---|---|
batch_idbắt buộc | integer | The stored batch request's id. |
countbắt buộc | integer | |
itemsbắt buộc | array<HarvestDeclaration> | In request order. |
HarvestDeclaration
object
A tenant-entered harvest of a growing area on one date (Self-declared).
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
growing_areabắt buộc | string | |
harvest_datebắt buộc | string (date) | |
seasonbắt buộc | string | The ingest policy's season of the harvest date. |
kgbắt buộc | number | |
sourcebắt buộc | "self_declared" | |
declared_bybắt buộc | string | The user who declared it. |
declared_atbắt buộc | number | Unix time of the declaration. |
HarvestDeclarationCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
harvest_datebắt buộc | string (date) | The harvest date; not later than today. |
kgbắt buộc | number | Mass harvested on that date. |
HarvestDeclarationPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<HarvestDeclaration> | |
next_cursorbắt buộc | string | null | Pass as |
HarvestKey
object
#160: a harvest app install's request to sign harvest records with its own key. The private key is a non-extractable WebCrypto ECDSA P-256 key that never leaves the browser; the public key's PEM is never returned. kid and device_id derive from fingerprint_sha256, the SHA-256 of the key's SubjectPublicKeyInfo DER. Once approved, the device (profile vn.agritrace.harvest-app, site and facility facility) and its active key exist in the fleet, and the install sends its signed harvest envelopes to POST /v1/ingest/{tenant}/{facility}/{device_id}/event/harvest.
| Tên | Kiểu | Mô tả |
|---|---|---|
kidbắt buộc | string | |
device_idbắt buộc | string | |
tenantbắt buộc | string | |
facilitybắt buộc | string | The collection point the install records for. |
labelbắt buộc | string | A name people recognise the install by. |
statusbắt buộc | "pending" | "approved" | "rejected" | "revoked" |
|
fingerprint_sha256bắt buộc | string | |
fingerprintbắt buộc | string | First four and last four hex characters. |
requested_bybắt buộc | string | |
requested_atbắt buộc | number | Unix seconds. |
decided_bybắt buộc | string | null | |
decided_atbắt buộc | number | null | Unix seconds. |
revoked_atbắt buộc | number | null | Unix seconds; set only when |
revoke_reasonbắt buộc | "rotation" | "compromise" | null |
HarvestKeyPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<HarvestKey> | |
next_cursorbắt buộc | string | null | Pass as |
HarvestKeyRegister
object
| Tên | Kiểu | Mô tả |
|---|---|---|
public_key_pembắt buộc | string | The install's EC P-256 public key as one PEM SubjectPublicKeyInfo block. |
facilitybắt buộc | string | A facility of the caller's tenant (within an operator's facilities). |
labelbắt buộc | string |
Health
object
| Tên | Kiểu | Mô tả |
|---|---|---|
okbắt buộc | true | |
outbound_backlogbắt buộc | map<string, integer> | Undelivered outbound items per target. |
certificatesbắt buộc | array<CertificateStatus> | |
read_onlykhông bắt buộc | true | Present (true) only in the read-only maintenance mode of the PostgreSQL cutover (AGRITRACE_READ_ONLY=1, #123): every request but GET, and every audited read (the exports), then answers 503 with Retry-After, and |
mqttkhông bắt buộc | object | Present when the MQTT bridge runs. |
warningskhông bắt buộc | array<string> | Present when a certificate is expired or due, MQTT is not connected, or the broker has not granted every uplink subscription of the MQTT bridge. |
Help
object
| Tên | Kiểu | Mô tả |
|---|---|---|
status_page_urlbắt buộc | string (uri) | null (uri) | CropPath's status page (an https address), or null: hide the link. |
announcementsbắt buộc | array<LiveAnnouncement> | The announcements showing now, newest first. |
IdentityProvider
object
#87. The company's identity provider; never its client secret.
| Tên | Kiểu | Mô tả |
|---|---|---|
issuerbắt buộc | string (uri) | |
client_idbắt buộc | string | |
enabledbắt buộc | boolean | Whether the company's people can sign in with it now. |
created_atbắt buộc | number | Unix seconds. |
updated_atbắt buộc | number | Unix seconds. |
linked_accountsbắt buộc | integer | Accounts linked to a subject of the provider (by a first sign-in). |
IdentityProviderState
object
#87. The company's identity provider (null when none is set up), the company's own redirect URI to register with it ({origin}/login/oidc/{company}; the provider must send the browser back there), and whether this deployment allows sign-in with an identity provider at all (it needs AGRITRACE_PUBLIC_ORIGIN and AGRITRACE_OIDC_ALLOWED_HOSTS).
| Tên | Kiểu | Mô tả |
|---|---|---|
availablebắt buộc | boolean | |
redirect_uribắt buộc | string | null | Null when the server has no public origin. |
providerbắt buộc | IdentityProvider | null |
IdentityProviderUpdate
object
#87. The company's identity provider as registered there.
| Tên | Kiểu | Mô tả |
|---|---|---|
issuerbắt buộc | string | The provider's issuer: an https:// URL without query or fragment, on a host this deployment allows; |
client_idbắt buộc | string | |
client_secretkhông bắt buộc | string | Required to set a provider up, and whenever the issuer or the client id changes (400 |
enabledkhông bắt buộc | boolean |
IngestResult
object
| Tên | Kiểu | Mô tả |
|---|---|---|
statusbắt buộc | "accepted" | "quarantined" | "duplicate" | "rejected" | |
idbắt buộc | string | null | Envelope id; null when the body could not be parsed far enough to read it. |
reasonsbắt buộc | array<string> | Quarantine reasons, or the single rejection reason. |
IntegrityAnchor
object
INTEGRITY-2 (#202): one closed UTC day's anchor. The day's records (audit log rows, evidence envelopes, lot seals, reviews, and the envelopes not accepted when the day was anchored) are hashed into one Merkle tree per kind (RFC 9162: leaf SHA-256(0x00 || record), node SHA-256(0x01 || left || right), empty SHA-256(""), leaves in the order of their hash); day_root = SHA-256(0x02 || audit_root || evidence_root || seal_root || review_root || held_root); anchor = SHA-256(prev_anchor || day_root || day as ASCII || audit_count || evidence_count || seal_count || review_count || held_count, each count 8 bytes big-endian). The first day's prev_anchor is 64 zeros. The record encoding is /developers/downloads/integrity-anchors.md; /developers/downloads/verify_anchors.py recomputes it with the Python standard library. Written once, never changed.
| Tên | Kiểu | Mô tả |
|---|---|---|
daybắt buộc | string | The UTC day the records were written (YYYY-MM-DD). |
seqbắt buộc | integer | Position in the chain: 0 for the first anchored day, then one per day without gaps. |
versionbắt buộc | 1 | The encoding version. |
prev_anchorbắt buộc | string | The previous day's |
audit_rootbắt buộc | string | Root of the day's activity log rows. |
evidence_rootbắt buộc | string | Root of the evidence envelopes received that day (accepted, quarantined or rejected after review). |
seal_rootbắt buộc | string | Root of the lot seals made that day. |
review_rootbắt buộc | string | Root of the reviews made that day (a person's decision on a quarantined envelope) and of the envelopes a pack sent back to quarantine that day (decision |
held_rootbắt buộc | string | Root of the day's envelopes that were not accepted when the day was anchored, each with that status. A later status must be that one, a lower one, or a review's outcome; an envelope a pack sent back to quarantine is accepted again only after an approve review later than that. |
day_rootbắt buộc | string | |
audit_countbắt buộc | integer | |
evidence_countbắt buộc | integer | |
seal_countbắt buộc | integer | |
review_countbắt buộc | integer | |
held_countbắt buộc | integer | |
anchorbắt buộc | string | |
created_atbắt buộc | string (date-time) | When the job computed the anchor (UTC). |
timestampbắt buộc | IntegrityAnchorTimestamp | null | Null while no TSA is configured or the job has not queued the anchor yet. |
IntegrityAnchorPage
object
INTEGRITY-2 (#202): one page of anchors, oldest first.
| Tên | Kiểu | Mô tả |
|---|---|---|
versionbắt buộc | 1 | |
genesisbắt buộc | string | The |
itemsbắt buộc | array<IntegrityAnchor> | |
next_afterbắt buộc | string | null | Pass as |
IntegrityAnchorTimestamp
object
INTEGRITY-2 (#202): the RFC 3161 timestamp of an anchor (the anchor's 32 bytes are the message imprint, SHA-256). pending while the job has no verified token (the TSA unreachable, or a token that did not verify; it retries); verified once a token was verified against the configured trust store and stored, then final.
| Tên | Kiểu | Mô tả |
|---|---|---|
statusbắt buộc | "pending" | "verified" | |
gen_timebắt buộc | string (date-time) | null (date-time) | The token's genTime (UTC); null while pending. |
tokenbắt buộc | string | null | Base64 of the TimeStampToken's DER (a CMS SignedData of a TSTInfo); null while pending. Check it with |
Invitation
object
SELF-1-4 (#185). An invitation link or a password link of the company; never the link or its token.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
purposebắt buộc | "invite" | "reset" | invite: an invitation to join the company; reset: a password link for a member ( |
emailbắt buộc | string | |
rolebắt buộc | "tenant_admin" | "operator" | "auditor" | "agronomist" | |
facilitiesbắt buộc | array<string> | null | An operator's facility codes; null = every facility of the company (always null for another role). |
display_namebắt buộc | string | null | |
statusbắt buộc | "pending" | "used" | "expired" | "revoked" | pending: works until |
created_bybắt buộc | string | Who created it (an email, or |
created_atbắt buộc | number | |
expires_atbắt buộc | number | |
used_atbắt buộc | number | null | |
used_bybắt buộc | string | null | |
revoked_atbắt buộc | number | null | |
revoked_bybắt buộc | string | null |
InvitationCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
emailbắt buộc | string | The email the person will sign in with. |
rolebắt buộc | "tenant_admin" | "operator" | "auditor" | "agronomist" | |
facilitieskhông bắt buộc | array<string> | null | Operators only: codes of the company's facilities; null or an empty list = every facility. |
display_namekhông bắt buộc | string | null |
InvitationList
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<Invitation> | |
next_cursorbắt buộc | string | null | Pass as |
InvitationRevoked
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
statusbắt buộc | "revoked" |
IssuerKey
object
A facility's did:web issuer key (#34). The private key is never returned: it is stored encrypted under the deployment's key-encryption key. key_id is the DID URL a credential cites (<did>#key-<n>).
| Tên | Kiểu | Mô tả |
|---|---|---|
facilitybắt buộc | string | |
nbắt buộc | integer | The key's number within the facility, never reused. |
namebắt buộc | string | |
didbắt buộc | string |
|
key_idbắt buộc | string | |
algbắt buộc | "ES256" | |
public_jwkbắt buộc | PublicJwk | |
statusbắt buộc | "active" | "retired" | "revoked" | active: signs. retired: replaced by a rotation, still in the DID document. revoked: compromised, removed from the DID document. |
created_bybắt buộc | string | |
created_atbắt buộc | number | Unix seconds. |
retired_atbắt buộc | number | null | Unix seconds. |
revoked_atbắt buộc | number | null | Unix seconds. |
revoke_reasonbắt buộc | "compromise" | null | |
revoked_bybắt buộc | string | null |
IssuerKeyList
object
Every key of the facility by number (at most 100 per facility).
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<IssuerKey> |
IssuerKeyRevoke
object
| Tên | Kiểu | Mô tả |
|---|---|---|
reasonbắt buộc | "compromise" | Only a compromise revokes; a rotation generates a new key instead. |
JudgedPosition
object
SENS-B1e (#235): the latest position of the device judged against the area in the range (WGS84, as the device signed it), with its verdict and when ingest judged it.
| Tên | Kiểu | Mô tả |
|---|---|---|
latbắt buộc | number | |
lonbắt buộc | number | |
acc_mbắt buộc | number | null | The accuracy the device reported; null when it reported none. |
verdictbắt buộc | GeofenceVerdict | |
checked_atbắt buộc | number |
Key
object
A device or gateway public key. The PEM is never returned; fingerprint_sha256 is the SHA-256 of the key's SubjectPublicKeyInfo DER and fingerprint its short display form.
| Tên | Kiểu | Mô tả |
|---|---|---|
kidbắt buộc | string | |
owner_typebắt buộc | "device" | "gateway" | |
owner_idbắt buộc | string | |
statusbắt buộc | string |
|
created_atbắt buộc | number | Unix seconds. |
revoked_atbắt buộc | number | null | Unix seconds. |
revoke_reasonbắt buộc | "rotation" | "compromise" | null | |
revoked_bybắt buộc | string | null | |
fingerprint_sha256bắt buộc | string | |
fingerprintbắt buộc | string | First four and last four hex characters, e.g. |
approvalbắt buộc | "pending" | "approved" | #201: |
KeyCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
kidbắt buộc | string | Unique across every tenant. |
owner_typebắt buộc | "device" | "gateway" | |
owner_idbắt buộc | string | A device or gateway of the caller's tenant. |
public_key_pembắt buộc | string | One |
KeyPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<Key> | |
next_cursorbắt buộc | string | null | Pass as |
KeyRevoke
object
| Tên | Kiểu | Mô tả |
|---|---|---|
reasonbắt buộc | "rotation" | "compromise" |
Lab
object
An accredited lab partner (platform record, no tenant). in_force: status active and valid_to today or later (Asia/Ho_Chi_Minh); only labs in force that hold an active key are assigned samples.
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | |
namebắt buộc | string | |
accreditationbắt buộc | string | |
valid_tobắt buộc | string (date) | Last day the accreditation is valid. |
statusbắt buộc | "active" | "suspended" | |
created_atbắt buộc | number | Unix seconds. |
updated_atbắt buộc | number | Unix seconds. |
in_forcebắt buộc | boolean | |
accreditation_bodybắt buộc | string | null | Accreditation body, e.g. |
accreditation_numberbắt buộc | string | null | Accreditation certificate number (#73); null when not recorded. |
accreditation_scopebắt buộc | string | null | The accredited scope: the tests the accreditation covers (#73); null when not recorded. |
LabApproval
object
#154: a lab's approval for a destination market (e.g. on the list of labs whose cadmium and auramine O reports GACC accepts for Vietnamese durian). A lab result counts toward Lab-verified for the report's market only when an active approval of its lab for that market, valid on the report's signed date (Asia/Ho_Chi_Minh), lists the analyte; otherwise the lab step stops at Cross-checked (reason lab_not_approved_for_market). A withdrawn approval never counts.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
labbắt buộc | string | Lab code. |
marketbắt buộc | string | Destination market, ISO 3166-1 alpha-2. |
approving_bodybắt buộc | string | |
referencebắt buộc | string | The approval's reference as published (decision or list number). |
analytesbắt buộc | array<string> | Analyte codes the approval covers, sorted. |
valid_frombắt buộc | string (date) | First valid day, inclusive. |
valid_tobắt buộc | string (date) | Last valid day, inclusive. |
source_urlbắt buộc | string | null | Where the list is published (http or https); stored and shown, never fetched. |
evidence_sha256bắt buộc | string | null | SHA-256 of the list document kept as evidence. |
statusbắt buộc | "active" | "withdrawn" |
|
in_forcebắt buộc | boolean | Active and valid today (Asia/Ho_Chi_Minh). |
created_atbắt buộc | number | |
created_bybắt buộc | string | |
updated_atbắt buộc | number | |
updated_bybắt buộc | string |
LabApprovalCreate
object
A new approval (status active). valid_to is on or after valid_from; source_url and evidence_sha256 are optional.
| Tên | Kiểu | Mô tả |
|---|---|---|
marketbắt buộc | string | Destination market, ISO 3166-1 alpha-2. |
approving_bodybắt buộc | string | |
referencebắt buộc | string | The approval's reference as published (decision or list number). |
analytesbắt buộc | array<string> | Analyte codes the approval covers, sorted. |
valid_frombắt buộc | string (date) | First valid day, inclusive. |
valid_tobắt buộc | string (date) | Last valid day, inclusive. |
source_urlkhông bắt buộc | string | null | Where the list is published (http or https); stored and shown, never fetched. |
evidence_sha256không bắt buộc | string | null | SHA-256 of the list document kept as evidence. |
LabApprovalList
object
Every approval of the lab (at most 100), by market, then newest valid_from first.
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<LabApproval> |
LabApprovalUpdate
object
Any of the editable fields (the market never changes: record a new approval). null clears source_url or evidence_sha256; status withdrawn withdraws the approval (nothing is deleted).
| Tên | Kiểu | Mô tả |
|---|---|---|
approving_bodykhông bắt buộc | string | |
referencekhông bắt buộc | string | The approval's reference as published (decision or list number). |
analyteskhông bắt buộc | array<string> | Analyte codes the approval covers, sorted. |
valid_fromkhông bắt buộc | string (date) | First valid day, inclusive. |
valid_tokhông bắt buộc | string (date) | Last valid day, inclusive. |
source_urlkhông bắt buộc | string | null | Where the list is published (http or https); stored and shown, never fetched. |
evidence_sha256không bắt buộc | string | null | SHA-256 of the list document kept as evidence. |
statuskhông bắt buộc | "active" | "withdrawn" |
|
LabAssignment
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
exporterbắt buộc | string | Name of the tenant that owns the lot. |
lotbắt buộc | object | |
facilitybắt buộc | object | |
analytesbắt buộc | array<SampleAnalyte> | |
sample_countbắt buộc | integer | |
selected_atbắt buộc | number | Unix seconds. |
samplesbắt buộc | array<SampleItem> | |
reportbắt buộc | object | null | The report's number and verdict once submitted (P4, #40), else null. |
LabAssignmentDetail
object
One sampling assigned to the caller's lab (#73), with its full report (LabReport, null before one) and the lab's active server-held key for portal entries (portal_key, null when the lab holds none: portal entry is then refused 409).
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
exporterbắt buộc | string | Name of the tenant that owns the lot. |
lotbắt buộc | object | |
facilitybắt buộc | object | |
analytesbắt buộc | array<SampleAnalyte> | |
sample_countbắt buộc | integer | |
selected_atbắt buộc | number | Unix seconds. |
samplesbắt buộc | array<SampleItem> | |
reportbắt buộc | LabReport | null | |
portal_keybắt buộc | object | null |
LabAssignmentPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<LabAssignment> | |
next_cursorbắt buộc | string | null | Pass as |
LabCompany
object
#278: a company a lab serves.
| Tên | Kiểu | Mô tả |
|---|---|---|
labbắt buộc | string | The lab's code. |
tenantbắt buộc | string | The company's id. |
namebắt buộc | string | The company's name. |
linked_atbắt buộc | number | When the link was made (Unix seconds); for a link migration 113 made from the samplings already assigned, the first of them. |
LabCompanyList
object
#278: the companies a lab serves, by company id (at most 500).
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<LabCompany> |
LabCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | |
namebắt buộc | string | |
accreditationbắt buộc | string | Accreditation scheme and number, e.g. |
valid_tobắt buộc | string (date) | |
accreditation_bodykhông bắt buộc | string | null | |
accreditation_numberkhông bắt buộc | string | null | |
accreditation_scopekhông bắt buộc | string | null |
LabHome
object
#286. The lab portal's home for the caller's lab: whether the lab can sign (its status, accreditation, market approvals and keys) and its work, read among its newest 500 samplings: samplings waiting for results, reports whose PDF original was not sent, and reports sent in the last 7 days. No person's name. Each section has state: ok with its figures, or unavailable (OverviewSectionUnavailable) when it could not be read.
| Tên | Kiểu | Mô tả |
|---|---|---|
labbắt buộc | object | The caller's lab. |
generated_atbắt buộc | string (date-time) | When the answer was computed (the server serves it for up to |
max_age_sbắt buộc | integer | Seconds the server serves one answer. |
windowbắt buộc | object | |
target_hoursbắt buộc | integer | The time from the draw to the results the lab aims for; |
sectionsbắt buộc | object |
LabHomePdfMissing
object | OverviewSectionUnavailable
#286. Reports stored without their PDF original, oldest first.
LabHomeSent
object | OverviewSectionUnavailable
#286. Reports stored in the last 7 days, newest first.
LabHomeWaiting
object | OverviewSectionUnavailable
#286. Samplings waiting for the lab's results (no report yet), oldest first.
LabInvitationCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
emailbắt buộc | string | The lab analyst's email: their sign-in name, not checked by any email. |
display_namekhông bắt buộc | string | null | Proposed as the new account's name; the invitee may change it. |
LabKey
object
A lab's result-signing public key. The PEM is never returned; fingerprint_sha256 is the SHA-256 of the key's SubjectPublicKeyInfo DER and fingerprint its short display form. custody (#73): lab, the lab holds the private key and registered the public one; server, the platform generated the pair and holds the private key (encrypted, never returned) to sign the results the lab's portal users enter, which therefore never count as signed by the accredited lab (ADR 0001).
| Tên | Kiểu | Mô tả |
|---|---|---|
kidbắt buộc | string | |
labbắt buộc | string | |
statusbắt buộc | "active" | "revoked" | |
created_atbắt buộc | number | Unix seconds. |
revoked_atbắt buộc | number | null | Unix seconds. |
revoke_reasonbắt buộc | "rotation" | "compromise" | null | |
revoked_bybắt buộc | string | null | |
fingerprint_sha256bắt buộc | string | |
fingerprintbắt buộc | string | |
custodybắt buộc | "lab" | "server" |
LabKeyCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
kidbắt buộc | string | Key id; one namespace with device and gateway keys. |
public_key_pembắt buộc | string | EC P-256 public key, PEM SubjectPublicKeyInfo. |
LabKeyPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<LabKey> | |
next_cursorbắt buộc | string | null | Pass as |
LabLogins
object
Who signs in for a lab, and its pending invitations. Never a link or its token.
| Tên | Kiểu | Mô tả |
|---|---|---|
membersbắt buộc | array<object> | Each person with a lab membership for this lab, in any company record, by email (at most 500). |
invitationsbắt buộc | array<object> | The lab's invitations still pending (unused, unrevoked, unexpired), newest first. |
LabOriginResult
object
One stored origin isotope result (#40 follow-up): passed exactly when it matched.
| Tên | Kiểu | Mô tả |
|---|---|---|
samplebắt buộc | integer | |
outcomebắt buộc | "match" | "mismatch" | |
regionbắt buộc | string | |
methodbắt buộc | string | |
passedbắt buộc | boolean |
LabOriginResultSubmission
object
An optional origin isotope result of one drawn sample (#40 follow-up): whether the sample's stable isotope profile matches (match) or not (mismatch) the profile of region, the region it was compared with. A match passes; a mismatch fails the sample and the report (the lot's lab hold), like a failed contaminant.
| Tên | Kiểu | Mô tả |
|---|---|---|
samplebắt buộc | integer | The sample number k of the sampling. |
analytebắt buộc | "origin_isotopes" | |
outcomebắt buộc | "match" | "mismatch" | |
regionbắt buộc | string | The region the sample was compared with, e.g. |
methodbắt buộc | string |
LabPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<Lab> | |
next_cursorbắt buộc | string | null | Pass as |
LabPortalEntry
object
What a lab portal user enters (#73): the report number, the SHA-256 of the report's PDF and the results, exactly as a signed LabReportSubmission carries them. The server adds the version, the lab, the sampling and the signing time and signs the document with the lab's active server-held key.
| Tên | Kiểu | Mô tả |
|---|---|---|
report_nobắt buộc | string | The lab's report number, once per lab. |
report_sha256bắt buộc | string | SHA-256 of the report's PDF original. |
resultsbắt buộc | array<LabReportResultSubmission | LabOriginResultSubmission> |
LabPortalKeyCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
kidbắt buộc | string | Key id; one namespace with device and gateway keys. |
LabReport
object
The lab's signed report of a sampling: pass/fail per result (sample and analyte), per analyte and for the lot (passed); origin lists its origin isotope results apart (empty without one, #40 follow-up).
| Tên | Kiểu | Mô tả |
|---|---|---|
report_nobắt buộc | string | |
labbắt buộc | string | |
kidbắt buộc | string | The lab key that signed it. |
key_custodybắt buộc | "lab" | "server" | Who holds the key that signed the report (#73): |
marketbắt buộc | string | ISO 3166-1 alpha-2 of the market whose limits judged it. |
signed_atbắt buộc | number | Unix seconds. |
report_sha256bắt buộc | string | |
passedbắt buộc | boolean | |
analytesbắt buộc | array<object> | |
resultsbắt buộc | array<LabReportResult> | |
originbắt buộc | array<LabOriginResult> | |
submitted_bybắt buộc | string | |
received_atbắt buộc | number | Unix seconds. |
report_pdfkhông bắt buộc | AttachmentStored | null | #73: the report's PDF original once the lab sent it ( |
LabReportResult
object
One stored result with the market limit that judged it (null when the market sets none).
| Tên | Kiểu | Mô tả |
|---|---|---|
samplebắt buộc | integer | |
analytebắt buộc | LabResultAnalyte | |
outcomebắt buộc | "measured" | "not_detected" | |
valuebắt buộc | number | null | |
unitbắt buộc | string | |
lodbắt buộc | number | |
methodbắt buộc | string | |
limitbắt buộc | object | null | |
passedbắt buộc | boolean |
LabReportResultSubmission
object
One result of one drawn sample. measured: value at least the detection limit; not_detected: no value. Values and detection limits are in mg/kg, the unit of the market's limits.
| Tên | Kiểu | Mô tả |
|---|---|---|
samplebắt buộc | integer | The sample number k of the sampling. |
analytebắt buộc | LabResultAnalyte | |
outcomebắt buộc | "measured" | "not_detected" | |
valuekhông bắt buộc | number | |
unitbắt buộc | "mg/kg" | |
lodbắt buộc | number | Detection limit. |
methodbắt buộc | string |
LabReportSubmission
object
A lab report signed like a device envelope: sig.value is ES256 (base64url r || s) over the canonical JSON (keys sorted, no whitespace, UTF-8) of every other member, made with an active key of the assigned lab. Every drawn sample and every analyte of the test scope exactly once; besides, at most one origin isotope result (LabOriginResultSubmission) per drawn sample, all compared with the same region (#40 follow-up).
| Tên | Kiểu | Mô tả |
|---|---|---|
vbắt buộc | 1 | |
labbắt buộc | string | The assigned lab's code; it must be the caller's lab. |
samplingbắt buộc | integer | The sampling id of the URL. |
report_nobắt buộc | string | The lab's report number, once per lab. |
signed_atbắt buộc | string (date-time) | When the lab signed, with its UTC offset; not before the samples were drawn, not more than 300 s ahead of the server clock. |
report_sha256bắt buộc | string | SHA-256 of the report's PDF original. |
resultsbắt buộc | array<LabReportResultSubmission | LabOriginResultSubmission> | |
sigbắt buộc | object |
LabResultAnalyte
"cadmium" | "auramine_o"
LabUpdate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
namekhông bắt buộc | string | |
accreditationkhông bắt buộc | string | |
valid_tokhông bắt buộc | string (date) | |
statuskhông bắt buộc | "active" | "suspended" | |
accreditation_bodykhông bắt buộc | string | null | null clears it. |
accreditation_numberkhông bắt buộc | string | null | null clears it. |
accreditation_scopekhông bắt buộc | string | null | null clears it. |
LandCertificate
object
#250: one land certificate with the corners as typed and the converted outline (WGS 84).
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | The certificate's id. |
growing_areabắt buộc | string | |
submitted_atbắt buộc | number | Unix seconds when the certificate was received. |
central_meridian_minbắt buộc | integer | The central meridian of the parcel map's projection, in minutes of arc east of Greenwich (e.g. 6345 = 105 degrees 45 minutes): one of the provinces' central meridians of Circular 26/2024/TT-BTNMT Appendix 01. |
corners_totalbắt buộc | integer | The number of corners. |
plane_area_m2bắt buộc | number | The parcel's area in square metres on the projection plane, from the corners as typed: the figure a certificate prints, so a typing slip shows. |
photo_sha256bắt buộc | string | SHA-256 of the photo of the certificate page, an image the company uploaded ( |
polygon_sha256bắt buộc | string | SHA-256 (hex) of the converted outline's canonical GeoJSON text (compact, sorted keys, UTF-8): the SHA-256 of the boundary proposal the certificate made, and of the version it becomes once a platform admin approves it. |
area_habắt buộc | number | The converted outline's area in hectares: the ring area on a sphere of the WGS 84 equatorial radius, as the admin console and the boundary walks compute a boundary's area. |
registered_area_habắt buộc | number | null | The growing area's registered |
area_difference_ratiobắt buộc | number | null | (area_ha - registered_area_ha) / registered_area_ha: negative when the certificate's parcel is smaller than registered; null without a registered size. |
walkbắt buộc | LandCertificateWalkComparison | null | The certificate against the area's latest boundary walk; null when the area has none. |
supersededbắt buộc | boolean | Whether the certificate replaced a boundary proposal that was waiting. |
cornersbắt buộc | array<array<number>> | The corners [X, Y] (VN-2000, metres) as typed, without a repeated first corner. |
polygonbắt buộc | GeoJsonPolygon |
LandCertificateCheck
object
#250: the parcel corners of a land-use right certificate to check before its photo is uploaded: LandCertificateCreate without photo_sha256.
| Tên | Kiểu | Mô tả |
|---|---|---|
central_meridian_minbắt buộc | integer | The central meridian of the parcel map's projection, in minutes of arc east of Greenwich (e.g. 6345 = 105 degrees 45 minutes): one of the provinces' central meridians of Circular 26/2024/TT-BTNMT Appendix 01. |
cornersbắt buộc | array<array<number>> | The corners in order around the parcel, 3 to 200 (the first may be repeated at the end; it is dropped), at least 3 different. |
LandCertificateCheckResult
object
#250: a passed check: the outline the certificate would propose, compared with the area's registered size. Nothing is stored.
| Tên | Kiểu | Mô tả |
|---|---|---|
corners_totalbắt buộc | integer | The number of corners. |
plane_area_m2bắt buộc | number | The parcel's area in square metres on the projection plane, from the corners as typed: the figure a certificate prints, so a typing slip shows. |
polygon_sha256bắt buộc | string | SHA-256 (hex) of the converted outline's canonical GeoJSON text (compact, sorted keys, UTF-8): the SHA-256 of the boundary proposal the certificate made, and of the version it becomes once a platform admin approves it. |
area_habắt buộc | number | The converted outline's area in hectares: the ring area on a sphere of the WGS 84 equatorial radius, as the admin console and the boundary walks compute a boundary's area. |
registered_area_habắt buộc | number | null | The growing area's registered |
area_difference_ratiobắt buộc | number | null | (area_ha - registered_area_ha) / registered_area_ha: negative when the certificate's parcel is smaller than registered; null without a registered size. |
polygonbắt buộc | GeoJsonPolygon |
LandCertificateCreate
object
#250: the parcel corners printed on a land-use right certificate's parcel map (VN-2000 plane coordinates) and the photo of the certificate page.
| Tên | Kiểu | Mô tả |
|---|---|---|
central_meridian_minbắt buộc | integer | The central meridian of the parcel map's projection, in minutes of arc east of Greenwich (e.g. 6345 = 105 degrees 45 minutes): one of the provinces' central meridians of Circular 26/2024/TT-BTNMT Appendix 01. |
cornersbắt buộc | array<array<number>> | The corners in order around the parcel, 3 to 200 (the first may be repeated at the end; it is dropped), at least 3 different. |
photo_sha256bắt buộc | string | SHA-256 of the photo of the certificate page, an image the company uploaded ( |
LandCertificatePage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<LandCertificateSummary> | Newest first. |
next_cursorbắt buộc | string | null |
LandCertificateSummary
object
#250: a land certificate kept as the evidence of a boundary proposal, without its corners. It is the evidence of the proposal and of the boundary version with the same polygon_sha256: that boundary is "from land certificate".
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | The certificate's id. |
growing_areabắt buộc | string | |
submitted_atbắt buộc | number | Unix seconds when the certificate was received. |
central_meridian_minbắt buộc | integer | The central meridian of the parcel map's projection, in minutes of arc east of Greenwich (e.g. 6345 = 105 degrees 45 minutes): one of the provinces' central meridians of Circular 26/2024/TT-BTNMT Appendix 01. |
corners_totalbắt buộc | integer | The number of corners. |
plane_area_m2bắt buộc | number | The parcel's area in square metres on the projection plane, from the corners as typed: the figure a certificate prints, so a typing slip shows. |
photo_sha256bắt buộc | string | SHA-256 of the photo of the certificate page, an image the company uploaded ( |
polygon_sha256bắt buộc | string | SHA-256 (hex) of the converted outline's canonical GeoJSON text (compact, sorted keys, UTF-8): the SHA-256 of the boundary proposal the certificate made, and of the version it becomes once a platform admin approves it. |
area_habắt buộc | number | The converted outline's area in hectares: the ring area on a sphere of the WGS 84 equatorial radius, as the admin console and the boundary walks compute a boundary's area. |
registered_area_habắt buộc | number | null | The growing area's registered |
area_difference_ratiobắt buộc | number | null | (area_ha - registered_area_ha) / registered_area_ha: negative when the certificate's parcel is smaller than registered; null without a registered size. |
walkbắt buộc | LandCertificateWalkComparison | null | The certificate against the area's latest boundary walk; null when the area has none. |
supersededbắt buộc | boolean | Whether the certificate replaced a boundary proposal that was waiting. |
LandCertificateWalkComparison
object
#250: a certificate against the area's latest boundary walk (#248).
| Tên | Kiểu | Mô tả |
|---|---|---|
walk_idbắt buộc | integer | The walk's id. |
area_habắt buộc | number | The walked area in hectares. |
area_difference_ratiobắt buộc | number | null | (certificate area - walked area) / walked area. |
centre_offset_mbắt buộc | number | null | The distance in metres between the centres of the two outlines (a local approximation, to compare, not a survey). |
LiveAnnouncement
object
An announcement showing now in the staff shell.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
textbắt buộc | string | Plain text, one line. |
levelbắt buộc | "info" | "warning" | |
starts_atbắt buộc | number | Shown from this time (seconds since 1970, UTC). |
ends_atbắt buộc | number | null | Shown until this time; null until expired. |
LocationCheck
object
#247 (getAreaLocationCheck): which location check ingest makes now for the company's positions of this area, and the area's commune by point. A position is checked against the area's approved plot boundary when it has one in force (plot_boundary); else, once the platform imported commune boundaries (OpenStreetMap, ODbL 1.0), against the area's registered commune (commune: an alert on a mismatch, never a hold, and the location trust is unchanged); else not at all (none: no plot boundary and either no commune boundaries imported or an area not approved yet). A registered commune no unit of the boundary data is named like (name unmatched, e.g. a name from before the 2025-07-01 reform) gets only commune_unknown; position_communes then shows the post-2025 units the area's positions fell in, to change the area's commune to.
| Tên | Kiểu | Mô tả |
|---|---|---|
appliesbắt buộc | "plot_boundary" | "commune" | "none" | The check ingest makes now for a position of the area. |
registered_communebắt buộc | string | null | The commune registered on the area; null: none. |
datasetbắt buộc | string | null | The key of the commune boundary dataset in force (the one imported last); null: none imported. |
namebắt buộc | "matched" | "unmatched" | "missing" | null | Whether a unit of the dataset in force is named like the registered commune ( |
commune_verdict_countsbắt buộc | CommuneVerdictCounts | |
position_communesbắt buộc | array<PositionCommune> | null | The units of the dataset in force that contained the area's judged positions in the range, most first (at most 5); null without a dataset or when the caller is not given positions (only a platform admin and the owning company's operators and admins are). |
attributionbắt buộc | string | null | "© OpenStreetMap contributors", to show with any commune named here (ODbL); null without a dataset. |
copyrightbắt buộc | string | null | The OpenStreetMap copyright page the attribution links to; null without a dataset. |
LoggerCheck
object
The logger cross-check, recomputed by every link, upload and departure: from the seal time (the earliest seal time of the shipment's lots) every reading within setpoint +/- tolerance and no gap above the logger interval up to the departure. Times are Unix seconds. At most 20 gaps and 20 out-of-range readings are listed; all are counted.
| Tên | Kiểu | Mô tả |
|---|---|---|
statusbắt buộc | "missing" | "incomplete" | "out_of_range" | "matched" | |
readingsbắt buộc | integer | |
consideredbắt buộc | integer | Readings from the seal time on. |
first_atbắt buộc | number | null | |
last_atbắt buộc | number | null | |
min_cbắt buộc | number | null | |
max_cbắt buộc | number | null | |
seal_atbắt buộc | number | null | |
untilbắt buộc | number | null | The departure; null while the shipment is open. |
gap_countbắt buộc | integer | |
gapsbắt buộc | array<object> | |
out_of_range_countbắt buộc | integer | |
out_of_rangebắt buộc | array<object> | |
completebắt buộc | boolean | |
within_setpointbắt buộc | boolean |
LoggerSeries
object
A temperature series of the shipment's logger, signed ES256 over the canonical JSON (sorted keys, no whitespace, UTF-8) of every member but sig, as a device envelope, with an active key of the device registry owned by the shipment's active logger (sig.kid names it).
| Tên | Kiểu | Mô tả |
|---|---|---|
loggerbắt buộc | string | The shipment's logger device id. |
shipmentbắt buộc | string | The shipment code. |
capabilitybắt buộc | "air.temperature" | |
unitbắt buộc | "Cel" | |
readingsbắt buộc | array<object> | |
sigbắt buộc | object |
LoginRequest
object
| Tên | Kiểu | Mô tả |
|---|---|---|
emailbắt buộc | string | |
passwordbắt buộc | string |
Lot
object
A lot of one tenant (issue #26). code is unique within the tenant and links the lot to envelopes whose signed context names it; seq is the tenant's lot number (fruit codes); public_id is 128 random bits as hex, never derived from the code or seq. Status in wave 5: draft (created), open (a session was opened), closed (service-level close; the route comes with the seal).
| Tên | Kiểu | Mô tả |
|---|---|---|
tenantbắt buộc | string | |
codebắt buộc | string | |
seqbắt buộc | integer | |
public_idbắt buộc | string | |
facilitybắt buộc | string | |
productbắt buộc | string | |
varietybắt buộc | string | null | |
growing_areabắt buộc | string | null | |
harvest_datebắt buộc | string (date) | null (date) | |
harvest_event_idbắt buộc | string | null | Id of the tenant's harvest envelope. |
destinationbắt buộc | string | null | |
gtinbắt buộc | string | null | |
statusbắt buộc | "draft" | "open" | "paused" | "closed" | "packed" | "shipped" | "recalled" | "withdrawn" | |
created_atbắt buộc | number | Unix seconds. |
updated_atbắt buộc | number | Unix seconds. |
closed_atbắt buộc | number | null | Unix seconds; null until closed. |
LotApplication
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | The application record's envelope id. |
applied_atbắt buộc | string (date-time) | When the application started (the event's time), UTC. |
inputbắt buộc | string | null |
|
productbắt buộc | object | null |
|
product_mass_kgbắt buộc | number | null |
|
product_volume_lbắt buộc | number | null |
|
duration_sbắt buộc | number | null |
|
phi_daysbắt buộc | number | null |
|
interval_ends_atbắt buộc | string (date-time) | null (date-time) | When the pre-harvest interval ends, as the check at harvest reads it (the application's end plus the interval); null when the record states none. |
statusbắt buộc | "accepted" | "quarantined" | quarantined: held for review. |
reasonsbắt buộc | array<string> | Why the record is held (empty when accepted). |
device_idbắt buộc | string | The device or harvest app install that signed it. |
operatorbắt buộc | string | null |
|
harvest_appbắt buộc | boolean | Entered by hand in the harvest app: Self-declared. |
LotApplications
object
| Tên | Kiểu | Mô tả |
|---|---|---|
lotbắt buộc | string | Lot code. |
growing_areabắt buộc | string | null | The lot's growing area; null: none, and no records. |
frombắt buộc | string (date-time) | null (date-time) | Start of the period listed (included), UTC; null without a growing area. |
untilbắt buộc | string (date-time) | null (date-time) | End of the period listed (excluded): the end of the lot's harvest day, UTC; null without a growing area. |
itemsbắt buộc | array<LotApplication> | |
morebắt buộc | boolean | More records than |
spraysbắt buộc | array<object> | #322: the spray records of the lot's growing area (its spray log, |
LotCartonBalance
object
The lot's exportable fruits (L6's export) against those left out of every carton. Stated, not blocking: a lot packs with the gap and keeps it in its packing view.
| Tên | Kiểu | Mô tả |
|---|---|---|
exportable_fruitsbắt buộc | integer | Fruits recorded or overridden with grade A or B. |
exportable_kgbắt buộc | number | Their measured weights (unweighed fruits add none). |
uncartoned_fruitsbắt buộc | integer | Exportable fruits in no carton. |
uncartoned_kgbắt buộc | number | Their measured weights. |
violationbắt buộc | "fruit_not_cartoned" | null | fruit_not_cartoned: an exportable fruit is in no carton; null when every exportable fruit is cartoned. |
LotCloseCheck
object
A lot's close check (O6, #64): the operator console's close dialog. Times are Unix seconds.
| Tên | Kiểu | Mô tả |
|---|---|---|
lotbắt buộc | string | Lot code. |
statusbắt buộc | "draft" | "open" | "paused" | "closed" | "packed" | "shipped" | "recalled" | "withdrawn" | |
sealedbắt buộc | boolean | Whether the lot has its seal. |
countsbắt buộc | object | The lot's final counts. |
sessionsbắt buộc | object | Measurement sessions of the lot not closed yet; the close closes a paused one. |
issuer_keybắt buộc | string | null | The DID URL of the facility's active issuer key, the one the close signs with; null without one. |
timestampingbắt buộc | boolean | Whether an external timestamp authority (RFC 3161) is configured: the seal's manifest hash is then timestamped by the periodic job. |
blockersbắt buộc | array<"already_sealed" | "not_sealable" | "fruits_pending_review" | "session_open" | "envelopes_not_synced" | "no_issuer_key" | "lot_too_large"> | Why the close cannot be confirmed now, in this order; empty when nothing blocks. |
sealbắt buộc | null | object |
LotCloseRequest
object
What the operator confirms before signing: the lot's fruit records as the console showed them.
| Tên | Kiểu | Mô tả |
|---|---|---|
confirm_countsbắt buộc | object |
LotCodeSuggestion
object
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | A code |
LotCreate
object
The owner is the tenant the caller acts for; seq, public_id and status are set by the server.
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | |
facilitybắt buộc | string | A facility of the caller's tenant (within an operator's facilities). |
productkhông bắt buộc | string | |
varietykhông bắt buộc | string | null | |
growing_areakhông bắt buộc | string | null | A growing-area code the tenant may read (its own or an unowned one). |
harvest_datekhông bắt buộc | string (date) | null (date) | YYYY-MM-DD, at most one day after today (UTC). |
harvest_event_idkhông bắt buộc | string | null | Id of a stored harvest envelope of the tenant. |
destinationkhông bắt buộc | string | null | |
gtinkhông bắt buộc | string | null | GTIN-14 with a valid GS1 check digit. |
LotGs1Carton
object
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | |
carton_nobắt buộc | integer | |
epcbắt buộc | string | |
element_stringbắt buộc | string | null | (01)<gtin>(10)<lot>(21)<serial>; null without a GTIN. |
digital_linkbắt buộc | string | null |
LotGs1Labels
object
#161: what the lot's GS1 labels print. The lot-level element string and Digital Link exist when the lot has a GTIN and its code fits AI 10 (20 characters); the public resolver answers the Digital Link once the lot is sealed (sealed).
| Tên | Kiểu | Mô tả |
|---|---|---|
lotbắt buộc | string | |
gtinbắt buộc | string | null | |
sealedbắt buộc | boolean | |
element_stringbắt buộc | string | null | (01)<gtin>(10)<lot> |
digital_linkbắt buộc | string | null | <resolver base>/01/<gtin>/10/<lot> |
cartonsbắt buộc | array<LotGs1Carton> | |
palletsbắt buộc | array<LotGs1Pallet> | |
next_cursorbắt buộc | string | null |
LotGs1Pallet
object
| Tên | Kiểu | Mô tả |
|---|---|---|
ssccbắt buộc | string | GS1 Serial Shipping Container Code: 18 digits, the last the GS1 mod-10 check digit. |
element_stringbắt buộc | string | |
lot_cartonsbắt buộc | integer | |
first_cartonbắt buộc | integer | The lowest number of the lot's cartons on the pallet. |
last_cartonbắt buộc | integer | The highest number of the lot's cartons on the pallet. |
cartonsbắt buộc | integer | Every carton on the pallet, of any lot. The export pallet label prints the pallet's (00) when the pallet holds exactly the cartons the label is printed for. |
LotMergeInput
object
One lot the merge consumes, with the kilograms taken from it.
| Tên | Kiểu | Mô tả |
|---|---|---|
lotbắt buộc | string | Code of a lot of the caller's tenant (closed, packed or shipped, never merged before, not on hold, of the output lot's product). |
quantity_kgbắt buộc | number | Kilograms taken from this lot; for a packed lot at most its packed net mass plus the mass tolerance. |
LotMergeRequest
object
A lot merge (#91): the input lots and the kilograms the output lot (the path's lot) holds.
| Tên | Kiểu | Mô tả |
|---|---|---|
inputsbắt buộc | array<LotMergeInput> | 2 to 50 distinct lots, never the output lot itself. |
output_kgbắt buộc | number | Kilograms of the output lot. Mass balance: it differs from the sum of the inputs' quantity_kg by at most mass_tolerance (5 %) of that sum. |
LotPacking
object
A lot's packing (issue #37): totals, seal numbers (newest first, at most 50) and the mass balance with every violation counted (at most 50 listed, in carton order).
| Tên | Kiểu | Mô tả |
|---|---|---|
lotbắt buộc | string | |
statusbắt buộc | "draft" | "open" | "paused" | "closed" | "packed" | "shipped" | "recalled" | "withdrawn" | |
packed_atbắt buộc | number | null | Unix seconds of the pack event (the first seal). |
cartonsbắt buộc | integer | |
fruitsbắt buộc | integer | |
net_mass_kgbắt buộc | number | Sum of the cartons' net masses. |
fruit_mass_kgbắt buộc | number | Sum of the packed fruits' measured weights. |
seal_numbersbắt buộc | array<object> | |
mass_balancebắt buộc | object |
LotPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<Lot> | |
next_cursorbắt buộc | string | null | Pass as |
LotRecall
object
The recall or withdrawal of a lot (P5, #41) and its outbound notice, stored for the outbound adapter (#90) and not sent yet. recalled_by is an opaque operator id (user-<id>, token-<id> or legacy-<keyed hash>), never an email or a name; cartons and shipments are what the trace found at the recall.
| Tên | Kiểu | Mô tả |
|---|---|---|
kindbắt buộc | "recall" | "withdrawal" | |
statusbắt buộc | "recalled" | "withdrawn" | |
reasonbắt buộc | RecallReason | |
scopebắt buộc | "consumer" | "retail" | "wholesale" | |
notebắt buộc | string | |
prior_statusbắt buộc | "draft" | "open" | "paused" | "closed" | "packed" | "shipped" | |
recalled_bybắt buộc | string | |
recalled_atbắt buộc | number | Unix seconds. |
cartonsbắt buộc | integer | |
shipmentsbắt buộc | integer | |
noticebắt buộc | object | null |
LotRecallRequest
object
A recall or withdrawal of the whole lot (P5, #41). kind recall moves the lot to recalled, withdrawal to withdrawn; scope is the recall depth (21 CFR 7.42(b)(1)); note is staff text, never public, never in the audit row or the outbound notice.
| Tên | Kiểu | Mô tả |
|---|---|---|
kindbắt buộc | "recall" | "withdrawal" | |
reasonbắt buộc | RecallReason | |
scopebắt buộc | "consumer" | "retail" | "wholesale" | |
notekhông bắt buộc | string |
LotSampling
object
The one sampling of a lot: the rule and the rates it was computed from, the population (the lot's export fruits), the lab the system assigned, the test scope and the fruits drawn.
| Tên | Kiểu | Mô tả |
|---|---|---|
lotbắt buộc | string | |
labbắt buộc | object | |
rulebắt buộc | object | |
populationbắt buộc | integer | |
sample_countbắt buộc | integer | |
analytesbắt buộc | array<SampleAnalyte> | |
selected_bybắt buộc | string | |
selected_atbắt buộc | number | Unix seconds. |
samplesbắt buộc | array<SampleItem> | |
reportbắt buộc | LabReport | null | The lab's signed report (P4, #40), null until the lab submits it. |
LotSamplingRead
object
| Tên | Kiểu | Mô tả |
|---|---|---|
samplingbắt buộc | LotSampling | null |
LotSeal
object
A lot's seal (L10, #35): the signed credential of its manifest and what identifies it. credential is a compact JWS (VC-JOSE: protected header alg ES256, kid the issuer key's DID URL, typ vc+jwt, cty vc) whose payload is a W3C verifiable credential (VC 2.0, type AgriTraceLotSeal, issuer the facility's did:web) with the lot's manifest as credentialSubject: the lot's facts, every fruit record with the SHA-256 of its stored record and its bound envelope ids, every envelope of the lot with the SHA-256 of its stored payload and its signing key, the totals, the packing, the lab report, the shipment and the trust snapshot. The signature verifies with the key listed in https://<domain>/<slug>/did.json. manifest_sha256 is the SHA-256 of the JWS payload bytes. sealed_by is an opaque operator id, never an email or a name: user-<id> for a signed-in user, token-<id> for an API token (its row id), legacy- and 16 hex digits of an HMAC under the server's secret for a legacy token. Times are Unix seconds.
| Tên | Kiểu | Mô tả |
|---|---|---|
lotbắt buộc | string | Lot code. |
statusbắt buộc | "closed" | "packed" | "shipped" | "recalled" | "withdrawn" | The lot's status now. |
sealed_atbắt buộc | number | |
sealed_bybắt buộc | string | |
key_idbắt buộc | string | The signing key's DID URL ( |
manifest_sha256bắt buộc | string | |
fruit_countbắt buộc | integer | |
event_countbắt buộc | integer | |
credentialbắt buộc | string |
LotSummary
object
Lot summary (L6, #31).
| Tên | Kiểu | Mô tả |
|---|---|---|
lotbắt buộc | string | Lot code. |
statusbắt buộc | "draft" | "open" | "paused" | "closed" | "packed" | "shipped" | "recalled" | "withdrawn" | |
countbắt buộc | integer | Fruits with a device record: status recorded or overridden, or rejected with at least one bound device envelope (knock, scale or override). Fruits awaiting a device and fruits rejected before any measurement are reported apart. |
awaiting_devicebắt buộc | integer | Fruits labelled but without a device record yet. |
rejected_unmeasuredbắt buộc | integer | Fruits rejected before any device envelope was bound (no device record); not in |
kgbắt buộc | number | Sum of the scale weights of the counted fruits, rounded to 3 decimals. |
weighedbắt buộc | integer | Counted fruits that have a scale weight. |
levelsbắt buộc | object | Counted fruits per effective ripeness level (the sensory level when overridden, else the device level); |
gradesbắt buộc | object | Counted fruits per grade; a fruit with status rejected counts as reject. |
overridesbắt buộc | integer | Counted fruits with a sensory override. |
avg_confidencebắt buộc | number | null | Mean device confidence of the counted fruits that have one, 4 decimals; null when none has one. |
pending_reviewbắt buộc | integer | Fruits of the lot with a bound envelope still in quarantine. |
exportbắt buộc | object | Counted fruits graded A or B and not rejected, and their weight. |
volumebắt buộc | GrowingAreaVolume | null | Volume headroom of the lot's growing area for the season of its harvest date (as GET /v1/growing-areas/{code}/volume); null when the lot has no growing area. |
LotTrace
object
The affected set of a lot (P5, #41): backward to its facility, growing area and harvest; forward to its cartons (all counted, at most 500 listed in carton order, truncated when more exist) and the shipment carrying it, and through the chain of lot merges (#91) to every lot holding its fruit: the lot a merge produced from it, the lot a merge produced from that one, and so on (a merged lot can be closed and merged again), at most 8 merges: those lots' cartons are counted and listed with the lot's own (after them, in chain order), and the shipment is the first found along the chain, the lot's own first; the other lots of the tenant from the same growing area and harvest date (at most 50, by code). The harvest is the lot's accepted signed harvest event carrying a mass (signed_event), else the growing area's declaration for the harvest date (area_declaration: the whole area's kg), else only the date. On request (getLotTrace merges=1, #259) the trace also names the lots the merges link: forward.merged_into, the lots of the chain after this one in chain order, backward.merged_from, the input lots of the merge that produced this one (empty when no merge did), and each listed carton's lot.
| Tên | Kiểu | Mô tả |
|---|---|---|
lotbắt buộc | object | |
recallbắt buộc | LotRecall | null | |
backwardbắt buộc | object | |
forwardbắt buộc | object | |
related_lotsbắt buộc | object |
LotTransformation
object
A lot merge (#91; the transform event type, FSMA 204 transformation CTE). Its EPCIS 2.0 TransformationEvent is in the staff EPCIS document of each of its lots.
| Tên | Kiểu | Mô tả |
|---|---|---|
event_idbắt buộc | string (uuid) | The merge's id: the eventID of its TransformationEvent is urn:uuid:<event_id>, and the records export rows of the merge carry it. |
lotbắt buộc | string | The output lot's code. |
facilitybắt buộc | string | The facility the merge happened at: the output lot's. |
inputsbắt buộc | array<LotMergeInput> | The lots the merge consumed, by code. |
input_kgbắt buộc | number | The sum of the inputs' quantity_kg. |
output_kgbắt buộc | number | The output lot's kilograms. |
mass_tolerancebắt buộc | number | The share of input_kg by which output_kg may differ (0.05). |
recorded_atbắt buộc | number | When the merge was recorded (Unix seconds). |
LotTransformations
object
The lot merges a lot took part in (#91).
| Tên | Kiểu | Mô tả |
|---|---|---|
produced_bybắt buộc | LotTransformation | null | The merge that produced the lot; null when no merge did. |
consumed_bybắt buộc | LotTransformation | null | The merge that consumed the lot; null when no merge did. |
LotTrust
object
| Tên | Kiểu | Mô tả |
|---|---|---|
lotbắt buộc | string | Lot code. |
snapshotbắt buộc | null | object | |
queuedbắt buộc | boolean | The lot waits for a recompute. |
holdsbắt buộc | array<object> | The latest recorded holds, newest first. |
historybắt buộc | array<object> | |
next_cursorbắt buộc | string | null |
LotUpdate
object
Descriptive fields only; code, facility, seq, public_id, tenant and status are immutable here.
| Tên | Kiểu | Mô tả |
|---|---|---|
productkhông bắt buộc | string | |
varietykhông bắt buộc | string | null | |
growing_areakhông bắt buộc | string | null | A growing-area code the tenant may read (its own or an unowned one). |
harvest_datekhông bắt buộc | string (date) | null (date) | YYYY-MM-DD, at most one day after today (UTC). |
harvest_event_idkhông bắt buộc | string | null | Id of a stored harvest envelope of the tenant. |
destinationkhông bắt buộc | string | null | |
gtinkhông bắt buộc | string | null | GTIN-14 with a valid GS1 check digit. |
MapPoint
object
SENS-B1e (#235): a placement's surveyed install point (WGS84).
| Tên | Kiểu | Mô tả |
|---|---|---|
latbắt buộc | number | |
lonbắt buộc | number | |
accuracy_mbắt buộc | number |
MarketLimit
object
One market limit entry: the maximum (kind max, value in mg/kg) or ban (kind banned, no value) of an analyte in a product for a destination market, from valid_from (Asia/Ho_Chi_Minh) until a later entry of the same market, product and analyte supersedes it. status on today's date: in_force (the entry that applies today), scheduled (from a later date) or superseded. Entries are never edited: a lab result keeps a copy of the limit it was judged with.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
marketbắt buộc | string | ISO 3166-1 alpha-2. |
productbắt buộc | string | As lots.product. |
analytebắt buộc | string | |
kindbắt buộc | "max" | "banned" | |
valuebắt buộc | number | null | The maximum; null for a ban. |
unitbắt buộc | "mg/kg" | |
valid_frombắt buộc | string (date) | |
sourcebắt buộc | string | The regulation it cites. |
created_atbắt buộc | number | Unix seconds. |
created_bybắt buộc | string | Who recorded it ( |
statusbắt buộc | "in_force" | "scheduled" | "superseded" |
MarketLimitCreate
object
A new entry. value is required for max (above 0, at most 1000 mg/kg) and must be absent or null for banned. valid_from from today (Asia/Ho_Chi_Minh) to 10 years ahead: an entry never reaches back. The unit is always mg/kg.
| Tên | Kiểu | Mô tả |
|---|---|---|
marketbắt buộc | string | |
productbắt buộc | string | |
analytebắt buộc | string | |
kindbắt buộc | "max" | "banned" | |
valuekhông bắt buộc | number | null | |
valid_frombắt buộc | string (date) | |
sourcebắt buộc | string |
MarketLimitPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<MarketLimit> | |
todaybắt buộc | string (date) | The date |
next_cursorbắt buộc | string | null | The next page's |
Me
object
| Tên | Kiểu | Mô tả |
|---|---|---|
userbắt buộc | User | |
membershipsbắt buộc | array<Membership> | |
csrf_tokenbắt buộc | string | |
tenantbắt buộc | string | null | Tenant the request acts for; null when the user has no membership. |
rolesbắt buộc | array<string> | |
tenant_namekhông bắt buộc | string | null | #282 (always present in this answer): the name of the tenant the request acts for ( |
lab_namekhông bắt buộc | string | null | #282 (always present in this answer): for a lab user ( |
two_factorkhông bắt buộc | TwoFactorState |
MeasurementSession
object
A measurement session of one lot on one line (not a login session). At most one open or paused session holds a line, and a device is in at most one open or paused session.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | |
tenantbắt buộc | string | |
lotbắt buộc | string | Lot code. |
facilitybắt buộc | string | The lot's facility. |
linebắt buộc | string | |
statusbắt buộc | "open" | "paused" | "closed" | |
opened_bybắt buộc | string | The principal that opened the session. |
opened_atbắt buộc | number | Unix seconds. |
paused_atbắt buộc | number | null | Unix seconds of the last pause. |
closed_atbắt buộc | number | null | Unix seconds. |
updated_atbắt buộc | number | Unix seconds. |
devicesbắt buộc | array<string> | Devices chosen when the session opened. |
MeasurementSessionList
object
Every measurement session of one lot, newest first.
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<MeasurementSession> |
MeasurementSessionOpen
object
| Tên | Kiểu | Mô tả |
|---|---|---|
linebắt buộc | string | |
deviceskhông bắt buộc | array<string> | Active devices of the lot's facility. Default: every one whose profile declares set_session. |
MeasurementSessionOpened
object
The new measurement session and the set_session outcome per chosen device.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | |
tenantbắt buộc | string | |
lotbắt buộc | string | Lot code. |
facilitybắt buộc | string | The lot's facility. |
linebắt buộc | string | |
statusbắt buộc | "open" | "paused" | "closed" | |
opened_bybắt buộc | string | The principal that opened the session. |
opened_atbắt buộc | number | Unix seconds. |
paused_atbắt buộc | number | null | Unix seconds of the last pause. |
closed_atbắt buộc | number | null | Unix seconds. |
updated_atbắt buộc | number | Unix seconds. |
devicesbắt buộc | array<string> | Devices chosen when the session opened. |
commandsbắt buộc | array<SessionCommand> |
Member
object
SELF-1-4 (#185). Someone who belongs to the company. Never a password, a token or a session.
| Tên | Kiểu | Mô tả |
|---|---|---|
user_idbắt buộc | integer | |
emailbắt buộc | string | The email the person signs in with. |
display_namebắt buộc | string | null | |
rolebắt buộc | "tenant_admin" | "operator" | "auditor" | "agronomist" | null | The member's role in this company; null when the person holds only platform-managed roles here (a lab user). |
facilitiesbắt buộc | array<string> | null | An operator's facility codes; null = every facility of the company (always null for another role). |
other_rolesbắt buộc | array<"lab" | "platform_admin"> | Platform-managed roles held in this company: shown, never changed here. |
lab_idbắt buộc | string | null | The lab of a lab membership. |
statusbắt buộc | "active" | "disabled" |
|
account_statusbắt buộc | "active" | "disabled" | The account itself, managed by CropPath only. |
last_sign_in_atbắt buộc | number | null | Unix seconds of the newest session CropPath still keeps (sessions are deleted 30 days after they end); null: none in that time. |
joined_atbắt buộc | number | null | Unix seconds; null for a membership older than #184. |
two_factorbắt buộc | boolean | SELF-1-6 (#187): the member's two-step sign-in is on. |
lockedbắt buộc | boolean | SELF-2-10 (#199): the member is locked out of signing in now (too many wrong passwords or two-step codes; the lock ends by itself after 15 minutes or when a company admin unlocks it). Never how many failures they had. |
MemberList
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<Member> | |
active_adminsbắt buộc | integer | How many company admins are active, with an active account (the last-admin rule). |
MemberSessionsRevoke
object
| Tên | Kiểu | Mô tả |
|---|---|---|
reasonkhông bắt buộc | string | Required from a platform admin (CropPath support): one line, kept in the company's activity log. Ignored for a company admin. |
MemberSessionsRevoked
object
| Tên | Kiểu | Mô tả |
|---|---|---|
user_idbắt buộc | integer | |
sessions_revokedbắt buộc | integer | How many live sessions of the member were ended. |
Membership
object
| Tên | Kiểu | Mô tả |
|---|---|---|
tenantbắt buộc | string | |
rolebắt buộc | string | e.g. tenant_admin, platform_admin, operator, lab, auditor. |
facilitiesbắt buộc | array<string> | null | null means every facility of the tenant. |
lab_idbắt buộc | string | null |
MemberUnlockResult
object
SELF-2-10 (#199). The member's sign-in lockout was cleared.
| Tên | Kiểu | Mô tả |
|---|---|---|
user_idbắt buộc | integer | |
lockedbắt buộc | false | |
was_lockedbắt buộc | boolean | The member was locked out when the request ran (false: there was nothing to clear but a count of earlier failures, which is cleared too). Never how many failures they had. |
MemberUpdate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
rolebắt buộc | "tenant_admin" | "operator" | "auditor" | "agronomist" | |
facilitieskhông bắt buộc | array<string> | null | Operators only: codes of the company's facilities; null or an empty list = every facility. |
NationalPortalFiling
object
The national-portal filing of the accepted envelopes of the shipment's lots (#299): the outbound rows of the national portal's own target only (a local EPCIS file archive or another EPCIS repository never counts), queue rows, delivered, pending, failing (pending after a failed attempt); filed when there is a row and every one is delivered. With no national portal target configured there is no row and filed is false.
| Tên | Kiểu | Mô tả |
|---|---|---|
rowsbắt buộc | integer | |
deliveredbắt buộc | integer | |
pendingbắt buộc | integer | |
failingbắt buộc | integer | |
filedbắt buộc | boolean |
Notification
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
kindbắt buộc | NotificationKind | |
paramsbắt buộc | NotificationParams | |
created_atbắt buộc | number | Unix seconds. |
read_atbắt buộc | number | null | When the caller read it; null while unread. |
NotificationKind
"invitation_accepted" | "invitation_expiring" | "webhook_disabled" | "api_token_expiring" | "facility_approved" | "facility_refused" | "growing_area_approved" | "report_filed" | "signing_key_missing" | "alarm_raised"
What happened. invitation_accepted {email, role}; invitation_expiring {email, role, expires_at}; webhook_disabled {subscription_id, description, failures}; api_token_expiring {token_id, name, expires_at}; facility_approved {code, name}; facility_refused {code, name, reason}; growing_area_approved {code, name}; report_filed {report_id, lot, category}; signing_key_missing {facility, name, open_lots}; alarm_raised {alarm_id, alarm_kind, priority, device, zone, area} (#361: an urgent or warning alarm of the irrigation cockpit was raised, to the company's admins, the operators of its facility getting the email only; GET /v1/alarms/{id}). Clients show an unknown kind generically: new kinds may be added.
NotificationPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<Notification> | |
unreadbắt buộc | integer | The caller's unread notifications in this company. |
next_cursorbắt buộc | string | null | The next page's |
NotificationParams
object
The kind's parameters (see NotificationKind): identifiers, names and times only, never rendered text.
| Tên | Kiểu | Mô tả |
|---|---|---|
emailkhông bắt buộc | string | The invited person's sign-in email. |
rolekhông bắt buộc | "tenant_admin" | "operator" | "auditor" | "agronomist" | The invited role. |
expires_atkhông bắt buộc | number | When the invitation or token expires (Unix seconds). |
subscription_idkhông bắt buộc | integer | The webhook subscription turned off. |
descriptionkhông bắt buộc | string | The webhook's own description (may be empty). |
failureskhông bắt buộc | integer | Failed delivery attempts in a row. |
token_idkhông bắt buộc | integer | |
namekhông bắt buộc | string | null | The token's, facility's or growing area's name. |
codekhông bắt buộc | string | The facility or growing area code. |
reasonkhông bắt buộc | string | Why CropPath refused the facility proposal. |
report_idkhông bắt buộc | integer | |
lotkhông bắt buộc | string | The lot code a public report names. |
categorykhông bắt buộc | "label_peeled" | "scanned_many" | "ripeness_off" | "other" | |
facilitykhông bắt buộc | string | The facility code missing a signing key. |
open_lotskhông bắt buộc | integer | Its lots not closed yet (draft, open or paused). |
alarm_idkhông bắt buộc | integer | #361: the alarm raised (GET /v1/alarms/{id}). |
alarm_kindkhông bắt buộc | string | #361: the alarm's catalog kind. |
prioritykhông bắt buộc | "urgent" | "warning" | "notice" | #361: the alarm's priority. |
devicekhông bắt buộc | string | null | #361: the alarm's device. |
zonekhông bắt buộc | integer | null | #361: the alarm's controller zone. |
areakhông bắt buộc | string | null | #361: the alarm's growing area code. |
NotificationsMarkedRead
object
| Tên | Kiểu | Mô tả |
|---|---|---|
markedbắt buộc | integer | |
unreadbắt buộc | integer |
NotificationUnreadCount
object
| Tên | Kiểu | Mô tả |
|---|---|---|
unreadbắt buộc | integer |
OAuthClient
object
An OAuth2 API client of the tenant as the admin console lists it: never the secret, never its hash. Unix seconds.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
client_idbắt buộc | string | The public client identifier the integration authenticates with. |
namebắt buộc | string | The operator's label (not unique). |
rolebắt buộc | "tenant_admin" | "operator" | "auditor" | |
scopesbắt buộc | array<"aggregate_read" | "attachment_read" | "attachment_upload" | "command_read" | "device_admin" | "device_command" | "device_read" | "envelope_read" | "epcis_capture" | "facility_edit" | "facility_read" | "fruit_action" | "grading_rule_read" | "grading_rule_write" | "growing_area_edit" | "growing_area_read" | "issuer_key_admin" | "lot_read" | "lot_recall" | "lot_write" | "market_limit_read" | "recall_read" | "records_export" | "report_triage" | "review" | "tenant_read" | "trace_read" | "webhook_admin"> | |
facilitiesbắt buộc | array<string> | null | An operator client's facility codes; null: every facility. |
created_bybắt buộc | string | |
created_atbắt buộc | number | |
last_token_atbắt buộc | number | null | When it last got a token; null: never. |
revoked_atbắt buộc | number | null | |
revoke_reasonbắt buộc | string | null | |
revoked_bybắt buộc | string | null | |
statusbắt buộc | "active" | "revoked" |
OAuthClientAllowedIps
object
#205: 1 to 20 distinct networks in CIDR form, IPv4 or IPv6 (a bare address is its /32 or /128; host bits set are refused), or null for any source. The key is required.
| Tên | Kiểu | Mô tả |
|---|---|---|
allowed_ipsbắt buộc | array<string> | null |
OAuthClientCreate
object
role: tenant_admin, operator or auditor. scopes: distinct permissions the role can hold (credential management, platform and lab permissions are never granted). facilities: an operator client only, 1 to 64 distinct facility codes of the tenant; absent or null, every facility.
| Tên | Kiểu | Mô tả |
|---|---|---|
namebắt buộc | string | |
rolebắt buộc | "tenant_admin" | "operator" | "auditor" | |
scopesbắt buộc | array<"aggregate_read" | "attachment_read" | "attachment_upload" | "command_read" | "device_admin" | "device_command" | "device_read" | "envelope_read" | "epcis_capture" | "facility_edit" | "facility_read" | "fruit_action" | "grading_rule_read" | "grading_rule_write" | "growing_area_edit" | "growing_area_read" | "issuer_key_admin" | "lot_read" | "lot_recall" | "lot_write" | "market_limit_read" | "recall_read" | "records_export" | "report_triage" | "review" | "tenant_read" | "trace_read" | "webhook_admin"> | |
facilitieskhông bắt buộc | array<string> | null |
OAuthClientCreated
object
The new client and, in client_secret, its secret: this response is the only place it ever appears. Store it now; a lost secret means revoking the client and registering a new one.
| Tên | Kiểu | Mô tả |
|---|---|---|
clientbắt buộc | OAuthClient | |
client_secretbắt buộc | string |
OAuthClientDetail
object
#205: an API client as the credential view shows it: the fields of OAuthClient plus its expiry, allowed sources, last use and write scopes. Never the secret, its hash or a client address. Unix seconds.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
client_idbắt buộc | string | The public client identifier the integration authenticates with. |
namebắt buộc | string | The operator's label (not unique). |
rolebắt buộc | "tenant_admin" | "operator" | "auditor" | |
scopesbắt buộc | array<"aggregate_read" | "attachment_read" | "attachment_upload" | "command_read" | "device_admin" | "device_command" | "device_read" | "envelope_read" | "epcis_capture" | "facility_edit" | "facility_read" | "fruit_action" | "grading_rule_read" | "grading_rule_write" | "growing_area_edit" | "growing_area_read" | "issuer_key_admin" | "lot_read" | "lot_recall" | "lot_write" | "market_limit_read" | "recall_read" | "records_export" | "report_triage" | "review" | "tenant_read" | "trace_read" | "webhook_admin"> | |
facilitiesbắt buộc | array<string> | null | An operator client's facility codes; null: every facility. |
created_bybắt buộc | string | |
created_atbắt buộc | number | |
last_token_atbắt buộc | number | null | When it last got a token; null: never. |
revoked_atbắt buộc | number | null | |
revoke_reasonbắt buộc | string | null | |
revoked_bybắt buộc | string | null | |
statusbắt buộc | "active" | "revoked" | |
expires_atbắt buộc | number | null | When the client stops getting tokens and its tokens stop working (Unix seconds); null only for a client an older server registered, which counts as expired. |
expiredbắt buộc | boolean | True from |
allowed_ipsbắt buộc | array<string> | null | The networks (CIDR form, IPv4 or IPv6) the client may call from; null: any source. |
last_used_atbắt buộc | number | null | When it last got a token or called the API (calls are recorded at most once a minute, and shown within seconds); null: never. |
last_used_ip_hashbắt buộc | string | null | A keyed hash (HMAC-SHA256) of the address of that last use, never the address: equal values mean the same source. |
write_scopesbắt buộc | array<"aggregate_read" | "attachment_read" | "attachment_upload" | "command_read" | "device_admin" | "device_command" | "device_read" | "envelope_read" | "epcis_capture" | "facility_edit" | "facility_read" | "fruit_action" | "grading_rule_read" | "grading_rule_write" | "growing_area_edit" | "growing_area_read" | "issuer_key_admin" | "lot_read" | "lot_recall" | "lot_write" | "market_limit_read" | "recall_read" | "records_export" | "report_triage" | "review" | "tenant_read" | "trace_read" | "webhook_admin"> | The client's scopes that open a write (a route other than GET). |
broad_scopebắt buộc | boolean | True when |
OAuthClientDetailPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<OAuthClientDetail> | |
next_cursorbắt buộc | string | null | The next page's |
OAuthClientPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<OAuthClient> | |
next_cursorbắt buộc | string | null | The next page's |
OAuthClientRenew
object
#205: the new lifetime, counted from now. Absent: 365 days.
| Tên | Kiểu | Mô tả |
|---|---|---|
expires_in_dayskhông bắt buộc | integer |
OAuthClientRevoke
object
| Tên | Kiểu | Mô tả |
|---|---|---|
reasonbắt buộc | string | Why it is revoked, one line. |
OAuthError
object
The error body of the OAuth2 endpoints (RFC 6749 §5.2): error the RFC error code, equal to code, and error_description the text. A request refused before the endpoint ran (a bad X-Request-Id, the rate limit, an Idempotency-Key header) gets the API's usual body, error and code only.
| Tên | Kiểu | Mô tả |
|---|---|---|
errorbắt buộc | string | |
error_descriptionkhông bắt buộc | string | |
codebắt buộc | string |
OAuthRevokeRequest
object
RFC 7009 §2.1. client_id and client_secret only when the client does not use HTTP Basic.
| Tên | Kiểu | Mô tả |
|---|---|---|
tokenbắt buộc | string | |
token_type_hintkhông bắt buộc | string | |
client_idkhông bắt buộc | string | |
client_secretkhông bắt buộc | string |
OAuthToken
object
RFC 6749 §5.1.
| Tên | Kiểu | Mô tả |
|---|---|---|
access_tokenbắt buộc | string | |
token_typebắt buộc | "Bearer" | |
expires_inbắt buộc | integer | Seconds. |
scopebắt buộc | string | The scopes granted, space separated. |
OAuthTokenRequest
object
RFC 6749 §4.4.2. client_id and client_secret only when the client does not use HTTP Basic. scope: space-separated permissions, a subset of the client's; absent, all of them.
| Tên | Kiểu | Mô tả |
|---|---|---|
grant_typebắt buộc | "client_credentials" | |
scopekhông bắt buộc | string | |
client_idkhông bắt buộc | string | |
client_secretkhông bắt buộc | string |
OidcCallback
object
#87. What the identity provider sent back to the company's redirect URI, and that company.
| Tên | Kiểu | Mô tả |
|---|---|---|
statebắt buộc | string | |
codebắt buộc | string | |
companybắt buộc | string | The company of the redirect URI the provider sent the browser back to ( |
isskhông bắt buộc | string | The |
OidcStart
object
#87. The company whose identity provider the person signs in with.
| Tên | Kiểu | Mô tả |
|---|---|---|
companybắt buộc | string | The company's id. |
OidcStarted
object
#87. Where to send the browser: the company's identity provider, with the authorization code flow's parameters (state, nonce, the PKCE code_challenge with method S256, the company's own redirect URI and scope openid email). The sign-in must finish (POST /v1/auth/oidc/callback) before expires_at, in the same browser.
| Tên | Kiểu | Mô tả |
|---|---|---|
authorization_urlbắt buộc | string (uri) | |
expires_atbắt buộc | number | Unix seconds (10 minutes after the start). |
Onboarding
object
SELF-1-8 (#189). The selected company's getting-started checklist: every step computed from its own records, counts only. Only hidden is stored.
| Tên | Kiểu | Mô tả |
|---|---|---|
tenantbắt buộc | string | |
completebắt buộc | boolean | Every required step is done. |
hiddenbắt buộc | boolean | A company admin hid the checklist (the console then stops showing it on /admin). |
hidden_atbắt buộc | number | null | Unix seconds when it was hidden; null while shown. |
stepsbắt buộc | array<OnboardingStep> | Every step, in the order a new company works through them. |
OnboardingStep
object
SELF-1-8 (#189). One step of the getting-started checklist, judged from the company's own records.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | "profile" | "second_admin" | "admin_two_factor" | "facility" | "growing_areas" | "operators" | "issuer_keys" | "devices" | "first_lot" | "first_sealed_lot" | "first_label" | "integrations" | profile: the company profile holds a legal name, an address and a tax number (count of 3 filled). second_admin: at least two active company admins (count: admins). admin_two_factor: every active company admin has two-step sign-in on (count of total admins). facility: an approved facility (count approved of total; waiting_for_platform while none is approved; a company cannot create facilities in Phase 1). growing_areas: an approved growing area with a grower of the company (count approved of total areas; waiting_for_platform while every area with a grower is unapproved). operators: an active operator (count). issuer_keys: every approved facility has an active signing key (count of total approved facilities). devices: an active device seen within 7 days (count of total active devices). first_lot, first_sealed_lot: a lot, a sealed lot (count). first_label: a fruit or carton label printed or an export label print logged. integrations (optional): an active API token, API client or webhook (count). |
requiredbắt buộc | boolean | false for an optional step (integrations): the checklist is complete without it. |
statusbắt buộc | "done" | "to_do" | "waiting_for_platform" | waiting_for_platform: the company did its part and waits for CropPath (an approval). |
countbắt buộc | integer | null | The number the step is judged by, where one helps. |
totalbắt buộc | integer | null | What |
linkbắt buộc | string | The console screen (path and hash) where the step is done. |
OnboardingUpdate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
hiddenbắt buộc | boolean | true hides the checklist, false shows it again. |
OutboundBacklog
object
| Tên | Kiểu | Mô tả |
|---|---|---|
targetsbắt buộc | array<OutboundTarget> | Every configured target, and any other target with events waiting, by name. |
OutboundTarget
object
B9 (#21): the company's undelivered events for one outbound target (a national system, a buyer's EPCIS repository, an archive).
| Tên | Kiểu | Mô tả |
|---|---|---|
targetbắt buộc | string | The target's name, as the deployment configures it. |
pendingbắt buộc | integer | Accepted events waiting to be delivered. |
heldbắt buộc | integer | Events not delivered because they are no longer accepted (for example sent back to quarantine by a pack), which wait until a review accepts them again. |
failingbắt buộc | integer | Pending events whose delivery failed at least once. |
next_attempt_atbắt buộc | number | null | Unix seconds: the earliest next delivery attempt of a pending event; null when none is pending. |
max_attemptsbắt buộc | integer | The most failed attempts of one waiting event. |
last_errorbắt buộc | string | null | The error of the waiting event that failed most often (the latest next attempt among equals); null when none failed. One delivery batch carries several companies' events and a partner's error body can echo any of them, so a company sees only a tenant-neutral summary: |
Pallet
object
#161: a pallet of a facility, identified by its SSCC, with the cartons on it.
| Tên | Kiểu | Mô tả |
|---|---|---|
ssccbắt buộc | string | GS1 Serial Shipping Container Code: 18 digits, the last the GS1 mod-10 check digit. |
facilitybắt buộc | string | |
epcbắt buộc | string | https://id.gs1.org/00/<sscc> |
element_stringbắt buộc | string | GS1-128 element string, (00)<sscc>. |
cartonsbắt buộc | array<PalletCarton> | |
created_bybắt buộc | string | |
created_atbắt buộc | number | Unix seconds. |
updated_atbắt buộc | number | Unix seconds. |
PalletCarton
object
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | |
lotbắt buộc | string | |
epcbắt buộc | string | The carton's EPC: its SGTIN Digital Link when its lot has a GTIN, else urn:agritrace:carton:<code>. |
PalletCartons
object
| Tên | Kiểu | Mô tả |
|---|---|---|
cartonsbắt buộc | array<string> | |
expected_cartonskhông bắt buộc | array<string> | The precondition (#267): the codes of every carton the writer read on the pallet (Pallet.cartons, all lots, any order). When given, the set is refused with 409 |
PalletCreate
object
Without sscc, the next SSCC of the platform's GS1 company prefix is allocated.
| Tên | Kiểu | Mô tả |
|---|---|---|
facilitybắt buộc | string | |
sscckhông bắt buộc | string | An SSCC of the company's own GS1 membership. |
PalletPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<PalletSummary> | |
next_cursorbắt buộc | string | null |
PalletSummary
object
| Tên | Kiểu | Mô tả |
|---|---|---|
ssccbắt buộc | string | GS1 Serial Shipping Container Code: 18 digits, the last the GS1 mod-10 check digit. |
facilitybắt buộc | string | |
epcbắt buộc | string | |
element_stringbắt buộc | string | |
carton_countbắt buộc | integer | |
created_bybắt buộc | string | |
created_atbắt buộc | number | |
updated_atbắt buộc | number |
Passkey
object
#87. One of the signed-in user's passkeys: never its credential id, public key or user handle.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
nicknamebắt buộc | string | The owner's name for it; empty when none was given. |
algorithmbắt buộc | "ES256" | "RS256" | "EdDSA" | |
transportsbắt buộc | array<"ble" | "hybrid" | "internal" | "nfc" | "smart-card" | "usb"> | How the browser said the authenticator connects (hints). |
attestation_formatbắt buộc | string | |
created_atbắt buộc | number | Unix seconds. |
last_used_atbắt buộc | number | null | Unix seconds of the last sign-in with it. |
clone_warning_atbắt buộc | number | null | When a sign-in with it was refused because its signature counter did not move forward: the authenticator may have been copied. Remove the passkey if you did not expect this. |
PasskeyCreationOptions
object
#87. public_key: PublicKeyCredentialCreationOptions for navigator.credentials.create(), binary values as base64url (challenge, user.id, excludeCredentials[].id).
| Tên | Kiểu | Mô tả |
|---|---|---|
public_keybắt buộc | object |
PasskeyList
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<Passkey> |
PasskeyLogin
object
#87. The answer of navigator.credentials.get(): the credential's rawId, response.clientDataJSON, response.authenticatorData, response.signature and response.userHandle, each base64url (padding optional).
| Tên | Kiểu | Mô tả |
|---|---|---|
credential_idbắt buộc | string | |
client_data_jsonbắt buộc | string | |
authenticator_databắt buộc | string | |
signaturebắt buộc | string | |
user_handlebắt buộc | string |
PasskeyRegistration
object
#87. The answer of navigator.credentials.create(): response.clientDataJSON and response.attestationObject, base64url (padding optional), and response.getTransports().
| Tên | Kiểu | Mô tả |
|---|---|---|
client_data_jsonbắt buộc | string | |
attestation_objectbắt buộc | string | |
transportskhông bắt buộc | array<string> | Unknown names are dropped. |
nicknamekhông bắt buộc | string |
PasskeyRename
object
| Tên | Kiểu | Mô tả |
|---|---|---|
nicknamebắt buộc | string |
PasskeyRequestOptions
object
#87. public_key: PublicKeyCredentialRequestOptions for navigator.credentials.get(), the challenge as base64url; no allowed credentials (the authenticator offers the person's passkeys for this site).
| Tên | Kiểu | Mô tả |
|---|---|---|
public_keybắt buộc | object |
PasswordChanged
object
| Tên | Kiểu | Mô tả |
|---|---|---|
csrf_tokenbắt buộc | string |
PasswordChangeRequest
object
| Tên | Kiểu | Mô tả |
|---|---|---|
current_passwordbắt buộc | string | |
new_passwordbắt buộc | string | |
codekhông bắt buộc | string | #187: the 6-digit code from the authenticator app; required (or |
backup_codekhông bắt buộc | string | #187: one unused backup code, instead of |
PasswordRecovered
object
| Tên | Kiểu | Mô tả |
|---|---|---|
backup_codes_leftbắt buộc | integer | The account's unused backup codes after this one. |
second_factorbắt buộc | "required" | The next sign-in asks for the second step after the password. |
PasswordRecoveryRequest
object
| Tên | Kiểu | Mô tả |
|---|---|---|
emailbắt buộc | string | The email used to sign in. |
backup_codebắt buộc | string | One unused backup code of the account (SELF-1-6, #187), as printed: any case, spaces and hyphens allowed. |
new_passwordbắt buộc | string |
PersonalData
object
SELF-2-9 (#198). What the platform holds about the signed-in member in the selected company. Never a secret: no password hash, session token, address hash, user agent or two-step secret.
| Tên | Kiểu | Mô tả |
|---|---|---|
user_idbắt buộc | integer | |
emailbắt buộc | string | |
display_namebắt buộc | string | null | |
companybắt buộc | object | |
rolesbắt buộc | array<"tenant_admin" | "operator" | "auditor" | "agronomist" | "lab" | "platform_admin"> | The member's roles in this company, the company-managed ones first. |
facilitiesbắt buộc | array<string> | null | An operator's facility codes; null for every facility or for another role. |
lab_idbắt buộc | string | null | The lab of a lab membership, or null. |
membership_statusbắt buộc | "active" | "disabled" | |
account_statusbắt buộc | "active" | "disabled" | |
account_created_atbắt buộc | number | Seconds since 1970 (UTC). |
joined_atbắt buộc | number | null | When the member joined this company, or null when not recorded. |
notice_accepted_atbắt buộc | number | null | When the member accepted the staff privacy notice (at the invitation), or null. |
two_factorbắt buộc | boolean | Whether two-step sign-in is on (never its secret). |
recent_sign_insbắt buộc | array<number> | The times of the account's most recent sign-ins that the database still keeps, newest first (sign-ins are per account, not per company). |
agronomistkhông bắt buộc | Agronomist | null | #351: with |
PersonalDataRequest
object
SELF-2-9 (#198). A member's request about their personal data, as the member sees it (never who handled it).
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
kindbắt buộc | "access" | "correction" |
|
textbắt buộc | string | Plain text, as typed (trimmed): never HTML or markdown; line breaks are kept. |
statusbắt buộc | "open" | "handled" |
|
created_atbắt buộc | number | Seconds since 1970 (UTC). |
handled_atbắt buộc | number | null | When a company admin marked it handled, or null. |
PersonalDataRequestCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
kindbắt buộc | "access" | "correction" | |
textbắt buộc | string | 1 to 2000 characters after trimming; line breaks and tabs allowed, no other control characters. Stored and shown as plain text. |
PersonalDataRequestPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<PersonalDataRequest> | |
next_cursorbắt buộc | string | null | The next page's |
PlatformOverview
object
#274. The platform overview for platform admins: the service's health, its traffic, the ingest and the queues, the work waiting on CropPath, sign-in security and the companies. The per-minute figures and the traffic are this server's, from when it started (process.started_at). Each section has state: ok with its figures, or unavailable (OverviewSectionUnavailable) when it could not be read.
| Tên | Kiểu | Mô tả |
|---|---|---|
generated_atbắt buộc | string (date-time) | When the answer was computed (the server serves it for up to |
max_age_sbắt buộc | integer | Seconds the server serves one answer. |
processbắt buộc | object | |
sectionsbắt buộc | object |
PlatformOverviewCompanies
object | OverviewSectionUnavailable
#274. The companies: at most 50, those that need attention first (open high alerts, open support requests, the daily API quota at its warning level), then by id.
PlatformOverviewCompany
object
#274. One company's figures: its name and code and counts, never a person's data.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | |
namebắt buộc | string | |
sandboxbắt buộc | boolean | A hosted sandbox company. |
offboardingbắt buộc | "leaving" | "left" | null | Whether the company is leaving or has left CropPath; null otherwise. |
members_activebắt buộc | integer | |
admins_activebắt buộc | integer | Active company admins. |
devices_registeredbắt buộc | integer | Devices of every status. |
messages_last_hourbắt buộc | integer | null | Device messages stored in the last hour; null until the server has measured an hour. |
api_calls_todaybắt buộc | integer | API calls this UTC day. |
api_day_percentbắt buộc | integer |
|
open_high_alertsbắt buộc | integer | Open alerts of severity high. |
support_openbắt buộc | integer | Support requests open. |
PlatformOverviewHealth
object | OverviewSectionUnavailable
#274. The service's health, as getAdminHealth reports it, with the last integrity anchor, the last evidence archive and the platform's own open alerts.
PlatformOverviewIngest
object | OverviewSectionUnavailable
#274. The device message ingest of this server since it started, the device messages stored per minute (about: a quarantine review or a correction counts too) and the ingest backlog.
PlatformOverviewIrrigation
object | OverviewSectionUnavailable
#363. The irrigation fleet's health across companies (decision D10: no litres, no zone names).
PlatformOverviewQueues
object | OverviewSectionUnavailable
#274. The queues the platform works through.
PlatformOverviewSecurity
object | OverviewSectionUnavailable
#274. Sign-in security.
PlatformOverviewTraffic
object | OverviewSectionUnavailable
#274. The requests this server answered since it started (since).
PlatformOverviewWaiting
object | OverviewSectionUnavailable
#274. The work waiting on CropPath.
PlatformSupportRequest
object
A support request in the platform's queue.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
tenantbắt buộc | string | The company the request came from. |
userbắt buộc | SupportRequestUser | |
subjectbắt buộc | string | Plain text, as typed (trimmed). |
bodybắt buộc | string | Plain text, as typed (trimmed): never HTML or markdown; line breaks are kept. |
record_idbắt buộc | string | null | The record the request is about (a lot code, device id, public id, ...), or null. |
statusbắt buộc | "open" | "in_progress" | "answered" | "closed" |
|
replybắt buộc | string | null | CropPath's reply (plain text), or null. |
created_atbắt buộc | number | Seconds since 1970 (UTC). |
updated_atbắt buộc | number | When the request was sent or CropPath last changed it. |
updated_bybắt buộc | string | null | The platform admin who last changed it; null until then. |
PlatformSupportRequestPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<PlatformSupportRequest> | |
next_cursorbắt buộc | string | null | The next page's |
PolygonHistory
object
| Tên | Kiểu | Mô tả |
|---|---|---|
pendingbắt buộc | PolygonProposal | null | |
itemsbắt buộc | array<PolygonVersion> | The approved versions, newest first. |
next_cursorbắt buộc | string | null |
PolygonProposal
object
SENS-A1 (#224): a company admin's change of an approved growing area's boundary, waiting for a platform admin. The proposed boundary and who proposed it are present only for the owning tenant_admin and platform_admin.
| Tên | Kiểu | Mô tả |
|---|---|---|
polygon_sha256bắt buộc | string | null | SHA-256 of the proposed boundary; null proposes removing it. |
proposed_atbắt buộc | number | |
polygonkhông bắt buộc | GeoJsonPolygon | null | |
proposed_bykhông bắt buộc | string | null |
PolygonProposalApproval
object
| Tên | Kiểu | Mô tả |
|---|---|---|
polygon_sha256bắt buộc | string | null | The SHA-256 of the proposal reviewed (null for a proposed removal): a proposal replaced meanwhile is refused (409). |
PolygonProposalPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<PolygonProposalQueueItem> | |
next_cursorbắt buộc | string | null |
PolygonProposalQueueItem
object
SENS-A1 (#224): a company's boundary proposal in the platform's queue, with the boundary in force.
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | |
tenantbắt buộc | string | |
tenant_namebắt buộc | string | |
namebắt buộc | string | null | |
polygonbắt buộc | GeoJsonPolygon | null | The proposed boundary; null proposes removing it. |
polygon_sha256bắt buộc | string | null | Name it when approving (POST /v1/polygon-proposals/{code}/approve). |
proposed_atbắt buộc | number | |
proposed_bybắt buộc | string | null | |
current_versionbắt buộc | integer | null | The latest approved version, null when none. |
current_polygon_sha256bắt buộc | string | null | SHA-256 of the boundary in force; null when none. |
current_polygonbắt buộc | GeoJsonPolygon | null | The boundary in force (the latest approved version's); null when none. Shown beside the proposed boundary so a widening is seen before it is approved. |
PolygonProposalRejected
object
SENS-A1 (#224): the boundary proposal CropPath rejected; the boundary in force stays.
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | |
tenantbắt buộc | string | |
polygon_sha256bắt buộc | string | null | |
proposed_atbắt buộc | number | |
proposed_bybắt buộc | string | null | |
reasonbắt buộc | string |
PolygonProposalRejection
object
| Tên | Kiểu | Mô tả |
|---|---|---|
reasonbắt buộc | string | Shown to the company in its activity log. |
PolygonVersion
object
SENS-A1 (#224): one boundary of a growing area that the platform approved. A version never changes and is addressed by (growing_area, version); it is in force from valid_from until the next version's valid_from. The boundary and who proposed and approved it are present only for the owning tenant_admin and platform_admin; other readers get the SHA-256 and times only.
| Tên | Kiểu | Mô tả |
|---|---|---|
growing_areabắt buộc | string | |
versionbắt buộc | integer | 1, 2, ... per growing area. |
polygon_sha256bắt buộc | string | null | SHA-256 (hex) of the boundary's canonical GeoJSON text (compact, sorted keys, UTF-8); null when this version removed the boundary. |
valid_frombắt buộc | number | Unix seconds from which this version is in force. |
originbắt buộc | "migration" | "area_approval" | "proposal" | "platform_edit" | How the version came about: recorded when the boundary was locked (migration 69), approved with the area, a company's proposal the platform approved, or a platform admin's own edit. |
polygonkhông bắt buộc | GeoJsonPolygon | null | Present only for the owning tenant_admin and platform_admin; null: no boundary. |
proposed_atkhông bắt buộc | number | null | Present only for the owning tenant_admin and platform_admin. |
proposed_bykhông bắt buộc | string | null | Present only for the owning tenant_admin and platform_admin. |
approved_bykhông bắt buộc | string | null | Present only for the owning tenant_admin and platform_admin. |
PositionCommune
object
#247: a commune-level unit of the boundary data that contained some of the area's judged positions.
| Tên | Kiểu | Mô tả |
|---|---|---|
namebắt buộc | string | The unit's name in OpenStreetMap. |
osm_relationbắt buộc | integer | The unit's OpenStreetMap relation id. |
positionsbắt buộc | integer | How many of the area's judged positions in the range it contained. |
ProductGtin
object
#161: the GTIN of one of the company's trade items (product, variety, grade; null: any variety, an ungraded item). A lot created without a GTIN takes the GTIN of its ungraded (product, variety).
| Tên | Kiểu | Mô tả |
|---|---|---|
productbắt buộc | string | |
varietybắt buộc | string | null | |
gradebắt buộc | string | null | |
gtinbắt buộc | string | 14 digits with the GS1 check digit. |
allocatedbắt buộc | boolean | Allocated from the platform's GS1 company prefix. |
created_bybắt buộc | string | |
created_atbắt buộc | number | Unix seconds. |
ProductGtinCreate
object
Without gtin, the next GTIN of the platform's GS1 company prefix is allocated.
| Tên | Kiểu | Mô tả |
|---|---|---|
productbắt buộc | string | |
varietykhông bắt buộc | string | null | |
gradekhông bắt buộc | string | null | |
gtinkhông bắt buộc | string | A GTIN of the company's own GS1 membership (14 digits, check digit). |
ProductGtinList
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<ProductGtin> |
ProgramHoldRelease
object
#367: the hold released before its end, and how many of the controller's enabled rules were made due (the engine composes them on its next run).
| Tên | Kiểu | Mô tả |
|---|---|---|
releasedbắt buộc | object | |
rules_duebắt buộc | integer |
ProgramWithdrawal
object
#367: the withdrawal recorded as owed (and whether it was handed to the transport), the control program now withdrawn, and the end of the engine's hold. The controller's reports, never this answer, say the program stopped.
| Tên | Kiểu | Mô tả |
|---|---|---|
withdrawalbắt buộc | object | |
control_programbắt buộc | object | null | The control program withdrawn; null when the controller held no control program in force (a set_program sent by hand, nothing on the controller any more, or a second withdrawal). |
hold_untilbắt buộc | string (date-time) | null (date-time) | The end of the engine's hold on the controller: the next farm-local midnight, or a later hold already set (RFC 3339 UTC). |
ProgramWithdrawalRequest
object
#367: why the person withdraws the controller's program, and the program they saw.
| Tên | Kiểu | Mô tả |
|---|---|---|
reasonbắt buộc | string | Why (required): 1 to 500 characters after trimming, without control characters but tab and newline, and without format characters (Unicode category Cf). |
control_program_idkhông bắt buộc | integer | The control program the person saw (optional); it must be one of the device's programs. Whatever the controller holds now is withdrawn. |
PublicAnalyte
"cadmium" | "auramine_o" | "origin_isotopes"
PublicCode
string
PublicCommuneMap
object
#293: the commune map of the record's growing area: one SVG image of the commune the record already names in words (its OpenStreetMap boundary on map tiles CropPath renders itself), never the orchard. Precision is the commune: no orchard point or boundary, no packing house. Present only when exactly one commune of the OpenStreetMap commune dataset in force matches the area's commune (by the official name of its commune code when it has one, else by its registered name; among several communes of that name, the one that holds the area's approved boundary, else the one that holds more than half of its judged positions) and a tile dataset is imported; otherwise the member is null. The image carries the attribution "© OpenMapTiles © OpenStreetMap contributors", and a page showing it must show the same text near it, linked to https://openmaptiles.org/ and https://www.openstreetmap.org/copyright.
| Tên | Kiểu | Mô tả |
|---|---|---|
urlbắt buộc | PublicSameOriginPath | The image's same-origin path, |
osm_relationbắt buộc | integer | The commune's OpenStreetMap relation id: https://www.openstreetmap.org/relation/{osm_relation} is its page on OpenStreetMap. |
PublicConformityCredential
string
#142: a VC-JOSE compact JWS (W3C Securing Verifiable Credentials using JOSE and COSE, Recommendation 2025-05-15): protected header {alg ES256, kid: the lab key's DID URL did:web:<domain>:labs:<lab code>#<kid>, typ vc+jwt, cty vc}, payload a VC 2.0 credential that is a UNTP Digital Conformity Credential 0.6.1 (@context [https://www.w3.org/ns/credentials/v2, https://test.uncefact.org/vocabulary/untp/dcc/0.6.1/]), signature r || s (64 bytes, so 86 base64url characters). See /developers/downloads/verify.md.
PublicCorrections
object
INTEGRITY-4 (#204): how often the journey steps of a public lot (or, for measurement on a fruit's page, the fruit) were corrected before the lot's seal. Counts and local dates only.
| Tên | Kiểu | Mô tả |
|---|---|---|
sealedbắt buộc | boolean | The lot is sealed (closed, or later): no record of it can be corrected any more. False while it is open, when more corrections may follow. |
public_sincebắt buộc | PublicIsoDate | null | The local date the lot was first public (its first measurement session opened); null when it has none. |
stepsbắt buộc | array<object> | One entry per step with at least one correction, in this order: registration, harvest, measurement, details. |
PublicCredential
string
X3 (#44): a VC-JOSE compact JWS (W3C Securing Verifiable Credentials using JOSE and COSE, Recommendation 2025-05-15): protected header {alg ES256, kid: the issuer key's DID URL, typ vc+jwt, cty vc}, payload a VC 2.0 credential, signature r || s (64 bytes, so 86 base64url characters). The payload is a UNTP 0.7.0 credential (@context [https://www.w3.org/ns/credentials/v2, https://vocabulary.uncefact.org/untp/0.7.0/context/]) for a lot sealed since #162: a Digital Product Passport, or the packing facility's Digital Facility Record; a passport sealed before is a UNTP Digital Product Passport 0.6.1 (@context [https://www.w3.org/ns/credentials/v2, https://test.uncefact.org/vocabulary/untp/dpp/0.6.1/]), served as stored. See /developers/downloads/verify.md.
PublicCurrentStatus
object
#177: the current public status of a record, as its own record states it now: status, status_since, status_reason and trust.tier (as tier).
| Tên | Kiểu | Mô tả |
|---|---|---|
statusbắt buộc | PublicStatus | |
status_sincebắt buộc | PublicIsoDateTime | null | |
status_reasonbắt buộc | RecallReason | null | |
tierbắt buộc | PublicTrustTier |
PublicCustomsDossier
object
X4 (#45): the code file for China customs (the customs dossier) of a public lot that is packed (so sealed, L8 #33) and on a shipment to the CN market. sealed holds the lot, carton and registry facts frozen when the lot was packed (their members depend on format: a lot packed since addresses are coded by official administrative unit codes, with its packing house or growing area coded, has format 2, #273), and seal their SHA-256 seal digest recorded then, so a registry edit after packing never changes the dossier. The rest is projected from the lot's public record (PublicLot), except producer, the lot's company as its company profile names it now (#186). No field outside the Public Data Allowlist appears: no GACC registration value, seal number, coordinates, grower, container or device. The growing-area and packing-house codes are the tenant's registry entries on the platform (registry_entry gives their tier and source), not GACC registration numbers. The body is the RFC 8785 JSON Canonicalization Scheme (JCS) form of the document, in UTF-8: no whitespace, members sorted by the UTF-16 code units of their names, strings escaped as ECMAScript's JSON.stringify does and numbers in ECMAScript's Number-to-String form (0.00001, not 1e-05; 12, not 12.0). It holds no per-read value and is byte-identical for the same stored facts; digest.value is the SHA-256 (hex) of the JCS form of the document without digest.
| Tên | Kiểu | Mô tả |
|---|---|---|
formatbắt buộc | "agritrace-customs-dossier/1" | "agritrace-customs-dossier/2" | The format of the document, that of its sealed record: |
langbắt buộc | "vi" | "zh-Hans" | "en" | |
statusbắt buộc | PublicStatus | |
trust_tierbắt buộc | PublicTrustTier | |
public_idbắt buộc | PublicCode | |
origin_countrybắt buộc | PublicText | |
sealedbắt buộc | object | object | The lot, carton and registry facts frozen when the lot was packed, exactly as stored: a registry edit after packing never changes them. |
sealbắt buộc | object | The seal digest recorded when the lot was packed: the SHA-256 (hex) of the JCS form of |
registry_entrybắt buộc | object | null | The trust tier and source of the growing-area and packing-house codes: those of the lot's registration step (PublicLotJourneyStep |
lab_reportbắt buộc | object | null | |
shipmentbắt buộc | object | |
protocolbắt buộc | PublicText | null | The Durian Protocol's name in |
producerbắt buộc | CompanyProducer | null | #186: the lot's company as its company profile names it now (legal name and address), null until the company saves a profile. Not part of |
digestbắt buộc | object |
PublicDeviceApproval
object
#201: whether the devices whose evidence this step reads are approved by CropPath. approved false: evidence of a device CropPath has not approved is counted as Self-declared. approved_on: the local date of the latest approval, null when one was approved before approvals were recorded.
| Tên | Kiểu | Mô tả |
|---|---|---|
approvedbắt buộc | boolean | |
approved_onbắt buộc | PublicIsoDate | null |
PublicDownloads
object
| Tên | Kiểu | Mô tả |
|---|---|---|
epcis_urlbắt buộc | PublicSameOriginPath | null | |
credential_urlbắt buộc | PublicSameOriginPath | null | X3 (#44): the fruit's UNTP credential ( |
PublicEpcisDocument
object
X3 (#44): an EPCIS 2.0 document (GS1 EPCIS 2.0.0, JSON-LD). Its full schema is GS1's (https://ref.gs1.org/standards/epcis/2.0.0/epcis-json-schema.json); this names only its frame. @context is the GS1 context, then this platform's agri: namespace.
| Tên | Kiểu | Mô tả |
|---|---|---|
@contextbắt buộc | array<any> | |
typebắt buộc | "EPCISDocument" | |
schemaVersionbắt buộc | "2.0" | |
creationDatebắt buộc | string | The seal time, UTC. |
epcisBodybắt buộc | object |
PublicEvidenceSource
"manual" | "registered_app" | "device" | "lab" | "registry" | "logger"
PublicFruit
object
| Tên | Kiểu | Mô tả |
|---|---|---|
statusbắt buộc | PublicStatus | |
status_sincebắt buộc | PublicIsoDateTime | null | |
status_reasonbắt buộc | RecallReason | null | P5 (#41): the reason category of a recalled or withdrawn lot (RecallReason), null otherwise. Never the recall's note, depth or who recalled it. |
public_idbắt buộc | PublicCode | |
codebắt buộc | PublicCode | |
cropbắt buộc | "durian" | |
varietybắt buộc | PublicText | |
harvested_onbắt buộc | PublicIsoDate | |
harvest_placebắt buộc | PublicText | null | |
carton_nobắt buộc | integer | null | |
lotbắt buộc | object | |
trustbắt buộc | object | |
scanbắt buộc | object | null | |
measurementbắt buộc | object | |
originbắt buộc | object | |
journeybắt buộc | array<PublicFruitJourneyStep> | |
downloadsbắt buộc | PublicDownloads | |
reportbắt buộc | object |
PublicFruitJourneyStep
object | object | object | object | object
PublicIsoDate
string (date)
PublicIsoDateTime
string (date-time)
PublicIssuer
object
| Tên | Kiểu | Mô tả |
|---|---|---|
didbắt buộc | string | |
key_idbắt buộc | string |
PublicJwk
object
A P-256 public key as a JWK (RFC 7518 §6.2.1).
| Tên | Kiểu | Mô tả |
|---|---|---|
ktybắt buộc | "EC" | |
crvbắt buộc | "P-256" | |
xbắt buộc | string | |
ybắt buộc | string |
PublicLabLimit
object | object
PublicLabMarketApproval
object
| Tên | Kiểu | Mô tả |
|---|---|---|
marketbắt buộc | PublicMarket | |
approvedbắt buộc | boolean | True when an active approval of the lab for this market, valid on the signed date, lists every tested analyte. False: the lab is not on the approved list for the market (for at least one analyte), so the results cannot count as Lab-verified for that market and the lab step is at most Cross-checked (reason |
referencebắt buộc | PublicText | null | The approval's reference as published (several joined by "; "); null when not approved. |
PublicLabResult
object | object | object
PublicLinkset
object
#162: an IETF link set (RFC 9264) as UNTP's Identity Resolver (UNTP 0.7.0) returns it: one context per thing the code names (the record, then a fruit's lot), each an anchor and its link relations, every relation a list of targets. Relation types: dpp (a UNTP Digital Product Passport), dfr (the packing facility's UNTP Digital Facility Record), dcc (the lab's UNTP Digital Conformity Credential), https://gs1.org/voc/traceability (the lot's EPCIS 2.0 document) and https://gs1.org/voc/pip (a public page, one per language).
| Tên | Kiểu | Mô tả |
|---|---|---|
linksetbắt buộc | array<object> |
PublicLinkTarget
object
#162: a link target (RFC 9264).
| Tên | Kiểu | Mô tả |
|---|---|---|
hrefbắt buộc | string | The target URL. |
titlebắt buộc | string | What the target is. |
typekhông bắt buộc | string | The target's media type. |
hreflangkhông bắt buộc | array<string> | The target's language, for a public page. |
PublicLot
object
| Tên | Kiểu | Mô tả |
|---|---|---|
statusbắt buộc | PublicStatus | |
status_sincebắt buộc | PublicIsoDateTime | null | |
status_reasonbắt buộc | RecallReason | null | P5 (#41): the reason category of a recalled or withdrawn lot (RecallReason), null otherwise. Never the recall's note, depth or who recalled it. |
public_idbắt buộc | PublicCode | |
codebắt buộc | PublicCode | |
cropbắt buộc | string | |
crop_namekhông bắt buộc | string | #156: the registry's name of the lot's crop ( |
ripeness_scalekhông bắt buộc | "levels_1_to_4" | null | #156: the crop's ripeness scale; null for a crop graded on none, whose lot has no ripeness section ( |
varietybắt buộc | PublicText | |
origin_countrybắt buộc | PublicText | |
fruit_countbắt buộc | integer | |
net_mass_kgbắt buộc | number | |
carton_countbắt buộc | integer | null | |
packed_onbắt buộc | PublicIsoDate | null | |
harvested_onbắt buộc | PublicIsoDate | |
facilitybắt buộc | object | |
growing_areabắt buộc | object | null | |
exportbắt buộc | object | null | |
trustbắt buộc | object | |
verificationbắt buộc | object | |
journeybắt buộc | array<PublicLotJourneyStep> | |
ripenessbắt buộc | object | null | |
labbắt buộc | object | null | |
downloadsbắt buộc | PublicLotDownloads | |
issuerbắt buộc | PublicIssuer | null |
PublicLotDownloads
object
| Tên | Kiểu | Mô tả |
|---|---|---|
epcis_urlbắt buộc | PublicSameOriginPath | null | X3 (#44): the lot's EPCIS 2.0 document ( |
credential_urlbắt buộc | PublicSameOriginPath | null | X3 (#44): the lot's UNTP credential ( |
customs_dossier_urlbắt buộc | PublicSameOriginPath | null | X4 (#45): the HTML print view of the lot's code file for China customs (its customs dossier, |
PublicLotFruit
object
U5 (#58): one public fruit of a lot, from an explicit allowlist. Never a tenant, database id, fruit number, session, line, operator, envelope, device id or key.
| Tên | Kiểu | Mô tả |
|---|---|---|
public_idbắt buộc | PublicCode | The fruit's public id (its record: /{locale}/q/{public_id}). |
codebắt buộc | PublicCode | The fruit code printed on its label. |
ripeness_levelbắt buộc | integer | The effective level (L3): the operator's sensory level when overridden, else the device's. |
model_confidencebắt buộc | number | The device model's confidence, 0..1. |
weight_kgbắt buộc | number | The bound scale reading, kg. |
gradebắt buộc | "A" | "B" | "reject" | The grade (L3). |
tierbắt buộc | PublicTrustTier | As the fruit record's |
sensory_overridebắt buộc | boolean | An operator replaced the device's level (always true in group |
recording_urlbắt buộc | PublicSameOriginPath | null | The original tap recording (GET /v1/public/fruits/{publicId}/recordings/{sha256}); null when the knock has no stored recording. |
PublicLotFruitPage
object
U5 (#58): one page of a public lot's fruits in one group, in fruit order.
| Tên | Kiểu | Mô tả |
|---|---|---|
lotbắt buộc | object | |
groupbắt buộc | "measured" | "overridden" | |
totalbắt buộc | integer | Public fruits of the lot in this group. |
itemsbắt buộc | array<PublicLotFruit> | |
next_cursorbắt buộc | string | null | Pass as |
PublicLotJourneyStep
object | object | object | object | object | object
PublicMarket
object
| Tên | Kiểu | Mô tả |
|---|---|---|
country_codebắt buộc | string | |
short_namebắt buộc | PublicText | |
authoritybắt buộc | PublicText |
PublicPeak
array<any>
PublicPeriod
object | object
PublicResolution
object
What a scanned or typed code names (#139): open /{locale}/l/{public_id} for a lot and /{locale}/q/{public_id} for a fruit. locale_hint is the locale segment of a scanned record URL, else null.
| Tên | Kiểu | Mô tả |
|---|---|---|
kindbắt buộc | "lot" | "fruit" | |
public_idbắt buộc | string | |
locale_hintbắt buộc | "vi" | "zh" | "en" | null |
PublicSameOriginPath
string
PublicSatelliteCheck
object
| Tên | Kiểu | Mô tả |
|---|---|---|
sourcebắt buộc | PublicText | |
image_datebắt buộc | PublicIsoDate | |
area_matches_registrationbắt buộc | boolean | |
deforestation_detectedbắt buộc | boolean |
PublicStatus
"normal" | "recalled" | "withdrawn" | "on_hold" | "under_review"
PublicText
string
PublicTrustTier
"self_declared" | "device_recorded" | "cross_checked" | "lab_verified"
QuarantinedEnvelope
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | |
device_idbắt buộc | string | |
seqbắt buộc | integer | |
kindbắt buộc | string | |
event_typebắt buộc | string | null | |
event_timebắt buộc | string | |
lotbắt buộc | string | null | |
growing_areabắt buộc | string | null | |
reasonsbắt buộc | array<string> |
ReauthRequest
object
| Tên | Kiểu | Mô tả |
|---|---|---|
passwordbắt buộc | string | |
codekhông bắt buộc | string | SELF-1-6 (#187): the 6-digit code from the authenticator app; required (or |
backup_codekhông bắt buộc | string | SELF-1-6 (#187): one unused backup code, instead of |
RecallExport
object
The FSMA-204-style sortable record of a lot's affected records (P5, #41): one row per critical tracking event in time order: harvesting (at the growing area: the signed harvest event's mass, else the area's declared kg for the date, else empty), initial_packing (one per carton, at the lot's facility and pack time) and shipping (one per carton on the departed shipment, at the departure facility), and transformation (#91: a lot merge the lot took part in, at the merge's facility and time: one row per input lot with the kg taken from it and one of the lot it produced with its kg). Through the chain of merges the record follows the fruit both ways: backward, the merge that produced the lot, the merges that produced its inputs, and so on, with each input lot's harvest (breadth first, at most 8 levels and 64 merges); forward, the merge that consumed the lot, the merge that consumed the lot it produced, and so on (at most 8 merges), with the cartons and shipment of each lot they produced. A row of another lot than the requested one carries that lot's code and product. Times are local (Asia/Ho_Chi_Minh, +07:00). Columns: traceability_lot_code, critical_tracking_event, event_date, event_time, location, location_description, product_description, quantity, unit_of_measure, carton, fruit_count, shipment, container, destination, border_gate, recall_kind, recall_reason. An empty cell is an empty string. Each row property documents its unit and format. At most 186,855 rows.
| Tên | Kiểu | Mô tả |
|---|---|---|
formatbắt buộc | "agritrace-recall-export/1" | |
lotbắt buộc | string | |
generated_atbắt buộc | string (date-time) | |
recallbắt buộc | object | null | |
columnsbắt buộc | array<"traceability_lot_code" | "critical_tracking_event" | "event_date" | "event_time" | "location" | "location_description" | "product_description" | "quantity" | "unit_of_measure" | "carton" | "fruit_count" | "shipment" | "container" | "destination" | "border_gate" | "recall_kind" | "recall_reason"> | |
rowsbắt buộc | array<object> |
RecallList
object
#322: the company's recalls and withdrawals, newest first, with their counts.
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<object> | |
totalbắt buộc | integer | Every recall and withdrawal of the company ( |
notices_pendingbắt buộc | integer | Their outbound notices not sent yet. |
RecallReason
"contamination" | "pathogen" | "foreign_matter" | "labelling" | "quality" | "regulatory" | "traceability" | "other"
The reason category of a recall or withdrawal (P5, #41), the only part of it the public pages show: contamination (a chemical residue or contaminant over its limit), pathogen (microbial), foreign_matter, labelling (wrong or missing label or origin information), quality (spoilage or a quality defect), regulatory (a market's rule not met), traceability (the evidence cannot be relied on), other.
RecordsExport
object
The records-request export of one lot (W1-3, #152): one sortable sheet for an authority (Circular 17/2021 Art. 6: one step back, one step forward) or a buyer (FSMA 204's electronic sortable spreadsheet within 24 hours). Rows in time order: the critical tracking events (harvesting, receiving, cooling, initial_packing per carton, shipping per carton), the sealed record, every lab result, the recall when any, and every open or escalated hold of the lot. Times are local (+07:00). Bounded: at most 1,000 signed device events (receiving, cooling, packing, shipping) (truncated when more exist), 9,999 cartons and 384 lab results.
| Tên | Kiểu | Mô tả |
|---|---|---|
formatbắt buộc | "agritrace-records-export/1" | |
lotbắt buộc | string | |
statusbắt buộc | "draft" | "open" | "paused" | "closed" | "packed" | "shipped" | "recalled" | "withdrawn" | The lot's status when the export was taken. |
generated_atbắt buộc | string (date-time) | |
truncatedbắt buộc | boolean | True when the lot has more than 1,000 signed device events (receiving, cooling, packing, shipping) and only the first 1,000 are listed. |
sealed_recordbắt buộc | object | null | The registry facts frozen at the pack event (sealed_lot.py) with their seal digest and basis; null while the lot is not packed. |
columnsbắt buộc | array<"record_type" | "traceability_lot_code" | "critical_tracking_event" | "event_date" | "event_time" | "record_source" | "event_id" | "location" | "location_description" | "location_address" | "location_registration" | "product_description" | "quantity" | "unit_of_measure" | "area_declared_kg" | "carton" | "fruit_count" | "supplier_name" | "supplier_organisation" | "supplier_code" | "supplier_address" | "supplier_registration" | "harvest_date" | "shipment" | "container" | "seal_number" | "destination" | "border_gate" | "consignee_name" | "consignee_address" | "consignee_country" | "consignee_gln" | "consignee_gacc_record" | "reference_document_type" | "reference_document_number" | "lab_key_custody" | "lab_market" | "sample" | "analyte" | "result_outcome" | "result_value" | "result_unit" | "limit_kind" | "limit_value" | "limit_source" | "verdict" | "sealed_digest" | "sealed_basis" | "recall_kind" | "recall_reason" | "recall_scope" | "hold_kind" | "hold_status" | "device_events_truncated"> | The column names in order (the CSV header): every RecordsExportRow property. |
rowsbắt buộc | array<RecordsExportRow> |
RecordsExportRange
object
One page of the records-request export of the tenant's lots created in [start, end) (W1-3, #152): the rows of each lot of the page, lot by lot in creation order, as RecordsExport lists them. A page holds at most 50 lots whose cartons together stay within 9,999 (always at least one lot); next_cursor names the next page.
| Tên | Kiểu | Mô tả |
|---|---|---|
formatbắt buộc | "agritrace-records-export-range/1" | |
startbắt buộc | string (date-time) | |
endbắt buộc | string (date-time) | |
generated_atbắt buộc | string (date-time) | |
lotsbắt buộc | array<string> | The lot codes of this page, in creation order. |
next_cursorbắt buộc | string | null | The |
truncatedbắt buộc | boolean | True when a lot of the page had more than 1,000 signed device events (receiving, cooling, packing, shipping). |
columnsbắt buộc | array<"record_type" | "traceability_lot_code" | "critical_tracking_event" | "event_date" | "event_time" | "record_source" | "event_id" | "location" | "location_description" | "location_address" | "location_registration" | "product_description" | "quantity" | "unit_of_measure" | "area_declared_kg" | "carton" | "fruit_count" | "supplier_name" | "supplier_organisation" | "supplier_code" | "supplier_address" | "supplier_registration" | "harvest_date" | "shipment" | "container" | "seal_number" | "destination" | "border_gate" | "consignee_name" | "consignee_address" | "consignee_country" | "consignee_gln" | "consignee_gacc_record" | "reference_document_type" | "reference_document_number" | "lab_key_custody" | "lab_market" | "sample" | "analyte" | "result_outcome" | "result_value" | "result_unit" | "limit_kind" | "limit_value" | "limit_source" | "verdict" | "sealed_digest" | "sealed_basis" | "recall_kind" | "recall_reason" | "recall_scope" | "hold_kind" | "hold_status" | "device_events_truncated"> | The column names in order (the CSV header): every RecordsExportRow property. |
rowsbắt buộc | array<RecordsExportRow> |
RecordsExportRow
object
One row of a records-request export (W1-3, #152): every column on every row, an empty cell an empty string. Each property documents which row kinds fill it, its unit and its format.
| Tên | Kiểu | Mô tả |
|---|---|---|
record_typebắt buộc | "cte" | "transformation_input" | "sealed_record" | "lab_result" | "recall" | "hold" | The row kind: cte (a critical tracking event), transformation_input (#91: a lot a merge consumed, with the kg taken from it; its critical_tracking_event is transformation), sealed_record (the registry facts frozen at the pack event), lab_result (one result of the lot's signed lab report), recall, or hold (an open or escalated hold of the lot, at its opening time). The CSV also starts, when a lot's signed device events were cut, with a truncation_notice row per cut lot; a JSON row never has that kind. |
traceability_lot_codebắt buộc | string | The lot code (the traceability lot code of every row). |
critical_tracking_eventbắt buộc | "harvesting" | "receiving" | "cooling" | "transformation" | "initial_packing" | "shipping" | "" | The critical tracking event of a cte row: harvesting (at the growing area), receiving and cooling (signed device events at their facility), initial_packing (one per carton at the lot's facility, and a device's signed pack event at its facility) or shipping (one per carton on the departed shipment, at the departure facility, and a device's signed ship event at its facility), or transformation (#91: a lot merge, on the cte row of the lot it produced and on each transformation_input row, at the merge's facility and time, all with the merge's event_id); empty for the other row kinds. |
event_datebắt buộc | string (date) | The row's local date (Asia/Ho_Chi_Minh), YYYY-MM-DD: the event, the pack time (sealed_record), the report's signing time (lab_result) or the recall time. |
event_timebắt buộc | string | The local time with its offset, whole seconds, hh:mm:ss+07:00; empty for a harvest known only by its date. |
record_sourcebắt buộc | "signed_device_event" | "self_declared" | "system_record" | "sealed_record" | "signed_lab_report" | "" | How the row's fact was recorded: signed_device_event (a signed device or harvest event), self_declared (the growing area's harvest declaration), system_record (the per-carton packing and shipping records, recall), sealed_record or signed_lab_report; empty for a harvest date without any record. A staff label, not a public trust tier. |
event_idbắt buộc | string | The signed event's envelope id (harvesting from a signed event, receiving, cooling, and a device's signed packing or shipping event); the merge's id on a transformation row (#91); empty otherwise. |
locationbắt buộc | string | Where: the growing area code (harvesting), the facility code (receiving, cooling, packing, shipping, sealed_record) or the lab code (lab_result); empty for the recall row or an unknown place. |
location_descriptionbắt buộc | string | The growing area's commune, district and province, the facility's name or the lab's name; empty when unknown. #273: a growing area coded by official administrative unit codes has its commune and province instead (Viet Nam has had no district level since 2025-07-01). |
location_addressbắt buộc | string | The facility's address, district and province, or the growing area's commune, district and province, comma-separated; empty when unknown. #273: a facility or growing area coded by official administrative unit codes has its commune and province instead (Viet Nam has had no district level since 2025-07-01). |
location_registrationbắt buộc | string | The GACC packing-house (PHC) code of the facility or growing-area (PUC) code of the area, as the tenant's registry records it; empty when none. |
product_descriptionbắt buộc | string | The lot's product and variety, space-separated (e.g. |
quantitybắt buộc | number | "" | The quantity in kilograms (unit_of_measure kg), at most 3 decimals: the lot's signed harvest mass (never an area's declaration, see area_declared_kg), the mass a signed device event carries (receiving, cooling, packing, shipping), a carton's net mass, the sealed lot's net mass, or a merge's kilograms (#91: taken from an input, or of the output); empty without one. |
unit_of_measurebắt buộc | "kg" | "" |
|
area_declared_kgbắt buộc | number | "" | Harvesting row without a signed harvest mass only: the growing area's self-declared harvest in kilograms for the harvest date (the area's harvest declaration). It is the AREA's figure for the day, shared by every lot of that area and day, not this lot's mass: never add it across lots. Empty on every other row. |
cartonbắt buộc | string | The carton code (initial_packing, shipping); empty otherwise. |
fruit_countbắt buộc | integer | "" | The fruits in the carton (initial_packing, shipping) or in the sealed lot (sealed_record); empty otherwise. |
supplier_namebắt buộc | string | One step back (Circular 17/2021 Art. 6 supplier): the grower of the lot's growing area, a grower of the lot's own tenant only, as its member label ( |
supplier_organisationbắt buộc | string | The grower's cooperative; empty when none. |
supplier_codebắt buộc | string | The growing area code (the sealed record's frozen code on its row); empty without an area. |
supplier_addressbắt buộc | string | The growing area's commune, district and province, comma-separated; empty when unknown. #273: a growing area coded by official administrative unit codes has its commune and province instead (Viet Nam has had no district level since 2025-07-01). |
supplier_registrationbắt buộc | string | The growing area's GACC growing-area (PUC) code; empty when none. |
harvest_datebắt buộc | string | The lot's harvest date, YYYY-MM-DD; empty when not recorded. |
shipmentbắt buộc | string | One step forward: the shipment code (shipping); empty otherwise. |
containerbắt buộc | string | The ISO 6346 container number (shipping); empty otherwise. |
seal_numberbắt buộc | string | The lot's seal number on the shipment (shipping); empty otherwise. |
destinationbắt buộc | string | The destination market, ISO 3166-1 alpha-2 (shipping); empty otherwise. |
border_gatebắt buộc | string | The border gate the shipment heads for (shipping); empty otherwise. |
consignee_namebắt buộc | string | The shipment's consignee (immediate subsequent recipient); empty until the shipment records one (#153). |
consignee_addressbắt buộc | string | The consignee's address; empty until recorded (#153). |
consignee_countrybắt buộc | string | The consignee's country, ISO 3166-1 alpha-2; empty until recorded (#153). |
consignee_glnbắt buộc | string | The consignee's GS1 GLN; empty until recorded (#153). |
consignee_gacc_recordbắt buộc | string | The importer's GACC registration number; empty until recorded (#153). |
reference_document_typebắt buộc | "test_report" | "phytosanitary_certificate" | "certificate_of_origin" | "commercial_invoice" | "packing_list" | "" | The reference document's type: test_report on a lab_result row (the shipment's documents once #153 records them); empty otherwise. |
reference_document_numberbắt buộc | string | The reference document's number: the lab's report number on a lab_result row; empty otherwise. |
lab_key_custodybắt buộc | "lab" | "server" | "" | Who holds the key that signed the lab report: lab (uploaded) or server (portal entry); empty on other rows. |
lab_marketbắt buộc | string | The market whose limits judged the report, ISO 3166-1 alpha-2; empty on other rows. |
samplebắt buộc | integer | "" | The sample number k (lab_result); empty otherwise. |
analytebắt buộc | string | The analyte (lab_result), e.g. cadmium, auramine_o; empty otherwise. |
result_outcomebắt buộc | "measured" | "not_detected" | "" | measured or not_detected (lab_result); empty otherwise. |
result_valuebắt buộc | number | "" | The measured value in result_unit (lab_result, measured); empty otherwise. |
result_unitbắt buộc | string | The unit the lab signed (lab_result), e.g. mg/kg; empty otherwise. |
limit_kindbắt buộc | "max" | "banned" | "" | The market limit that judged the result: max or banned; empty when the market sets none or on other rows. |
limit_valuebắt buộc | number | "" | The maximum in result_unit (limit_kind max); empty otherwise. |
limit_sourcebắt buộc | string | The source of the limit as it stood when the report was judged; empty when none. |
verdictbắt buộc | "pass" | "fail" | "" | pass or fail (lab_result); empty otherwise. |
sealed_digestbắt buộc | string | The SHA-256 (lower-case hex) of the sealed record (sealed_record); empty otherwise. |
sealed_basisbắt buộc | "transition" | "migration" | "" | How the sealed record was taken: transition (inside the pack transaction) or migration; empty otherwise. |
recall_kindbắt buộc | "recall" | "withdrawal" | "" | recall or withdrawal (recall row); empty otherwise. |
recall_reasonbắt buộc | RecallReason | "" | The recall's reason category (recall row); empty otherwise. |
recall_scopebắt buộc | "consumer" | "retail" | "wholesale" | "" | The recall depth: consumer, retail or wholesale (recall row); empty otherwise. |
hold_kindbắt buộc | "report" | "quarantine" | "key_compromise" | "lab_failure" | "rejected_component" | "" | The hold's kind (hold row): an open public report, a quarantined component, a device key revoked for compromise, a failing lab result or a rejected component; empty otherwise. ADR 0001: a hold caps what the lot's evidence shows (a compromised key caps it at Self-declared), so read the lot's signed rows with its holds. |
hold_statusbắt buộc | "open" | "escalated" | "" | The hold's status (hold row): open or escalated (still unresolved); empty otherwise. Resolved and withdrawn holds are not listed. |
device_events_truncatedbắt buộc | "true" | "false" | On every row: "true" when this row's lot has more than 1,000 signed device events (receiving, cooling, packing, shipping) and the sheet lists only the first 1,000, else "false". The CSV carries it, and starts with a truncation_notice row per cut lot, so a forwarded file still says it is incomplete; the document's |
RecoveryLinkCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
reasonbắt buộc | string | Why (one line); written to the company's activity log. |
RegistryList
object
An imported published PUC/PHC code list (#150). On the import's answer, superseded names the list it replaced (null for the first of its kind, market and crop).
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
kindbắt buộc | "puc" | "phc" | puc: growing-area codes; phc: packing-house codes. |
marketbắt buộc | string | The destination market whose protocol the codes are registered for (ISO 3166-1 alpha-2). |
cropbắt buộc | string | One of the platform's crops (AGRITRACE_REGISTRY_CROPS; by default coconut, dragon_fruit, durian, jackfruit, mango). |
source_urlbắt buộc | string | The page the list was downloaded from. |
source_sha256bắt buộc | string | SHA-256 of the file the authority published (its spreadsheet or PDF), which the admin converted into the stored CSV. The server computed it when the original was uploaded (PUT /v1/registry-sources/{sha256}); it ties a Cross-checked registration step back to the authority's own file. |
source_media_typebắt buộc | "application/pdf" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "text/csv" | null | The media type of the authority's original file |
published_onbắt buộc | string (date) | null (date) | The date the authority published the list, when known. |
file_namebắt buộc | string | |
file_sha256bắt buộc | string | SHA-256 of the stored file. |
file_sizebắt buộc | integer | |
entry_countbắt buộc | integer | |
imported_atbắt buộc | number | Unix seconds. |
imported_bybắt buộc | string | |
superseded_bybắt buộc | integer | null | |
superseded_atbắt buộc | number | null | When a later import superseded the list, or when it was retired (then |
retired_bybắt buộc | string | null | Who retired the list (POST /v1/registry-lists/{id}/retire); null unless retired. |
retire_reasonbắt buộc | string | null | Why the list was retired; null unless retired. |
currentbắt buộc | boolean | Neither superseded by a later import nor retired. |
stalebắt buộc | boolean | Current and older than the configured age. |
supersededkhông bắt buộc | integer | null | Only on the import's answer: the id of the list this import superseded. |
RegistryListDetail
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
kindbắt buộc | "puc" | "phc" | puc: growing-area codes; phc: packing-house codes. |
marketbắt buộc | string | The destination market whose protocol the codes are registered for (ISO 3166-1 alpha-2). |
cropbắt buộc | string | One of the platform's crops (AGRITRACE_REGISTRY_CROPS; by default coconut, dragon_fruit, durian, jackfruit, mango). |
source_urlbắt buộc | string | The page the list was downloaded from. |
source_sha256bắt buộc | string | SHA-256 of the file the authority published (its spreadsheet or PDF), which the admin converted into the stored CSV. The server computed it when the original was uploaded (PUT /v1/registry-sources/{sha256}); it ties a Cross-checked registration step back to the authority's own file. |
source_media_typebắt buộc | "application/pdf" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "text/csv" | null | The media type of the authority's original file |
published_onbắt buộc | string (date) | null (date) | The date the authority published the list, when known. |
file_namebắt buộc | string | |
file_sha256bắt buộc | string | SHA-256 of the stored file. |
file_sizebắt buộc | integer | |
entry_countbắt buộc | integer | |
imported_atbắt buộc | number | Unix seconds. |
imported_bybắt buộc | string | |
superseded_bybắt buộc | integer | null | |
superseded_atbắt buộc | number | null | When a later import superseded the list, or when it was retired (then |
retired_bybắt buộc | string | null | Who retired the list (POST /v1/registry-lists/{id}/retire); null unless retired. |
retire_reasonbắt buộc | string | null | Why the list was retired; null unless retired. |
currentbắt buộc | boolean | Neither superseded by a later import nor retired. |
stalebắt buộc | boolean | Current and older than the configured age. |
status_countsbắt buộc | object | |
max_age_daysbắt buộc | integer |
RegistryListEntry
object
One row of an imported list: code normalised (NFKC, no whitespace, dashes as '-', upper case), code_raw as written in the file.
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | |
code_rawbắt buộc | string | |
statusbắt buộc | "active" | "suspended" | "revoked" | |
holderbắt buộc | string | null | |
provincebắt buộc | string | null | |
districtbắt buộc | string | null | |
communebắt buộc | string | null | |
area_habắt buộc | number | null | |
valid_frombắt buộc | string (date) | null (date) | |
valid_tobắt buộc | string (date) | null (date) |
RegistryListEntryPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<RegistryListEntry> | |
next_cursorbắt buộc | string | null |
RegistryListImport
object
| Tên | Kiểu | Mô tả |
|---|---|---|
kindbắt buộc | "puc" | "phc" | |
marketbắt buộc | "CN" | A destination market the platform ships to (ISO 3166-1 alpha-2). |
cropbắt buộc | string | The list's crop: one of the platform's crops (AGRITRACE_REGISTRY_CROPS; by default coconut, dragon_fruit, durian, jackfruit, mango; the Vietnamese names of those are accepted), as GET /v1/registry-lists lists them in |
source_urlbắt buộc | string | |
source_sha256bắt buộc | string | SHA-256 of the file the authority published (its spreadsheet or PDF), downloaded from source_url, before the admin converted it to this CSV. It must name an original already uploaded with PUT /v1/registry-sources/{sha256}, whose hash the server computed; any other value is refused. Required: a Cross-checked step must trace back to the authority's own file. |
published_onkhông bắt buộc | string (date) | null (date) | |
file_namebắt buộc | string | |
file_base64bắt buộc | string | The CSV file, base64-encoded. |
RegistryListPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<RegistryList> | |
max_age_daysbắt buộc | integer | |
cropsbắt buộc | array<string> | The crops an import may name, sorted (AGRITRACE_REGISTRY_CROPS; by default the D7 crops). |
next_cursorbắt buộc | string | null | The next page's |
RegistryListRetire
object
| Tên | Kiểu | Mô tả |
|---|---|---|
reasonbắt buộc | string | Why the list is retired: 1 to 200 characters on one line. |
RegistryMatch
object
A registered code and its check against the current lists.
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | The growing area's or facility's own code. |
tenantbắt buộc | string | null | |
namebắt buộc | string | null | |
cropbắt buộc | string | null | The growing area's crop; null for a facility. |
registered_codebắt buộc | string | The PUC or PHC as entered. |
normalized_codebắt buộc | string | null | |
resultbắt buộc | "matched" | "no_code" | "no_list" | "not_found" | "mismatch" | "suspended" | "revoked" | "expired" | |
stalebắt buộc | boolean | |
list_idbắt buộc | integer | null | The list that decided (null for mismatch, no_list, no_code). |
list_cropbắt buộc | string | null |
RegistryMatchPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<RegistryMatch> | |
max_age_daysbắt buộc | integer | |
next_cursorbắt buộc | string | null |
RegistrySourceStored
object
The authority's original file of a code list as the server stored it: sha256 is computed from the bytes.
| Tên | Kiểu | Mô tả |
|---|---|---|
sha256bắt buộc | string | |
media_typebắt buộc | "application/pdf" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "text/csv" | |
sizebắt buộc | integer |
Rejection
object
B9 (#21): a device message the server refused (not stored as a record). The payload itself is never returned: raw, untrusted device bytes.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
routebắt buộc | string | null | The ingest route the message came on, |
envelope_idbắt buộc | string | null | The envelope id, when one could be read. |
reasonbắt buộc | string | Why it was refused, for example |
received_atbắt buộc | number | Unix seconds. |
payload_bytesbắt buộc | integer | Size of the stored payload (at most 65,536 bytes are kept). |
RejectionPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<Rejection> | |
next_cursorbắt buộc | string | null | The next page's |
Report
object
A public mismatch report as staff triage sees it, with the contact (null when none was given or once erased, 90 days after the resolution). Times are Unix seconds.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
fruitbắt buộc | object | |
lotbắt buộc | object | |
categorybắt buộc | ReportCategory | |
notebắt buộc | string | |
contactbắt buộc | string | null | |
statusbắt buộc | "open" | "resolved" | |
outcomebắt buộc | "confirmed" | "unfounded" | "duplicate" | null | |
created_atbắt buộc | number | |
resolved_atbắt buộc | number | null |
ReportCategory
"label_peeled" | "scanned_many" | "ripeness_off" | "other"
What does not match: label_peeled (the label was peeled or replaced), scanned_many (the code was scanned many times: a copied label is suspected), ripeness_off (the ripeness does not match the record), other.
ReportChallenge
object
A proof-of-work challenge for a public mismatch report (#46, report_challenge.py). Find a solution (1 to 32 ASCII letters and digits; a decimal counter will do) such that SHA-256 of <challenge>:<solution> (UTF-8) starts with difficulty zero bits, and send both with the report within expires_in seconds. Signed by the backend (<id>.<bits>.<expires>.<HMAC-SHA256>), single-use (a challenge files one report) and refused once the deployment's difficulty (AGRITRACE_REPORT_POW_BITS) changes.
| Tên | Kiểu | Mô tả |
|---|---|---|
challengebắt buộc | string | |
difficultybắt buộc | integer | |
expires_inbắt buộc | integer |
ReportDetail
object
A public mismatch report as staff triage sees it (Report) with the reported fruit's scan history (A8, #74). Scans are logged only by the web server's own render of the public fruit page (scans.py) and keep only a coarse place (country, region, city from the CDN's geolocation, any of them null when not forwarded) and a device class; there are no coordinates, and never an address or its hash. Times are Unix seconds.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
fruitbắt buộc | object | |
lotbắt buộc | object | |
categorybắt buộc | ReportCategory | |
notebắt buộc | string | |
contactbắt buộc | string | null | |
statusbắt buộc | "open" | "resolved" | |
outcomebắt buộc | "confirmed" | "unfounded" | "duplicate" | null | |
created_atbắt buộc | number | |
resolved_atbắt buộc | number | null | |
scansbắt buộc | object |
ReportPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<Report> | |
next_cursorbắt buộc | string | null | The next page's |
ReportReceipt
object
A report was received. Nothing of the report is echoed. #177: fruit and lot are the current public status of the reported fruit and of its lot (the report's hold), read from the origin when the report was filed, so the page can show them at once although an edge-cached record may still show the old status; null when the record is not public.
| Tên | Kiểu | Mô tả |
|---|---|---|
statusbắt buộc | "received" | |
fruitbắt buộc | PublicCurrentStatus | null | |
lotbắt buộc | PublicCurrentStatus | null |
ReportResolution
object
confirmed (the mismatch was real and has been dealt with), unfounded (the fruit matches its record) or duplicate (another report covers it). Every outcome resolves the report.
| Tên | Kiểu | Mô tả |
|---|---|---|
outcomebắt buộc | "confirmed" | "unfounded" | "duplicate" |
ReportSubmission
object
A public mismatch report on a public fruit. No other field is accepted (no photo: no public upload route exists). note keeps line breaks and no other control character; contact is one line. Both are trimmed; an empty contact is none. The contact is stored for staff triage only, never returned on a public route, and erased 90 days after the report is resolved.
| Tên | Kiểu | Mô tả |
|---|---|---|
publicIdbắt buộc | string | The public id of the fruit (its page's). |
categorybắt buộc | ReportCategory | |
notekhông bắt buộc | string | |
contactkhông bắt buộc | string | null | |
challengebắt buộc | string | A ReportChallenge's |
solutionbắt buộc | string |
ResidueCertificate
object
#157: a lot's lab results judged against its destination market (see getLotResidueCertificate).
| Tên | Kiểu | Mô tả |
|---|---|---|
lotbắt buộc | string | |
productbắt buộc | string | |
reportbắt buộc | object | null | The lab report; null while the lab has not reported. |
marketbắt buộc | string | null | The destination market the results are judged against. |
market_frombắt buộc | "shipment" | "lot" | "report" | null | Where the market comes from: the lot's shipment, the lot's own destination, or the lab report. |
limits_onbắt buộc | string (date) | null (date) | The report's signed date (Asia/Ho_Chi_Minh), the day the limits are read for. |
verdictbắt buộc | "pass" | "fail" | "incomplete" | null | |
analytesbắt buộc | array<ResidueCertificateAnalyte> | |
required_analytesbắt buộc | array<string> | |
missing_analytesbắt buộc | array<string> |
ResidueCertificateAnalyte
object
| Tên | Kiểu | Mô tả |
|---|---|---|
analytebắt buộc | string | |
samplesbắt buộc | integer | The number of results (one per drawn sample). |
outcomebắt buộc | "measured" | "not_detected" | measured when a sample measured it, else not_detected. |
valuebắt buộc | number | null | The highest measured value; null when not detected. |
lodbắt buộc | number | null | The highest detection limit of the results; null when measured. |
unitbắt buộc | "mg/kg" | |
limitbắt buộc | object | null | The limit the analyte was judged with; null when the market sets none. |
verdictbắt buộc | "pass" | "fail" | "no_limit" |
ReviewRequest
object
| Tên | Kiểu | Mô tả |
|---|---|---|
decisionbắt buộc | "approve" | "reject" | |
notekhông bắt buộc | string | Optional; recorded with the review. |
ReviewResult
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | |
statusbắt buộc | "accepted" | "rejected_after_review" |
SampleAnalyte
"cadmium" | "auramine_o"
SampleItem
object
| Tên | Kiểu | Mô tả |
|---|---|---|
kbắt buộc | integer | Sample number within the lot's sampling. |
fruitbắt buộc | string | Fruit code as printed on the label. |
statusbắt buộc | "selected" | "received" | "passed" | "failed" |
SandboxAccount
object
A new sandbox company and its API token (#218). The token is shown this once: only its SHA-256 is stored.
| Tên | Kiểu | Mô tả |
|---|---|---|
tenant_idbắt buộc | string | The new company's id, the tenant every record of the token belongs to. |
api_tokenbắt buộc | string | An API token of the company, role tenant_admin, sent as |
expires_atbắt buộc | number | When the token stops working: 24 hours after the creation, Unix seconds. |
base_urlbắt buộc | string (uri) | The sandbox API's address: the requests go to |
SandboxAccountCreate
object
The body of a sandbox account request (#218): empty, or an empty object. The sandbox chooses everything.
SatelliteCheck
object
A satellite check of a growing area.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
growing_areabắt buộc | string | |
image_datebắt buộc | string (date) | |
providerbắt buộc | string | |
resultbắt buộc | "match" | "mismatch" | "inconclusive" | Whether the image matches the registered area. |
cultivated_habắt buộc | number | null | |
deforestationbắt buộc | boolean | |
confidencebắt buộc | number | null | |
image_sha256bắt buộc | string | null | SHA-256 of the image attachment; the blob itself is stored elsewhere. |
sourcebắt buộc | "manual" | "automatic" | manual for every check recorded through this API. |
created_atbắt buộc | number | Unix seconds. |
SatelliteCheckCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
image_datebắt buộc | string (date) | |
providerbắt buộc | string | |
resultbắt buộc | "match" | "mismatch" | "inconclusive" | |
cultivated_hakhông bắt buộc | number | null | |
deforestationbắt buộc | boolean | |
confidencekhông bắt buộc | number | null | |
image_sha256không bắt buộc | string | null |
SatelliteCheckPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<SatelliteCheck> | |
next_cursorbắt buộc | string | null | Pass as |
SealRequest
object
| Tên | Kiểu | Mô tả |
|---|---|---|
seal_nobắt buộc | string |
SecondFactorChallenge
object
SELF-1-6 (#187). The password was right and the account has two-step sign-in: no session yet. Send ticket with a code to POST /v1/auth/login/second-factor before expires_at.
| Tên | Kiểu | Mô tả |
|---|---|---|
second_factorbắt buộc | "required" | |
ticketbắt buộc | string | 32 random bytes (base64url), valid 5 minutes, for one sign-in and at most 5 codes. Only its SHA-256 is stored. |
expires_atbắt buộc | number | Unix seconds. |
SecondFactorLogin
object
| Tên | Kiểu | Mô tả |
|---|---|---|
ticketbắt buộc | string | |
codekhông bắt buộc | string | The 6-digit code from the authenticator app (spaces allowed). |
backup_codekhông bắt buộc | string | One unused backup code instead (any case, spaces and hyphens allowed). |
SecondFactorSession
object
SELF-1-6 (#187). A session opened by the code step: the AuthSession fields plus what proved the second factor.
| Tên | Kiểu | Mô tả |
|---|---|---|
userbắt buộc | User | |
membershipsbắt buộc | array<Membership> | |
csrf_tokenbắt buộc | string | |
two_factorkhông bắt buộc | TwoFactorState | |
second_factorbắt buộc | "code" | "backup_code" | What proved the second factor. |
backup_codes_leftbắt buộc | integer | Unused backup codes left (tell the user when it runs low). |
SensorSeries
object
SENS-B1e (#235): the hourly, daily (UTC) or farm-day (local_daily, #365) summaries of one capability in a growing area, from the caller's company's devices only, one series per depth (no depth first, then ascending).
| Tên | Kiểu | Mô tả |
|---|---|---|
growing_areabắt buộc | string | |
capabilitybắt buộc | string | |
unitbắt buộc | string | null | The vocabulary's UCUM unit of the capability. |
grainbắt buộc | "hourly" | "daily" | "local_daily" | |
bucket_sbắt buộc | number | Bucket width in seconds: 3600 or 86400. |
frombắt buộc | number | Start of the range, Unix seconds. |
tobắt buộc | number | End of the range (excluded), Unix seconds. |
truncatedbắt buộc | boolean | True when the answer reached the bucket cap (5000 buckets in all): the later depths or buckets were left out. |
seriesbắt buộc | array<SensorSeriesDepth> | |
time_zonekhông bắt buộc | "Asia/Ho_Chi_Minh" |
|
day_starts_atkhông bắt buộc | number |
|
SensorSeriesBucket
object
SENS-B1e (#235): one hourly or daily bucket of a sensor series, as the summary of the reading record stores it. The statistics take only the readings flagged pass or not evaluated that have a value; every reading counts in n_total and in its flag's count (QARTOD flags: 1 pass, 2 not evaluated, 3 suspect, 4 fail, 9 missing).
| Tên | Kiểu | Mô tả |
|---|---|---|
bucket_startbắt buộc | number | Start of the UTC hour or day, or ( |
minbắt buộc | number | null | Null when |
maxbắt buộc | number | null | Null when |
meanbắt buộc | number | null | The sum of the values over |
countbắt buộc | integer | Values in the statistics. |
n_totalbắt buộc | integer | Every reading of the bucket. |
n_passbắt buộc | integer | Readings flagged 1 (pass). |
n_not_evaluatedbắt buộc | integer | Readings flagged 2 (not evaluated). |
n_suspectbắt buộc | integer | Readings flagged 3 (suspect). |
n_failbắt buộc | integer | Readings flagged 4 (fail). |
n_missingbắt buộc | integer | Readings flagged 9 (missing value). |
SensorSeriesDepth
object
SENS-B1e (#235): the buckets of one depth, oldest first.
| Tên | Kiểu | Mô tả |
|---|---|---|
depth_cmbắt buộc | number | null | The readings' depth in cm; null for readings without a depth. |
bucketsbắt buộc | array<SensorSeriesBucket> |
SeqGap
object
B9 (#21): an open range of sequence numbers a device has not sent yet (inclusive). It closes, and leaves the list, when the missing messages arrive.
| Tên | Kiểu | Mô tả |
|---|---|---|
device_idbắt buộc | string | |
start_seqbắt buộc | integer | First missing sequence number. |
end_seqbắt buộc | integer | Last missing sequence number. |
missingbắt buộc | integer | How many numbers are missing: end_seq - start_seq + 1. |
opened_atbắt buộc | number | Unix seconds: when the server first saw the gap. |
alertedbắt buộc | boolean | Whether the gap has been open long enough to raise a |
SeqGapPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<SeqGap> | |
next_cursorbắt buộc | string | null | The next page's |
ServerEpoch
object
A signed server epoch value (SENS-B2c, #239). sig is over the canonical JSON of epoch, issuedAt and kid; publicKeyJwk is outside the signed part.
| Tên | Kiểu | Mô tả |
|---|---|---|
epochbắt buộc | string | The value a device cites in |
issuedAtbắt buộc | string (date-time) | When the server issued it (UTC, milliseconds). |
kidbắt buộc | string | The epoch key's id: |
sigbắt buộc | object | |
publicKeyJwkbắt buộc | PublicJwk |
SessionCommand
object
The set_session outcome for one chosen device: pending (recorded, no transport configured), sent, failed (the transport refused it; the device's command list shows the failed row), refused (refused before any command was recorded: device_not_found when the device is missing, of another tenant or outside the caller's facilities, device_not_approved (#242) when the platform has not approved the device or no active approved key reaches it, its own or an approved gateway's at its site, invalid_command when its profile or the params do not allow it) or skipped (its profile does not declare set_session).
| Tên | Kiểu | Mô tả |
|---|---|---|
device_idbắt buộc | string | |
command_idbắt buộc | string | null | |
statusbắt buộc | "pending" | "sent" | "failed" | "refused" | "skipped" | |
reasonbắt buộc | "not_declared" | "dispatch_failed" | "device_not_found" | "device_not_approved" | "invalid_command" | null |
SessionFeed
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<SessionFeedItem> | |
next_afterbắt buộc | integer | The rx_seq of the last item, or the given |
session_statusbắt buộc | "open" | "paused" | "closed" | |
devicesbắt buộc | array<Device> | The devices stored on the session, by id. |
scalebắt buộc | null | object | Scale live weight: the newest |
pendingbắt buộc | object | Fruits of the session still awaiting a device, and those under review. |
SessionFeedItem
object
One fruit upsert: the fruit as it is now and the rx_seq of its latest change.
| Tên | Kiểu | Mô tả |
|---|---|---|
rx_seqbắt buộc | integer | |
fruitbắt buộc | Fruit |
SessionsRevoked
object
| Tên | Kiểu | Mô tả |
|---|---|---|
sessions_revokedbắt buộc | integer | How many live sessions were ended. |
Shipment
object
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | |
facilitybắt buộc | string | |
containerbắt buộc | string | |
border_gatebắt buộc | string | |
destinationbắt buộc | string | |
setpoint_cbắt buộc | number | |
tolerance_cbắt buộc | number | |
logger_interval_minutesbắt buộc | integer | |
loggerbắt buộc | object | |
statusbắt buộc | "open" | "departed" | |
created_bybắt buộc | string | |
created_atbắt buộc | number | |
departed_bybắt buộc | string | null | |
departed_atbắt buộc | number | null | |
lotsbắt buộc | array<ShipmentLot> | |
logger_checkbắt buộc | LoggerCheck | |
national_portalbắt buộc | NationalPortalFiling | |
uploadkhông bắt buộc | object | Only in the answer of an upload: the stored upload, its readings and how many were new. |
consigneebắt buộc | Consignee | null | |
documentsbắt buộc | array<ShipmentDocument> | |
paperworkbắt buộc | ShipmentPaperwork | |
amendmentsbắt buộc | array<ShipmentAmendment> |
ShipmentAmendment
object
A change made after the departure: the consignee or the document list before and after it.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
kindbắt buộc | "consignee" | "documents" | |
reasonbắt buộc | string | |
beforebắt buộc | object | The consignee (or null) or the document list before the change. |
afterbắt buộc | object | The consignee or the document list after the change. |
amended_bybắt buộc | string | |
amended_atbắt buộc | number |
ShipmentConsigneeSet
object
| Tên | Kiểu | Mô tả |
|---|---|---|
consigneebắt buộc | ConsigneeInput | |
reasonkhông bắt buộc | string | Required once the shipment departed (the change is kept as an amendment); accepted and not kept before. |
ShipmentCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | Unique within the tenant (a lot code's pattern). |
facilitybắt buộc | string | The departure facility: one of the tenant's, within the caller's facilities. |
containerbắt buộc | string | ISO 6346 container number; its check digit must be valid. |
border_gatebắt buộc | string | The border gate the shipment heads for (a display string). |
destinationbắt buộc | "CN" | Destination market, ISO 3166-1 alpha-2. |
setpoint_cbắt buộc | number | Reefer setpoint, Cel. |
tolerance_ckhông bắt buộc | number | Deviation from the setpoint a logger reading may show, Cel. |
logger_interval_minuteskhông bắt buộc | integer | The longest interval the logger may leave between readings. |
loggerbắt buộc | object | The independent temperature logger: an active device of the tenant's registry at the departure facility whose profile declares air.temperature (vn.agritrace.reefer-logger). The device and its keys are registered by a device admin; the shipment stores no key. |
ShipmentDepart
object
An empty object.
ShipmentDocument
object
| Tên | Kiểu | Mô tả |
|---|---|---|
typebắt buộc | "phytosanitary_certificate" | "certificate_of_origin" | "commercial_invoice" | "packing_list" | "customs_declaration" | "bill_of_lading" | "air_waybill" | "test_report" | "other" | |
numberbắt buộc | string | |
issued_onbắt buộc | string (date) | |
attachment_sha256bắt buộc | string | null | |
added_bybắt buộc | string | |
added_atbắt buộc | number |
ShipmentDocumentInput
object
| Tên | Kiểu | Mô tả |
|---|---|---|
typebắt buộc | "phytosanitary_certificate" | "certificate_of_origin" | "commercial_invoice" | "packing_list" | "customs_declaration" | "bill_of_lading" | "air_waybill" | "test_report" | "other" | |
numberbắt buộc | string | |
issued_onbắt buộc | string (date) | YYYY-MM-DD, from 2000-01-01 to tomorrow (Asia/Ho_Chi_Minh). |
attachment_sha256không bắt buộc | string | null | A PDF the tenant uploaded (PUT /v1/attachments/{sha256}); staff-only. |
ShipmentDocumentsSet
object
| Tên | Kiểu | Mô tả |
|---|---|---|
documentsbắt buộc | array<ShipmentDocumentInput> | The whole list, each (type, number) once; it replaces the stored one. |
reasonkhông bắt buộc | string | Required once the shipment departed (the change is kept as an amendment); accepted and not kept before. |
ShipmentLot
object
| Tên | Kiểu | Mô tả |
|---|---|---|
lotbắt buộc | string | |
statusbắt buộc | string | |
cartonsbắt buộc | integer | |
seal_nobắt buộc | string | The lot's seal number when it was linked. |
sealed_atbắt buộc | number | |
current_seal_nobắt buộc | string | null | The lot's seal number now. |
seal_matchesbắt buộc | boolean | |
added_bybắt buộc | string | |
added_atbắt buộc | number |
ShipmentLotLink
object
| Tên | Kiểu | Mô tả |
|---|---|---|
lotbắt buộc | string | A packed lot of the shipment's facility. |
ShipmentPaperwork
object
The destination market's paperwork rule (CN: the consignee, the phytosanitary certificate and the test report) and what is still missing. The departure is refused (409 missing_paperwork) while anything is missing.
| Tên | Kiểu | Mô tả |
|---|---|---|
requiredbắt buộc | array<string> | |
missingbắt buộc | array<string> | |
completebắt buộc | boolean |
ShipmentSscc
object
#161: the SSCC of a shipment's container load; null until set.
| Tên | Kiểu | Mô tả |
|---|---|---|
shipmentbắt buộc | string | |
ssccbắt buộc | string | null | GS1 Serial Shipping Container Code: 18 digits, the last the GS1 mod-10 check digit. |
epcbắt buộc | string | null | |
element_stringbắt buộc | string | null |
SignedInSession
object
SELF-2-1 (#190). One live session of the signed-in user: what the browser told CropPath about itself, read into well-known names, and when it was opened and last used, to the minute. Never the session's token, its hash, its CSRF token, the client's IP address or the raw user agent.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | The session's id: pass it to revokeMySession. |
browserbắt buộc | string | null | The browser, such as Chrome, Safari, Firefox, Edge, Cốc Cốc, Zalo or Samsung Internet; null when it could not be told. |
osbắt buộc | string | null | The operating system: Windows, macOS, iOS, Android, ChromeOS or Linux; null when it could not be told. |
mobilebắt buộc | boolean | Whether the browser said it runs on a phone. |
created_atbắt buộc | integer | When the session was opened (sign-in), Unix seconds rounded down to the minute. |
last_seen_atbắt buộc | integer | When the session was last used, Unix seconds rounded down to the minute (recorded at most once a minute). |
currentbắt buộc | boolean | Whether this is the session making the request. |
SignedInSessionList
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<SignedInSession> | The live sessions, the current one first, then the most recently used. |
SignedInSessionRevoked
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
revokedbắt buộc | true |
SprayRecord
object
A spray record with its withholding status.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
growing_areabắt buộc | string | |
sprayed_onbắt buộc | string (date) | |
productbắt buộc | string | |
active_ingredientbắt buộc | string | null | |
withholding_daysbắt buộc | integer | |
evidence_sha256bắt buộc | string | null | |
created_atbắt buộc | number | Unix seconds. |
safe_frombắt buộc | string (date) | sprayed_on plus withholding_days: the first day a harvest is allowed. |
evaluated_onbắt buộc | string (date) | The harvest date the status was judged against (today's UTC date when none was given). |
withholding_statusbắt buộc | "ok" | "violated" | violated when sprayed_on <= evaluated_on < safe_from. |
SprayRecordCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
sprayed_onbắt buộc | string (date) | |
productbắt buộc | string | |
active_ingredientkhông bắt buộc | string | null | |
withholding_daysbắt buộc | integer | |
evidence_sha256không bắt buộc | string | null |
SprayRecordPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<SprayRecord> | |
next_cursorbắt buộc | string | null | Pass as |
SsccChange
object | object
Set the SSCC (a number of the company's own GS1 membership, not under the platform's prefix), or allocate the next SSCC of the platform's GS1 company prefix.
StationActionRecord
object
#85: an operator's action recorded offline at an edge station, signed with the station's key.
| Tên | Kiểu | Mô tả |
|---|---|---|
vbắt buộc | 1 | |
idbắt buộc | string (uuid) | |
typebắt buộc | "accept" | "remeasure" | "print" | |
gatewaybắt buộc | string | |
seqbắt buộc | integer | The station's action counter: replay order. |
delegationbắt buộc | string | |
operatorbắt buộc | string | |
fruitbắt buộc | string | |
roundkhông bắt buộc | integer | A re-measure only: the round the station numbered. |
recorded_atbắt buộc | string (date-time) | The station's time, ISO 8601 with a zone offset. |
time_sourcekhông bắt buộc | "gnss" | "ntp" | "unsynced" | The station's clock state. |
since_claim_skhông bắt buộc | integer | Whole seconds (0 to 2^31 - 1) since the station claimed the delegation, by its monotonic clock, rounded up; above the delegation's length plus 300 s the action is refused (403 |
afterkhông bắt buộc | array<string (uuid)> | The fruit's envelopes the station recorded before the action. |
sigbắt buộc | StationSignature |
StationActionResult
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | |
typebắt buộc | "accept" | "remeasure" | "print" | |
outcomebắt buộc | "applied" | |
seqbắt buộc | integer | |
fruitbắt buộc | object |
StationClaim
object
| Tên | Kiểu | Mô tả |
|---|---|---|
delegationbắt buộc | object | |
labelsbắt buộc | array<StationLabel> | |
last_seqbắt buộc | integer | null | The highest |
timebắt buộc | number | The cloud's time (Unix seconds): the station counts the delegation's end from it on its monotonic clock. |
StationClaimRequest
object
| Tên | Kiểu | Mô tả |
|---|---|---|
gatewaybắt buộc | string | |
timebắt buộc | string (date-time) | The station's time, ISO 8601 with a zone offset. |
codebắt buộc | string | |
sigbắt buộc | StationSignature |
StationDelegation
object
#85: a station sign-in (Unix times).
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | |
gatewaybắt buộc | string | |
operatorbắt buộc | string | The operator's opaque id ( |
statebắt buộc | "pending" | "unclaimed" | "active" | "expired" | "revoked" | pending: the code not typed yet; unclaimed: the code expired unused; active: claimed by the station; expired: past |
issued_atbắt buộc | number | |
code_expires_atbắt buộc | number | |
expires_atbắt buộc | number | |
claimed_atbắt buộc | number | null | |
revoked_atbắt buộc | number | null |
StationDelegationList
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<StationDelegation> |
StationLabel
object
What the station's printer queue prints a fruit's 40 x 30 mm label from (#66, #92).
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | |
lotbắt buộc | string | |
nbắt buộc | integer | |
roundbắt buộc | integer | The fruit's measurement round. |
statusbắt buộc | string | |
qr_urlbắt buộc | string (uri) | |
label_codekhông bắt buộc | string | #326, with |
StationSignature
object
ES256 over the canonical JSON of every member but sig (an envelope's signature).
| Tên | Kiểu | Mô tả |
|---|---|---|
algbắt buộc | "ES256" | |
kidbắt buộc | string | |
valuebắt buộc | string |
StationSignIn
object
#85: a new station sign-in with its one-time code (shown only in this answer).
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | |
gatewaybắt buộc | string | |
operatorbắt buộc | string | The operator's opaque id ( |
statebắt buộc | "pending" | "unclaimed" | "active" | "expired" | "revoked" | pending: the code not typed yet; unclaimed: the code expired unused; active: claimed by the station; expired: past |
issued_atbắt buộc | number | |
code_expires_atbắt buộc | number | |
expires_atbắt buộc | number | |
claimed_atbắt buộc | number | null | |
revoked_atbắt buộc | number | null | |
codebắt buộc | string | Typed on the station's screen within 10 minutes. |
StationSignInRequest
object
#85: a station sign-in; lifetime_s its length (default the most, one shift).
| Tên | Kiểu | Mô tả |
|---|---|---|
lifetime_skhông bắt buộc | integer |
StationSync
object
| Tên | Kiểu | Mô tả |
|---|---|---|
delegationsbắt buộc | map<string, "active" | "revoked" | "expired" | "unknown"> | |
labelsbắt buộc | array<StationLabel> | |
last_seqbắt buộc | integer | null | The highest |
timebắt buộc | number |
StationSyncRequest
object
| Tên | Kiểu | Mô tả |
|---|---|---|
gatewaybắt buộc | string | |
timebắt buộc | string (date-time) | The station's time, ISO 8601 with a zone offset. |
delegationskhông bắt buộc | array<string> | |
sigbắt buộc | StationSignature |
StoredEnvelope
object
A stored envelope (envelope version 1, see Envelope: its schema is served at /developers/downloads/envelope-v1.schema.json, its event types at /developers/downloads/event-types-v1.json; open here) plus the server-added _status.
| Tên | Kiểu | Mô tả |
|---|---|---|
_statusbắt buộc | string |
SupportRequest
object
A support request as its company sees it (never who at CropPath changed it).
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
tenantbắt buộc | string | The company the request came from. |
userbắt buộc | SupportRequestUser | |
subjectbắt buộc | string | Plain text, as typed (trimmed). |
bodybắt buộc | string | Plain text, as typed (trimmed): never HTML or markdown; line breaks are kept. |
record_idbắt buộc | string | null | The record the request is about (a lot code, device id, public id, ...), or null. |
statusbắt buộc | "open" | "in_progress" | "answered" | "closed" |
|
replybắt buộc | string | null | CropPath's reply (plain text), or null. |
created_atbắt buộc | number | Seconds since 1970 (UTC). |
updated_atbắt buộc | number | When the request was sent or CropPath last changed it. |
SupportRequestCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
subjectbắt buộc | string | 1 to 200 characters after trimming; no line breaks or other control characters. |
bodybắt buộc | string | 1 to 5000 characters after trimming; line breaks and tabs allowed, no other control characters. Stored and shown as plain text. |
record_idkhông bắt buộc | string | null | Optional: at most 100 letters, digits and . _ : / # -, starting with a letter or digit; blank or null for none. |
SupportRequestPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<SupportRequest> | |
next_cursorbắt buộc | string | null | The next page's |
SupportRequestUpdate
object
A status, a reply, or both.
| Tên | Kiểu | Mô tả |
|---|---|---|
statuskhông bắt buộc | "open" | "in_progress" | "answered" | "closed" |
|
replykhông bắt buộc | string | null | Plain text; line breaks allowed; null or blank clears it. |
SupportRequestUser
object
The member who sent the request.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
emailbắt buộc | string | |
display_namebắt buộc | string | null |
Tenant
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | |
namebắt buộc | string | |
sourcebắt buộc | "manual" | "backfill" | |
created_atbắt buộc | number | Unix seconds. |
membersbắt buộc | integer | SELF-1-3 (#184): how many people hold an active membership of the tenant (each counted once); SELF-1-4 (#185): a membership the company turned off does not count. |
adminsbắt buộc | integer | SELF-1-3 (#184): how many of them are active company admins whose account is active (SELF-1-4, #185). |
offboardingbắt buộc | CompanyOffboarding | SELF-2-4 (#193): whether the company is leaving CropPath. |
platformkhông bắt buộc | boolean | #282: present only with listTenants |
TenantAdmin
object
| Tên | Kiểu | Mô tả |
|---|---|---|
user_idbắt buộc | integer | |
emailbắt buộc | string | The email the admin signs in with. |
display_namebắt buộc | string | null | |
statusbắt buộc | "active" | "disabled" |
TenantAdminList
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<TenantAdmin> |
TenantCreate
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | |
namebắt buộc | string |
TenantPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<Tenant> | |
next_cursorbắt buộc | string | null | Pass as |
TrustReason
object
A machine-readable explanation: a stable code and its parameters, no prose.
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | A stable reason code of the trust engine (trust.Code). |
paramsbắt buộc | map<string, string | integer> |
TrustTier
"self_declared" | "device_recorded" | "cross_checked" | "lab_verified"
Trust tiers, lowest first.
TwoFactorCode
object
| Tên | Kiểu | Mô tả |
|---|---|---|
codebắt buộc | string | The 6-digit code the app shows now. |
TwoFactorDisable
object
| Tên | Kiểu | Mô tả |
|---|---|---|
passwordbắt buộc | string | |
codekhông bắt buộc | string | The 6-digit code from the app; or send |
backup_codekhông bắt buộc | string | |
set_up_againkhông bắt buộc | boolean | Turning it off to set the app up again at once (a new phone): allowed even when the account must use two-step sign-in. |
TwoFactorReset
object
| Tên | Kiểu | Mô tả |
|---|---|---|
reasonkhông bắt buộc | string | Required from a platform admin (CropPath support): one line, kept in the company's activity log. Ignored for a company admin. |
TwoFactorResetResult
object
| Tên | Kiểu | Mô tả |
|---|---|---|
user_idbắt buộc | integer | |
two_factorbắt buộc | false | |
sessions_revokedbắt buộc | integer | The member's sessions ended by the reset. |
TwoFactorSetup
object
SELF-1-6 (#187). A new secret for the authenticator app, in this response only: show otpauth_uri as a QR code (never log it or send it anywhere else) and secret as text to type in.
| Tên | Kiểu | Mô tả |
|---|---|---|
secretbắt buộc | string | 160 random bits in base32 (RFC 4648, no padding). |
otpauth_uribắt buộc | string | otpauth://totp/CropPath:<email>?secret=...&issuer=CropPath |
issuerbắt buộc | "CropPath" | |
accountbắt buộc | string | |
digitsbắt buộc | 6 | |
periodbắt buộc | 30 |
TwoFactorState
object
SELF-1-6 (#187). The signed-in user's own two-step sign-in. Never the secret or a code.
| Tên | Kiểu | Mô tả |
|---|---|---|
enabledbắt buộc | boolean | The authenticator app is on for this account. |
backup_codes_leftbắt buộc | integer | Unused backup codes (0 when the app is off). |
verifiedbắt buộc | boolean | This session proved a second factor (a code at sign-in, at re-authentication or when the app was turned on). |
requiredbắt buộc | boolean | This account must use two-step sign-in when acting for the selected company (a platform admin; a company admin after the deadline; a member of a company that requires it). When it is true and |
deadlinebắt buộc | number | null | For a company admin before the deadline: the Unix time from which two-step sign-in is required (the console prompts until then); null otherwise. |
UiTelemetryBeacon
object
A browser beacon (#81): a page kind, the page's Core Web Vitals in the browser's units and the uncaught errors it saw. At least one measure or error. No URL, id, message or stack.
| Tên | Kiểu | Mô tả |
|---|---|---|
pagebắt buộc | "landing" | "lot" | "fruit" | "fruit_results" | "privacy" | "accessibility" | "staff" | "other" | The kind of page, never its URL. |
lcp_mskhông bắt buộc | number | Largest Contentful Paint, milliseconds. |
clskhông bắt buộc | number | Cumulative Layout Shift (largest session window). |
inp_mskhông bắt buộc | number | Interaction to Next Paint, milliseconds. |
errorskhông bắt buộc | array<object> |
User
object
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
emailbắt buộc | string | |
display_namebắt buộc | string | null |
VerdictCounts
object
SENS-B1e (#235): how many positions of the device got each geofence verdict in the range.
| Tên | Kiểu | Mô tả |
|---|---|---|
insidebắt buộc | integer | |
nearbắt buộc | integer | |
outsidebắt buộc | integer | |
ambiguousbắt buộc | integer | |
unverifiablebắt buộc | integer | |
no_positionbắt buộc | integer | |
no_polygonbắt buộc | integer |
VerdictMap
object
SENS-B1e (#235): the growing area's devices with their geofence verdicts over a range of reception times.
| Tên | Kiểu | Mô tả |
|---|---|---|
growing_areabắt buộc | string | |
frombắt buộc | number | Start of the range of reception times, Unix seconds. |
tobắt buộc | number | End of the range (included), Unix seconds. |
coordinates_shownbắt buộc | boolean | Whether the install points and judged positions are given to this caller. |
truncatedbắt buộc | boolean | True when more than 500 devices matched: the rest, by device id, were left out. |
devicesbắt buộc | array<VerdictMapDevice> | Ordered by device id. |
polygonkhông bắt buộc | GeoJsonPolygon | null | The area's boundary, present only for the owning tenant_admin and platform_admin (as the growing-area read); null: no boundary. |
VerdictMapDevice
object
SENS-B1e (#235): one device of the caller's company bound to the area or judged against it in the range.
| Tên | Kiểu | Mô tả |
|---|---|---|
device_idbắt buộc | string | |
profilebắt buộc | string | |
placementbắt buộc | VerdictMapPlacement | null | Null for a device without a placement. |
verdict_countsbắt buộc | VerdictCounts | |
latest_verdictbắt buộc | GeofenceVerdict | null | |
latest_verdict_atbắt buộc | number | null | When ingest judged the latest position (its reception). |
latest_positionkhông bắt buộc | JudgedPosition | null | Present only when |
VerdictMapPlacement
object
SENS-B1e (#235): the device's current placement version.
| Tên | Kiểu | Mô tả |
|---|---|---|
versionbắt buộc | integer | |
mobilitybắt buộc | "fixed" | "mobile" | |
growing_areabắt buộc | string | null | The area the version binds the device to. |
bound_herebắt buộc | boolean | The version is an installation bound to this area. |
depth_cmbắt buộc | number | null | |
installed_atbắt buộc | number | null | |
removed_atbắt buộc | number | null | Set when the current version is a removal. |
install_pointkhông bắt buộc | MapPoint | null | Present only when |
Volume
object
| Tên | Kiểu | Mô tả |
|---|---|---|
growing_areabắt buộc | string | |
seasonbắt buộc | string | |
declared_kgbắt buộc | number | |
cap_kgbắt buộc | number | null | area_ha times yield_kg_per_ha; null when the growing area is unknown or is a tenant-created area not yet approved by a platform admin. |
WebhookDelivery
object
One delivery of one event to the subscription: pending (attempted at next_attempt_at), delivered (a 2xx answer) or failed (12 attempts over about 21 hours, or the subscription was disabled). Unix seconds.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
subscription_idbắt buộc | integer | |
event_idbắt buộc | string | The |
event_typebắt buộc | WebhookEventType | |
statusbắt buộc | "pending" | "delivered" | "failed" | |
attemptsbắt buộc | integer | Since the delivery was queued or redelivered. |
next_attempt_atbắt buộc | number | null | |
last_attempt_atbắt buộc | number | null | |
last_statusbắt buộc | integer | null | The last attempt's HTTP status; null: none. |
last_errorbắt buộc | string | null | Why the last attempt failed: |
created_atbắt buộc | number | |
delivered_atbắt buộc | number | null |
WebhookDeliveryPage
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<WebhookDelivery> | |
next_cursorbắt buộc | string | null | The next page's |
WebhookEventLabResultRecorded
object
The body of a lab_result.recorded delivery (compact JSON, UTF-8).
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | Equals |
typebắt buộc | "lab_result.recorded" | |
created_atbắt buộc | string (date-time) | UTC, ISO 8601 with milliseconds. |
tenantbắt buộc | string | |
databắt buộc | WebhookLabResultRecordedData |
WebhookEventLotRecalled
object
The body of a lot.recalled delivery (compact JSON, UTF-8).
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | Equals |
typebắt buộc | "lot.recalled" | |
created_atbắt buộc | string (date-time) | UTC, ISO 8601 with milliseconds. |
tenantbắt buộc | string | |
databắt buộc | WebhookLotRecalledData |
WebhookEventLotSealed
object
The body of a lot.sealed delivery (compact JSON, UTF-8).
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | Equals |
typebắt buộc | "lot.sealed" | |
created_atbắt buộc | string (date-time) | UTC, ISO 8601 with milliseconds. |
tenantbắt buộc | string | |
databắt buộc | WebhookLotSealedData |
WebhookEventLotTrustTierChanged
object
The body of a lot.trust_tier_changed delivery (compact JSON, UTF-8).
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | Equals |
typebắt buộc | "lot.trust_tier_changed" | |
created_atbắt buộc | string (date-time) | UTC, ISO 8601 with milliseconds. |
tenantbắt buộc | string | |
databắt buộc | WebhookTrustTierChangedData |
WebhookEventLotWithdrawn
object
The body of a lot.withdrawn delivery (compact JSON, UTF-8).
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | Equals |
typebắt buộc | "lot.withdrawn" | |
created_atbắt buộc | string (date-time) | UTC, ISO 8601 with milliseconds. |
tenantbắt buộc | string | |
databắt buộc | WebhookLotRecalledData |
WebhookEventReportFiled
object
The body of a report.filed delivery (compact JSON, UTF-8).
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | Equals |
typebắt buộc | "report.filed" | |
created_atbắt buộc | string (date-time) | UTC, ISO 8601 with milliseconds. |
tenantbắt buộc | string | |
databắt buộc | WebhookReportFiledData |
WebhookEventShipmentDeparted
object
The body of a shipment.departed delivery (compact JSON, UTF-8).
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | string | Equals |
typebắt buộc | "shipment.departed" | |
created_atbắt buộc | string (date-time) | UTC, ISO 8601 with milliseconds. |
tenantbắt buộc | string | |
databắt buộc | WebhookShipmentDepartedData |
WebhookEventType
"lot.sealed" | "lot.recalled" | "lot.withdrawn" | "lab_result.recorded" | "shipment.departed" | "lot.trust_tier_changed" | "report.filed"
An event a subscription can take: lot.sealed (a lot closed and signed), lot.recalled and lot.withdrawn (a recall or withdrawal), lab_result.recorded (a lab report stored, from the lab's signature or its portal), shipment.departed (the ship event), lot.trust_tier_changed (the displayed trust tier of a lot moved) and report.filed (a public mismatch report on one of the tenant's fruits).
WebhookLabResultRecordedData
object
lab_result.recorded: a lab report of the lot's sampling was stored; passed is the verdict against the market's limits (the values are read through the API).
| Tên | Kiểu | Mô tả |
|---|---|---|
lotbắt buộc | string | |
sampling_idbắt buộc | integer | |
labbắt buộc | string | |
report_nobắt buộc | string | |
marketbắt buộc | string | |
signed_atbắt buộc | string (date-time) | UTC, ISO 8601 with milliseconds. |
passedbắt buộc | boolean |
WebhookLotRecalledData
object
lot.recalled and lot.withdrawn: the lot's recall or withdrawal (P5). The staff note never appears.
| Tên | Kiểu | Mô tả |
|---|---|---|
lotbắt buộc | string | |
public_idbắt buộc | string | The lot's public id (its QR record). |
kindbắt buộc | "recall" | "withdrawal" | |
reasonbắt buộc | "contamination" | "pathogen" | "foreign_matter" | "labelling" | "quality" | "regulatory" | "traceability" | "other" | |
scopebắt buộc | "consumer" | "retail" | "wholesale" | |
recalled_atbắt buộc | string (date-time) | UTC, ISO 8601 with milliseconds. |
cartonsbắt buộc | integer | |
shipmentsbắt buộc | integer |
WebhookLotSealedData
object
lot.sealed: the lot was closed and its manifest signed (L10).
| Tên | Kiểu | Mô tả |
|---|---|---|
lotbắt buộc | string | |
public_idbắt buộc | string | The lot's public id (its QR record). |
facilitybắt buộc | string | |
sealed_atbắt buộc | string (date-time) | UTC, ISO 8601 with milliseconds. |
manifest_sha256bắt buộc | string | |
fruit_countbắt buộc | integer | |
event_countbắt buộc | integer |
WebhookReportFiledData
object
report.filed: a consumer filed a mismatch report on one of the lot's fruits (X5). The note and the contact never appear.
| Tên | Kiểu | Mô tả |
|---|---|---|
report_idbắt buộc | integer | |
lotbắt buộc | string | |
fruitbắt buộc | string | |
categorybắt buộc | "label_peeled" | "scanned_many" | "ripeness_off" | "other" | |
filed_atbắt buộc | string (date-time) | UTC, ISO 8601 with milliseconds. |
WebhookSecret
object
The subscription and, in secret, its signing secret: this response is the only place it appears (Standard Webhooks format: whsec_ + base64 of 32 random bytes; the HMAC key is the decoded bytes). Store it now; a lost secret is rotated.
| Tên | Kiểu | Mô tả |
|---|---|---|
subscriptionbắt buộc | WebhookSubscription | |
secretbắt buộc | string |
WebhookShipmentDepartedData
object
shipment.departed: the shipment left its facility; its lots are shipped.
| Tên | Kiểu | Mô tả |
|---|---|---|
shipmentbắt buộc | string | |
facilitybắt buộc | string | |
containerbắt buộc | string | |
border_gatebắt buộc | string | |
destinationbắt buộc | string | |
departed_atbắt buộc | string (date-time) | UTC, ISO 8601 with milliseconds. |
lotsbắt buộc | array<string> |
WebhookSubscription
object
A webhook subscription of the tenant: never its secret (stored encrypted, shown once by create and by rotate-secret). Unix seconds.
| Tên | Kiểu | Mô tả |
|---|---|---|
idbắt buộc | integer | |
urlbắt buộc | string | The endpoint: https only, no credentials, no fragment; every address its host resolves to is public (checked when set and again at every delivery). |
descriptionbắt buộc | string | |
event_typesbắt buộc | array<WebhookEventType> | |
statusbắt buộc | "active" | "disabled" | Only an active subscription takes new events and is delivered to. |
disabled_reasonbắt buộc | "manual" | "failures" | null |
|
disabled_atbắt buộc | number | null | |
consecutive_failuresbắt buộc | integer | Failed delivery attempts since the last success. |
created_bybắt buộc | string | |
created_atbắt buộc | number | |
updated_atbắt buộc | number |
WebhookSubscriptionCreate
object
A tenant holds at most 20 subscriptions. The secret is generated by the server.
| Tên | Kiểu | Mô tả |
|---|---|---|
urlbắt buộc | string | |
event_typesbắt buộc | array<WebhookEventType> | |
descriptionkhông bắt buộc | string | null | One line. |
WebhookSubscriptionList
object
| Tên | Kiểu | Mô tả |
|---|---|---|
itemsbắt buộc | array<WebhookSubscription> |
WebhookSubscriptionUpdate
object
At least one field. enabled: false disables the subscription (manual) and fails its pending deliveries (subscription_disabled); enabled: true makes it active again with no failures counted.
| Tên | Kiểu | Mô tả |
|---|---|---|
urlkhông bắt buộc | string | |
event_typeskhông bắt buộc | array<WebhookEventType> | |
descriptionkhông bắt buộc | string | null | |
enabledkhông bắt buộc | boolean |
WebhookTrustTierChangedData
object
lot.trust_tier_changed: a recompute moved the lot's displayed trust tier (ADR 0001; a hold drops it to self_declared, its resolution restores at most the sealed tier). Not sent for a lot's first snapshot.